typedef unsigned char   undefined;

typedef unsigned char    bool;
typedef unsigned char    byte;
typedef unsigned int    dword;
float10
float16
float2
typedef pointer32 ImageBaseOffset32;

typedef long double    longdouble;
typedef long long    longlong;
typedef unsigned long long    qword;
typedef int    sdword;
typedef long long    sqword;
typedef unsigned char    uchar;
typedef unsigned int    uint;
typedef unsigned long    ulong;
typedef unsigned long long    ulonglong;
typedef unsigned char    undefined1;
typedef unsigned short    undefined2;
typedef unsigned int    undefined4;
typedef unsigned long long    undefined8;
typedef unsigned short    ushort;
typedef unsigned short    wchar16;
typedef unsigned int    wchar32;
typedef short    wchar_t;
typedef unsigned short    word;
typedef struct __gnu_cxx __gnu_cxx, *P__gnu_cxx;

struct __gnu_cxx { // PlaceHolder Class Structure
};

typedef struct tagMSG tagMSG, *PtagMSG;

typedef struct tagMSG MSG;

typedef struct HWND__ HWND__, *PHWND__;

typedef struct HWND__ *HWND;

typedef uint UINT;

typedef ulonglong UINT_PTR;

typedef UINT_PTR WPARAM;

typedef longlong LONG_PTR;

typedef LONG_PTR LPARAM;

typedef ulong DWORD;

typedef struct tagPOINT tagPOINT, *PtagPOINT;

typedef struct tagPOINT POINT;

typedef long LONG;

struct tagPOINT {
    LONG x;
    LONG y;
};

struct tagMSG {
    HWND hwnd;
    UINT message;
    WPARAM wParam;
    LPARAM lParam;
    DWORD time;
    POINT pt;
};

struct HWND__ {
    int unused;
};

typedef LONG_PTR LRESULT;

typedef LRESULT (*WNDPROC)(HWND, UINT, WPARAM, LPARAM);

typedef struct tagMSG *LPMSG;

typedef struct tagWNDCLASSEXW tagWNDCLASSEXW, *PtagWNDCLASSEXW;

typedef struct tagWNDCLASSEXW WNDCLASSEXW;

typedef struct HINSTANCE__ HINSTANCE__, *PHINSTANCE__;

typedef struct HINSTANCE__ *HINSTANCE;

typedef struct HICON__ HICON__, *PHICON__;

typedef struct HICON__ *HICON;

typedef HICON HCURSOR;

typedef struct HBRUSH__ HBRUSH__, *PHBRUSH__;

typedef struct HBRUSH__ *HBRUSH;

typedef wchar_t WCHAR;

typedef WCHAR *LPCWSTR;

struct HBRUSH__ {
    int unused;
};

struct HICON__ {
    int unused;
};

struct HINSTANCE__ {
    int unused;
};

struct tagWNDCLASSEXW {
    UINT cbSize;
    UINT style;
    WNDPROC lpfnWndProc;
    int cbClsExtra;
    int cbWndExtra;
    HINSTANCE hInstance;
    HICON hIcon;
    HCURSOR hCursor;
    HBRUSH hbrBackground;
    LPCWSTR lpszMenuName;
    LPCWSTR lpszClassName;
    HICON hIconSm;
};

typedef void (*TIMERPROC)(HWND, UINT, UINT_PTR, DWORD);

typedef struct __facet_shims __facet_shims, *P__facet_shims;

struct __facet_shims { // PlaceHolder Class Structure
};

typedef struct random_device random_device, *Prandom_device;

struct random_device { // PlaceHolder Class Structure
};

typedef struct istreambuf_iterator<char,std::char_traits<char>> istreambuf_iterator<char,std::char_traits<char>>, *Pistreambuf_iterator<char,std::char_traits<char>>;

struct istreambuf_iterator<char,std::char_traits<char>> { // PlaceHolder Class Structure
};

typedef struct istreambuf_iterator<wchar_t,std::char_traits<wchar_t>> istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>, *Pistreambuf_iterator<wchar_t,std::char_traits<wchar_t>>;

struct istreambuf_iterator<wchar_t,std::char_traits<wchar_t>> { // PlaceHolder Class Structure
};

typedef struct _Rep _Rep, *P_Rep;

struct _Rep { // PlaceHolder Class Structure
};

typedef struct _GUID _GUID, *P_GUID;

typedef struct _GUID GUID;

struct _GUID {
    ulong Data1;
    ushort Data2;
    ushort Data3;
    uchar Data4[8];
};

typedef GUID IID;

typedef uint ULONG;

typedef ushort wint_t;

typedef ushort WORD;

typedef ulonglong ULONGLONG;

typedef char CHAR;

typedef ulonglong size_t;

typedef int WINBOOL;

typedef int errno_t;

typedef qword DWORD64;

typedef uint ULong;

typedef uchar BYTE;

typedef sdword int32_t;

typedef dword uint32_t;


// WARNING! conflicting data type names: /DWARF/DWORD - /WinDef.h/DWORD

typedef ulonglong uintptr_t;

typedef ulonglong ULONG_PTR;

typedef longlong ptrdiff_t;

typedef float2 _Float16;

typedef sqword int64_t;

typedef ushort UShort;

typedef longlong ssize_t;

typedef float2 __bf16;

typedef longlong INT_PTR;

typedef int mbstate_t;

typedef char _TCHAR;


// WARNING! conflicting data type names: /DWARF/LONG - /winnt.h/LONG

typedef longlong LONGLONG;

typedef int BOOL;

typedef ushort wctype_t;

typedef struct _exception _exception, *P_exception;

typedef int (*fUserMathErr)(struct _exception *);

struct _exception {
    int type;
    char *name;
    double arg1;
    double arg2;
    double retval;
};

typedef struct _RTL_CRITICAL_SECTION _RTL_CRITICAL_SECTION, *P_RTL_CRITICAL_SECTION;

typedef struct _RTL_CRITICAL_SECTION RTL_CRITICAL_SECTION;

typedef RTL_CRITICAL_SECTION CRITICAL_SECTION;

typedef struct _RTL_CRITICAL_SECTION_DEBUG _RTL_CRITICAL_SECTION_DEBUG, *P_RTL_CRITICAL_SECTION_DEBUG;

typedef struct _RTL_CRITICAL_SECTION_DEBUG *PRTL_CRITICAL_SECTION_DEBUG;

typedef void *HANDLE;

typedef struct _LIST_ENTRY _LIST_ENTRY, *P_LIST_ENTRY;

typedef struct _LIST_ENTRY LIST_ENTRY;

struct _RTL_CRITICAL_SECTION {
    PRTL_CRITICAL_SECTION_DEBUG DebugInfo;
    LONG LockCount;
    LONG RecursionCount;
    HANDLE OwningThread;
    HANDLE LockSemaphore;
    ULONG_PTR SpinCount;
};

struct _LIST_ENTRY {
    struct _LIST_ENTRY *Flink;
    struct _LIST_ENTRY *Blink;
};

struct _RTL_CRITICAL_SECTION_DEBUG {
    WORD Type;
    WORD CreatorBackTraceIndex;
    struct _RTL_CRITICAL_SECTION *CriticalSection;
    LIST_ENTRY ProcessLocksList;
    DWORD EntryCount;
    DWORD ContentionCount;
    DWORD Flags;
    WORD CreatorBackTraceIndexHigh;
    WORD SpareWORD;
};

typedef struct _RTL_CRITICAL_SECTION *PRTL_CRITICAL_SECTION;

typedef PRTL_CRITICAL_SECTION LPCRITICAL_SECTION;

typedef struct _tagpropertykey _tagpropertykey, *P_tagpropertykey;

struct _tagpropertykey {
    GUID fmtid;
    DWORD pid;
};

typedef struct _tagpropertykey PROPERTYKEY;

typedef enum VARENUM {
    VT_EMPTY=0,
    VT_NULL=1,
    VT_I2=2,
    VT_I4=3,
    VT_R4=4,
    VT_R8=5,
    VT_CY=6,
    VT_DATE=7,
    VT_BSTR=8,
    VT_DISPATCH=9,
    VT_ERROR=10,
    VT_BOOL=11,
    VT_VARIANT=12,
    VT_UNKNOWN=13,
    VT_DECIMAL=14,
    VT_I1=16,
    VT_UI1=17,
    VT_UI2=18,
    VT_UI4=19,
    VT_I8=20,
    VT_UI8=21,
    VT_INT=22,
    VT_UINT=23,
    VT_VOID=24,
    VT_HRESULT=25,
    VT_PTR=26,
    VT_SAFEARRAY=27,
    VT_CARRAY=28,
    VT_USERDEFINED=29,
    VT_LPSTR=30,
    VT_LPWSTR=31,
    VT_RECORD=36,
    VT_INT_PTR=37,
    VT_UINT_PTR=38,
    VT_FILETIME=64,
    VT_BLOB=65,
    VT_STREAM=66,
    VT_STORAGE=67,
    VT_STREAMED_OBJECT=68,
    VT_STORED_OBJECT=69,
    VT_BLOB_OBJECT=70,
    VT_CF=71,
    VT_CLSID=72,
    VT_VERSIONED_STREAM=73,
    VT_BSTR_BLOB=4095,
    VT_ILLEGALMASKED=4095,
    VT_TYPEMASK=4095,
    VT_VECTOR=4096,
    VT_ARRAY=8192,
    VT_BYREF=16384,
    VT_RESERVED=32768,
    VT_ILLEGAL=65535
} VARENUM;

typedef union __mingw_dbl_type_t __mingw_dbl_type_t, *P__mingw_dbl_type_t;

typedef struct anon_struct_8_2_19ee64c9_for_lh anon_struct_8_2_19ee64c9_for_lh, *Panon_struct_8_2_19ee64c9_for_lh;

struct anon_struct_8_2_19ee64c9_for_lh {
    uint low;
    uint high;
};

union __mingw_dbl_type_t {
    double x;
    ulonglong val;
    struct anon_struct_8_2_19ee64c9_for_lh lh;
};

typedef union __mingw_ldbl_type_t __mingw_ldbl_type_t, *P__mingw_ldbl_type_t;

typedef struct anon_struct_16_5_a4d538a0_for_lh anon_struct_16_5_a4d538a0_for_lh, *Panon_struct_16_5_a4d538a0_for_lh;

struct anon_struct_16_5_a4d538a0_for_lh {
    uint low;
    uint high;
    int sign_exponent:16;
    int res1:16;
    int res0:32;
};

union __mingw_ldbl_type_t {
    long double x;
    struct anon_struct_16_5_a4d538a0_for_lh lh;
};

typedef struct __mingwthr_key __mingwthr_key, *P__mingwthr_key;

typedef struct __mingwthr_key __mingwthr_key_t;

struct __mingwthr_key {
    DWORD key;
    void (*dtor)(void *);
    __mingwthr_key_t *next;
};

typedef char *__gnuc_va_list;

typedef __gnuc_va_list va_list;

typedef void (*func_ptr)(void);

typedef struct _TEB _TEB, *P_TEB;

struct _TEB {
};

typedef struct lconv lconv, *Plconv;

struct lconv {
    char *decimal_point;
    char *thousands_sep;
    char *grouping;
    char *int_curr_symbol;
    char *currency_symbol;
    char *mon_decimal_point;
    char *mon_thousands_sep;
    char *mon_grouping;
    char *positive_sign;
    char *negative_sign;
    char int_frac_digits;
    char frac_digits;
    char p_cs_precedes;
    char p_sep_by_space;
    char n_cs_precedes;
    char n_sep_by_space;
    char p_sign_posn;
    char n_sign_posn;
    wchar_t *_W_decimal_point;
    wchar_t *_W_thousands_sep;
    wchar_t *_W_int_curr_symbol;
    wchar_t *_W_currency_symbol;
    wchar_t *_W_mon_decimal_point;
    wchar_t *_W_mon_thousands_sep;
    wchar_t *_W_positive_sign;
    wchar_t *_W_negative_sign;
};

typedef struct runtime_pseudo_reloc_v2 runtime_pseudo_reloc_v2, *Pruntime_pseudo_reloc_v2;

struct runtime_pseudo_reloc_v2 {
    DWORD magic1;
    DWORD magic2;
    DWORD version;
};

typedef struct runtime_pseudo_reloc_item_v2 runtime_pseudo_reloc_item_v2, *Pruntime_pseudo_reloc_item_v2;

struct runtime_pseudo_reloc_item_v2 {
    DWORD sym;
    DWORD target;
    DWORD flags;
};

typedef struct runtime_pseudo_reloc_item_v1 runtime_pseudo_reloc_item_v1, *Pruntime_pseudo_reloc_item_v1;

struct runtime_pseudo_reloc_item_v1 {
    DWORD addend;
    DWORD target;
};

typedef struct sSecInfo sSecInfo, *PsSecInfo;

typedef void *PVOID;

typedef ULONG_PTR SIZE_T;

typedef BYTE *PBYTE;

typedef struct _IMAGE_SECTION_HEADER _IMAGE_SECTION_HEADER, *P_IMAGE_SECTION_HEADER;

typedef struct _IMAGE_SECTION_HEADER *PIMAGE_SECTION_HEADER;

typedef union anon_union_4_2_d8da8690_for_Misc anon_union_4_2_d8da8690_for_Misc, *Panon_union_4_2_d8da8690_for_Misc;

union anon_union_4_2_d8da8690_for_Misc {
    DWORD PhysicalAddress;
    DWORD VirtualSize;
};

struct sSecInfo {
    DWORD old_protect;
    PVOID base_address;
    SIZE_T region_size;
    PBYTE sec_start;
    PIMAGE_SECTION_HEADER hash;
};

struct _IMAGE_SECTION_HEADER {
    BYTE Name[8];
    union anon_union_4_2_d8da8690_for_Misc Misc;
    DWORD VirtualAddress;
    DWORD SizeOfRawData;
    DWORD PointerToRawData;
    DWORD PointerToRelocations;
    DWORD PointerToLinenumbers;
    WORD NumberOfRelocations;
    WORD NumberOfLinenumbers;
    DWORD Characteristics;
};

typedef struct _iobuf _iobuf, *P_iobuf;

typedef struct _iobuf FILE;

typedef FILE * (*_f__acrt_iob_func)(uint);

struct _iobuf {
    char *_ptr;
    int _cnt;
    char *_base;
    int _flag;
    int _file;
    int _charbuf;
    int _bufsiz;
    char *_tmpfname;
};

typedef ULONG_PTR DWORD_PTR;

typedef union __pformat_fpreg_t __pformat_fpreg_t, *P__pformat_fpreg_t;

typedef struct anon_struct_16_2_b02704d6_for___pformat_fpreg_t_2 anon_struct_16_2_b02704d6_for___pformat_fpreg_t_2, *Panon_struct_16_2_b02704d6_for___pformat_fpreg_t_2;

struct anon_struct_16_2_b02704d6_for___pformat_fpreg_t_2 {
    ulonglong __pformat_fpreg_mantissa;
    short __pformat_fpreg_exponent;
};

union __pformat_fpreg_t {
    double __pformat_fpreg_double_t;
    long double __pformat_fpreg_ldouble_t;
    struct anon_struct_16_2_b02704d6_for___pformat_fpreg_t_2 field_2;
    wchar_t __pformat_fpreg_bitmap[5];
    ulong __pformat_fpreg_bits;
};

typedef enum __pformat_length_t {
    PFORMAT_LENGTH_INT=0,
    PFORMAT_LENGTH_SHORT=1,
    PFORMAT_LENGTH_LONG=2,
    PFORMAT_LENGTH_LLONG=3,
    PFORMAT_LENGTH_LLONG128=4,
    PFORMAT_LENGTH_CHAR=5
} __pformat_length_t;

typedef union __pformat_intarg_t __pformat_intarg_t, *P__pformat_intarg_t;

typedef union __uI128 __uI128, *P__uI128;

typedef struct __tI128 __tI128, *P__tI128;

typedef struct __tI128_2 __tI128_2, *P__tI128_2;

struct __tI128 {
    int64_t digits[2];
};

struct __tI128_2 {
    uint32_t digits32[4];
};

union __uI128 {
    struct __tI128 t128;
    struct __tI128_2 t128_2;
};

union __pformat_intarg_t {
    long __pformat_long_t;
    longlong __pformat_llong_t;
    ulong __pformat_ulong_t;
    ulonglong __pformat_ullong_t;
    wchar_t __pformat_ushort_t;
    uchar __pformat_uchar_t;
    short __pformat_short_t;
    char __pformat_char_t;
    void *__pformat_ptr_t;
    union __uI128 __pformat_u128_t;
};

typedef struct __pformat_t __pformat_t, *P__pformat_t;

struct __pformat_t {
    void *dest;
    int flags;
    int width;
    int precision;
    int rplen;
    wchar_t rpchr;
    int thousands_chr_len;
    wchar_t thousands_chr;
    int count;
    int quota;
    int expmin;
};

typedef enum __pformat_state_t {
    PFORMAT_INIT=0,
    PFORMAT_SET_WIDTH=1,
    PFORMAT_GET_PRECISION=2,
    PFORMAT_SET_PRECISION=3,
    PFORMAT_END=4
} __pformat_state_t;

typedef void (*__p_sig_fn_t)(int);

typedef struct __Bigint __Bigint, *P__Bigint;

struct __Bigint {
    struct __Bigint *next;
    int k;
    int maxwds;
    int sign;
    int wds;
    ULong x[1];
};

typedef union _dbl_union _dbl_union, *P_dbl_union;

typedef union _dbl_union dbl_union;

union _dbl_union {
    double d;
    ULong L[2];
};

typedef int (*_onexit_t)(void);

typedef void (*_invalid_parameter_handler)(wchar_t *, wchar_t *, wchar_t *, uint, uintptr_t);

typedef struct _STARTUPINFOA _STARTUPINFOA, *P_STARTUPINFOA;

typedef CHAR *LPSTR;

typedef BYTE *LPBYTE;

struct _STARTUPINFOA {
    DWORD cb;
    LPSTR lpReserved;
    LPSTR lpDesktop;
    LPSTR lpTitle;
    DWORD dwX;
    DWORD dwY;
    DWORD dwXSize;
    DWORD dwYSize;
    DWORD dwXCountChars;
    DWORD dwYCountChars;
    DWORD dwFillAttribute;
    DWORD dwFlags;
    WORD wShowWindow;
    WORD cbReserved2;
    LPBYTE lpReserved2;
    HANDLE hStdInput;
    HANDLE hStdOutput;
    HANDLE hStdError;
};

typedef struct _STARTUPINFOA STARTUPINFOA;

typedef STARTUPINFOA STARTUPINFO;

typedef struct _STARTUPINFOA *LPSTARTUPINFOA;

typedef enum anon_enum_32 {
    D2D1_INTERPOLATION_MODE_DEFINITION_NEAREST_NEIGHBOR=0,
    FPI_Round_zero=0,
    STRTOG_Zero=0,
    D2D1_INTERPOLATION_MODE_DEFINITION_LINEAR=1,
    FPI_Round_near=1,
    STRTOG_Normal=1,
    D2D1_INTERPOLATION_MODE_DEFINITION_CUBIC=2,
    FPI_Round_up=2,
    STRTOG_Denormal=2,
    D2D1_INTERPOLATION_MODE_DEFINITION_MULTI_SAMPLE_LINEAR=3,
    FPI_Round_down=3,
    STRTOG_Infinite=3,
    D2D1_INTERPOLATION_MODE_DEFINITION_ANISOTROPIC=4,
    STRTOG_NaN=4,
    D2D1_INTERPOLATION_MODE_DEFINITION_HIGH_QUALITY_CUBIC=5,
    STRTOG_NaNbits=5,
    D2D1_INTERPOLATION_MODE_DEFINITION_FANT=6,
    STRTOG_NoNumber=6,
    D2D1_INTERPOLATION_MODE_DEFINITION_MIPMAP_LINEAR=7,
    STRTOG_Retmask=7,
    STRTOG_Neg=8,
    STRTOG_Inexlo=16,
    STRTOG_Inexhi=32,
    STRTOG_Inexact=48,
    STRTOG_Underflow=64,
    STRTOG_Overflow=128
} anon_enum_32;

typedef enum D2D1_FACTORY_TYPE {
    D2D1_FACTORY_TYPE_SINGLE_THREADED=0,
    D2D1_FACTORY_TYPE_MULTI_THREADED=1,
    D2D1_FACTORY_TYPE_FORCE_DWORD=4294967295
} D2D1_FACTORY_TYPE;

typedef DWORD *PDWORD;

typedef INT_PTR (*FARPROC)(...);


// WARNING! conflicting data type names: /DWARF/minwindef.h/HINSTANCE - /WinDef.h/HINSTANCE

typedef void *LPCVOID;

typedef void *LPVOID;

typedef WINBOOL *LPBOOL;

typedef HINSTANCE HMODULE;


// WARNING! conflicting data type names: /DWARF/wchar.h/mbstate_t - /DWARF/mbstate_t

typedef struct _Mbstatet _Mbstatet, *P_Mbstatet;

struct _Mbstatet {
    ulong _Wchar;
    wchar_t _Byte;
    wchar_t _State;
};

typedef union anon_union_4_2_626584ff anon_union_4_2_626584ff, *Panon_union_4_2_626584ff;

union anon_union_4_2_626584ff {
    mbstate_t val;
    char mbcs[4];
};

typedef struct FPI FPI, *PFPI;

struct FPI {
    int nbits;
    int emin;
    int emax;
    int rounding;
    int sudden_underflow;
    int int_max;
};

typedef struct _startupinfo _startupinfo, *P_startupinfo;

struct _startupinfo {
    int newmode;
};

typedef enum __enative_startup_state {
    __uninitialized=0,
    __initializing=1,
    __initialized=2
} __enative_startup_state;

typedef GUID FMTID;

typedef union lD lD, *PlD;

union lD {
    UShort L[5];
    long double D;
};

typedef GUID CATID;

typedef struct _IMAGE_IMPORT_DESCRIPTOR _IMAGE_IMPORT_DESCRIPTOR, *P_IMAGE_IMPORT_DESCRIPTOR;

typedef struct _IMAGE_IMPORT_DESCRIPTOR IMAGE_IMPORT_DESCRIPTOR;

typedef union anon_union_4_2_b1ad5ba6_for__IMAGE_IMPORT_DESCRIPTOR_0 anon_union_4_2_b1ad5ba6_for__IMAGE_IMPORT_DESCRIPTOR_0, *Panon_union_4_2_b1ad5ba6_for__IMAGE_IMPORT_DESCRIPTOR_0;

union anon_union_4_2_b1ad5ba6_for__IMAGE_IMPORT_DESCRIPTOR_0 {
    DWORD Characteristics;
    DWORD OriginalFirstThunk;
};

struct _IMAGE_IMPORT_DESCRIPTOR {
    union anon_union_4_2_b1ad5ba6_for__IMAGE_IMPORT_DESCRIPTOR_0 field_0;
    DWORD TimeDateStamp;
    DWORD ForwarderChain;
    DWORD Name;
    DWORD FirstThunk;
};

typedef struct _MEMORY_BASIC_INFORMATION _MEMORY_BASIC_INFORMATION, *P_MEMORY_BASIC_INFORMATION;

struct _MEMORY_BASIC_INFORMATION {
    PVOID BaseAddress;
    PVOID AllocationBase;
    DWORD AllocationProtect;
    WORD PartitionId;
    SIZE_T RegionSize;
    DWORD State;
    DWORD Protect;
    DWORD Type;
};

typedef struct _EXCEPTION_RECORD _EXCEPTION_RECORD, *P_EXCEPTION_RECORD;

typedef struct _EXCEPTION_RECORD EXCEPTION_RECORD;

typedef EXCEPTION_RECORD *PEXCEPTION_RECORD;

struct _EXCEPTION_RECORD {
    DWORD ExceptionCode;
    DWORD ExceptionFlags;
    struct _EXCEPTION_RECORD *ExceptionRecord;
    PVOID ExceptionAddress;
    DWORD NumberParameters;
    ULONG_PTR ExceptionInformation[15];
};

typedef struct _IMAGE_DOS_HEADER _IMAGE_DOS_HEADER, *P_IMAGE_DOS_HEADER;

struct _IMAGE_DOS_HEADER {
    WORD e_magic;
    WORD e_cblp;
    WORD e_cp;
    WORD e_crlc;
    WORD e_cparhdr;
    WORD e_minalloc;
    WORD e_maxalloc;
    WORD e_ss;
    WORD e_sp;
    WORD e_csum;
    WORD e_ip;
    WORD e_cs;
    WORD e_lfarlc;
    WORD e_ovno;
    WORD e_res[4];
    WORD e_oemid;
    WORD e_oeminfo;
    WORD e_res2[10];
    LONG e_lfanew;
};

typedef enum JOB_OBJECT_NET_RATE_CONTROL_FLAGS {
    JOB_OBJECT_NET_RATE_CONTROL_ENABLE=1,
    JOB_OBJECT_NET_RATE_CONTROL_MAX_BANDWIDTH=2,
    JOB_OBJECT_NET_RATE_CONTROL_DSCP_TAG=4,
    JOB_OBJECT_NET_RATE_CONTROL_VALID_FLAGS=7
} JOB_OBJECT_NET_RATE_CONTROL_FLAGS;

typedef struct _MEMORY_BASIC_INFORMATION MEMORY_BASIC_INFORMATION;

typedef struct _EXCEPTION_REGISTRATION_RECORD _EXCEPTION_REGISTRATION_RECORD, *P_EXCEPTION_REGISTRATION_RECORD;

typedef union anon_union_8_2_30252521_for__EXCEPTION_REGISTRATION_RECORD_0 anon_union_8_2_30252521_for__EXCEPTION_REGISTRATION_RECORD_0, *Panon_union_8_2_30252521_for__EXCEPTION_REGISTRATION_RECORD_0;

typedef union anon_union_8_2_988ba941_for__EXCEPTION_REGISTRATION_RECORD_1 anon_union_8_2_988ba941_for__EXCEPTION_REGISTRATION_RECORD_1, *Panon_union_8_2_988ba941_for__EXCEPTION_REGISTRATION_RECORD_1;

typedef struct _CONTEXT _CONTEXT, *P_CONTEXT;

typedef int (*PEXCEPTION_ROUTINE)(struct _EXCEPTION_RECORD *, PVOID, struct _CONTEXT *, PVOID);

typedef union anon_union_512_3_a3503179_for__CONTEXT_38 anon_union_512_3_a3503179_for__CONTEXT_38, *Panon_union_512_3_a3503179_for__CONTEXT_38;

typedef struct _M128A _M128A, *P_M128A;

typedef struct _M128A M128A;

typedef struct _XMM_SAVE_AREA32 _XMM_SAVE_AREA32, *P_XMM_SAVE_AREA32;

typedef struct _XMM_SAVE_AREA32 XMM_SAVE_AREA32;

typedef struct anon_struct_416_18_1bcf7cc9_for_anon_union_512_3_a3503179_for__CONTEXT_38_2 anon_struct_416_18_1bcf7cc9_for_anon_union_512_3_a3503179_for__CONTEXT_38_2, *Panon_struct_416_18_1bcf7cc9_for_anon_union_512_3_a3503179_for__CONTEXT_38_2;

struct _M128A {
    ULONGLONG Low;
    LONGLONG High;
};

struct anon_struct_416_18_1bcf7cc9_for_anon_union_512_3_a3503179_for__CONTEXT_38_2 {
    M128A Header[2];
    M128A Legacy[8];
    M128A Xmm0;
    M128A Xmm1;
    M128A Xmm2;
    M128A Xmm3;
    M128A Xmm4;
    M128A Xmm5;
    M128A Xmm6;
    M128A Xmm7;
    M128A Xmm8;
    M128A Xmm9;
    M128A Xmm10;
    M128A Xmm11;
    M128A Xmm12;
    M128A Xmm13;
    M128A Xmm14;
    M128A Xmm15;
};

struct _XMM_SAVE_AREA32 {
    WORD ControlWord;
    WORD StatusWord;
    BYTE TagWord;
    BYTE Reserved1;
    WORD ErrorOpcode;
    DWORD ErrorOffset;
    WORD ErrorSelector;
    WORD Reserved2;
    DWORD DataOffset;
    WORD DataSelector;
    WORD Reserved3;
    DWORD MxCsr;
    DWORD MxCsr_Mask;
    M128A FloatRegisters[8];
    M128A XmmRegisters[16];
    BYTE Reserved4[96];
};

union anon_union_512_3_a3503179_for__CONTEXT_38 {
    XMM_SAVE_AREA32 FltSave;
    XMM_SAVE_AREA32 FloatSave;
    struct anon_struct_416_18_1bcf7cc9_for_anon_union_512_3_a3503179_for__CONTEXT_38_2 field_2;
};

struct _CONTEXT {
    DWORD64 P1Home;
    DWORD64 P2Home;
    DWORD64 P3Home;
    DWORD64 P4Home;
    DWORD64 P5Home;
    DWORD64 P6Home;
    DWORD ContextFlags;
    DWORD MxCsr;
    WORD SegCs;
    WORD SegDs;
    WORD SegEs;
    WORD SegFs;
    WORD SegGs;
    WORD SegSs;
    DWORD EFlags;
    DWORD64 Dr0;
    DWORD64 Dr1;
    DWORD64 Dr2;
    DWORD64 Dr3;
    DWORD64 Dr6;
    DWORD64 Dr7;
    DWORD64 Rax;
    DWORD64 Rcx;
    DWORD64 Rdx;
    DWORD64 Rbx;
    DWORD64 Rsp;
    DWORD64 Rbp;
    DWORD64 Rsi;
    DWORD64 Rdi;
    DWORD64 R8;
    DWORD64 R9;
    DWORD64 R10;
    DWORD64 R11;
    DWORD64 R12;
    DWORD64 R13;
    DWORD64 R14;
    DWORD64 R15;
    DWORD64 Rip;
    union anon_union_512_3_a3503179_for__CONTEXT_38 field_38;
    M128A VectorRegister[26];
    DWORD64 VectorControl;
    DWORD64 DebugControl;
    DWORD64 LastBranchToRip;
    DWORD64 LastBranchFromRip;
    DWORD64 LastExceptionToRip;
    DWORD64 LastExceptionFromRip;
};

union anon_union_8_2_30252521_for__EXCEPTION_REGISTRATION_RECORD_0 {
    struct _EXCEPTION_REGISTRATION_RECORD *Next;
    struct _EXCEPTION_REGISTRATION_RECORD *prev;
};

union anon_union_8_2_988ba941_for__EXCEPTION_REGISTRATION_RECORD_1 {
    PEXCEPTION_ROUTINE Handler;
    PEXCEPTION_ROUTINE handler;
};

struct _EXCEPTION_REGISTRATION_RECORD {
    union anon_union_8_2_30252521_for__EXCEPTION_REGISTRATION_RECORD_0 field_0;
    union anon_union_8_2_988ba941_for__EXCEPTION_REGISTRATION_RECORD_1 field_1;
};

typedef struct _IMAGE_NT_HEADERS64 _IMAGE_NT_HEADERS64, *P_IMAGE_NT_HEADERS64;

typedef struct _IMAGE_FILE_HEADER _IMAGE_FILE_HEADER, *P_IMAGE_FILE_HEADER;

typedef struct _IMAGE_FILE_HEADER IMAGE_FILE_HEADER;

typedef struct _IMAGE_OPTIONAL_HEADER64 _IMAGE_OPTIONAL_HEADER64, *P_IMAGE_OPTIONAL_HEADER64;

typedef struct _IMAGE_OPTIONAL_HEADER64 IMAGE_OPTIONAL_HEADER64;

typedef struct _IMAGE_DATA_DIRECTORY _IMAGE_DATA_DIRECTORY, *P_IMAGE_DATA_DIRECTORY;

typedef struct _IMAGE_DATA_DIRECTORY IMAGE_DATA_DIRECTORY;

struct _IMAGE_FILE_HEADER {
    WORD Machine;
    WORD NumberOfSections;
    DWORD TimeDateStamp;
    DWORD PointerToSymbolTable;
    DWORD NumberOfSymbols;
    WORD SizeOfOptionalHeader;
    WORD Characteristics;
};

struct _IMAGE_DATA_DIRECTORY {
    DWORD VirtualAddress;
    DWORD Size;
};

struct _IMAGE_OPTIONAL_HEADER64 {
    WORD Magic;
    BYTE MajorLinkerVersion;
    BYTE MinorLinkerVersion;
    DWORD SizeOfCode;
    DWORD SizeOfInitializedData;
    DWORD SizeOfUninitializedData;
    DWORD AddressOfEntryPoint;
    DWORD BaseOfCode;
    ULONGLONG ImageBase;
    DWORD SectionAlignment;
    DWORD FileAlignment;
    WORD MajorOperatingSystemVersion;
    WORD MinorOperatingSystemVersion;
    WORD MajorImageVersion;
    WORD MinorImageVersion;
    WORD MajorSubsystemVersion;
    WORD MinorSubsystemVersion;
    DWORD Win32VersionValue;
    DWORD SizeOfImage;
    DWORD SizeOfHeaders;
    DWORD CheckSum;
    WORD Subsystem;
    WORD DllCharacteristics;
    ULONGLONG SizeOfStackReserve;
    ULONGLONG SizeOfStackCommit;
    ULONGLONG SizeOfHeapReserve;
    ULONGLONG SizeOfHeapCommit;
    DWORD LoaderFlags;
    DWORD NumberOfRvaAndSizes;
    IMAGE_DATA_DIRECTORY DataDirectory[16];
};

struct _IMAGE_NT_HEADERS64 {
    DWORD Signature;
    IMAGE_FILE_HEADER FileHeader;
    IMAGE_OPTIONAL_HEADER64 OptionalHeader;
};

typedef IMAGE_IMPORT_DESCRIPTOR *PIMAGE_IMPORT_DESCRIPTOR;

typedef struct _NT_TIB _NT_TIB, *P_NT_TIB;

typedef struct _NT_TIB NT_TIB;

typedef union anon_union_8_2_9ea3c503_for__NT_TIB_4 anon_union_8_2_9ea3c503_for__NT_TIB_4, *Panon_union_8_2_9ea3c503_for__NT_TIB_4;

union anon_union_8_2_9ea3c503_for__NT_TIB_4 {
    PVOID FiberData;
    DWORD Version;
};

struct _NT_TIB {
    struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;
    PVOID StackBase;
    PVOID StackLimit;
    PVOID SubSystemTib;
    union anon_union_8_2_9ea3c503_for__NT_TIB_4 field_4;
    PVOID ArbitraryUserPointer;
    struct _NT_TIB *Self;
};

typedef NT_TIB *PNT_TIB;

typedef WCHAR *LPWSTR;

typedef struct _EXCEPTION_POINTERS _EXCEPTION_POINTERS, *P_EXCEPTION_POINTERS;

typedef struct _EXCEPTION_POINTERS EXCEPTION_POINTERS;

typedef struct _CONTEXT *PCONTEXT;

struct _EXCEPTION_POINTERS {
    PEXCEPTION_RECORD ExceptionRecord;
    PCONTEXT ContextRecord;
};

typedef BYTE BOOLEAN;


// WARNING! conflicting data type names: /DWARF/winnt.h/LPCWSTR - /winnt.h/LPCWSTR

typedef CHAR *LPCCH;

typedef struct _IMAGE_OPTIONAL_HEADER64 *PIMAGE_OPTIONAL_HEADER64;

typedef PIMAGE_OPTIONAL_HEADER64 PIMAGE_OPTIONAL_HEADER;

typedef struct _IMAGE_DOS_HEADER *PIMAGE_DOS_HEADER;

typedef struct _IMAGE_NT_HEADERS64 *PIMAGE_NT_HEADERS64;

typedef struct _IMAGE_OPTIONAL_HEADER _IMAGE_OPTIONAL_HEADER, *P_IMAGE_OPTIONAL_HEADER;

typedef struct _IMAGE_OPTIONAL_HEADER *PIMAGE_OPTIONAL_HEADER32;

struct _IMAGE_OPTIONAL_HEADER {
    WORD Magic;
    BYTE MajorLinkerVersion;
    BYTE MinorLinkerVersion;
    DWORD SizeOfCode;
    DWORD SizeOfInitializedData;
    DWORD SizeOfUninitializedData;
    DWORD AddressOfEntryPoint;
    DWORD BaseOfCode;
    DWORD BaseOfData;
    DWORD ImageBase;
    DWORD SectionAlignment;
    DWORD FileAlignment;
    WORD MajorOperatingSystemVersion;
    WORD MinorOperatingSystemVersion;
    WORD MajorImageVersion;
    WORD MinorImageVersion;
    WORD MajorSubsystemVersion;
    WORD MinorSubsystemVersion;
    DWORD Win32VersionValue;
    DWORD SizeOfImage;
    DWORD SizeOfHeaders;
    DWORD CheckSum;
    WORD Subsystem;
    WORD DllCharacteristics;
    DWORD SizeOfStackReserve;
    DWORD SizeOfStackCommit;
    DWORD SizeOfHeapReserve;
    DWORD SizeOfHeapCommit;
    DWORD LoaderFlags;
    DWORD NumberOfRvaAndSizes;
    IMAGE_DATA_DIRECTORY DataDirectory[16];
};

typedef struct _IMAGE_TLS_DIRECTORY64 _IMAGE_TLS_DIRECTORY64, *P_IMAGE_TLS_DIRECTORY64;

typedef struct _IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY64;

typedef IMAGE_TLS_DIRECTORY64 IMAGE_TLS_DIRECTORY;

struct _IMAGE_TLS_DIRECTORY64 {
    ULONGLONG StartAddressOfRawData;
    ULONGLONG EndAddressOfRawData;
    ULONGLONG AddressOfIndex;
    ULONGLONG AddressOfCallBacks;
    DWORD SizeOfZeroFill;
    DWORD Characteristics;
};

typedef struct _MEMORY_BASIC_INFORMATION *PMEMORY_BASIC_INFORMATION;

typedef CHAR *LPCSTR;

typedef struct _IMAGE_DOS_HEADER IMAGE_DOS_HEADER;

typedef WCHAR *LPCWCH;

typedef PIMAGE_NT_HEADERS64 PIMAGE_NT_HEADERS;

typedef void (*PIMAGE_TLS_CALLBACK)(PVOID, DWORD, PVOID);

typedef union anon_union_8_2_9472fd79 anon_union_8_2_9472fd79, *Panon_union_8_2_9472fd79;

union anon_union_8_2_9472fd79 {
    ULong L[2];
    double d;
};

typedef void (*_PVFV)(void);

typedef int (*_PIFV)(void);

typedef char * * (*_f__p__acmdln)(void);

typedef LONG (*PTOP_LEVEL_EXCEPTION_FILTER)(struct _EXCEPTION_POINTERS *);

typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;

typedef enum D3D10_FEATURE_LEVEL1 {
    D3D10_FEATURE_LEVEL_9_1=37120,
    D3D10_FEATURE_LEVEL_9_2=37376,
    D3D10_FEATURE_LEVEL_9_3=37632,
    D3D10_FEATURE_LEVEL_10_0=40960,
    D3D10_FEATURE_LEVEL_10_1=41216
} D3D10_FEATURE_LEVEL1;

typedef enum tagCOINITBASE {
    COINITBASE_MULTITHREADED=0
} tagCOINITBASE;

typedef union anon_union_4_2_9472fd7b anon_union_4_2_9472fd7b, *Panon_union_4_2_9472fd7b;

union anon_union_4_2_9472fd7b {
    ULong L[1];
    float f;
};

typedef enum DBREASONENUM {
    DBREASON_ROWSET_FETCHPOSITIONCHANGE=0,
    DBREASON_ROWSET_RELEASE=1,
    DBREASON_COLUMN_SET=2,
    DBREASON_COLUMN_RECALCULATED=3,
    DBREASON_ROW_ACTIVATE=4,
    DBREASON_ROW_RELEASE=5,
    DBREASON_ROW_DELETE=6,
    DBREASON_ROW_FIRSTCHANGE=7,
    DBREASON_ROW_INSERT=8,
    DBREASON_ROW_RESYNCH=9,
    DBREASON_ROW_UNDOCHANGE=10,
    DBREASON_ROW_UNDOINSERT=11,
    DBREASON_ROW_UNDODELETE=12,
    DBREASON_ROW_UPDATE=13,
    DBREASON_ROWSET_CHANGED=14
} DBREASONENUM;

typedef struct anon_struct_16_2_f7718127 anon_struct_16_2_f7718127, *Panon_struct_16_2_f7718127;

struct anon_struct_16_2_f7718127 {
    char *name;
    wctype_t flags;
};


// WARNING! conflicting data type names: /winbase.h/_STARTUPINFOA - /DWARF/processthreadsapi.h/_STARTUPINFOA

typedef struct _PROCESS_INFORMATION _PROCESS_INFORMATION, *P_PROCESS_INFORMATION;

struct _PROCESS_INFORMATION {
    HANDLE hProcess;
    HANDLE hThread;
    DWORD dwProcessId;
    DWORD dwThreadId;
};

typedef struct _SECURITY_ATTRIBUTES _SECURITY_ATTRIBUTES, *P_SECURITY_ATTRIBUTES;

struct _SECURITY_ATTRIBUTES {
    DWORD nLength;
    LPVOID lpSecurityDescriptor;
    BOOL bInheritHandle;
};


// WARNING! conflicting data type names: /winbase.h/LPSTARTUPINFOA - /DWARF/processthreadsapi.h/LPSTARTUPINFOA

typedef struct _OVERLAPPED _OVERLAPPED, *P_OVERLAPPED;

typedef union _union_540 _union_540, *P_union_540;

typedef struct _struct_541 _struct_541, *P_struct_541;

struct _struct_541 {
    DWORD Offset;
    DWORD OffsetHigh;
};

union _union_540 {
    struct _struct_541 s;
    PVOID Pointer;
};

struct _OVERLAPPED {
    ULONG_PTR Internal;
    ULONG_PTR InternalHigh;
    union _union_540 u;
    HANDLE hEvent;
};

typedef struct _RTL_CONDITION_VARIABLE _RTL_CONDITION_VARIABLE, *P_RTL_CONDITION_VARIABLE;

typedef struct _RTL_CONDITION_VARIABLE RTL_CONDITION_VARIABLE;

typedef RTL_CONDITION_VARIABLE *PCONDITION_VARIABLE;

struct _RTL_CONDITION_VARIABLE {
    PVOID Ptr;
};

typedef struct _STARTUPINFOW _STARTUPINFOW, *P_STARTUPINFOW;


// WARNING! conflicting data type names: /winnt.h/LPWSTR - /DWARF/winnt.h/LPWSTR


// WARNING! conflicting data type names: /WinDef.h/LPBYTE - /DWARF/minwindef.h/LPBYTE

struct _STARTUPINFOW {
    DWORD cb;
    LPWSTR lpReserved;
    LPWSTR lpDesktop;
    LPWSTR lpTitle;
    DWORD dwX;
    DWORD dwY;
    DWORD dwXSize;
    DWORD dwYSize;
    DWORD dwXCountChars;
    DWORD dwYCountChars;
    DWORD dwFillAttribute;
    DWORD dwFlags;
    WORD wShowWindow;
    WORD cbReserved2;
    LPBYTE lpReserved2;
    HANDLE hStdInput;
    HANDLE hStdOutput;
    HANDLE hStdError;
};

typedef struct _STARTUPINFOW *LPSTARTUPINFOW;

typedef struct _PROCESS_INFORMATION *LPPROCESS_INFORMATION;


// WARNING! conflicting data type names: /winbase.h/LPCRITICAL_SECTION - /DWARF/minwinbase.h/LPCRITICAL_SECTION

typedef struct _OVERLAPPED *LPOVERLAPPED;


// WARNING! conflicting data type names: /winbase.h/PTOP_LEVEL_EXCEPTION_FILTER - /DWARF/errhandlingapi.h/PTOP_LEVEL_EXCEPTION_FILTER

typedef struct _SECURITY_ATTRIBUTES *LPSECURITY_ATTRIBUTES;


// WARNING! conflicting data type names: /winnt.h/PRTL_CRITICAL_SECTION - /DWARF/winnt.h/PRTL_CRITICAL_SECTION

typedef PRTL_CRITICAL_SECTION PCRITICAL_SECTION;


// WARNING! conflicting data type names: /winbase.h/LPTOP_LEVEL_EXCEPTION_FILTER - /DWARF/errhandlingapi.h/LPTOP_LEVEL_EXCEPTION_FILTER


// WARNING! conflicting data type names: /winnt.h/_MEMORY_BASIC_INFORMATION - /DWARF/winnt.h/_MEMORY_BASIC_INFORMATION


// WARNING! conflicting data type names: /winnt.h/_RTL_CRITICAL_SECTION_DEBUG - /DWARF/winnt.h/_RTL_CRITICAL_SECTION_DEBUG


// WARNING! conflicting data type names: /winnt.h/PEXCEPTION_RECORD - /DWARF/winnt.h/PEXCEPTION_RECORD


// WARNING! conflicting data type names: /winnt.h/_RTL_CRITICAL_SECTION - /DWARF/winnt.h/_RTL_CRITICAL_SECTION

typedef struct _XSAVE_FORMAT _XSAVE_FORMAT, *P_XSAVE_FORMAT;

struct _XSAVE_FORMAT {
    WORD ControlWord;
    WORD StatusWord;
    BYTE TagWord;
    BYTE Reserved1;
    WORD ErrorOpcode;
    DWORD ErrorOffset;
    WORD ErrorSelector;
    WORD Reserved2;
    DWORD DataOffset;
    WORD DataSelector;
    WORD Reserved3;
    DWORD MxCsr;
    DWORD MxCsr_Mask;
    M128A FloatRegisters[8];
    M128A XmmRegisters[16];
    BYTE Reserved4[96];
};

typedef struct _struct_55 _struct_55, *P_struct_55;

struct _struct_55 {
    M128A Header[2];
    M128A Legacy[8];
    M128A Xmm0;
    M128A Xmm1;
    M128A Xmm2;
    M128A Xmm3;
    M128A Xmm4;
    M128A Xmm5;
    M128A Xmm6;
    M128A Xmm7;
    M128A Xmm8;
    M128A Xmm9;
    M128A Xmm10;
    M128A Xmm11;
    M128A Xmm12;
    M128A Xmm13;
    M128A Xmm14;
    M128A Xmm15;
};


// WARNING! conflicting data type names: /winnt.h/XMM_SAVE_AREA32 - /DWARF/winnt.h/XMM_SAVE_AREA32

typedef struct _RUNTIME_FUNCTION _RUNTIME_FUNCTION, *P_RUNTIME_FUNCTION;

struct _RUNTIME_FUNCTION {
    DWORD BeginAddress;
    DWORD EndAddress;
    DWORD UnwindData;
};


// WARNING! conflicting data type names: /winnt.h/LIST_ENTRY - /DWARF/winnt.h/LIST_ENTRY

typedef struct _RUNTIME_FUNCTION *PRUNTIME_FUNCTION;

typedef enum _EXCEPTION_DISPOSITION {
    ExceptionContinueExecution=0,
    ExceptionContinueSearch=1,
    ExceptionNestedException=2,
    ExceptionCollidedUnwind=3
} _EXCEPTION_DISPOSITION;

typedef enum _EXCEPTION_DISPOSITION EXCEPTION_DISPOSITION;


// WARNING! conflicting data type names: /excpt.h/_EXCEPTION_RECORD - /DWARF/winnt.h/_EXCEPTION_RECORD


// WARNING! conflicting data type names: /excpt.h/_CONTEXT - /DWARF/winnt.h/_CONTEXT

typedef EXCEPTION_DISPOSITION (EXCEPTION_ROUTINE)(struct _EXCEPTION_RECORD *, PVOID, struct _CONTEXT *, PVOID);

typedef struct _M128A *PM128A;

typedef struct _UNWIND_HISTORY_TABLE_ENTRY _UNWIND_HISTORY_TABLE_ENTRY, *P_UNWIND_HISTORY_TABLE_ENTRY;

typedef struct _UNWIND_HISTORY_TABLE_ENTRY UNWIND_HISTORY_TABLE_ENTRY;


// WARNING! conflicting data type names: /basetsd.h/DWORD64 - /DWARF/DWORD64

struct _UNWIND_HISTORY_TABLE_ENTRY {
    DWORD64 ImageBase;
    PRUNTIME_FUNCTION FunctionEntry;
};

typedef union _union_61 _union_61, *P_union_61;

typedef struct _struct_62 _struct_62, *P_struct_62;

struct _struct_62 {
    PM128A Xmm0;
    PM128A Xmm1;
    PM128A Xmm2;
    PM128A Xmm3;
    PM128A Xmm4;
    PM128A Xmm5;
    PM128A Xmm6;
    PM128A Xmm7;
    PM128A Xmm8;
    PM128A Xmm9;
    PM128A Xmm10;
    PM128A Xmm11;
    PM128A Xmm12;
    PM128A Xmm13;
    PM128A Xmm14;
    PM128A Xmm15;
};

union _union_61 {
    PM128A FloatingContext[16];
    struct _struct_62 s;
};

typedef union _union_63 _union_63, *P_union_63;

typedef ulonglong *PDWORD64;

typedef struct _struct_64 _struct_64, *P_struct_64;

struct _struct_64 {
    PDWORD64 Rax;
    PDWORD64 Rcx;
    PDWORD64 Rdx;
    PDWORD64 Rbx;
    PDWORD64 Rsp;
    PDWORD64 Rbp;
    PDWORD64 Rsi;
    PDWORD64 Rdi;
    PDWORD64 R8;
    PDWORD64 R9;
    PDWORD64 R10;
    PDWORD64 R11;
    PDWORD64 R12;
    PDWORD64 R13;
    PDWORD64 R14;
    PDWORD64 R15;
};

union _union_63 {
    PDWORD64 IntegerContext[16];
    struct _struct_64 s;
};

typedef struct _UNWIND_HISTORY_TABLE _UNWIND_HISTORY_TABLE, *P_UNWIND_HISTORY_TABLE;

typedef struct _UNWIND_HISTORY_TABLE *PUNWIND_HISTORY_TABLE;

struct _UNWIND_HISTORY_TABLE {
    DWORD Count;
    BYTE LocalHint;
    BYTE GlobalHint;
    BYTE Search;
    BYTE Once;
    DWORD64 LowAddress;
    DWORD64 HighAddress;
    UNWIND_HISTORY_TABLE_ENTRY Entry[12];
};

typedef long HRESULT;


// WARNING! conflicting data type names: /winnt.h/LPCSTR - /DWARF/winnt.h/LPCSTR


// WARNING! conflicting data type names: /winnt.h/PMEMORY_BASIC_INFORMATION - /DWARF/winnt.h/PMEMORY_BASIC_INFORMATION

typedef struct _XSAVE_FORMAT XSAVE_FORMAT;


// WARNING! conflicting data type names: /winnt.h/PRTL_CRITICAL_SECTION_DEBUG - /DWARF/winnt.h/PRTL_CRITICAL_SECTION_DEBUG


// WARNING! conflicting data type names: /winnt.h/_LIST_ENTRY - /DWARF/winnt.h/_LIST_ENTRY

typedef union _union_54 _union_54, *P_union_54;

union _union_54 {
    XMM_SAVE_AREA32 FltSave;
    struct _struct_55 s;
};


// WARNING! conflicting data type names: /winnt.h/LPSTR - /DWARF/winnt.h/LPSTR


// WARNING! conflicting data type names: /winnt.h/PCONTEXT - /DWARF/winnt.h/PCONTEXT

typedef struct _KNONVOLATILE_CONTEXT_POINTERS _KNONVOLATILE_CONTEXT_POINTERS, *P_KNONVOLATILE_CONTEXT_POINTERS;

typedef struct _KNONVOLATILE_CONTEXT_POINTERS *PKNONVOLATILE_CONTEXT_POINTERS;

struct _KNONVOLATILE_CONTEXT_POINTERS {
    union _union_61 u;
    union _union_63 u2;
};


// WARNING! conflicting data type names: /winnt.h/PEXCEPTION_ROUTINE - /DWARF/winnt.h/PEXCEPTION_ROUTINE


// WARNING! conflicting data type names: /winnt.h/EXCEPTION_RECORD - /DWARF/winnt.h/EXCEPTION_RECORD

typedef HANDLE *PHANDLE;


// WARNING! conflicting data type names: /DOS/IMAGE_DOS_HEADER - /DWARF/winnt.h/IMAGE_DOS_HEADER

typedef struct tm tm, *Ptm;

struct tm {
    int tm_sec;
    int tm_min;
    int tm_hour;
    int tm_mday;
    int tm_mon;
    int tm_year;
    int tm_wday;
    int tm_yday;
    int tm_isdst;
};

typedef struct _DISPATCHER_CONTEXT _DISPATCHER_CONTEXT, *P_DISPATCHER_CONTEXT;

struct _DISPATCHER_CONTEXT {
};


// WARNING! conflicting data type names: /excpt.h/_EXCEPTION_POINTERS - /DWARF/winnt.h/_EXCEPTION_POINTERS


// WARNING! conflicting data type names: /wtypes.h/ULONG - /DWARF/ULONG

typedef struct tagINITCOMMONCONTROLSEX tagINITCOMMONCONTROLSEX, *PtagINITCOMMONCONTROLSEX;

typedef struct tagINITCOMMONCONTROLSEX INITCOMMONCONTROLSEX;

struct tagINITCOMMONCONTROLSEX {
    DWORD dwSize;
    DWORD dwICC;
};

typedef struct HFONT__ HFONT__, *PHFONT__;

typedef struct HFONT__ *HFONT;

struct HFONT__ {
    int unused;
};

typedef struct tagPOINT *LPPOINT;

typedef DWORD *LPDWORD;

typedef struct HPEN__ HPEN__, *PHPEN__;

typedef struct HPEN__ *HPEN;

struct HPEN__ {
    int unused;
};


// WARNING! conflicting data type names: /WinDef.h/PDWORD - /DWARF/minwindef.h/PDWORD

typedef struct HDC__ HDC__, *PHDC__;

struct HDC__ {
    int unused;
};


// WARNING! conflicting data type names: /WinDef.h/HMODULE - /DWARF/minwindef.h/HMODULE

typedef HANDLE HLOCAL;

typedef struct tagRECT tagRECT, *PtagRECT;

typedef struct tagRECT RECT;

struct tagRECT {
    LONG left;
    LONG top;
    LONG right;
    LONG bottom;
};

typedef struct HMENU__ HMENU__, *PHMENU__;

typedef struct HMENU__ *HMENU;

struct HMENU__ {
    int unused;
};

typedef struct _FILETIME _FILETIME, *P_FILETIME;

typedef struct _FILETIME *LPFILETIME;

struct _FILETIME {
    DWORD dwLowDateTime;
    DWORD dwHighDateTime;
};


// WARNING! conflicting data type names: /WinDef.h/FARPROC - /DWARF/minwindef.h/FARPROC

typedef struct HDC__ *HDC;

typedef WORD ATOM;

typedef struct tagRECT *LPRECT;


// WARNING! conflicting data type names: /WinDef.h/LPBOOL - /DWARF/minwindef.h/LPBOOL

typedef void *HGDIOBJ;

typedef DWORD COLORREF;


// WARNING! conflicting data type names: /PE/IMAGE_OPTIONAL_HEADER64 - /DWARF/winnt.h/IMAGE_OPTIONAL_HEADER64

typedef struct IMAGE_SECTION_HEADER IMAGE_SECTION_HEADER, *PIMAGE_SECTION_HEADER;

typedef union Misc Misc, *PMisc;

typedef enum SectionFlags {
    IMAGE_SCN_TYPE_NO_PAD=8,
    IMAGE_SCN_RESERVED_0001=16,
    IMAGE_SCN_CNT_CODE=32,
    IMAGE_SCN_CNT_INITIALIZED_DATA=64,
    IMAGE_SCN_CNT_UNINITIALIZED_DATA=128,
    IMAGE_SCN_LNK_OTHER=256,
    IMAGE_SCN_LNK_INFO=512,
    IMAGE_SCN_RESERVED_0040=1024,
    IMAGE_SCN_LNK_REMOVE=2048,
    IMAGE_SCN_LNK_COMDAT=4096,
    IMAGE_SCN_GPREL=32768,
    IMAGE_SCN_MEM_16BIT=131072,
    IMAGE_SCN_MEM_PURGEABLE=131072,
    IMAGE_SCN_MEM_LOCKED=262144,
    IMAGE_SCN_MEM_PRELOAD=524288,
    IMAGE_SCN_ALIGN_1BYTES=1048576,
    IMAGE_SCN_ALIGN_2BYTES=2097152,
    IMAGE_SCN_ALIGN_4BYTES=3145728,
    IMAGE_SCN_ALIGN_8BYTES=4194304,
    IMAGE_SCN_ALIGN_16BYTES=5242880,
    IMAGE_SCN_ALIGN_32BYTES=6291456,
    IMAGE_SCN_ALIGN_64BYTES=7340032,
    IMAGE_SCN_ALIGN_128BYTES=8388608,
    IMAGE_SCN_ALIGN_256BYTES=9437184,
    IMAGE_SCN_ALIGN_512BYTES=10485760,
    IMAGE_SCN_ALIGN_1024BYTES=11534336,
    IMAGE_SCN_ALIGN_2048BYTES=12582912,
    IMAGE_SCN_ALIGN_4096BYTES=13631488,
    IMAGE_SCN_ALIGN_8192BYTES=14680064,
    IMAGE_SCN_LNK_NRELOC_OVFL=16777216,
    IMAGE_SCN_MEM_DISCARDABLE=33554432,
    IMAGE_SCN_MEM_NOT_CACHED=67108864,
    IMAGE_SCN_MEM_NOT_PAGED=134217728,
    IMAGE_SCN_MEM_SHARED=268435456,
    IMAGE_SCN_MEM_EXECUTE=536870912,
    IMAGE_SCN_MEM_READ=1073741824,
    IMAGE_SCN_MEM_WRITE=2147483648
} SectionFlags;

union Misc {
    dword PhysicalAddress;
    dword VirtualSize;
};

struct IMAGE_SECTION_HEADER {
    char Name[8];
    union Misc Misc;
    ImageBaseOffset32 VirtualAddress;
    dword SizeOfRawData;
    dword PointerToRawData;
    dword PointerToRelocations;
    dword PointerToLinenumbers;
    word NumberOfRelocations;
    word NumberOfLinenumbers;
    enum SectionFlags Characteristics;
};

typedef struct IMAGE_NT_HEADERS64 IMAGE_NT_HEADERS64, *PIMAGE_NT_HEADERS64;


// WARNING! conflicting data type names: /PE/IMAGE_FILE_HEADER - /DWARF/winnt.h/IMAGE_FILE_HEADER

struct IMAGE_NT_HEADERS64 {
    char Signature[4];
    struct IMAGE_FILE_HEADER FileHeader;
    struct IMAGE_OPTIONAL_HEADER64 OptionalHeader;
};

typedef struct _IMAGE_RUNTIME_FUNCTION_ENTRY _IMAGE_RUNTIME_FUNCTION_ENTRY, *P_IMAGE_RUNTIME_FUNCTION_ENTRY;

struct _IMAGE_RUNTIME_FUNCTION_ENTRY {
    ImageBaseOffset32 BeginAddress;
    dword EndAddress; // Apply ImageBaseOffset32 to see reference
    ImageBaseOffset32 UnwindInfoAddressOrData;
};


// WARNING! conflicting data type names: /PE/IMAGE_DATA_DIRECTORY - /DWARF/winnt.h/IMAGE_DATA_DIRECTORY

typedef struct IMAGE_BASE_RELOCATION IMAGE_BASE_RELOCATION, *PIMAGE_BASE_RELOCATION;

struct IMAGE_BASE_RELOCATION {
    dword VirtualAddress;
    dword SizeOfBlock;
};

typedef struct IMAGE_THUNK_DATA64 IMAGE_THUNK_DATA64, *PIMAGE_THUNK_DATA64;

struct IMAGE_THUNK_DATA64 {
    qword StartAddressOfRawData;
    qword EndAddressOfRawData;
    qword AddressOfIndex;
    qword AddressOfCallBacks;
    dword SizeOfZeroFill;
    dword Characteristics;
};


// WARNING! conflicting data type names: /mbstring.h/_iobuf - /DWARF/stdio.h/_iobuf


// WARNING! conflicting data type names: /mbstring.h/FILE - /DWARF/stdio.h/FILE


// WARNING! conflicting data type names: /vadefs.h/va_list - /DWARF/vadefs.h/va_list

typedef struct signed signed, *Psigned;

struct signed { // PlaceHolder Structure
};

typedef struct tagDRAWITEMSTRUCT tagDRAWITEMSTRUCT, *PtagDRAWITEMSTRUCT;

struct tagDRAWITEMSTRUCT { // PlaceHolder Structure
};

typedef struct __forced_unwind __forced_unwind, *P__forced_unwind;

struct __forced_unwind { // PlaceHolder Structure
};

typedef struct __class_type_info __class_type_info, *P__class_type_info;

struct __class_type_info { // PlaceHolder Structure
};

typedef struct __foreign_exception __foreign_exception, *P__foreign_exception;

struct __foreign_exception { // PlaceHolder Structure
};

typedef struct __si_class_type_info __si_class_type_info, *P__si_class_type_info;

struct __si_class_type_info { // PlaceHolder Structure
};

typedef struct __vmi_class_type_info __vmi_class_type_info, *P__vmi_class_type_info;

struct __vmi_class_type_info { // PlaceHolder Structure
};

typedef struct __dyncast_result __dyncast_result, *P__dyncast_result;

struct __dyncast_result { // PlaceHolder Structure
};

typedef undefined __sub_kind;

typedef struct __upcast_result __upcast_result, *P__upcast_result;

struct __upcast_result { // PlaceHolder Structure
};

typedef struct exception exception, *Pexception;

struct exception { // PlaceHolder Structure
};

typedef struct wios wios, *Pwios;

struct wios { // PlaceHolder Structure
};

typedef struct numpunct<char> numpunct<char>, *Pnumpunct<char>;

struct numpunct<char> { // PlaceHolder Structure
};

typedef struct istreambuf_iterator istreambuf_iterator, *Pistreambuf_iterator;

struct istreambuf_iterator { // PlaceHolder Structure
};

typedef struct __codecvt_utf16_base<char32_t> __codecvt_utf16_base<char32_t>, *P__codecvt_utf16_base<char32_t>;

struct __codecvt_utf16_base<char32_t> { // PlaceHolder Structure
};

typedef struct ostream ostream, *Postream;

struct ostream { // PlaceHolder Structure
};

typedef struct ios ios, *Pios;

struct ios { // PlaceHolder Structure
};

typedef struct wostream wostream, *Pwostream;

struct wostream { // PlaceHolder Structure
};

typedef struct codecvt<wchar_t,char,int> codecvt<wchar_t,char,int>, *Pcodecvt<wchar_t,char,int>;

struct codecvt<wchar_t,char,int> { // PlaceHolder Structure
};

typedef struct num_put num_put, *Pnum_put;

struct num_put { // PlaceHolder Structure
};

typedef undefined fpos;

typedef struct _Ios_Iostate _Ios_Iostate, *P_Ios_Iostate;

struct _Ios_Iostate { // PlaceHolder Structure
};

typedef struct time_get_byname<char,std::istreambuf_iterator<char,std::char_traits<char>>> time_get_byname<char,std::istreambuf_iterator<char,std::char_traits<char>>>, *Ptime_get_byname<char,std::istreambuf_iterator<char,std::char_traits<char>>>;

struct time_get_byname<char,std::istreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct moneypunct<char,true> moneypunct<char,true>, *Pmoneypunct<char,true>;

struct moneypunct<char,true> { // PlaceHolder Structure
};

typedef struct iostream iostream, *Piostream;

struct iostream { // PlaceHolder Structure
};

typedef struct istream istream, *Pistream;

struct istream { // PlaceHolder Structure
};

typedef struct ctype<char> ctype<char>, *Pctype<char>;

struct ctype<char> { // PlaceHolder Structure
};

typedef struct __time_get_state __time_get_state, *P__time_get_state;

struct __time_get_state { // PlaceHolder Structure
};

typedef struct numpunct numpunct, *Pnumpunct;

struct numpunct { // PlaceHolder Structure
};

typedef struct collate_byname<wchar_t> collate_byname<wchar_t>, *Pcollate_byname<wchar_t>;

struct collate_byname<wchar_t> { // PlaceHolder Structure
};

typedef undefined _Setw;

typedef struct nothrow_t nothrow_t, *Pnothrow_t;

struct nothrow_t { // PlaceHolder Structure
};

typedef struct __timepunct<char> __timepunct<char>, *P__timepunct<char>;

struct __timepunct<char> { // PlaceHolder Structure
};

typedef struct wistream wistream, *Pwistream;

struct wistream { // PlaceHolder Structure
};

typedef struct num_get<char,std::istreambuf_iterator<char,std::char_traits<char>>> num_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>, *Pnum_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>;

struct num_get<char,std::istreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct bad_cast bad_cast, *Pbad_cast;

struct bad_cast { // PlaceHolder Structure
};

typedef struct wiostream wiostream, *Pwiostream;

struct wiostream { // PlaceHolder Structure
};

typedef struct messages<char> messages<char>, *Pmessages<char>;

struct messages<char> { // PlaceHolder Structure
};

typedef struct time_get_byname<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> time_get_byname<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Ptime_get_byname<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct time_get_byname<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef struct codecvt<char16_t,char8_t,int> codecvt<char16_t,char8_t,int>, *Pcodecvt<char16_t,char8_t,int>;

struct codecvt<char16_t,char8_t,int> { // PlaceHolder Structure
};

typedef struct __sso_string __sso_string, *P__sso_string;

struct __sso_string { // PlaceHolder Structure
};

typedef struct __codecvt_utf16_base<wchar_t> __codecvt_utf16_base<wchar_t>, *P__codecvt_utf16_base<wchar_t>;

struct __codecvt_utf16_base<wchar_t> { // PlaceHolder Structure
};

typedef struct __numpunct_cache __numpunct_cache, *P__numpunct_cache;

struct __numpunct_cache { // PlaceHolder Structure
};

typedef struct bad_alloc bad_alloc, *Pbad_alloc;

struct bad_alloc { // PlaceHolder Structure
};

typedef struct type_info type_info, *Ptype_info;

struct type_info { // PlaceHolder Structure
};

typedef struct moneypunct moneypunct, *Pmoneypunct;

struct moneypunct { // PlaceHolder Structure
};

typedef struct collate<char> collate<char>, *Pcollate<char>;

struct collate<char> { // PlaceHolder Structure
};

typedef struct __timepunct_cache<char> __timepunct_cache<char>, *P__timepunct_cache<char>;

struct __timepunct_cache<char> { // PlaceHolder Structure
};

typedef struct __timepunct_cache __timepunct_cache, *P__timepunct_cache;

struct __timepunct_cache { // PlaceHolder Structure
};

typedef struct __codecvt_utf8_base<char32_t> __codecvt_utf8_base<char32_t>, *P__codecvt_utf8_base<char32_t>;

struct __codecvt_utf8_base<char32_t> { // PlaceHolder Structure
};

typedef struct ctype<wchar_t> ctype<wchar_t>, *Pctype<wchar_t>;

struct ctype<wchar_t> { // PlaceHolder Structure
};

typedef struct __timepunct_cache<wchar_t> __timepunct_cache<wchar_t>, *P__timepunct_cache<wchar_t>;

struct __timepunct_cache<wchar_t> { // PlaceHolder Structure
};

typedef struct ctype_byname<char> ctype_byname<char>, *Pctype_byname<char>;

struct ctype_byname<char> { // PlaceHolder Structure
};

typedef struct __iosfail_type_info __iosfail_type_info, *P__iosfail_type_info;

struct __iosfail_type_info { // PlaceHolder Structure
};

typedef undefined forward_iterator_tag;

typedef struct logic_error logic_error, *Plogic_error;

struct logic_error { // PlaceHolder Structure
};

typedef struct bad_array_new_length bad_array_new_length, *Pbad_array_new_length;

struct bad_array_new_length { // PlaceHolder Structure
};

typedef struct out_of_range out_of_range, *Pout_of_range;

struct out_of_range { // PlaceHolder Structure
};

typedef struct codecvt_byname<char,char,int> codecvt_byname<char,char,int>, *Pcodecvt_byname<char,char,int>;

struct codecvt_byname<char,char,int> { // PlaceHolder Structure
};

typedef struct time_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>> time_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>, *Ptime_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>;

struct time_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef undefined ostreambuf_iterator;

typedef struct error_condition error_condition, *Perror_condition;

struct error_condition { // PlaceHolder Structure
};

typedef struct wstring wstring, *Pwstring;

struct wstring { // PlaceHolder Structure
};

typedef undefined _Resetiosflags;

typedef struct num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>> num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>, *Pnum_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>;

struct num_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct moneypunct<wchar_t,true> moneypunct<wchar_t,true>, *Pmoneypunct<wchar_t,true>;

struct moneypunct<wchar_t,true> { // PlaceHolder Structure
};

typedef struct __numpunct_cache<wchar_t> __numpunct_cache<wchar_t>, *P__numpunct_cache<wchar_t>;

struct __numpunct_cache<wchar_t> { // PlaceHolder Structure
};

typedef struct collate collate, *Pcollate;

struct collate { // PlaceHolder Structure
};

typedef struct num_get num_get, *Pnum_get;

struct num_get { // PlaceHolder Structure
};

typedef struct time_get<char,std::istreambuf_iterator<char,std::char_traits<char>>> time_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>, *Ptime_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>;

struct time_get<char,std::istreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct time_put time_put, *Ptime_put;

struct time_put { // PlaceHolder Structure
};

typedef struct locale locale, *Plocale;

struct locale { // PlaceHolder Structure
};

typedef struct moneypunct<char,false> moneypunct<char,false>, *Pmoneypunct<char,false>;

struct moneypunct<char,false> { // PlaceHolder Structure
};

typedef struct moneypunct<wchar_t,false> moneypunct<wchar_t,false>, *Pmoneypunct<wchar_t,false>;

struct moneypunct<wchar_t,false> { // PlaceHolder Structure
};

typedef struct money_get money_get, *Pmoney_get;

struct money_get { // PlaceHolder Structure
};

typedef struct codecvt<char32_t,char,int> codecvt<char32_t,char,int>, *Pcodecvt<char32_t,char,int>;

struct codecvt<char32_t,char,int> { // PlaceHolder Structure
};

typedef struct error_code error_code, *Perror_code;

struct error_code { // PlaceHolder Structure
};

typedef struct __cow_string __cow_string, *P__cow_string;

struct __cow_string { // PlaceHolder Structure
};

typedef struct __ios_failure __ios_failure, *P__ios_failure;

struct __ios_failure { // PlaceHolder Structure
};


// WARNING! conflicting data type names: /Demangler/std/string - /string

typedef struct __codecvt_utf8_utf16_base<char32_t> __codecvt_utf8_utf16_base<char32_t>, *P__codecvt_utf8_utf16_base<char32_t>;

struct __codecvt_utf8_utf16_base<char32_t> { // PlaceHolder Structure
};

typedef undefined _Setbase;

typedef struct underflow_error underflow_error, *Punderflow_error;

struct underflow_error { // PlaceHolder Structure
};

typedef struct __moneypunct_cache __moneypunct_cache, *P__moneypunct_cache;

struct __moneypunct_cache { // PlaceHolder Structure
};

typedef struct time_get time_get, *Ptime_get;

struct time_get { // PlaceHolder Structure
};

typedef struct length_error length_error, *Plength_error;

struct length_error { // PlaceHolder Structure
};

typedef struct money_put money_put, *Pmoney_put;

struct money_put { // PlaceHolder Structure
};

typedef undefined _Setprecision;

typedef undefined _Ios_Seekdir;

typedef struct __moneypunct_cache<char,true> __moneypunct_cache<char,true>, *P__moneypunct_cache<char,true>;

struct __moneypunct_cache<char,true> { // PlaceHolder Structure
};

typedef struct money_get<char,std::istreambuf_iterator<char,std::char_traits<char>>> money_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>, *Pmoney_get<char,std::istreambuf_iterator<char,std::char_traits<char>>>;

struct money_get<char,std::istreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct time_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> time_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Ptime_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct time_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef struct ctype_byname<wchar_t> ctype_byname<wchar_t>, *Pctype_byname<wchar_t>;

struct ctype_byname<wchar_t> { // PlaceHolder Structure
};

typedef struct money_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> money_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Pmoney_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct money_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef undefined _Ios_Fmtflags;

typedef struct invalid_argument invalid_argument, *Pinvalid_argument;

struct invalid_argument { // PlaceHolder Structure
};

typedef struct numpunct<wchar_t> numpunct<wchar_t>, *Pnumpunct<wchar_t>;

struct numpunct<wchar_t> { // PlaceHolder Structure
};

typedef struct bad_typeid bad_typeid, *Pbad_typeid;

struct bad_typeid { // PlaceHolder Structure
};

typedef struct wstreambuf wstreambuf, *Pwstreambuf;

struct wstreambuf { // PlaceHolder Structure
};

typedef struct moneypunct_byname<wchar_t,false> moneypunct_byname<wchar_t,false>, *Pmoneypunct_byname<wchar_t,false>;

struct moneypunct_byname<wchar_t,false> { // PlaceHolder Structure
};

typedef struct streambuf streambuf, *Pstreambuf;

struct streambuf { // PlaceHolder Structure
};

typedef struct allocator allocator, *Pallocator;

struct allocator { // PlaceHolder Structure
};

typedef struct numpunct_byname<char> numpunct_byname<char>, *Pnumpunct_byname<char>;

struct numpunct_byname<char> { // PlaceHolder Structure
};

typedef struct time_put_byname<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> time_put_byname<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Ptime_put_byname<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct time_put_byname<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef struct codecvt<char16_t,char,int> codecvt<char16_t,char,int>, *Pcodecvt<char16_t,char,int>;

struct codecvt<char16_t,char,int> { // PlaceHolder Structure
};

typedef struct ios_base ios_base, *Pios_base;

struct ios_base { // PlaceHolder Structure
};

typedef struct moneypunct_byname<wchar_t,true> moneypunct_byname<wchar_t,true>, *Pmoneypunct_byname<wchar_t,true>;

struct moneypunct_byname<wchar_t,true> { // PlaceHolder Structure
};

typedef struct __moneypunct_cache<wchar_t,true> __moneypunct_cache<wchar_t,true>, *P__moneypunct_cache<wchar_t,true>;

struct __moneypunct_cache<wchar_t,true> { // PlaceHolder Structure
};

typedef struct codecvt_byname<wchar_t,char,int> codecvt_byname<wchar_t,char,int>, *Pcodecvt_byname<wchar_t,char,int>;

struct codecvt_byname<wchar_t,char,int> { // PlaceHolder Structure
};

typedef struct time_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> time_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Ptime_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct time_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef struct domain_error domain_error, *Pdomain_error;

struct domain_error { // PlaceHolder Structure
};

typedef struct messages messages, *Pmessages;

struct messages { // PlaceHolder Structure
};

typedef struct codecvt<char32_t,char8_t,int> codecvt<char32_t,char8_t,int>, *Pcodecvt<char32_t,char8_t,int>;

struct codecvt<char32_t,char8_t,int> { // PlaceHolder Structure
};

typedef struct ctype ctype, *Pctype;

struct ctype { // PlaceHolder Structure
};

typedef struct collate<wchar_t> collate<wchar_t>, *Pcollate<wchar_t>;

struct collate<wchar_t> { // PlaceHolder Structure
};

typedef struct messages<wchar_t> messages<wchar_t>, *Pmessages<wchar_t>;

struct messages<wchar_t> { // PlaceHolder Structure
};

typedef struct num_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> num_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Pnum_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct num_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef struct codecvt codecvt, *Pcodecvt;

struct codecvt { // PlaceHolder Structure
};

typedef undefined _Setiosflags;

typedef undefined _Ios_Openmode;

typedef struct runtime_error runtime_error, *Pruntime_error;

struct runtime_error { // PlaceHolder Structure
};

typedef struct system_error system_error, *Psystem_error;

struct system_error { // PlaceHolder Structure
};

typedef struct money_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>> money_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>, *Pmoney_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>>;

struct money_put<char,std::ostreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct __codecvt_utf8_utf16_base<char16_t> __codecvt_utf8_utf16_base<char16_t>, *P__codecvt_utf8_utf16_base<char16_t>;

struct __codecvt_utf8_utf16_base<char16_t> { // PlaceHolder Structure
};

typedef struct num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Pnum_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct num_get<wchar_t,std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef struct __moneypunct_cache<wchar_t,false> __moneypunct_cache<wchar_t,false>, *P__moneypunct_cache<wchar_t,false>;

struct __moneypunct_cache<wchar_t,false> { // PlaceHolder Structure
};

typedef struct collate_byname<char> collate_byname<char>, *Pcollate_byname<char>;

struct collate_byname<char> { // PlaceHolder Structure
};

typedef struct __timepunct __timepunct, *P__timepunct;

struct __timepunct { // PlaceHolder Structure
};

typedef struct codecvt<char,char,int> codecvt<char,char,int>, *Pcodecvt<char,char,int>;

struct codecvt<char,char,int> { // PlaceHolder Structure
};

typedef undefined integral_constant;

typedef struct overflow_error overflow_error, *Poverflow_error;

struct overflow_error { // PlaceHolder Structure
};

typedef struct numpunct_byname<wchar_t> numpunct_byname<wchar_t>, *Pnumpunct_byname<wchar_t>;

struct numpunct_byname<wchar_t> { // PlaceHolder Structure
};

typedef undefined _Setfill;

typedef struct __codecvt_utf16_base<char16_t> __codecvt_utf16_base<char16_t>, *P__codecvt_utf16_base<char16_t>;

struct __codecvt_utf16_base<char16_t> { // PlaceHolder Structure
};

typedef struct __codecvt_utf8_utf16_base<wchar_t> __codecvt_utf8_utf16_base<wchar_t>, *P__codecvt_utf8_utf16_base<wchar_t>;

struct __codecvt_utf8_utf16_base<wchar_t> { // PlaceHolder Structure
};

typedef struct money_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> money_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>, *Pmoney_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>>;

struct money_put<wchar_t,std::ostreambuf_iterator<wchar_t,std::char_traits<wchar_t>>> { // PlaceHolder Structure
};

typedef undefined initializer_list;

typedef struct bad_exception bad_exception, *Pbad_exception;

struct bad_exception { // PlaceHolder Structure
};

typedef struct __numpunct_cache<char> __numpunct_cache<char>, *P__numpunct_cache<char>;

struct __numpunct_cache<char> { // PlaceHolder Structure
};

typedef struct messages_byname<wchar_t> messages_byname<wchar_t>, *Pmessages_byname<wchar_t>;

struct messages_byname<wchar_t> { // PlaceHolder Structure
};

typedef struct __moneypunct_cache<char,false> __moneypunct_cache<char,false>, *P__moneypunct_cache<char,false>;

struct __moneypunct_cache<char,false> { // PlaceHolder Structure
};

typedef struct __timepunct<wchar_t> __timepunct<wchar_t>, *P__timepunct<wchar_t>;

struct __timepunct<wchar_t> { // PlaceHolder Structure
};

typedef struct messages_byname<char> messages_byname<char>, *Pmessages_byname<char>;

struct messages_byname<char> { // PlaceHolder Structure
};

typedef struct range_error range_error, *Prange_error;

struct range_error { // PlaceHolder Structure
};

typedef struct moneypunct_byname<char,true> moneypunct_byname<char,true>, *Pmoneypunct_byname<char,true>;

struct moneypunct_byname<char,true> { // PlaceHolder Structure
};

typedef struct __codecvt_utf8_base<char16_t> __codecvt_utf8_base<char16_t>, *P__codecvt_utf8_base<char16_t>;

struct __codecvt_utf8_base<char16_t> { // PlaceHolder Structure
};

typedef struct moneypunct_byname<char,false> moneypunct_byname<char,false>, *Pmoneypunct_byname<char,false>;

struct moneypunct_byname<char,false> { // PlaceHolder Structure
};

typedef struct time_put_byname<char,std::ostreambuf_iterator<char,std::char_traits<char>>> time_put_byname<char,std::ostreambuf_iterator<char,std::char_traits<char>>>, *Ptime_put_byname<char,std::ostreambuf_iterator<char,std::char_traits<char>>>;

struct time_put_byname<char,std::ostreambuf_iterator<char,std::char_traits<char>>> { // PlaceHolder Structure
};

typedef struct __codecvt_utf8_base<wchar_t> __codecvt_utf8_base<wchar_t>, *P__codecvt_utf8_base<wchar_t>;

struct __codecvt_utf8_base<wchar_t> { // PlaceHolder Structure
};

typedef struct _Alloc_hider _Alloc_hider, *P_Alloc_hider;

struct _Alloc_hider { // PlaceHolder Structure
};

typedef undefined dateorder;

typedef struct sentry sentry, *Psentry;

struct sentry { // PlaceHolder Structure
};

typedef struct facet facet, *Pfacet;

struct facet { // PlaceHolder Structure
};

typedef struct _Impl _Impl, *P_Impl;

struct _Impl { // PlaceHolder Structure
};

typedef struct id id, *Pid;

struct id { // PlaceHolder Structure
};

typedef struct __any_string __any_string, *P__any_string;

struct __any_string { // PlaceHolder Structure
};

typedef struct istringstream istringstream, *Pistringstream;

struct istringstream { // PlaceHolder Structure
};

typedef struct wstringstream wstringstream, *Pwstringstream;

struct wstringstream { // PlaceHolder Structure
};


// WARNING! conflicting data type names: /Demangler/std/__cxx11/string - /string

typedef struct ostringstream ostringstream, *Postringstream;

struct ostringstream { // PlaceHolder Structure
};

typedef struct stringstream stringstream, *Pstringstream;

struct stringstream { // PlaceHolder Structure
};

typedef struct wostringstream wostringstream, *Pwostringstream;

struct wostringstream { // PlaceHolder Structure
};

typedef struct wstringbuf wstringbuf, *Pwstringbuf;

struct wstringbuf { // PlaceHolder Structure
};

typedef struct wistringstream wistringstream, *Pwistringstream;

struct wistringstream { // PlaceHolder Structure
};

typedef struct stringbuf stringbuf, *Pstringbuf;

struct stringbuf { // PlaceHolder Structure
};

typedef struct __xfer_bufptrs __xfer_bufptrs, *P__xfer_bufptrs;

struct __xfer_bufptrs { // PlaceHolder Structure
};

typedef struct failure failure, *Pfailure;

struct failure { // PlaceHolder Structure
};

typedef struct failure[abi:cxx11] failure[abi:cxx11], *Pfailure[abi:cxx11];

struct failure[abi:cxx11] { // PlaceHolder Structure
};

typedef undefined event;

typedef struct error_category error_category, *Perror_category;

struct error_category { // PlaceHolder Structure
};

typedef struct recursive_init_error recursive_init_error, *Precursive_init_error;

struct recursive_init_error { // PlaceHolder Structure
};

typedef struct __concurrence_wait_error __concurrence_wait_error, *P__concurrence_wait_error;

struct __concurrence_wait_error { // PlaceHolder Structure
};

typedef struct __concurrence_lock_error __concurrence_lock_error, *P__concurrence_lock_error;

struct __concurrence_lock_error { // PlaceHolder Structure
};

typedef struct __normal_iterator __normal_iterator, *P__normal_iterator;

struct __normal_iterator { // PlaceHolder Structure
};

typedef struct __scoped_lock __scoped_lock, *P__scoped_lock;

struct __scoped_lock { // PlaceHolder Structure
};

typedef struct __concurrence_unlock_error __concurrence_unlock_error, *P__concurrence_unlock_error;

struct __concurrence_unlock_error { // PlaceHolder Structure
};

typedef struct __concurrence_broadcast_error __concurrence_broadcast_error, *P__concurrence_broadcast_error;

struct __concurrence_broadcast_error { // PlaceHolder Structure
};


// WARNING! conflicting data type names: /stdlib.h/_onexit_t - /DWARF/stdlib.h/_onexit_t


// WARNING! conflicting data type names: /crtdefs.h/lconv - /DWARF/locale.h/lconv

typedef struct IUnknownVtbl IUnknownVtbl, *PIUnknownVtbl;

typedef struct IUnknown IUnknown, *PIUnknown;

struct IUnknownVtbl {
    HRESULT (*QueryInterface)(struct IUnknown *, IID *, void **);
    ULONG (*AddRef)(struct IUnknown *);
    ULONG (*Release)(struct IUnknown *);
};

struct IUnknown {
    struct IUnknownVtbl *lpVtbl;
};

typedef struct IUnknown *LPUNKNOWN;



undefined _matherr;
int _fmode;
int managedapp;
int _commode;
int _MINGW_INSTALL_DEBUG_MATHERR;
int __mingw_initltssuo_force;
int __mingw_initltsdyn_force;
int __mingw_initltsdrot_force;
int __mingw_app_type;
int _dowildcard;
int _newmode;
_TCHAR * *envp;
_TCHAR * *argv;
int argc;
_startupinfo startinfo;
undefined __mingw_invalidParameterHandler;
undefined *PTR___initenv_1400fd770;
__enative_startup_state __native_startup_state;
void *__native_startup_lock;
_PVFV[1] __xi_a;
undefined _gnu_exception_handler;
_PVFV[1] __xi_z;
_PVFV[1] __xc_z;
int has_cctor;
LPTOP_LEVEL_EXCEPTION_FILTER __mingw_oldexcpt_handler;
int mainret;
_PVFV[1] __xc_a;
undefined __gcc_deregister_frame;
undefined8 hEditor;
undefined *PTR_SendMessageW_1400fd9e8;
undefined *PTR_DAT_1400c0000;
undefined *PTR_u_char_1400c0008;
undefined *PTR_u_break_1400c00a8;
pointer KEYWORDS;
undefined1 inHighlight;
undefined8 hMain;
undefined DAT_1400c360e;
undefined DAT_1400c3616;
undefined1 __uuid_inst;
GUID CLSID_FileSaveDialog;
undefined8 hBtn;
undefined WndProc;
undefined DAT_1400c36e2;
undefined vswprintf;
undefined DAT_1400c36ea;
undefined1 syncScroll;
undefined DAT_1400c38fe;
undefined8 hLineNos;
undefined DAT_1400c3904;
undefined DAT_1400c390a;
undefined *PTR_~stringbuf_1400dc540;
pointer PTR_~istringstream_1400dcae8;
pointer PTR_~istringstream_1400dcb10;
undefined *PTR_~streambuf_1400dd810;
pointer PTR_~ios_1400ded80;
undefined DAT_1400c3945;
undefined do_widen;
undefined DAT_1400d6cd8;
undefined DAT_1400d6d00;
undefined DAT_1400c39a8;
undefined DAT_1400c3d35;
undefined DAT_1400c398e;
undefined8 hBtnSave;
undefined8 hBrEd;
undefined hBtnSetup;
undefined8 hBtnIso;
undefined8 hMono;
undefined8 hBrPanel;
undefined8 hBrBg;
undefined8 hRichLib;
undefined DAT_1400c654c;
undefined DAT_1400c65b4;
undefined1 DAT_1400c65b8;
undefined DAT_1400c65bb;
undefined DAT_1400c65d4;
pointer PTR_s_signed_char_1400c7b60;
undefined DAT_1400c7b68;
pointer PTR_s_decimal32_1400c7ea0;
pointer PTR_s_decimal64_1400c7ec0;
pointer PTR_s_decimal128_1400c7ee0;
pointer PTR_DAT_1400c7f00;
pointer PTR_s_char8_t_1400c7f20;
pointer PTR_s_char16_t_1400c7f40;
pointer PTR_s_char32_t_1400c7f60;
pointer PTR_s_decltype(nullptr)_1400c7f80;
pointer PTR_s__Float_1400c7fa0;
pointer PTR_s_std_bfloat16_t_1400c7fc0;
uint switchdataD_1400c6638;
uint switchdataD_1400c65e8;
pointer PTR_DAT_1400c7340;
uint switchdataD_1400c6728;
uint switchdataD_1400c6780;
undefined DAT_1400c6867;
undefined1 DAT_1400c686b;
undefined DAT_1400c6870;
undefined1 DAT_1400c6871;
undefined1 DAT_1400c6873;
undefined1 DAT_1400c6889;
undefined DAT_1400c688e;
undefined1 DAT_1400c68f5;
undefined DAT_1400c68f9;
undefined1 DAT_1400c6a7b;
undefined DAT_1400c6a7e;
undefined1 DAT_1400c6ac6;
undefined DAT_1400c6acd;
undefined1 DAT_1400c6ace;
undefined1 DAT_1400c6ad0;
undefined1 DAT_1400c69da;
undefined DAT_1400c69df;
undefined1 DAT_1400c6cca;
undefined1 DAT_1400c6ccc;
undefined1 DAT_1400c6ce3;
undefined DAT_1400c6ce6;
undefined1 DAT_1400c6874;
undefined1 DAT_1400c6876;
undefined1 DAT_1400c6885;
undefined DAT_1400c6888;
undefined1 DAT_1400c6e30;
undefined1 DAT_1400c6e32;
undefined1 DAT_1400c6e3c;
undefined DAT_1400c6e40;
undefined1 DAT_1400c6e41;
undefined DAT_1400c6e45;
undefined1 DAT_1400c6e46;
undefined DAT_1400c6e4b;
undefined FUN_14000a030;
func_ptr *p;
undefined UNK_1400bf2a8;
undefined __do_global_dtors;
undefined8 ___CTOR_LIST__;
int initialized;
int _CRT_MT;
int maxSections;
sSecInfo *the_secs;
int was_init;
fUserMathErr stUserMathErr;
CRITICAL_SECTION __mingwthr_cs;
__mingwthr_key_t *key_dtor_list;
int __mingwthr_cs_init;
IMAGE_SECTION_HEADER IMAGE_SECTION_HEADER_140000188;
undefined DAT_140000480;
IMAGE_DOS_HEADER IMAGE_DOS_HEADER_140000000;
dword DWORD_1400fd000;
undefined8 .bss;
DWORD DAT_1400fc208;
undefined4 .data;
undefined DAT_1400c0254;
undefined DAT_1400fc220;
undefined .text;
FPI fpi;
FPI fpi0;
undefined fpi0.0;
anon_struct_16_2_f7718127[11] cmap;
int[23] fivesbits;
double[23] __tens_D2A;
double[5] __bigtens_D2A;
double[5] __tinytens_D2A;
uchar[256] __hexdig_D2A;
undefined DAT_1400c9deb;
undefined DAT_1400c9df2;
undefined .rdata;
undefined dtoa_lock_cleanup;
long dtoa_CS_init;
CRITICAL_SECTION[2] dtoa_CritSec;
__Bigint *[10] freelist;
double *pmem_next;
__Bigint *p5s;
int[3] p05;
undefined *PTR__fmode_1400fd7c0;
undefined *PTR__commode_1400fd7a8;
undefined *PTR__acmdln_1400fd790;
_func_BOOLEAN_void_ptr_ULONG *pRtlGenRandom;
undefined mingw_rand_s;
_func_errno_t_uint_ptr *__imp_rand_s;
_invalid_parameter_handler handler;
mbstate_t internal_mbstate;
mbstate_t s_mbstate;
undefined *PTR_~__class_type_info_1400db5c0;
undefined *PTR_~__si_class_type_info_1400db650;
undefined *PTR_~__vmi_class_type_info_1400db6b0;
undefined *typeinfo;
undefined .text$__tcf_0;
undefined1 .data$_ZGVZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex;
undefined .data$_ZZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex;
undefined *PTR_.text$_ZN12_GLOBAL__N_117io_error_categoryD2Ev_1400db710;
undefined8 DAT_1400c09e8;
undefined .data$_ZN12_GLOBAL__N_19fake_condE;
undefined8 .data$_ZN12_GLOBAL__N_1L11static_condE;
undefined .data$_ZN12_GLOBAL__N_114emergency_poolE;
undefined .data$_ZN12_GLOBAL__N_110fake_mutexE;
undefined8 .data$_ZN12_GLOBAL__N_1L12static_mutexE;
undefined *PTR_~__concurrence_unlock_error_1400db890;
undefined ~__concurrence_unlock_error;
undefined *PTR_~recursive_init_error_1400db800;
undefined *PTR_~__concurrence_lock_error_1400db830;
undefined *PTR_~__concurrence_wait_error_1400db860;
undefined UNK_140021d1d;
undefined DAT_1400c4b51;
undefined1 .data$_ZZN9__gnu_cxx27__verbose_terminate_handlerEvE11terminating;
_f__acrt_iob_func __imp___acrt_iob_func;
undefined *PTR_~__concurrence_broadcast_error_1400db8c0;
undefined ~__concurrence_lock_error;
undefined ~__concurrence_broadcast_error;
undefined DAT_00000010;
pointer .data$_ZN12_GLOBAL__N_125generic_category_instanceE;
undefined do_neg_format;
undefined do_pos_format;
undefined do_curr_symbol;
undefined do_frac_digits;
undefined do_decimal_point;
undefined do_negative_sign;
undefined do_positive_sign;
undefined do_thousands_sep;
undefined do_grouping;
undefined8 id;
pointer PTR_~__numpunct_cache_1400ddb60;
pointer PTR_~__numpunct_cache_1400ddb80;
undefined1 id;
undefined .text$_ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
undefined .text$_ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
undefined .text$_ZNSt12_GLOBAL__N_112__x86_rdrandEPv;
undefined .text$_ZNSt12_GLOBAL__N_112__x86_rdseedEPv;
undefined .text$_ZNSt12_GLOBAL__N_114__winxp_rand_sEPv;
undefined .text$_ZNSt12_GLOBAL__N_119__x86_rdseed_rdrandEPv;
undefined do_tolower;
undefined do_toupper;
undefined DAT_1400c5220;
undefined DAT_1400c52b0;
undefined do_narrow;
undefined do_is;
undefined4 _S_refcount;
pointer .rdata$_ZN9__gnu_cxxL14category_namesE;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db8f0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db970;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400db9f0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dba70;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbaf0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbb90;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc30;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbce0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbd90;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbdf0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe50;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbeb0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf10;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dbff0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc0d0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc1b0;
pointer PTR_~moneypunct_1400dd0f0;
undefined *PTR_~moneypunct_1400dd160;
undefined *PTR_~moneypunct_1400dd1d0;
undefined *PTR_~moneypunct_1400dd240;
pointer PTR_~__moneypunct_cache_1400dddd0;
pointer PTR_~__moneypunct_cache_1400dddf0;
pointer PTR_~__moneypunct_cache_1400dde10;
pointer PTR_~__moneypunct_cache_1400dde30;
undefined *PTR_~collate_1400de8a0;
undefined *PTR_~collate_1400de8e0;
undefined *PTR_~numpunct_1400debb0;
undefined *PTR_~numpunct_1400dec00;
undefined *PTR_~time_get_1400dec50;
undefined *PTR_~time_get_1400deca0;
undefined *PTR_~money_get_1400dedf0;
undefined *PTR_~money_get_1400dee20;
undefined *PTR_~money_put_1400dee50;
undefined *PTR_~money_put_1400dee80;
pointer typeinfo;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db930;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db9b0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400dba30;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dbab0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbb40;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbbe0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc80;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbd30;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbdc0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbe20;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe80;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbee0;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf80;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dc060;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc140;
undefined *PTR_.text$_ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc220;
undefined *PTR_~moneypunct_1400dc300;
undefined *PTR_~moneypunct_1400dc370;
undefined *PTR_~moneypunct_1400dc3e0;
undefined *PTR_~moneypunct_1400dc450;
undefined *PTR_~collate_1400dcc20;
undefined *PTR_~collate_1400dcc60;
undefined *PTR_~numpunct_1400dcd20;
undefined *PTR_~numpunct_1400dcd70;
undefined *PTR_~time_get_1400dcdc0;
undefined *PTR_~time_get_1400dce20;
undefined *PTR_~money_get_1400dce80;
undefined *PTR_~money_get_1400dceb0;
undefined *PTR_~money_put_1400dcee0;
undefined *PTR_~money_put_1400dcf10;
undefined do_hash;
undefined do_open;
undefined do_close;
undefined do_truename;
undefined do_falsename;
undefined do_date_order;
ulonglong UNK_00000018;
undefined *_S_timezones;
uint switchdataD_1400c552c;
undefined UNK_140037367;
undefined do_get;
undefined UNK_14003a3c4;
uint switchdataD_1400c58bc;
undefined UNK_14003cec6;
pointer _S_atoms;
uint UINT_1400c53f4;
uint switchdataD_1400c546c;
uint switchdataD_1400c57fc;
undefined do_put;
undefined UNK_140043811;
undefined UNK_140044d2c;
undefined UNK_14005ea70;
undefined UNK_1400604e0;
undefined s_random_device:_rdseed_failed_1400c5d1a;
undefined UNK_14006c31b;
uint caseD_5;
uint UINT_1400c5b30;
uint UINT_1400c5c38;
uint caseD_5f;
undefined8 UNK_00000000;
byte UNK_400c5cc0;
byte UNK_14035d479;
undefined1 UNK_19f2c9b40;
undefined1 UNK_1a43190a0;
undefined8 UNK_1a6588b5b;
uint caseD_a;
undefined UNK_140065203;
undefined DAT_1400c6146;
undefined UNK_140069d50;
uint UINT_1400c62c8;
int UNK_1d75fffa;
undefined UNK_140070369;
undefined UNK_140071528;
undefined1 _S_empty_rep_storage;
undefined DAT_1400d6e18;
undefined DAT_1400d6e40;
pointer PTR_~iostream_1400dcfa8;
pointer PTR_~iostream_1400dcfd0;
pointer PTR_~iostream_1400dcff8;
undefined DAT_1400d6e68;
undefined DAT_1400d6e90;
pointer PTR_~istream_1400dd028;
pointer PTR_~istream_1400dd050;
pointer PTR_~ostream_1400dd078;
pointer PTR_~ostream_1400dd0a0;
undefined *PTR_~bad_typeid_1400dd0c0;
undefined ~__moneypunct_cache;
undefined DAT_1400c4cf2;
undefined DAT_1400c8382;
undefined DAT_1400c8383;
undefined DAT_1400c8386;
undefined DAT_1400c83ce;
undefined DAT_1400c83d2;
undefined DAT_1400c83d6;
undefined DAT_1400c83da;
undefined DAT_1400c83de;
undefined DAT_1400c83e2;
undefined DAT_1400c83e6;
undefined DAT_1400c8401;
undefined DAT_1400c840b;
undefined DAT_1400c8410;
undefined DAT_1400c8440;
undefined DAT_1400c8444;
undefined DAT_1400c8448;
undefined DAT_1400c844c;
undefined DAT_1400c8450;
undefined DAT_1400c8454;
undefined DAT_1400c8458;
undefined DAT_1400c845c;
undefined DAT_1400c8460;
undefined DAT_1400c8464;
undefined DAT_1400c8468;
pointer PTR_~__timepunct_cache_1400ddbd0;
pointer PTR_~__timepunct_1400dd2b0;
undefined ~__timepunct_cache;
undefined DAT_1400c860c;
undefined DAT_1400c8614;
undefined DAT_1400c8490;
undefined DAT_1400c861c;
undefined DAT_1400c8492;
undefined DAT_1400c8624;
undefined DAT_1400c8498;
undefined DAT_1400c862c;
undefined DAT_1400c8634;
undefined DAT_1400c863c;
undefined DAT_1400c8644;
undefined DAT_1400c864c;
undefined DAT_1400c8654;
undefined DAT_1400c865c;
pointer PTR_~__timepunct_cache_1400ddbf0;
undefined DAT_1400c8528;
undefined DAT_1400c8530;
undefined DAT_1400c8538;
undefined DAT_1400c8540;
undefined DAT_1400c8548;
undefined DAT_1400c8550;
undefined DAT_1400c8558;
undefined DAT_1400c858e;
undefined DAT_1400c85ac;
pointer PTR_~__timepunct_1400dd2d0;
undefined *PTR_~logic_error_1400dd2f0;
undefined *PTR_~range_error_1400dd320;
pointer PTR_~runtime_error_1400dd5f0;
undefined2 .rdata$_ZNSt12_GLOBAL__N_1L8mon_ydayE;
undefined *PTR_~ctype_byname_1400dd350;
undefined *PTR_~ctype_byname_1400dd3b0;
undefined *PTR_~ctype_1400de5e0;
undefined DAT_1400de1a0;
undefined *PTR_~domain_error_1400dd430;
undefined *PTR_~length_error_1400dd460;
undefined *PTR_~out_of_range_1400dd490;
undefined DAT_1400c86b5;
undefined *PTR_~system_error_1400dd4c0;
uint switchdataD_1400c4da8;
uint UINT_1400c56e8;
uint UINT_1400c56f8;
uint UINT_1400c5700;
uint switchdataD_1400c56d0;
uint switchdataD_1400c5728;
char UNK_6403db1d2;
pointer PTR_~failure_1400dcf40;
undefined *PTR_~__ios_failure_1400dd4f0;
pointer PTR_~wistream_1400dd558;
pointer PTR_~wistream_1400dd580;
pointer PTR_~wios_1400deda0;
pointer PTR_~wostream_1400dd5a8;
pointer PTR_~wostream_1400dd5d0;
undefined DAT_1400d6eb8;
undefined DAT_1400d6ee0;
pointer PTR_~wiostream_1400dd628;
pointer PTR_~wiostream_1400dd650;
pointer PTR_~wiostream_1400dd678;
undefined DAT_1400d6f08;
undefined DAT_1400d6f30;
undefined *PTR_~codecvt_byname_1400dd6a0;
undefined *PTR_~codecvt_byname_1400dd700;
undefined *PTR_~collate_byname_1400dd760;
undefined *PTR_~collate_byname_1400dd7a0;
undefined *PTR_~overflow_error_1400dd7e0;
undefined seekoff;
undefined seekpos;
undefined underflow;
undefined overflow;
undefined uflow;
undefined sync;
undefined pbackfail;
undefined showmanyc;
undefined imbue;
undefined setbuf;
undefined *PTR_~wstreambuf_1400dd890;
undefined *PTR_~messages_byname_1400dd910;
undefined *PTR_~messages_1400deb30;
undefined *PTR_~messages_byname_1400dd950;
undefined *PTR_~messages_1400deb70;
undefined *PTR_~numpunct_byname_1400dd990;
undefined *PTR_~numpunct_byname_1400dd9e0;
undefined *PTR_~time_get_byname_1400dda30;
pointer PTR_~time_get_byname_1400dda80;
undefined *PTR_~time_put_byname_1400ddad0;
undefined *PTR_~time_put_1400decf0;
undefined *PTR_~time_put_byname_1400ddb00;
undefined *PTR_~time_put_1400ded20;
undefined *PTR_~underflow_error_1400ddb30;
pointer _S_atoms_in;
pointer _S_atoms_out;
undefined *PTR_~invalid_argument_1400ddba0;
undefined *PTR_~moneypunct_byname_1400ddc10;
undefined *PTR_~moneypunct_byname_1400ddc80;
undefined *PTR_~moneypunct_byname_1400ddcf0;
undefined *PTR_~moneypunct_byname_1400ddd60;
undefined DAT_1400de280;
undefined DAT_1400de340;
undefined *PTR_~__codecvt_utf8_base_1400ddf10;
undefined *PTR_~__iosfail_type_info_1400ddf70;
undefined *PTR_~__codecvt_utf16_base_1400de090;
undefined *PTR_~bad_array_new_length_1400de0f0;
undefined *PTR_~__codecvt_utf8_utf16_base_1400de520;
pointer .data$_ZN12_GLOBAL__N_124system_category_instanceE;
undefined .rdata$_ZZNSt5ctypeIcE13classic_tableEvE16_S_classic_table;
undefined *PTR_~ctype_1400de580;
undefined .data$_ZN12_GLOBAL__N_18c_localeE;
undefined _S_initialize_once;
undefined .data$_ZN12_GLOBAL__N_113c_locale_implE;
undefined8 _S_classic;
undefined1 _S_once;
undefined8 _S_global;
undefined DAT_1400c1ba8;
undefined DAT_1400c1bb0;
undefined DAT_1400c1cc8;
undefined DAT_1400c1cd0;
undefined DAT_1400c1c50;
undefined DAT_1400c1c48;
undefined DAT_1400c1c70;
undefined DAT_1400c1c68;
undefined DAT_1400c1c08;
undefined DAT_1400c1c28;
undefined DAT_1400c1be8;
undefined DAT_1400c1b68;
undefined DAT_1400c1bc8;
undefined DAT_1400c1bd0;
undefined DAT_1400c1ce8;
undefined DAT_1400c1cf0;
undefined DAT_1400c1c90;
undefined DAT_1400c1c88;
undefined DAT_1400c1ca8;
undefined DAT_1400c1cb0;
undefined DAT_1400c1c18;
undefined DAT_1400c1c38;
undefined DAT_1400c1bf8;
undefined DAT_1400c1b88;
undefined .data$_ZNSt12_GLOBAL__N_110messages_wE;
undefined .data$_ZNSt12_GLOBAL__N_110time_get_wE;
undefined .data$_ZNSt12_GLOBAL__N_111money_put_wE;
undefined .data$_ZNSt12_GLOBAL__N_111money_get_wE;
undefined .data$_ZNSt12_GLOBAL__N_113moneypunct_wfE;
undefined .data$_ZNSt12_GLOBAL__N_113moneypunct_wtE;
undefined .data$_ZNSt12_GLOBAL__N_110numpunct_wE;
undefined .data$_ZNSt12_GLOBAL__N_19collate_wE;
undefined .data$_ZNSt12_GLOBAL__N_110messages_cE;
undefined .data$_ZNSt12_GLOBAL__N_110time_get_cE;
undefined .data$_ZNSt12_GLOBAL__N_111money_put_cE;
undefined .data$_ZNSt12_GLOBAL__N_111money_get_cE;
undefined .data$_ZNSt12_GLOBAL__N_113moneypunct_cfE;
undefined .data$_ZNSt12_GLOBAL__N_113moneypunct_ctE;
undefined .data$_ZNSt12_GLOBAL__N_110numpunct_cE;
undefined .data$_ZNSt12_GLOBAL__N_19collate_cE;
undefined ~facet;
pointer _S_twinned_facets;
undefined1 .data$_ZGVZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex;
undefined .data$_ZZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex;
undefined DAT_1400c1668;
undefined DAT_1400c1648;
undefined DAT_1400c1658;
undefined DAT_1400c0a48;
undefined DAT_1400c0a08;
undefined DAT_1400c0a10;
undefined DAT_1400c0a18;
undefined1 DAT_1400c0a20;
undefined DAT_1400c0a28;
undefined DAT_1400c0a30;
undefined DAT_1400c0a38;
undefined DAT_1400c0a40;
undefined1 DAT_1400c0a88;
undefined DAT_1400c0768;
undefined DAT_1400c0770;
undefined DAT_1400c1a18;
undefined DAT_1400c1a38;
undefined DAT_1400c1848;
undefined DAT_1400c1850;
undefined DAT_1400c0ee1;
undefined DAT_1400c0ec8;
undefined DAT_1400c0ed0;
undefined DAT_1400c0ed8;
undefined1 DAT_1400c0ee0;
undefined DAT_1400c0ee8;
undefined DAT_1400c0ef0;
undefined DAT_1400c0ef8;
undefined DAT_1400c0f00;
undefined DAT_1400c0f08;
undefined DAT_1400c0f10;
undefined DAT_1400c0f18;
undefined DAT_1400c0f1c;
undefined1 DAT_1400c0f2f;
undefined DAT_1400c0928;
undefined DAT_1400c0930;
undefined DAT_1400c0f48;
undefined1 DAT_1400c0f60;
undefined DAT_1400c0f61;
undefined DAT_1400c0f50;
undefined DAT_1400c0f58;
undefined DAT_1400c0f68;
undefined DAT_1400c0f70;
undefined DAT_1400c0f78;
undefined DAT_1400c0f80;
undefined DAT_1400c0f88;
undefined DAT_1400c0f90;
undefined DAT_1400c0f98;
undefined DAT_1400c0f9c;
undefined1 DAT_1400c0faf;
undefined DAT_1400c0948;
undefined DAT_1400c0950;
undefined DAT_1400c0808;
undefined DAT_1400c0828;
undefined DAT_1400c0b88;
undefined1 DAT_1400c0d08;
undefined DAT_1400c0d00;
undefined DAT_1400c0b90;
undefined DAT_1400c0ba0;
undefined DAT_1400c0bb0;
undefined DAT_1400c0bc0;
undefined DAT_1400c0bd0;
undefined DAT_1400c0be0;
undefined DAT_1400c0bf0;
undefined DAT_1400c0c00;
undefined DAT_1400c0c10;
undefined DAT_1400c0c20;
undefined DAT_1400c0c30;
undefined DAT_1400c0c40;
undefined DAT_1400c0c50;
undefined DAT_1400c0c60;
undefined DAT_1400c0c70;
undefined DAT_1400c0c80;
undefined DAT_1400c0c90;
undefined DAT_1400c0ca0;
undefined DAT_1400c0cb0;
undefined DAT_1400c0cc0;
undefined DAT_1400c0cd0;
undefined DAT_1400c0ce0;
undefined DAT_1400c0cf0;
undefined DAT_1400c07a8;
undefined DAT_1400c07c8;
undefined DAT_1400c0aa8;
undefined1 DAT_1400c0ac0;
undefined DAT_1400c0ab0;
undefined DAT_1400c0ab8;
undefined DAT_1400c0ac8;
undefined DAT_1400c0ad0;
undefined DAT_1400c0ad8;
undefined DAT_1400c0ae0;
undefined DAT_1400c0ae8;
undefined1 DAT_1400c0b68;
undefined DAT_1400c0788;
undefined DAT_1400c0790;
undefined DAT_1400c1a28;
undefined DAT_1400c1a48;
undefined DAT_1400c1868;
undefined DAT_1400c1870;
undefined DAT_1400c0fc8;
undefined1 DAT_1400c0fe0;
undefined DAT_1400c0fd0;
undefined DAT_1400c0fd8;
undefined DAT_1400c0fe2;
undefined DAT_1400c0fe8;
undefined DAT_1400c0ff0;
undefined DAT_1400c0ff8;
undefined DAT_1400c1000;
undefined DAT_1400c1008;
undefined DAT_1400c1010;
undefined DAT_1400c1018;
undefined DAT_1400c101c;
undefined1 DAT_1400c103a;
undefined DAT_1400c0968;
undefined DAT_1400c0970;
undefined DAT_1400c1048;
undefined1 DAT_1400c1060;
undefined DAT_1400c1050;
undefined DAT_1400c1058;
undefined DAT_1400c1062;
undefined DAT_1400c1068;
undefined DAT_1400c1070;
undefined DAT_1400c1078;
undefined DAT_1400c1080;
undefined DAT_1400c1088;
undefined DAT_1400c1090;
undefined DAT_1400c1098;
undefined DAT_1400c109c;
undefined1 DAT_1400c10ba;
undefined DAT_1400c0988;
undefined DAT_1400c0990;
undefined DAT_1400c0818;
undefined DAT_1400c0838;
undefined DAT_1400c0d28;
undefined1 DAT_1400c0ea8;
undefined DAT_1400c0ea0;
undefined DAT_1400c0d30;
undefined DAT_1400c0d40;
undefined DAT_1400c0d50;
undefined DAT_1400c0d60;
undefined DAT_1400c0d70;
undefined DAT_1400c0d80;
undefined DAT_1400c0d90;
undefined DAT_1400c0da0;
undefined DAT_1400c0db0;
undefined DAT_1400c0dc0;
undefined DAT_1400c0dd0;
undefined DAT_1400c0de0;
undefined DAT_1400c0df0;
undefined DAT_1400c0e00;
undefined DAT_1400c0e10;
undefined DAT_1400c0e20;
undefined DAT_1400c0e30;
undefined DAT_1400c0e40;
undefined DAT_1400c0e50;
undefined DAT_1400c0e60;
undefined DAT_1400c0e70;
undefined DAT_1400c0e80;
undefined DAT_1400c0e90;
undefined DAT_1400c07b8;
undefined DAT_1400c07d8;
undefined DAT_1400c07e8;
undefined DAT_1400c07f8;
undefined DAT_1400c09a8;
undefined DAT_1400c09b8;
pointer PTR_~codecvt_1400de660;
pointer PTR_~codecvt_1400de6c0;
pointer PTR_~codecvt_1400de720;
pointer PTR_~codecvt_1400de780;
undefined *PTR_~num_get_1400de920;
undefined *PTR_~num_get_1400de9a0;
undefined *PTR_~num_put_1400dea20;
undefined *PTR_~num_put_1400dea80;
undefined .data$_ZN12_GLOBAL__N_117timepunct_cache_wE;
undefined .data$_ZN12_GLOBAL__N_119moneypunct_cache_wfE;
undefined .data$_ZN12_GLOBAL__N_119moneypunct_cache_wtE;
undefined .data$_ZN12_GLOBAL__N_116numpunct_cache_wE;
undefined .data$_ZN12_GLOBAL__N_117timepunct_cache_cE;
undefined .data$_ZN12_GLOBAL__N_119moneypunct_cache_cfE;
undefined .data$_ZN12_GLOBAL__N_119moneypunct_cache_ctE;
undefined .data$_ZN12_GLOBAL__N_116numpunct_cache_cE;
undefined .data$_ZN12_GLOBAL__N_114codecvt_c32_c8E;
undefined .data$_ZN12_GLOBAL__N_114codecvt_c16_c8E;
undefined .data$_ZN12_GLOBAL__N_111codecvt_c32E;
undefined .data$_ZN12_GLOBAL__N_111codecvt_c16E;
undefined .data$_ZN12_GLOBAL__N_110messages_wE;
undefined .data$_ZN12_GLOBAL__N_110time_put_wE;
undefined .data$_ZN12_GLOBAL__N_110time_get_wE;
undefined .data$_ZN12_GLOBAL__N_111timepunct_wE;
undefined .data$_ZN12_GLOBAL__N_111money_put_wE;
undefined .data$_ZN12_GLOBAL__N_111money_get_wE;
undefined .data$_ZN12_GLOBAL__N_113moneypunct_wfE;
undefined .data$_ZN12_GLOBAL__N_113moneypunct_wtE;
undefined .data$_ZN12_GLOBAL__N_19codecvt_wE;
undefined .data$_ZN12_GLOBAL__N_19num_put_wE;
undefined .data$_ZN12_GLOBAL__N_19num_get_wE;
undefined .data$_ZN12_GLOBAL__N_110numpunct_wE;
undefined .data$_ZN12_GLOBAL__N_19collate_wE;
undefined .data$_ZN12_GLOBAL__N_17ctype_wE;
undefined .data$_ZN12_GLOBAL__N_110messages_cE;
undefined .data$_ZN12_GLOBAL__N_110time_put_cE;
undefined .data$_ZN12_GLOBAL__N_110time_get_cE;
undefined .data$_ZN12_GLOBAL__N_111timepunct_cE;
undefined .data$_ZN12_GLOBAL__N_111money_put_cE;
undefined .data$_ZN12_GLOBAL__N_111money_get_cE;
undefined .data$_ZN12_GLOBAL__N_113moneypunct_cfE;
undefined .data$_ZN12_GLOBAL__N_113moneypunct_ctE;
undefined .data$_ZN12_GLOBAL__N_19codecvt_cE;
undefined .data$_ZN12_GLOBAL__N_19num_put_cE;
undefined .data$_ZN12_GLOBAL__N_19num_get_cE;
undefined .data$_ZN12_GLOBAL__N_110numpunct_cE;
undefined .data$_ZN12_GLOBAL__N_19collate_cE;
undefined .data$_ZN12_GLOBAL__N_17ctype_cE;
undefined8 .data$_ZN12_GLOBAL__N_19cache_vecE;
undefined8 .data$_ZN12_GLOBAL__N_19facet_vecE;
undefined .data$_ZN12_GLOBAL__N_16name_cE;
undefined .data$_ZN12_GLOBAL__N_18name_vecE;
undefined1 _S_c_name;
undefined8 _S_c_locale;
undefined DAT_1400c4ce2;
undefined *PTR_~collate_byname_1400dc4c0;
undefined *PTR_~collate_byname_1400dc500;
undefined *PTR_~wstringbuf_1400dc5c0;
undefined *PTR_~messages_byname_1400dc640;
undefined *PTR_~messages_1400dcca0;
undefined *PTR_~messages_byname_1400dc680;
undefined *PTR_~messages_1400dcce0;
undefined *PTR_~numpunct_byname_1400dc6c0;
undefined *PTR_~numpunct_byname_1400dc710;
undefined *PTR_~time_get_byname_1400dc760;
undefined *PTR_~time_get_byname_1400dc7c0;
undefined *PTR_~moneypunct_byname_1400dc820;
undefined *PTR_~moneypunct_byname_1400dc890;
undefined *PTR_~moneypunct_byname_1400dc900;
undefined *PTR_~moneypunct_byname_1400dc970;
undefined DAT_1400d6b18;
undefined DAT_1400d6b40;
pointer PTR_~stringstream_1400dc9e8;
pointer PTR_~stringstream_1400dca10;
pointer PTR_~stringstream_1400dca38;
undefined DAT_1400d6b68;
undefined DAT_1400d6b90;
undefined *PTR_DAT_1400db3a8;
undefined DAT_1400d6bb8;
undefined DAT_1400d6be0;
pointer PTR_~wstringstream_1400dca68;
pointer PTR_~wstringstream_1400dca90;
pointer PTR_~wstringstream_1400dcab8;
undefined DAT_1400d6c88;
undefined DAT_1400d6cb0;
undefined *PTR_DAT_1400db3f8;
undefined DAT_1400d6d28;
undefined DAT_1400d6d50;
pointer PTR_~wistringstream_1400dcb38;
pointer PTR_~wistringstream_1400dcb60;
undefined DAT_1400d6d78;
undefined DAT_1400d6da0;
pointer PTR_~ostringstream_1400dcb88;
pointer PTR_~ostringstream_1400dcbb0;
undefined DAT_1400d6dc8;
undefined DAT_1400d6df0;
pointer PTR_~wostringstream_1400dcbd8;
pointer PTR_~wostringstream_1400dcc00;
undefined DAT_1400c4d01;
undefined DAT_1400de220;
undefined DAT_1400de2e0;
undefined *PTR_~codecvt_1400de7e0;
undefined DAT_1400de3a0;
undefined *PTR_~codecvt_1400de840;
undefined DAT_1400de400;
undefined *PTR_~bad_cast_1400deae0;
undefined4 .data$_ZZNSt8ios_base6xallocEvE6_S_top;
undefined *PTR_~failure_1400dcf70;
pointer PTR_~ios_base_1400deb10;
undefined DAT_1400c4d31;
undefined ~__numpunct_cache;
undefined *PTR_~bad_alloc_1400ded50;
pointer __unexpected_handler;
pointer __terminate_handler;
undefined __verbose_terminate_handler;
undefined DAT_1400c8200;
undefined DAT_1400c8210;
undefined terminate;
undefined8 .data$_ZN12_GLOBAL__N_113__new_handlerE;
pointer .data$_ZN12_GLOBAL__N_120io_category_instanceE;
undefined ~failure;
undefined UNK_1400b90cf;
undefined ~out_of_range;
undefined .rdata$CSWTCH.434;
undefined .rdata$CSWTCH.825;
undefined ~bad_alloc;
void *DAT_1400c09f0;
longlong DAT_1400c09f8;
undefined .data$__emutls_v._ZZN12_GLOBAL__N_110get_globalEvE6global;
undefined ~recursive_init_error;
undefined .data$_ZZN12_GLOBAL__N_115get_static_condEvE4once;
undefined ~__concurrence_wait_error;
undefined .data$_ZZN12_GLOBAL__N_116get_static_mutexEvE4once;
undefined .text$_ZN12_GLOBAL__N_1L16init_static_condEv;
undefined .text$_ZN12_GLOBAL__N_1L4initEv;
undefined .text$_ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception;
undefined .text$_ZN10__cxxabiv1L21__gxx_personality_impEiiyP17_Unwind_ExceptionP15_Unwind_Context;
undefined *PTR_~bad_exception_1400dd520;
undefined ~bad_exception;
undefined ~bad_array_new_length;
undefined ~bad_cast;
undefined ~bad_typeid;
undefined ~logic_error;
undefined ~domain_error;
undefined ~invalid_argument;
undefined ~length_error;
undefined ~runtime_error;
undefined ~range_error;
undefined ~overflow_error;
undefined ~underflow_error;
size_t DAT_1400c09f8;
undefined8 DAT_1400c09f0;
undefined ~__ios_failure;
undefined ~system_error;
undefined .text$__tcf_1;

void __mingw_invalidParameterHandler
               (wchar_t *expression,wchar_t *function,wchar_t *file,uint line,uintptr_t pReserved)

{
  return;
}



// WARNING: Removing unreachable block (ram,0x000140001118)
// WARNING: Removing unreachable block (ram,0x000140001122)
// WARNING: Unknown calling convention -- yet parameter storage is locked

int pre_c_init(void)

{
  int *piVar1;
  
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pPEHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER32 pNTHeader32@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER64 pNTHeader64@[???]
  __mingw_initltsdrot_force = 1;
  __mingw_initltsdyn_force = 1;
  __mingw_initltssuo_force = 1;
  managedapp = 0;
  if (__mingw_app_type == 0) {
    __set_app_type(1);
  }
  else {
    __set_app_type(2);
  }
  piVar1 = __p__fmode();
  *piVar1 = _fmode;
  piVar1 = __p__commode();
  *piVar1 = _commode;
  _setargv();
  if (_MINGW_INSTALL_DEBUG_MATHERR != 1) {
    return 0;
  }
  __mingw_setusermatherr(_matherr);
  return 0;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void pre_cpp_init(void)

{
  startinfo.newmode = _newmode;
  __getmainargs(&argc,&argv,&envp,_dowildcard,&startinfo);
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int __tmainCRTStartup(void)

{
  int iVar1;
  undefined8 *puVar2;
  bool bVar3;
  _TCHAR **pp_Var4;
  int iVar5;
  void *pvVar6;
  void *pvVar7;
  _TCHAR **pp_Var8;
  size_t sVar9;
  void *pvVar10;
  longlong lVar11;
  size_t _Size;
  _TCHAR **pp_Var12;
  longlong unaff_GS_OFFSET;
  
                    // Unresolved local var: void * lock_free@[???]
                    // Unresolved local var: void * fiberid@[???]
                    // Unresolved local var: int nested@[???]
                    // Unresolved local var: ulonglong ret@[???]
  pvVar10 = *(void **)(*(longlong *)(unaff_GS_OFFSET + 0x30) + 8);
  while( true ) {
    LOCK();
    pvVar7 = (void *)0x0;
    pvVar6 = pvVar10;
    if (__native_startup_lock != (void *)0x0) {
      pvVar7 = __native_startup_lock;
      pvVar6 = __native_startup_lock;
    }
    __native_startup_lock = pvVar6;
    UNLOCK();
    if (pvVar7 == (void *)0x0) break;
    if (pvVar10 == pvVar7) {
      bVar3 = true;
joined_r0x0001400011ec:
      if (__native_startup_state == __initializing) {
        _amsg_exit(0x1f);
      }
      else if (__native_startup_state == __uninitialized) {
        __native_startup_state = __initializing;
        _initterm(__xi_a,__xi_z);
      }
      else {
        has_cctor = 1;
      }
      if (__native_startup_state == __initializing) {
        _initterm(__xc_a,__xc_z);
        __native_startup_state = __initialized;
      }
      if (!bVar3) {
        LOCK();
        __native_startup_lock = (void *)0x0;
        UNLOCK();
      }
      __dyn_tls_init((HANDLE)0x0,2,(LPVOID)0x0);
      _pei386_runtime_relocator();
      __mingw_oldexcpt_handler =
           (LPTOP_LEVEL_EXCEPTION_FILTER)SetUnhandledExceptionFilter(_gnu_exception_handler);
      mingw_set_invalid_parameter_handler(__mingw_invalidParameterHandler);
      _fpreset();
      iVar5 = argc;
                    // Unresolved local var: _TCHAR * * avl@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: _TCHAR * * n@[???]
      iVar1 = argc + 1;
      _Size = (longlong)iVar1 * 8;
      pp_Var8 = malloc(_Size);
      pp_Var4 = argv;
      pp_Var12 = pp_Var8;
      if (0 < iVar5) {
        lVar11 = 0;
        do {
                    // Unresolved local var: size_t l@[???]
          sVar9 = strlen(*(char **)((longlong)pp_Var4 + lVar11));
          pvVar10 = malloc(sVar9 + 1);
          *(void **)((longlong)pp_Var8 + lVar11) = pvVar10;
          puVar2 = (undefined8 *)((longlong)pp_Var4 + lVar11);
          lVar11 = lVar11 + 8;
          memcpy(pvVar10,(void *)*puVar2,sVar9 + 1);
        } while (_Size - 8 != lVar11);
        pp_Var12 = pp_Var8 + (longlong)iVar1 + -1;
      }
      *pp_Var12 = (_TCHAR *)0x0;
      argv = pp_Var8;
      __main();
      iVar1 = argc;
      pp_Var4 = envp;
      *(_TCHAR ***)__initenv_exref = envp;
      mainret = main(iVar1,argv,pp_Var4);
      if (managedapp != 0) {
        if (has_cctor != 0) {
          return mainret;
        }
        _cexit();
        return mainret;
      }
                    // WARNING: Subroutine does not return
      exit(mainret);
    }
    Sleep(1000);
  }
  bVar3 = false;
  goto joined_r0x0001400011ec;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int WinMainCRTStartup(void)

{
  int iVar1;
  
                    // Unresolved local var: int ret@[???]
  __mingw_app_type = 1;
  iVar1 = __tmainCRTStartup();
  return iVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int mainCRTStartup(void)

{
  int iVar1;
  
                    // Unresolved local var: int ret@[???]
  __mingw_app_type = 0;
  iVar1 = __tmainCRTStartup();
  return iVar1;
}



int atexit(_PVFV func)

{
  _onexit_t p_Var1;
  
  p_Var1 = _onexit((_onexit_t)func);
  return -(uint)(p_Var1 == (_onexit_t)0x0);
}



void __gcc_register_frame(void)

{
  atexit(__gcc_deregister_frame);
  return;
}



void __gcc_deregister_frame(void)

{
  return;
}



int vswprintf(wchar_t *buf,size_t length,wchar_t *fmt,va_list argv)

{
  int iVar1;
  int iVar2;
  int max;
  
  if (length == 0) {
    iVar2 = __mingw_wpformat(0,buf,0,fmt,argv);
    return iVar2;
  }
  max = (int)length + -1;
  iVar1 = __mingw_wpformat(0,buf,max,fmt,argv);
  iVar2 = iVar1;
  if (max <= iVar1) {
    iVar2 = max;
  }
  buf[iVar2] = L'\0';
  return iVar1;
}



// void std::__cxx11::wstring::_M_construct<wchar_t const*>(wchar_t const*, wchar_t const*,
// std::forward_iterator_tag) [clone .isra.0]

void std::__cxx11::wstring::_M_construct<>(undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  ulonglong _Size;
  ulonglong local_30 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    if (uVar2 == 1) {
      *_Dst = *param_2;
      lVar1 = 2;
      goto LAB_1400014fd;
    }
  }
  else {
    _Dst = (undefined2 *)_M_create(param_1,local_30,0);
    *param_1 = _Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_1400014fd:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return;
}



// void std::__cxx11::wstring::_M_construct<wchar_t*>(wchar_t*, wchar_t*, std::forward_iterator_tag)
// [clone .isra.0]

void std::__cxx11::wstring::_M_construct<wchar_t*>
               (undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  ulonglong _Size;
  ulonglong local_30 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    if (uVar2 == 1) {
      *_Dst = *param_2;
      lVar1 = 2;
      goto LAB_14000158d;
    }
  }
  else {
    _Dst = (undefined2 *)_M_create(param_1,local_30,0);
    *param_1 = _Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_14000158d:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return;
}



// GetEdText[abi:cxx11]()

wstring * GetEdText_abi_cxx11_(wstring *param_1)

{
  int iVar1;
  
  iVar1 = GetWindowTextLengthW(hEditor);
  *(wstring **)param_1 = param_1 + 0x10;
  std::__cxx11::wstring::_M_construct(param_1,(longlong)iVar1,0);
  GetWindowTextW(hEditor,*(LPWSTR *)param_1,iVar1 + 1);
  return param_1;
}



// W2U(std::__cxx11::wstring const&)

longlong * W2U(longlong *param_1,undefined8 *param_2)

{
  int cbMultiByte;
  uint uVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  LPSTR local_58;
  undefined8 local_50;
  undefined4 local_48;
  undefined4 uStack_44;
  
  if (param_2[1] != 0) {
    cbMultiByte = WideCharToMultiByte(0xfde9,0,(LPCWSTR)*param_2,-1,(LPSTR)0x0,0,(LPCSTR)0x0,
                                      (LPBOOL)0x0);
    local_58 = (LPSTR)&local_48;
    std::__cxx11::string::_M_construct((string *)&local_58,(longlong)(cbMultiByte + -1),'\0');
    WideCharToMultiByte(0xfde9,0,(LPCWSTR)*param_2,-1,local_58,cbMultiByte,(LPCSTR)0x0,(LPBOOL)0x0);
    *param_1 = (longlong)(param_1 + 2);
    if (local_58 == (LPSTR)&local_48) {
      uVar4 = local_50 + 1;
      uVar1 = (uint)uVar4;
      if (uVar1 < 8) {
        if ((uVar4 & 4) == 0) {
          if (uVar1 != 0) {
            *(CHAR *)(param_1 + 2) = (CHAR)local_48;
            if ((uVar4 & 2) != 0) {
              *(undefined2 *)((longlong)param_1 + (uVar4 & 0xffffffff) + 0xe) =
                   *(undefined2 *)((longlong)&local_50 + (uVar4 & 0xffffffff) + 6);
            }
          }
        }
        else {
          *(undefined4 *)(param_1 + 2) = local_48;
          *(undefined4 *)((longlong)param_1 + (uVar4 & 0xffffffff) + 0xc) =
               *(undefined4 *)((longlong)&local_50 + (uVar4 & 0xffffffff) + 4);
        }
      }
      else {
        param_1[2] = CONCAT44(uStack_44,local_48);
        *(undefined8 *)((longlong)param_1 + (uVar4 & 0xffffffff) + 8) =
             *(undefined8 *)((longlong)&local_50 + (uVar4 & 0xffffffff));
        lVar3 = (longlong)(param_1 + 2) - ((ulonglong)(param_1 + 3) & 0xfffffffffffffff8);
        uVar1 = uVar1 + (int)lVar3 & 0xfffffff8;
        if (7 < uVar1) {
          uVar2 = 0;
          do {
            uVar4 = (ulonglong)uVar2;
            uVar2 = uVar2 + 8;
            *(undefined8 *)(((ulonglong)(param_1 + 3) & 0xfffffffffffffff8) + uVar4) =
                 *(undefined8 *)((longlong)&local_48 + (uVar4 - lVar3));
          } while (uVar2 < uVar1);
        }
      }
    }
    else {
      *param_1 = (longlong)local_58;
      param_1[2] = CONCAT44(uStack_44,local_48);
    }
    param_1[1] = local_50;
    return param_1;
  }
  param_1[1] = 0;
  *param_1 = (longlong)(param_1 + 2);
  *(undefined1 *)(param_1 + 2) = 0;
  return param_1;
}



// U2W(std::__cxx11::string const&)

longlong * U2W(longlong *param_1,undefined8 *param_2)

{
  int cchWideChar;
  LPWSTR local_58;
  longlong local_50;
  longlong local_48 [3];
  
  if (param_2[1] == 0) {
    param_1[1] = 0;
    *param_1 = (longlong)(param_1 + 2);
    *(undefined2 *)(param_1 + 2) = 0;
    return param_1;
  }
  cchWideChar = MultiByteToWideChar(0xfde9,0,(LPCSTR)*param_2,-1,(LPWSTR)0x0,0);
  local_58 = (LPWSTR)local_48;
  std::__cxx11::wstring::_M_construct((wstring *)&local_58,(longlong)(cchWideChar + -1),0);
  MultiByteToWideChar(0xfde9,0,(LPCSTR)*param_2,-1,local_58,cchWideChar);
  *param_1 = (longlong)(param_1 + 2);
  if (local_58 == (LPWSTR)local_48) {
    memcpy(param_1 + 2,local_48,local_50 * 2 + 2);
  }
  else {
    *param_1 = (longlong)local_58;
    param_1[2] = local_48[0];
  }
  param_1[1] = local_50;
  return param_1;
}



// WriteUTF8(std::__cxx11::wstring const&, std::__cxx11::string const&)

bool WriteUTF8(undefined8 *param_1,undefined8 *param_2)

{
  HANDLE hFile;
  DWORD local_1c [3];
  
  hFile = CreateFileW((LPCWSTR)*param_1,0x40000000,0,(LPSECURITY_ATTRIBUTES)0x0,2,0x80,(HANDLE)0x0);
  if (hFile != (HANDLE)0xffffffffffffffff) {
    WriteFile(hFile,(LPCVOID)*param_2,*(DWORD *)(param_2 + 1),local_1c,(LPOVERLAPPED)0x0);
    CloseHandle(hFile);
  }
  return hFile != (HANDLE)0xffffffffffffffff;
}



// TmpDir[abi:cxx11]()

undefined8 * TmpDir_abi_cxx11_(undefined8 *param_1)

{
  wstring *_Src;
  size_t sVar1;
  wstring *pwVar2;
  longlong lVar3;
  undefined1 *local_258;
  longlong local_250;
  undefined1 local_248 [16];
  wchar_t local_238 [268];
  
  GetTempPathW(0x104,local_238);
  local_258 = local_248;
  sVar1 = wcslen(local_238);
  std::__cxx11::wstring::_M_construct<>
            ((undefined8 *)&local_258,local_238,(longlong)(local_238 + sVar1));
  sVar1 = wcslen(L"osbuilder\\");
  if (sVar1 <= 0x1fffffffffffffffU - local_250) {
    pwVar2 = std::__cxx11::wstring::_M_append((wstring *)&local_258,L"osbuilder\\",sVar1);
    *param_1 = param_1 + 2;
    _Src = pwVar2 + 0x10;
    lVar3 = *(longlong *)(pwVar2 + 8);
    if (*(wstring **)pwVar2 == _Src) {
      memcpy(param_1 + 2,_Src,lVar3 * 2 + 2);
      lVar3 = *(longlong *)(pwVar2 + 8);
    }
    else {
      *param_1 = *(wstring **)pwVar2;
      param_1[2] = *(undefined8 *)(pwVar2 + 0x10);
    }
    *(wstring **)pwVar2 = _Src;
    param_1[1] = lVar3;
    *(undefined8 *)(pwVar2 + 8) = 0;
    *(undefined2 *)(pwVar2 + 0x10) = 0;
    if (local_258 != local_248) {
      operator_delete(local_258);
    }
    CreateDirectoryW((LPCWSTR)*param_1,(LPSECURITY_ATTRIBUTES)0x0);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_length_error("basic_string::append");
}



// ToWsl(std::__cxx11::wstring)

undefined8 * ToWsl(undefined8 *param_1,undefined8 *param_2)

{
  short *psVar1;
  undefined8 uVar2;
  wint_t wVar3;
  short *psVar4;
  undefined8 *puVar5;
  size_t sVar6;
  wstring *pwVar7;
  ulonglong uVar8;
  wstring *pwVar9;
  undefined1 *local_c8 [2];
  undefined1 local_b8 [16];
  wstring *local_a8;
  ulonglong local_a0;
  ulonglong local_98 [2];
  ulonglong *local_88;
  ulonglong local_80;
  ulonglong local_78 [2];
  wstring *local_68;
  longlong local_60;
  undefined8 local_58 [3];
  
  psVar1 = (short *)*param_2;
  uVar8 = param_2[1];
  for (psVar4 = psVar1; psVar4 != psVar1 + uVar8; psVar4 = psVar4 + 1) {
    if (*psVar4 == 0x5c) {
      *psVar4 = 0x2f;
    }
  }
  if (uVar8 < 3) {
    *param_1 = param_1 + 2;
    puVar5 = (undefined8 *)*param_2;
    if (puVar5 == param_2 + 2) goto LAB_140001b53;
  }
  else {
    if (psVar1[1] == 0x3a) {
      local_88 = local_78;
      std::__cxx11::wstring::_M_construct<>
                ((undefined8 *)&local_88,psVar1 + 2,(longlong)(psVar1 + uVar8));
      wVar3 = towlower(*(wint_t *)*param_2);
      local_c8[0] = local_b8;
      std::__cxx11::wstring::_M_construct((wstring *)local_c8,1,wVar3);
      sVar6 = wcslen(L"/mnt/");
      pwVar7 = std::__cxx11::wstring::_M_replace((wstring *)local_c8,0,0,(wstring *)L"/mnt/",sVar6);
      pwVar9 = pwVar7 + 0x10;
      local_a8 = *(wstring **)pwVar7;
      local_a0 = *(ulonglong *)(pwVar7 + 8);
      if (local_a8 == pwVar9) {
        local_a8 = (wstring *)local_98;
        memcpy((wstring *)local_98,pwVar9,local_a0 * 2 + 2);
        local_a0 = *(ulonglong *)(pwVar7 + 8);
      }
      else {
        local_98[0] = *(ulonglong *)(pwVar7 + 0x10);
      }
      *(wstring **)pwVar7 = pwVar9;
      *(undefined8 *)(pwVar7 + 8) = 0;
      *(undefined2 *)(pwVar7 + 0x10) = 0;
      uVar8 = local_a0 + local_80;
      if (local_a8 == (wstring *)local_98) {
        if ((7 < uVar8) && (local_88 != local_78)) goto LAB_140001c67;
LAB_140001c73:
        if (0x1fffffffffffffff - local_a0 < local_80) {
                    // WARNING: Subroutine does not return
          std::__throw_length_error("basic_string::append");
        }
        pwVar7 = std::__cxx11::wstring::_M_append
                           ((wstring *)&local_a8,(undefined2 *)local_88,local_80);
        local_68 = (wstring *)local_58;
        pwVar9 = pwVar7 + 0x10;
        local_60 = *(longlong *)(pwVar7 + 8);
        if (*(wstring **)pwVar7 == pwVar9) {
          memcpy(local_68,pwVar9,local_60 * 2 + 2);
          local_60 = *(longlong *)(pwVar7 + 8);
        }
        else {
          local_58[0] = *(undefined8 *)(pwVar7 + 0x10);
          local_68 = *(wstring **)pwVar7;
        }
        *(wstring **)pwVar7 = pwVar9;
        *(undefined8 *)(pwVar7 + 8) = 0;
        *(undefined2 *)(pwVar7 + 0x10) = 0;
      }
      else {
        if (uVar8 <= local_98[0]) goto LAB_140001c73;
        if (local_88 == local_78) {
          local_78[0] = 7;
        }
LAB_140001c67:
        if (local_78[0] < uVar8) goto LAB_140001c73;
        pwVar7 = std::__cxx11::wstring::_M_replace((wstring *)&local_88,0,0,local_a8,local_a0);
        local_68 = (wstring *)local_58;
        pwVar9 = pwVar7 + 0x10;
        local_60 = *(longlong *)(pwVar7 + 8);
        if (*(wstring **)pwVar7 == pwVar9) {
          memcpy(local_68,pwVar9,local_60 * 2 + 2);
          local_60 = *(longlong *)(pwVar7 + 8);
        }
        else {
          local_58[0] = *(undefined8 *)(pwVar7 + 0x10);
          local_68 = *(wstring **)pwVar7;
        }
        *(wstring **)pwVar7 = pwVar9;
        *(undefined8 *)(pwVar7 + 8) = 0;
        *(undefined2 *)(pwVar7 + 0x10) = 0;
      }
      pwVar9 = (wstring *)*param_2;
      if (pwVar9 == (wstring *)(param_2 + 2)) {
        if (local_68 == (wstring *)local_58) goto LAB_140001e78;
        *param_2 = local_68;
        param_2[1] = local_60;
        param_2[2] = local_58[0];
      }
      else {
        if (local_68 == (wstring *)local_58) {
LAB_140001e78:
          if (local_60 != 0) {
            if (local_60 == 1) {
              *(undefined2 *)pwVar9 = (undefined2)local_58[0];
            }
            else {
              memcpy(pwVar9,(wstring *)local_58,local_60 * 2);
              pwVar9 = (wstring *)*param_2;
            }
          }
          param_2[1] = local_60;
          *(undefined2 *)(pwVar9 + local_60 * 2) = 0;
          pwVar9 = local_68;
          uVar2 = local_58[0];
        }
        else {
          uVar2 = param_2[2];
          *param_2 = local_68;
          param_2[1] = local_60;
          param_2[2] = local_58[0];
          if (pwVar9 == (wstring *)0x0) goto LAB_140001d69;
        }
        local_58[0] = uVar2;
        local_68 = pwVar9;
        local_60 = 0;
        *(undefined2 *)local_68 = 0;
        if (local_68 != (wstring *)local_58) {
          operator_delete(local_68);
        }
      }
LAB_140001d69:
      if (local_a8 != (wstring *)local_98) {
        operator_delete(local_a8);
      }
      if (local_c8[0] != local_b8) {
        operator_delete(local_c8[0]);
      }
      if (local_88 != local_78) {
        operator_delete(local_88);
      }
      uVar8 = param_2[1];
    }
    *param_1 = param_1 + 2;
    puVar5 = (undefined8 *)*param_2;
    if (puVar5 == param_2 + 2) {
LAB_140001b53:
      memcpy(param_1 + 2,param_2 + 2,uVar8 * 2 + 2);
      uVar8 = param_2[1];
      goto LAB_140001b12;
    }
  }
  *param_1 = puVar5;
  param_1[2] = param_2[2];
LAB_140001b12:
  param_1[1] = uVar8;
  *(undefined2 *)(param_2 + 2) = 0;
  *param_2 = param_2 + 2;
  param_2[1] = 0;
  return param_1;
}



// SetRangeColor(int, int, unsigned long)

void SetRangeColor(undefined4 param_1,undefined4 param_2,undefined4 param_3)

{
  longlong lVar1;
  undefined8 *puVar2;
  undefined4 local_a0;
  undefined4 local_9c;
  undefined8 local_98;
  undefined8 local_90;
  undefined4 local_84;
  
  local_a0 = param_1;
  local_9c = param_2;
  SendMessageW(hEditor,0x437,0,(LPARAM)&local_a0);
  puVar2 = &local_90;
  for (lVar1 = 0xd; lVar1 != 0; lVar1 = lVar1 + -1) {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  }
  local_98 = 0x4000000000000074;
  local_84 = param_3;
  *(undefined4 *)puVar2 = 0;
  SendMessageW(hEditor,0x444,1,(LPARAM)&local_98);
  return;
}



// isIdChar(wchar_t)

uint isIdChar(wint_t param_1)

{
  undefined3 uVar1;
  int iVar2;
  
  iVar2 = iswalnum(param_1);
  uVar1 = (undefined3)((uint)iVar2 >> 8);
  return CONCAT31(uVar1,param_1 == 0x5f) | CONCAT31(uVar1,iVar2 != 0);
}



// ApplySyntaxHighlight()

void ApplySyntaxHighlight(void)

{
  wint_t wVar1;
  short sVar2;
  ushort _C;
  wchar_t *pwVar3;
  longlong lVar4;
  undefined **ppuVar5;
  int iVar6;
  int iVar7;
  LRESULT LVar8;
  ulonglong uVar9;
  size_t sVar10;
  LRESULT LVar11;
  size_t sVar12;
  wint_t _C_00;
  int iVar13;
  wint_t *pwVar14;
  int iVar15;
  int iVar16;
  ulonglong uVar17;
  ulonglong uVar18;
  undefined1 *puVar19;
  wint_t *pwVar20;
  int local_a8;
  undefined1 local_90 [8];
  undefined1 *local_88;
  ulonglong local_80;
  undefined1 local_78 [16];
  wchar_t *local_68;
  size_t local_60;
  wchar_t local_58 [12];
  
  if (inHighlight == '\0') {
    inHighlight = 1;
    SendMessageW(hEditor,0x434,0,(LPARAM)local_90);
    LVar8 = SendMessageW(hEditor,0xce,0,0);
    SendMessageW(hEditor,0x445,0,0);
    SendMessageW(hEditor,0xb,0,0);
    GetEdText_abi_cxx11_((wstring *)&local_88);
    iVar13 = (int)local_80;
    SetRangeColor(0,iVar13,0xf0e8e2);
    if (0 < iVar13) {
      puVar19 = local_88;
      iVar7 = 0;
LAB_140002110:
      iVar15 = iVar7;
      uVar18 = (ulonglong)iVar15;
      iVar16 = iVar15 + 1;
      lVar4 = uVar18 * 2;
      pwVar14 = (wint_t *)(puVar19 + lVar4);
      wVar1 = *pwVar14;
      pwVar20 = pwVar14;
      iVar7 = iVar15;
      if (iVar16 < iVar13) {
        if (wVar1 == 0x2f) {
          if (*(short *)(puVar19 + lVar4 + 2) == 0x2f) {
            do {
              iVar16 = iVar7;
              if ((*pwVar14 == 10) || (*pwVar14 == 0xd)) break;
              iVar16 = iVar16 + 1;
              pwVar14 = pwVar14 + 1;
              iVar7 = iVar16;
            } while (iVar13 != iVar16);
            SetRangeColor(iVar15,iVar16,0x55996a);
          }
          else {
            if (*(short *)(puVar19 + lVar4 + 2) != 0x2a) {
              iVar6 = iswdigit(0x2f);
              if (iVar6 == 0) {
                _C_00 = 0x2f;
                goto LAB_140002177;
              }
              goto LAB_140002550;
            }
            iVar16 = iVar15 + 2;
            uVar18 = (ulonglong)(iVar15 + 3);
            if (iVar15 + 3 < iVar13) {
              do {
                iVar16 = (int)uVar18;
                if ((*(short *)(puVar19 + uVar18 * 2 + -2) == 0x2a) &&
                   (*(short *)(puVar19 + uVar18 * 2) == 0x2f)) {
                  iVar16 = iVar16 + -1;
                  goto LAB_1400026a1;
                }
                uVar18 = uVar18 + 1;
              } while ((int)uVar18 < iVar13);
              uVar18 = (ulonglong)(iVar16 + 1);
LAB_1400026a1:
              if ((int)uVar18 < iVar13) {
                iVar16 = iVar16 + 2;
              }
            }
            SetRangeColor(iVar15,iVar16,0x55996a);
          }
          goto LAB_140002191;
        }
        iVar6 = iVar16;
        if (wVar1 == 0x22) {
          do {
            sVar2 = *(short *)(puVar19 + (longlong)iVar6 * 2);
            iVar16 = iVar6;
            if ((sVar2 == 10) || (sVar2 == 0x22)) goto LAB_140002518;
            iVar16 = iVar6 + 1;
            if (sVar2 == 0x5c) {
              if (iVar13 <= iVar16) break;
              iVar16 = iVar6 + 2;
            }
            iVar6 = iVar16;
          } while (iVar16 < iVar13);
        }
        else {
          if (wVar1 != 0x27) goto LAB_140002148;
          do {
            sVar2 = *(short *)(puVar19 + (longlong)iVar6 * 2);
            iVar16 = iVar6;
            if ((sVar2 == 10) || (sVar2 == 0x27)) goto LAB_140002518;
            iVar16 = iVar6 + 1;
            if (sVar2 == 0x5c) {
              if (iVar13 <= iVar16) break;
              iVar16 = iVar6 + 2;
            }
            iVar6 = iVar16;
          } while (iVar16 < iVar13);
        }
        goto LAB_140002523;
      }
      if ((wVar1 == 0x22) || (wVar1 == 0x27)) goto LAB_140002382;
LAB_140002148:
      if (wVar1 == 0x23) {
        iVar16 = iVar15;
        if (iVar13 <= iVar15) {
          SetRangeColor(iVar15,iVar15,0x509b9b);
          goto LAB_140002391;
        }
        do {
          if ((*pwVar14 == 0xd) || (*pwVar14 == 10)) break;
          iVar16 = iVar16 + 1;
          pwVar14 = pwVar14 + 1;
        } while (iVar13 != iVar16);
        SetRangeColor(iVar15,iVar16,0x509b9b);
      }
      else {
        iVar6 = iswdigit(wVar1);
        if (iVar6 == 0) {
          _C_00 = wVar1;
          if (wVar1 == 0x2e) {
            if (iVar16 < iVar13) {
              iVar6 = iswdigit(*(wint_t *)(puVar19 + lVar4 + 2));
              if (iVar6 != 0) goto LAB_140002550;
              iVar6 = iswalpha(0x2e);
              iVar7 = iVar16;
              iVar16 = iVar15;
              if (iVar6 == 0) goto LAB_140002110;
LAB_140002250:
              do {
                wVar1 = *pwVar20;
                iVar7 = iswalnum(wVar1);
                if ((wVar1 != 0x5f) && (iVar7 == 0)) {
                  uVar9 = (ulonglong)(iVar16 - iVar15);
                  goto LAB_140002275;
                }
                iVar16 = iVar16 + 1;
                pwVar20 = pwVar20 + 1;
              } while (iVar13 != iVar16);
              uVar9 = (ulonglong)(iVar13 - iVar15);
            }
            else {
              iVar7 = iswalpha(0x2e);
              if (iVar7 == 0) goto LAB_140002391;
LAB_140002240:
              uVar9 = 0;
              iVar16 = iVar15;
              if (iVar15 < iVar13) goto LAB_140002250;
            }
LAB_140002275:
            if (local_80 < uVar18) {
                    // WARNING: Subroutine does not return
              std::__throw_out_of_range_fmt
                        ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c3038,uVar18
                         ,local_80);
            }
            uVar17 = local_80 - uVar18;
            if (uVar9 < local_80 - uVar18) {
              uVar17 = uVar9;
            }
            local_68 = local_58;
            std::__cxx11::wstring::_M_construct<>(&local_68,pwVar14,(longlong)(pwVar14 + uVar17));
            ppuVar5 = &PTR_u_break_1400c00a8;
            pwVar3 = (wchar_t *)KEYWORDS;
            sVar12 = local_60;
            while (pwVar3 != (wchar_t *)0x0) {
              local_60 = sVar12;
              sVar10 = wcslen(pwVar3);
              if (sVar12 == sVar10) {
                if ((local_60 == 0) || (local_68 == pwVar3)) {
LAB_140002490:
                  SetRangeColor(iVar15,iVar16,0xd69c56);
                  goto LAB_140002320;
                }
                if (local_68 != (wchar_t *)0x0) {
                  sVar12 = 0;
                  while (local_68[sVar12] == pwVar3[sVar12]) {
                    sVar12 = sVar12 + 1;
                    if (sVar12 == local_60) goto LAB_140002490;
                  }
                }
              }
              pwVar3 = (wchar_t *)*ppuVar5;
              ppuVar5 = ppuVar5 + 1;
              sVar12 = local_60;
            }
            ppuVar5 = &PTR_u_char_1400c0008;
            pwVar3 = (wchar_t *)PTR_DAT_1400c0000;
            while (local_60 = sVar12, pwVar3 != (wchar_t *)0x0) {
              sVar10 = wcslen(pwVar3);
              if (sVar12 == sVar10) {
                if ((local_60 == 0) || (pwVar3 == local_68)) {
LAB_140002620:
                  SetRangeColor(iVar15,iVar16,0xb0c94e);
                  break;
                }
                if (local_68 != (wchar_t *)0x0) {
                  sVar12 = 0;
                  while (local_68[sVar12] == pwVar3[sVar12]) {
                    sVar12 = sVar12 + 1;
                    if (local_60 == sVar12) goto LAB_140002620;
                  }
                }
              }
              pwVar3 = (wchar_t *)*ppuVar5;
              ppuVar5 = ppuVar5 + 1;
              sVar12 = local_60;
            }
LAB_140002320:
            if (local_68 != local_58) {
              operator_delete(local_68);
            }
            goto LAB_140002191;
          }
LAB_140002177:
          iVar7 = iswalpha(_C_00);
          if ((wVar1 == 0x5f) || (iVar7 != 0)) goto LAB_140002240;
        }
        else {
          if (iVar13 <= iVar15) {
            SetRangeColor(iVar15,iVar15,0xa8ceb5);
            goto LAB_140002391;
          }
LAB_140002550:
          do {
            iVar16 = iVar7;
            _C = *pwVar14;
            iVar7 = iswxdigit(_C);
            if (((iVar7 == 0) && (_C != 0x2e)) &&
               ((0x32 < (ushort)(_C - 0x46) ||
                ((0x4804100048041U >> ((ulonglong)(_C - 0x46) & 0x3f) & 1) == 0)))) break;
            iVar16 = iVar16 + 1;
            pwVar14 = pwVar14 + 1;
            iVar7 = iVar16;
          } while (iVar13 != iVar16);
          SetRangeColor(iVar15,iVar16,0xa8ceb5);
        }
      }
      goto LAB_140002191;
    }
LAB_140002391:
    SendMessageW(hEditor,0x437,0,(LPARAM)local_90);
    LVar11 = SendMessageW(hEditor,0xce,0,0);
    local_a8 = (int)LVar8;
    SendMessageW(hEditor,0xb6,0,(longlong)(local_a8 - (int)LVar11));
    SendMessageW(hEditor,0xb,1,0);
    SendMessageW(hEditor,0x445,0,5);
    InvalidateRect(hEditor,(RECT *)0x0,0);
    inHighlight = '\0';
    if (local_88 != local_78) {
      operator_delete(local_88);
    }
  }
  return;
LAB_140002518:
  if (iVar13 <= iVar16) {
LAB_140002382:
    SetRangeColor(iVar15,iVar16,0x7891ce);
    goto LAB_140002391;
  }
  iVar16 = iVar16 + 1;
LAB_140002523:
  SetRangeColor(iVar15,iVar16,0x7891ce);
LAB_140002191:
  puVar19 = local_88;
  iVar7 = iVar16;
  if (iVar13 <= iVar16) goto LAB_140002391;
  goto LAB_140002110;
}



// GenVGARuntime[abi:cxx11]()

longlong * GenVGARuntime_abi_cxx11_(longlong *param_1)

{
  char *pcVar1;
  longlong lVar2;
  ulonglong uVar3;
  char *pcVar4;
  undefined8 *puVar5;
  ulonglong local_20;
  
  local_20 = 0x38a;
  *param_1 = (longlong)(param_1 + 2);
  pcVar1 = (char *)std::__cxx11::string::_M_create(param_1,&local_20,0);
  *param_1 = (longlong)pcVar1;
  param_1[2] = local_20;
  builtin_strncpy(pcVar1,"volatile",8);
  builtin_strncpy(pcVar1 + 0x382,"i]=0;\n}\n",8);
  lVar2 = (longlong)pcVar1 - (longlong)((ulonglong)(pcVar1 + 8) & 0xfffffffffffffff8);
  pcVar4 = "volatile unsigned short* const VGA=(volatile unsigned short*)0xB8000;\nstatic int _cx=0,_cy=0;\nstatic void vcls(){for(int i=0;i<80*25;i++)VGA[i]=\' \'|0x0700;_cx=_cy=0;}\nstatic void _vscroll(){\n    for(int y=0;y<24;y++)for(int x=0;x<80;x++)VGA[y*80+x]=VGA[(y+1)*80+x];\n    for(int x=0;x<80;x++)VGA[24*80+x]=\' \'|0x0700;_cy=24;\n}\nstatic void _vputc(char c){\n    if(c==\'\\n\'||_cx>=80){_cx=0;_cy++;if(_cy>=25)_vscroll();}\n    if(c!=\'\\n\'){VGA[_cy*80+_cx]=(unsigned short)c|0x0700;_cx++;}\n}\nstatic void printf(const char*s){while(*s)_vputc(*s++);}\nstatic void putchar(char c){_vputc(c);}\nstatic int strlen(const char*s){int n=0;while(s[n])n++;return n;}\nstatic void itoa(int v,char*b,int r){\n    if(!v){b[0]=\'0\';b[1]=0;return;}\n    int neg=v<0&&r==10;if(neg)v=-v;\n    int i=0;char t[32];\n    while(v){int q=v%r;t[i++]=q<10?\'0\'+q:\'a\'+q-10;v/=r;}\n    if(neg)t[i++]=\'-\';\n    for(int j=0;j<i;j++)b[j]=t[i-1-j];b[i]=0;\n}\n"
           + -lVar2;
  puVar5 = (undefined8 *)((ulonglong)(pcVar1 + 8) & 0xfffffffffffffff8);
  for (uVar3 = (ulonglong)((int)lVar2 + 0x38aU >> 3); uVar3 != 0; uVar3 = uVar3 - 1) {
    *puVar5 = *(undefined8 *)pcVar4;
    pcVar4 = pcVar4 + 8;
    puVar5 = puVar5 + 1;
  }
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return param_1;
}



// GenBootS[abi:cxx11]()

longlong * GenBootS_abi_cxx11_(longlong *param_1)

{
  char *pcVar1;
  longlong lVar2;
  ulonglong uVar3;
  char *pcVar4;
  undefined8 *puVar5;
  ulonglong local_20;
  
  local_20 = 0x1be;
  *param_1 = (longlong)(param_1 + 2);
  pcVar1 = (char *)std::__cxx11::string::_M_create(param_1,&local_20,0);
  *param_1 = (longlong)pcVar1;
  param_1[2] = local_20;
  builtin_strncpy(pcVar1,".set MB_",8);
  builtin_strncpy(pcVar1 + 0x1b6," jmp 1b\n",8);
  lVar2 = (longlong)pcVar1 - (longlong)((ulonglong)(pcVar1 + 8) & 0xfffffffffffffff8);
  pcVar4 = ".set MB_MAGIC,0xE85250D6\n.set MB_ARCH,0\n.set MB_HDRLEN,(mb_end-mb_start)\n.set MB_CHECKSUM,-(MB_MAGIC+MB_ARCH+MB_HDRLEN)\n.section .multiboot\n.align 8\nmb_start:\n    .long MB_MAGIC\n    .long MB_ARCH\n    .long MB_HDRLEN\n    .long MB_CHECKSUM\n    .short 0\n    .short 0\n    .long 8\nmb_end:\n.section .bss\n.align 16\nstk_bot: .skip 65536\nstk_top:\n.section .text\n.global _start\n_start:\n    movl $stk_top,%esp\n    call kernel_main\n    cli\n1: hlt\n    jmp 1b\n"
           + -lVar2;
  puVar5 = (undefined8 *)((ulonglong)(pcVar1 + 8) & 0xfffffffffffffff8);
  for (uVar3 = (ulonglong)((int)lVar2 + 0x1beU >> 3); uVar3 != 0; uVar3 = uVar3 - 1) {
    *puVar5 = *(undefined8 *)pcVar4;
    pcVar4 = pcVar4 + 8;
    puVar5 = puVar5 + 1;
  }
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return param_1;
}



// GenLinker[abi:cxx11]()

longlong * GenLinker_abi_cxx11_(longlong *param_1)

{
  undefined8 *puVar1;
  ulonglong local_10;
  
  local_10 = 0xed;
  *param_1 = (longlong)(param_1 + 2);
  puVar1 = (undefined8 *)std::__cxx11::string::_M_create(param_1,&local_10,0);
  *param_1 = (longlong)puVar1;
  param_1[2] = local_10;
  *puVar1 = 0x735f285952544e45;
  puVar1[1] = 0x45530a2974726174;
  puVar1[2] = 0x7b0a534e4f495443;
  puVar1[3] = 0x3d202e202020200a;
  puVar1[4] = 0x2020200a3b4d3120;
  puVar1[5] = 0x6269746c756d2e20;
  puVar1[6] = 0x207b203a20746f6f;
  puVar1[7] = 0x69746c756d2e282a;
  puVar1[8] = 0xa7d2029746f6f62;
  puVar1[9] = 0x7865742e20202020;
  puVar1[10] = 0x47494c4120202074;
  puVar1[0xb] = 0x203a20294b34284e;
  puVar1[0xc] = 0x7865742e282a207b;
  puVar1[0xd] = 0x20200a7d20292a74;
  puVar1[0xe] = 0x7461646f722e2020;
  puVar1[0xf] = 0x284e47494c412061;
  puVar1[0x10] = 0x207b203a20294b34;
  puVar1[0x11] = 0x7461646f722e282a;
  puVar1[0x12] = 0x20200a7d20292a61;
  puVar1[0x13] = 0x20617461642e2020;
  puVar1[0x14] = 0x284e47494c412020;
  puVar1[0x15] = 0x207b203a20294b34;
  puVar1[0x16] = 0x2a617461642e282a;
  puVar1[0x17] = 0x202020200a7d2029;
  puVar1[0x18] = 0x202020207373622e;
  puVar1[0x19] = 0x4b34284e47494c41;
  puVar1[0x1b] = 0x20294e4f4d4d4f43;
  puVar1[0x1a] = 0x282a207b203a2029;
  *(undefined8 *)((longlong)puVar1 + 0xdd) = 0x73622e282a20294e;
  *(undefined8 *)((longlong)puVar1 + 0xe5) = 0xa7d0a7d20292a73;
  param_1[1] = local_10;
  *(undefined1 *)(*param_1 + local_10) = 0;
  return param_1;
}



// DoSave()

void DoSave(void)

{
  wchar_t *pwVar1;
  HRESULT HVar2;
  int iVar3;
  size_t sVar4;
  uint local_c4;
  longlong *local_c0;
  longlong *local_b8;
  wchar_t *local_b0;
  wchar_t *local_a8;
  wchar_t *pwStack_a0;
  wchar_t *local_98;
  undefined *puStack_90;
  undefined1 *local_88 [2];
  undefined1 local_78 [16];
  undefined1 *local_68 [2];
  undefined1 local_58 [16];
  undefined1 *local_48 [2];
  undefined1 local_38 [16];
  
  local_c0 = (longlong *)0x0;
  HVar2 = CoCreateInstance((IID *)&CLSID_FileSaveDialog,(LPUNKNOWN)0x0,1,
                           (IID *)&__mingw_uuidof_s<>::__uuid_inst,&local_c0);
  if (-1 < HVar2) {
    local_a8 = L"C++ Source";
    pwStack_a0 = L"*.cpp";
    local_98 = L"All Files";
    puStack_90 = &DAT_1400c360e;
    (**(code **)(*local_c0 + 0x20))(local_c0,2,&local_a8);
    (**(code **)(*local_c0 + 0xb0))(local_c0,&DAT_1400c3616);
    (**(code **)(*local_c0 + 0x28))(local_c0,1);
    (**(code **)(*local_c0 + 0x78))(local_c0,L"main.cpp");
    (**(code **)(*local_c0 + 0x88))(local_c0,L"Save .cpp");
    (**(code **)(*local_c0 + 0x50))(local_c0,&local_c4);
    (**(code **)(*local_c0 + 0x48))(local_c0,local_c4 | 0x842);
    iVar3 = (**(code **)(*local_c0 + 0x18))(local_c0,hMain);
    if (-1 < iVar3) {
      local_b8 = (longlong *)0x0;
      iVar3 = (**(code **)(*local_c0 + 0xa0))(local_c0,&local_b8);
      if (-1 < iVar3) {
        local_b0 = (wchar_t *)0x0;
        iVar3 = (**(code **)(*local_b8 + 0x28))(local_b8,0x80058000,&local_b0);
        if (iVar3 < 0) {
          (**(code **)(*local_b8 + 0x10))();
        }
        else {
          GetEdText_abi_cxx11_((wstring *)local_88);
          W2U((longlong *)local_68,(undefined8 *)local_88);
          pwVar1 = local_b0;
          local_48[0] = local_38;
          if (local_b0 == (wchar_t *)0x0) {
                    // WARNING: Subroutine does not return
            std::__throw_logic_error("basic_string: construction from null is not valid");
          }
          sVar4 = wcslen(local_b0);
          std::__cxx11::wstring::_M_construct<>(local_48,pwVar1,(longlong)(pwVar1 + sVar4));
          WriteUTF8(local_48,local_68);
          if (local_48[0] != local_38) {
            operator_delete(local_48[0]);
          }
          if (local_68[0] != local_58) {
            operator_delete(local_68[0]);
          }
          if (local_88[0] != local_78) {
            operator_delete(local_88[0]);
          }
          CoTaskMemFree(local_b0);
          (**(code **)(*local_b8 + 0x10))();
        }
      }
    }
    (**(code **)(*local_c0 + 0x10))();
  }
  return;
}



// DrawBtn(tagDRAWITEMSTRUCT*, unsigned long)

void DrawBtn(longlong param_1,ulonglong param_2)

{
  HDC hdc;
  int iVar1;
  HBRUSH pHVar2;
  HGDIOBJ pvVar3;
  HPEN h;
  longlong lVar4;
  COLORREF color;
  ulonglong uVar5;
  WCHAR *pWVar6;
  uint uVar7;
  tagRECT local_c8;
  WCHAR local_b8 [64];
  
  local_c8._0_8_ = *(undefined8 *)(param_1 + 0x28);
  local_c8._8_8_ = *(undefined8 *)(param_1 + 0x30);
  hdc = *(HDC *)(param_1 + 0x20);
  uVar7 = (uint)((param_2 & 0xffffffff) >> 8) & 0xff;
  uVar5 = param_2 >> 0x10 & 0xffff;
  color = (COLORREF)param_2;
  if ((*(byte *)(param_1 + 0x10) & 1) == 0) {
    pHVar2 = CreateSolidBrush(color);
    SelectObject(hdc,pHVar2);
    pvVar3 = GetStockObject(8);
    SelectObject(hdc,pvVar3);
    RoundRect(hdc,local_c8.left,local_c8.top,local_c8.right + 1,local_c8.bottom + 1,10,10);
    DeleteObject(pHVar2);
    if (0xcd < (byte)((param_2 & 0xffffffff) >> 8)) {
      uVar7 = 0xffffffcd;
    }
    if (0xcd < (byte)param_2) {
      color = 0xffffffcd;
    }
    iVar1 = -0x33;
    if ((byte)uVar5 < 0xce) {
      iVar1 = (int)uVar5;
    }
    h = CreatePen(0,1,(iVar1 + 0x32U & 0xff) << 0x10 |
                      (uVar7 + 0x32 & 0xff) << 8 | color + 0x32 & 0xff);
    SelectObject(hdc,h);
    MoveToEx(hdc,local_c8.left + 7,local_c8.top + 1,(LPPOINT)0x0);
    LineTo(hdc,local_c8.right + -7,local_c8.top + 1);
    DeleteObject(h);
    pWVar6 = local_b8;
    for (lVar4 = 0x10; lVar4 != 0; lVar4 = lVar4 + -1) {
      pWVar6[0] = L'\0';
      pWVar6[1] = L'\0';
      pWVar6[2] = L'\0';
      pWVar6[3] = L'\0';
      pWVar6 = pWVar6 + 4;
    }
    GetWindowTextW(*(HWND *)(param_1 + 0x18),local_b8,0x40);
    SetBkMode(hdc,1);
    SetTextColor(hdc,0xffffff);
    if (hBtn != (HGDIOBJ)0x0) {
      SelectObject(hdc,hBtn);
    }
  }
  else {
    pHVar2 = CreateSolidBrush((((uint)(param_2 >> 0x10) & 0xff) * 7) / 10 << 0x10 |
                              ((color & 0xff) * 7) / 10 | (uVar7 * 7) / 10 << 8);
    SelectObject(hdc,pHVar2);
    pvVar3 = GetStockObject(8);
    SelectObject(hdc,pvVar3);
    RoundRect(hdc,local_c8.left,local_c8.top,local_c8.right + 1,local_c8.bottom + 1,10,10);
    DeleteObject(pHVar2);
    pWVar6 = local_b8;
    for (lVar4 = 0x10; lVar4 != 0; lVar4 = lVar4 + -1) {
      pWVar6[0] = L'\0';
      pWVar6[1] = L'\0';
      pWVar6[2] = L'\0';
      pWVar6[3] = L'\0';
      pWVar6 = pWVar6 + 4;
    }
    GetWindowTextW(*(HWND *)(param_1 + 0x18),local_b8,0x40);
    SetBkMode(hdc,1);
    SetTextColor(hdc,0xffffff);
    if (hBtn != (HGDIOBJ)0x0) {
      SelectObject(hdc,hBtn);
    }
    iVar1 = local_c8.top;
    local_c8.left = local_c8.left + 1;
    local_c8.top = iVar1 + 1;
  }
  DrawTextW(hdc,local_b8,-1,&local_c8,0x25);
  return;
}



int __stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)

{
  BOOL BVar1;
  HBRUSH pHVar2;
  HCURSOR pHVar3;
  HWND hWnd;
  INITCOMMONCONTROLSEX local_b0;
  tagMSG local_a8;
  undefined1 local_78 [32];
  undefined1 local_58 [16];
  undefined1 local_48 [16];
  undefined1 local_38 [16];
  
  CoInitialize((LPVOID)0x0);
  local_b0.dwSize = 8;
  local_b0.dwICC = 0xff;
  InitCommonControlsEx(&local_b0);
  local_78._0_4_ = 0x50;
  local_78._4_4_ = 3;
  local_58 = (undefined1  [16])0x0;
  local_48 = (undefined1  [16])0x0;
  local_38 = (undefined1  [16])0x0;
  local_78._24_8_ = 0;
  local_78._16_8_ = hInstance;
  local_78._16_16_ = local_78._16_16_ << 0x40;
  local_78._8_8_ = WndProc;
  pHVar2 = CreateSolidBrush(0x1a1414);
  local_38._0_8_ = L"OSBuilderIDE";
  local_48._0_8_ = pHVar2;
  pHVar3 = LoadCursorW((HINSTANCE)0x0,(LPCWSTR)0x7f00);
  local_58._8_8_ = pHVar3;
  local_58._0_8_ = LoadIconW((HINSTANCE)0x0,(LPCWSTR)0x7f00);
  RegisterClassExW((WNDCLASSEXW *)local_78);
  hWnd = CreateWindowExW(0,L"OSBuilderIDE",L"OSBuilder IDE  —  C++ → Bootable ISO",0xcf0000,
                         -0x80000000,-0x80000000,0x44c,0x2d0,(HWND)0x0,(HMENU)0x0,hInstance,
                         (LPVOID)0x0);
  ShowWindow(hWnd,nShowCmd);
  UpdateWindow(hWnd);
  while( true ) {
    BVar1 = GetMessageW(&local_a8,(HWND)0x0,0,0);
    if (BVar1 == 0) break;
    TranslateMessage(&local_a8);
    DispatchMessageW(&local_a8);
  }
  return (int)local_a8.wParam;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// RunCmd(std::__cxx11::wstring const&, bool&)

longlong * RunCmd(longlong *param_1,undefined8 *param_2,undefined1 *param_3)

{
  wstring *_Src;
  BOOL BVar1;
  DWORD DVar2;
  size_t sVar3;
  wstring *pwVar4;
  longlong lVar5;
  LPWSTR *ppWVar6;
  undefined8 in_stack_ffffffffffffee68;
  undefined4 uVar7;
  uint local_1150;
  DWORD local_114c;
  HANDLE local_1148;
  HANDLE local_1140;
  _SECURITY_ATTRIBUTES local_1138;
  undefined1 local_1118 [16];
  undefined8 local_1108;
  LPWSTR local_10f8 [2];
  WCHAR local_10e8 [8];
  undefined1 *local_10d8;
  longlong local_10d0;
  undefined1 local_10c8 [16];
  _STARTUPINFOW local_10b8;
  undefined1 *local_1048 [2];
  undefined1 local_1038 [4080];
  undefined8 uStack_48;
  
  uVar7 = (undefined4)((ulonglong)in_stack_ffffffffffffee68 >> 0x20);
  uStack_48 = 0x1400031d6;
  local_1138.nLength = 0x18;
  local_1138.lpSecurityDescriptor = (LPVOID)0x0;
  local_1138.bInheritHandle = 1;
  CreatePipe(&local_1148,&local_1140,&local_1138,0);
  SetHandleInformation(local_1148,1,0);
  local_10b8._4_8_ = 0;
  local_10b8.hStdInput = (HANDLE)0x0;
  ppWVar6 = &local_10b8.lpReserved;
  for (lVar5 = 10; lVar5 != 0; lVar5 = lVar5 + -1) {
    *ppWVar6 = (LPWSTR)0x0;
    ppWVar6 = ppWVar6 + 1;
  }
  local_10b8.cb = 0x68;
  local_10b8.dwFlags = 0x101;
  local_1108._0_4_ = 0;
  local_1108._4_4_ = 0;
  local_10b8.hStdOutput = local_1140;
  local_10b8.hStdError = local_1140;
  local_1118 = (undefined1  [16])0x0;
  local_10f8[0] = local_10e8;
  std::__cxx11::wstring::_M_construct<wchar_t*>
            (local_10f8,(undefined2 *)*param_2,(longlong)((undefined2 *)*param_2 + param_2[1]));
  BVar1 = CreateProcessW((LPCWSTR)0x0,local_10f8[0],(LPSECURITY_ATTRIBUTES)0x0,
                         (LPSECURITY_ATTRIBUTES)0x0,1,0x8000000,(LPVOID)0x0,(LPCWSTR)0x0,&local_10b8
                         ,(LPPROCESS_INFORMATION)local_1118);
  if (BVar1 == 0) {
    CloseHandle(local_1148);
    CloseHandle(local_1140);
    *param_3 = 0;
    DVar2 = GetLastError();
    __gnu_cxx::__to_xstring<>
              ((__gnu_cxx *)local_1048,vswprintf,0x10,&DAT_1400c36e2,CONCAT44(uVar7,DVar2));
    sVar3 = wcslen(L"실행 실패: ");
    pwVar4 = std::__cxx11::wstring::_M_replace
                       ((wstring *)local_1048,0,0,(wstring *)&DAT_1400c36ea,sVar3);
    *param_1 = (longlong)(param_1 + 2);
    _Src = pwVar4 + 0x10;
    lVar5 = *(longlong *)(pwVar4 + 8);
    if (*(wstring **)pwVar4 == _Src) {
      memcpy(param_1 + 2,_Src,lVar5 * 2 + 2);
      lVar5 = *(longlong *)(pwVar4 + 8);
    }
    else {
      *param_1 = (longlong)*(wstring **)pwVar4;
      param_1[2] = *(longlong *)(pwVar4 + 0x10);
    }
    *(wstring **)pwVar4 = _Src;
    param_1[1] = lVar5;
    *(undefined8 *)(pwVar4 + 8) = 0;
    *(undefined2 *)(pwVar4 + 0x10) = 0;
    if (local_1048[0] != local_1038) {
      operator_delete(local_1048[0]);
    }
  }
  else {
    CloseHandle(local_1140);
    local_10c8[0] = 0;
    local_10d0 = 0;
    local_10d8 = local_10c8;
    while( true ) {
      BVar1 = ReadFile(local_1148,(string *)local_1048,0x1000,&local_1150,(LPOVERLAPPED)0x0);
      if ((BVar1 == 0) || (local_1150 == 0)) break;
      if (0x3fffffffffffffffU - local_10d0 < (ulonglong)local_1150) {
                    // WARNING: Subroutine does not return
        std::__throw_length_error("basic_string::append");
      }
      std::__cxx11::string::_M_append
                ((string *)&local_10d8,(string *)local_1048,(ulonglong)local_1150);
    }
    WaitForSingleObject((HANDLE)local_1118._0_8_,60000);
    local_114c = 0;
    GetExitCodeProcess((HANDLE)local_1118._0_8_,&local_114c);
    CloseHandle((HANDLE)local_1118._0_8_);
    CloseHandle((HANDLE)local_1118._8_8_);
    CloseHandle(local_1148);
    *param_3 = local_114c == 0;
    U2W(param_1,(undefined8 *)&local_10d8);
    if (local_10d8 != local_10c8) {
      operator_delete(local_10d8);
    }
  }
  if (local_10f8[0] != local_10e8) {
    operator_delete(local_10f8[0]);
  }
  return param_1;
}



// HasWsl()

undefined1 HasWsl(void)

{
  size_t sVar1;
  undefined1 local_59;
  undefined1 *local_58 [2];
  undefined1 local_48 [16];
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  local_58[0] = local_48;
  sVar1 = wcslen(L"wsl echo ok");
  std::__cxx11::wstring::_M_construct<>(local_58,L"wsl echo ok",(longlong)(L"wsl echo ok" + sVar1));
  RunCmd((longlong *)local_38,local_58,&local_59);
  if (local_38[0] != local_28) {
    operator_delete(local_38[0]);
  }
  if (local_58[0] != local_48) {
    operator_delete(local_58[0]);
  }
  return local_59;
}



// DoSetup()

void DoSetup(void)

{
  wstring *_Src;
  undefined2 *puVar1;
  char cVar2;
  char *pcVar3;
  longlong lVar4;
  size_t sVar5;
  wstring *pwVar6;
  ulonglong uVar7;
  char *pcVar8;
  undefined8 *puVar9;
  undefined1 local_138 [16];
  undefined8 local_128;
  undefined2 *local_118;
  ulonglong local_110;
  undefined2 local_108 [8];
  wstring *local_f8;
  longlong local_f0;
  undefined8 local_e8 [2];
  LPWSTR local_d8;
  longlong local_d0;
  undefined2 local_c8 [8];
  undefined8 local_b8;
  undefined8 local_b0;
  LPWSTR local_a8 [5];
  DWORD local_7c;
  WORD local_78;
  HANDLE local_58;
  
  cVar2 = HasWsl();
  if (cVar2 == '\0') {
                    // WARNING: Could not recover jumptable at 0x000140003ae6. Too many branches
                    // WARNING: Treating indirect jump as call
    MessageBoxW(hMain,L"WSL이 없습니다.\nPowerShell에서: wsl --install -d Ubuntu",L"오류",
                0x10);
    return;
  }
  TmpDir_abi_cxx11_(&local_118);
  local_d8 = (LPWSTR)0x139;
  local_b8 = local_a8;
  pcVar3 = (char *)std::__cxx11::string::_M_create
                             ((LPSTARTUPINFOW)&local_b8,(ulonglong *)&local_d8,0);
  local_b8._0_4_ = (DWORD)pcVar3;
  local_b8._4_4_ = (undefined4)((ulonglong)pcVar3 >> 0x20);
  local_a8[0] = local_d8;
  builtin_strncpy(pcVar3,"@echo of",8);
  builtin_strncpy(pcVar3 + 0x131,".\npause\n",8);
  lVar4 = (longlong)pcVar3 - (longlong)((ulonglong)(pcVar3 + 8) & 0xfffffffffffffff8);
  pcVar8 = "@echo off\ncolor 0A\necho Installing i686 toolchain via WSL...\nwsl -u root apt-get update\nwsl -u root apt-get install -y gcc-i686-linux-gnu g++-i686-linux-gnu binutils-i686-linux-gnu grub-pc-bin grub-common xorriso\nif errorlevel 1 (echo FAILED & pause & exit /b 1)\necho.\necho Done! You can now use Build ISO.\npause\n"
           + -lVar4;
  puVar9 = (undefined8 *)((ulonglong)(pcVar3 + 8) & 0xfffffffffffffff8);
  for (uVar7 = (ulonglong)((int)lVar4 + 0x139U >> 3); uVar7 != 0; uVar7 = uVar7 - 1) {
    *puVar9 = *(undefined8 *)pcVar8;
    pcVar8 = pcVar8 + 8;
    puVar9 = puVar9 + 1;
  }
  local_b0._0_4_ = SUB84(local_d8,0);
  local_b0._4_4_ = (undefined4)((ulonglong)local_d8 >> 0x20);
  pcVar3[(longlong)local_d8] = '\0';
  sVar5 = wcslen(L"setup.bat");
  uVar7 = local_110;
  puVar1 = local_118;
  local_d0 = 0;
  local_c8[0] = 0;
  local_d8 = local_c8;
  std::__cxx11::wstring::reserve((wstring *)&local_d8,sVar5 + local_110);
  if (0x1fffffffffffffffU - local_d0 < uVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,puVar1,uVar7);
  if (0x1fffffffffffffffU - local_d0 < sVar5) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"setup.bat",sVar5);
  WriteUTF8((undefined8 *)&local_d8,&local_b8);
  if (local_d8 != local_c8) {
    operator_delete(local_d8);
  }
  if ((LPWSTR *)CONCAT44(local_b8._4_4_,(DWORD)local_b8) != local_a8) {
    operator_delete((LPWSTR *)CONCAT44(local_b8._4_4_,(DWORD)local_b8));
  }
  puVar1 = local_118;
  local_b8._4_4_ = 0;
  local_b0._0_4_ = 0;
  local_58 = (HANDLE)0x0;
  puVar9 = &local_b0;
  for (lVar4 = 0xc; lVar4 != 0; lVar4 = lVar4 + -1) {
    *puVar9 = 0;
    puVar9 = puVar9 + 1;
  }
  local_138 = (undefined1  [16])0x0;
  local_78 = 5;
  local_b8._0_4_ = 0x68;
  local_7c = 1;
  local_128._0_4_ = 0;
  local_128._4_4_ = 0;
  sVar5 = wcslen(L"cmd.exe /C \"");
  local_c8[0] = 0;
  local_d0 = 0;
  local_d8 = local_c8;
  std::__cxx11::wstring::reserve((wstring *)&local_d8,local_110 + sVar5);
  if (sVar5 <= 0x1fffffffffffffffU - local_d0) {
    std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"cmd.exe /C \"",sVar5);
    if (0x1fffffffffffffffU - local_d0 < local_110) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    std::__cxx11::wstring::_M_append((wstring *)&local_d8,puVar1,local_110);
    sVar5 = wcslen(L"setup.bat\"");
    if (sVar5 <= 0x1fffffffffffffffU - local_d0) {
      pwVar6 = std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"setup.bat\"",sVar5);
      local_f8 = *(wstring **)pwVar6;
      _Src = pwVar6 + 0x10;
      local_f0 = *(longlong *)(pwVar6 + 8);
      if (local_f8 == _Src) {
        local_f8 = (wstring *)local_e8;
        memcpy((wstring *)local_e8,_Src,local_f0 * 2 + 2);
        local_f0 = *(longlong *)(pwVar6 + 8);
      }
      else {
        local_e8[0] = *(undefined8 *)(pwVar6 + 0x10);
      }
      *(wstring **)pwVar6 = _Src;
      *(undefined8 *)(pwVar6 + 8) = 0;
      *(undefined2 *)(pwVar6 + 0x10) = 0;
      if (local_d8 != local_c8) {
        operator_delete(local_d8);
      }
      CreateProcessW((LPCWSTR)0x0,(LPWSTR)local_f8,(LPSECURITY_ATTRIBUTES)0x0,
                     (LPSECURITY_ATTRIBUTES)0x0,0,0x10,(LPVOID)0x0,(LPCWSTR)0x0,
                     (LPSTARTUPINFOW)&local_b8,(LPPROCESS_INFORMATION)local_138);
      if ((HANDLE)local_138._0_8_ != (HANDLE)0x0) {
        CloseHandle((HANDLE)local_138._0_8_);
        CloseHandle((HANDLE)local_138._8_8_);
      }
      if (local_f8 != (wstring *)local_e8) {
        operator_delete(local_f8);
      }
      if (local_118 != local_108) {
        operator_delete(local_118);
      }
      return;
    }
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
                    // WARNING: Subroutine does not return
  std::__throw_length_error("basic_string::append");
}



// UpdateLineNos()

void UpdateLineNos(void)

{
  short sVar1;
  ulonglong uVar2;
  short *psVar3;
  size_t sVar4;
  LRESULT LVar5;
  LRESULT LVar6;
  ulonglong *puVar7;
  int iVar8;
  int local_e8;
  int local_e4;
  WCHAR *local_d8;
  short *local_c8;
  longlong local_c0;
  short local_b8 [8];
  WCHAR *local_a8;
  longlong local_a0;
  WCHAR local_98 [8];
  ulonglong *local_88;
  ulonglong local_80;
  ulonglong auStack_78 [2];
  ulonglong *local_68;
  ulonglong local_60;
  ulonglong local_58 [3];
  
  if (syncScroll != '\0') {
    return;
  }
  GetEdText_abi_cxx11_((wstring *)&local_c8);
  if (local_c8 + local_c0 == local_c8) {
    local_e4 = 1;
  }
  else {
    local_e4 = 1;
    psVar3 = local_c8;
    do {
      sVar1 = *psVar3;
      psVar3 = psVar3 + 1;
      local_e4 = local_e4 + (uint)(sVar1 == 10);
    } while (psVar3 != local_c8 + local_c0);
    local_a8 = local_98;
    local_a0 = 0;
    local_98[0] = L'\0';
    if (local_e4 < 1) {
LAB_140003f9b:
      local_d8 = local_98;
      syncScroll = 1;
      SetWindowTextW(hLineNos,local_a8);
      LVar5 = SendMessageW(hEditor,0xce,0,0);
      LVar6 = SendMessageW(hLineNos,0xce,0,0);
      SendMessageW(hLineNos,0xb6,0,(longlong)((int)LVar5 - (int)LVar6));
      syncScroll = 0;
      if (local_a8 != local_d8) {
        operator_delete(local_a8);
      }
      if (local_c8 == local_b8) {
        return;
      }
      operator_delete(local_c8);
      return;
    }
  }
  local_a8 = local_98;
  local_98[0] = L'\0';
  local_a0 = 0;
  local_e8 = 1;
  do {
    __gnu_cxx::__to_xstring<>((__gnu_cxx *)&local_88,vswprintf,0x10,&DAT_1400c38fe,local_e8);
    iVar8 = (int)local_80;
joined_r0x000140003cd1:
    if (iVar8 < 4) {
      do {
        uVar2 = local_80;
        puVar7 = local_88;
        sVar4 = wcslen(L" ");
        local_58[0] = local_58[0] & 0xffffffffffff0000;
        local_60 = 0;
        local_68 = local_58;
        std::__cxx11::wstring::reserve((wstring *)&local_68,sVar4 + uVar2);
        if (0x1fffffffffffffff - local_60 < sVar4) {
                    // WARNING: Subroutine does not return
          std::__throw_length_error("basic_string::append");
        }
        std::__cxx11::wstring::_M_append((wstring *)&local_68,(undefined2 *)&DAT_1400c390a,sVar4);
        if (0x1fffffffffffffff - local_60 < uVar2) {
                    // WARNING: Subroutine does not return
          std::__throw_length_error("basic_string::append");
        }
        std::__cxx11::wstring::_M_append((wstring *)&local_68,(undefined2 *)puVar7,uVar2);
        uVar2 = auStack_78[0];
        puVar7 = local_88;
        if (local_68 == local_58) {
          puVar7 = local_58;
          if (local_60 != 0) {
            if (local_60 == 1) {
              *(undefined2 *)local_88 = (undefined2)local_58[0];
            }
            else {
              memcpy(local_88,local_58,local_60 * 2);
              puVar7 = local_68;
            }
          }
          *(undefined2 *)((longlong)local_88 + local_60 * 2) = 0;
          local_80 = local_60;
LAB_140003d23:
          local_60 = 0;
          *(undefined2 *)puVar7 = 0;
          if (puVar7 != local_58) {
            operator_delete(puVar7);
          }
        }
        else {
          if (local_88 == auStack_78) goto LAB_140003e50;
          local_88 = local_68;
          local_80 = local_60;
          auStack_78[0] = local_58[0];
          if (puVar7 != (ulonglong *)0x0) {
            local_68 = puVar7;
            local_58[0] = uVar2;
            goto LAB_140003d23;
          }
        }
        if (3 < (int)local_80) break;
      } while( true );
    }
    sVar4 = wcslen(L"\r\n");
    uVar2 = local_80;
    puVar7 = local_88;
    local_60 = 0;
    local_58[0] = local_58[0] & 0xffffffffffff0000;
    local_68 = local_58;
    std::__cxx11::wstring::reserve((wstring *)&local_68,sVar4 + local_80);
    if (0x1fffffffffffffff - local_60 < uVar2) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    std::__cxx11::wstring::_M_append((wstring *)&local_68,(undefined2 *)puVar7,uVar2);
    if (0x1fffffffffffffff - local_60 < sVar4) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    std::__cxx11::wstring::_M_append((wstring *)&local_68,(undefined2 *)&DAT_1400c3904,sVar4);
    if (0x1fffffffffffffffU - local_a0 < local_60) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    std::__cxx11::wstring::_M_append((wstring *)&local_a8,(undefined2 *)local_68,local_60);
    if (local_68 != local_58) {
      operator_delete(local_68);
    }
    if (local_88 != auStack_78) {
      operator_delete(local_88);
    }
    local_e8 = local_e8 + 1;
    if (local_e4 < local_e8) goto LAB_140003f9b;
  } while( true );
LAB_140003e50:
  iVar8 = (int)local_60;
  local_88 = local_68;
  local_80 = local_60;
  auStack_78[0] = local_58[0];
  goto joined_r0x000140003cd1;
}



// StripAndRename(std::__cxx11::string const&)

string * StripAndRename(string *param_1,undefined8 *param_2)

{
  undefined1 *_Src;
  ctype<char> *this;
  ulonglong uVar1;
  ctype<char> cVar2;
  longlong *plVar3;
  ulonglong uVar4;
  string **ppsVar5;
  string *psVar6;
  string *local_228;
  ulonglong local_220;
  string local_218 [16];
  string *local_208;
  ulonglong local_200;
  ulonglong local_1f8;
  undefined2 local_1f0;
  undefined1 local_1ee;
  string *local_1e8;
  ulonglong local_1e0;
  undefined8 local_1d8;
  undefined1 local_1d0;
  undefined1 local_1cf;
  undefined **local_1c8;
  undefined8 local_1c0;
  undefined **local_1b8;
  undefined8 local_1b0;
  undefined8 local_1a8;
  undefined8 local_1a0;
  undefined8 local_198;
  undefined8 local_190;
  undefined8 local_188;
  locale local_180 [8];
  undefined4 local_178;
  stringbuf *local_170;
  string *local_168;
  string *local_160 [2];
  undefined **local_150 [15];
  undefined8 auStack_d8 [12];
  undefined8 local_78;
  undefined2 local_70;
  undefined1 local_68 [16];
  undefined1 local_58 [16];
  
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  *(undefined8 *)(param_1 + 8) = 0;
  std::ios_base::ios_base((ios_base *)local_150);
  local_68 = (undefined1  [16])0x0;
  local_70 = 0;
  local_58 = (undefined1  [16])0x0;
  local_78 = 0;
  local_1c8 = (undefined **)&DAT_1400d6cd8;
  local_150[0] = (undefined **)&DAT_1400d6d00;
  local_1c0 = 0;
  std::ios::init((ios *)local_150,0);
  local_1b0 = 0;
  local_1a8 = 0;
  local_1a0 = 0;
  local_1c8 = &PTR__istringstream_1400dcae8;
  local_198 = 0;
  local_190 = 0;
  local_150[0] = &PTR__istringstream_1400dcb10;
  local_188 = 0;
  local_1b8 = &PTR__streambuf_1400dd810;
  std::locale::locale(local_180);
  psVar6 = (string *)param_2[1];
  local_178 = 0;
  _Src = (undefined1 *)*param_2;
  local_1b8 = &PTR__stringbuf_1400dc540;
  local_170 = (stringbuf *)local_160;
  if ((_Src == (undefined1 *)0x0) && (psVar6 != (string *)0x0)) {
                    // WARNING: Subroutine does not return
    std::__throw_logic_error("basic_string: construction from null is not valid");
  }
  local_208 = psVar6;
  if (psVar6 < (string *)0x10) {
    if (psVar6 == (string *)0x1) {
      local_160[0] = (string *)CONCAT71(local_160[0]._1_7_,*_Src);
    }
    else if (psVar6 != (string *)0x0) goto LAB_1400048ab;
  }
  else {
    local_170 = (stringbuf *)std::__cxx11::string::_M_create(&local_170,(ulonglong *)&local_208,0);
    local_160[0] = local_208;
LAB_1400048ab:
    memcpy(local_170,_Src,(size_t)psVar6);
  }
  local_170[(longlong)local_208] = (stringbuf)0x0;
  local_178 = 8;
  local_168 = local_208;
  std::__cxx11::stringbuf::_M_sync((stringbuf *)&local_1b8,local_170,0,0);
  std::ios::init((ios *)local_150,(longlong)&local_1b8);
  local_218[0] = (string)0x0;
  local_220 = 0;
  this = *(ctype<char> **)((longlong)auStack_d8 + (longlong)local_1c8[-3]);
  local_228 = local_218;
  while( true ) {
    if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
      std::__throw_bad_cast();
    }
    if (this[0x38] == (ctype<char>)0x0) {
      std::ctype<char>::_M_widen_init(this);
      cVar2 = (ctype<char>)0xa;
      if (*(code **)(*(longlong *)this + 0x30) != std::ctype<char>::do_widen) {
        cVar2 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,10);
      }
    }
    else {
      cVar2 = this[0x43];
    }
    plVar3 = std::getline<>((longlong *)&local_1c8,(string *)&local_228,(byte)cVar2);
    if ((*(byte *)((longlong)plVar3 + *(longlong *)(*plVar3 + -0x18) + 0x20) & 5) != 0) break;
    if ((local_220 != 0) && (local_228[local_220 - 1] == (string)0xd)) {
      std::__cxx11::string::_M_erase((string *)&local_228,local_220 - 1,1);
    }
    uVar4 = std::__cxx11::string::find((string *)&local_228,"#include",0,8);
    if ((uVar4 == 0xffffffffffffffff) ||
       ((((uVar4 = std::__cxx11::string::find((string *)&local_228,"cstdio",0,6),
          uVar4 == 0xffffffffffffffff &&
          (uVar4 = std::__cxx11::string::find((string *)&local_228,"stdio",0,5),
          uVar4 == 0xffffffffffffffff)) &&
         (uVar4 = std::__cxx11::string::find((string *)&local_228,"stdlib",0,6),
         uVar4 == 0xffffffffffffffff)) &&
        (((uVar4 = std::__cxx11::string::find((string *)&local_228,"iostream",0,8),
          uVar4 == 0xffffffffffffffff &&
          (uVar4 = std::__cxx11::string::find((string *)&local_228,"cstring",0,7),
          uVar4 == 0xffffffffffffffff)) &&
         (uVar4 = std::__cxx11::string::find((string *)&local_228,"string.h",0,8),
         uVar4 == 0xffffffffffffffff)))))) {
      uVar4 = local_220;
      psVar6 = local_228;
      local_200 = 0;
      local_1f8 = local_1f8 & 0xffffffffffffff00;
      local_208 = (string *)&local_1f8;
      std::__cxx11::string::reserve((string *)&local_208,local_220 + 1);
      if (0x3fffffffffffffff - local_200 < uVar4) {
                    // WARNING: Subroutine does not return
        std::__throw_length_error("basic_string::append");
      }
      std::__cxx11::string::_M_append((string *)&local_208,psVar6,uVar4);
      if (local_200 == 0x3fffffffffffffff) {
                    // WARNING: Subroutine does not return
        std::__throw_length_error("basic_string::append");
      }
      std::__cxx11::string::_M_append((string *)&local_208,(string *)&DAT_1400c3945,1);
      if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < local_200) {
                    // WARNING: Subroutine does not return
        std::__throw_length_error("basic_string::append");
      }
      std::__cxx11::string::_M_append(param_1,local_208,local_200);
      if (local_208 != (string *)&local_1f8) {
        operator_delete(local_208);
      }
    }
    this = *(ctype<char> **)((longlong)auStack_d8 + (longlong)local_1c8[-3]);
  }
  local_1f0 = 0x2820;
  ppsVar5 = &local_208;
  local_1f8 = 0x6e69616d20746e69;
  local_200 = 10;
  local_1ee = 0;
  local_1d8 = 0x6e69616d20746e69;
  local_1d0 = 0x28;
  local_1e0 = 9;
  local_1cf = 0;
  local_208 = (string *)&local_1f8;
  local_1e8 = (string *)&local_1d8;
  uVar4 = std::__cxx11::string::find(param_1,(char *)&local_1f8,0,10);
  if (uVar4 == 0xffffffffffffffff) {
    uVar4 = std::__cxx11::string::find(param_1,(char *)local_1e8,0,local_1e0);
    ppsVar5 = &local_1e8;
    if (uVar4 == 0xffffffffffffffff) goto LAB_140004732;
  }
  uVar1 = *(ulonglong *)(param_1 + 8);
  psVar6 = ppsVar5[1];
  if ((string *)(uVar1 - uVar4) <= ppsVar5[1]) {
    psVar6 = (string *)(uVar1 - uVar4);
  }
  if (uVar1 < uVar4) {
                    // WARNING: Subroutine does not return
    std::__throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c3947,uVar4,uVar1);
  }
  std::__cxx11::string::_M_replace(param_1,uVar4,(ulonglong)psVar6,(string *)"int _user_main(",0xf);
LAB_140004732:
  if (local_1e8 != (string *)&local_1d8) {
    operator_delete(local_1e8);
  }
  if (local_208 != (string *)&local_1f8) {
    operator_delete(local_208);
  }
  if (local_228 != local_218) {
    operator_delete(local_228);
  }
  local_1c8 = &PTR__istringstream_1400dcae8;
  local_150[0] = &PTR__istringstream_1400dcb10;
  local_1b8 = &PTR__stringbuf_1400dc540;
  if (local_170 != (stringbuf *)local_160) {
    operator_delete(local_170);
  }
  local_1b8 = &PTR__streambuf_1400dd810;
  std::locale::~locale(local_180);
  local_1c8 = (undefined **)&DAT_1400d6cd8;
  local_1c0 = 0;
  local_150[0] = &PTR__ios_1400ded80;
  std::ios_base::~ios_base((ios_base *)local_150);
  return param_1;
}



// DoBuildIso()

void DoBuildIso(void)

{
  undefined1 auVar1 [16];
  undefined2 *puVar2;
  WCHAR *pWVar3;
  char cVar4;
  HRESULT HVar5;
  int iVar6;
  size_t sVar7;
  longlong lVar8;
  string *psVar9;
  char *pcVar10;
  undefined8 *puVar11;
  wstring *pwVar12;
  ulonglong uVar13;
  ulonglong uVar14;
  ulonglong uVar15;
  uint uVar16;
  string *psVar17;
  string *psVar18;
  char *pcVar19;
  string *psVar20;
  longlong *plVar21;
  string *local_748;
  string *local_740;
  string *local_728;
  string *local_720;
  string *local_710;
  undefined2 *local_618;
  ulonglong local_610;
  undefined2 local_608 [8];
  undefined2 *local_5f8;
  ulonglong local_5f0;
  undefined2 local_5e8 [8];
  WCHAR *local_5d8;
  ulonglong local_5d0;
  WCHAR local_5c8 [8];
  WCHAR *local_5b8;
  ulonglong local_5b0;
  WCHAR local_5a8 [8];
  WCHAR *local_598;
  longlong local_590;
  WCHAR local_588 [8];
  string *local_578;
  ulonglong local_570;
  string local_568 [16];
  string *local_558;
  longlong local_550;
  undefined8 local_548 [2];
  undefined1 *local_538 [2];
  undefined1 local_528 [16];
  undefined1 *local_518 [2];
  undefined1 local_508 [16];
  undefined1 *local_4f8 [2];
  undefined1 local_4e8 [16];
  undefined1 *local_4d8 [2];
  undefined1 local_4c8 [16];
  string *local_4b8;
  longlong local_4b0;
  undefined8 local_4a8 [2];
  undefined1 *local_498 [2];
  undefined1 local_488 [16];
  string *local_478;
  longlong local_470;
  undefined8 local_468 [2];
  string *local_458;
  ulonglong local_450;
  ulonglong local_448 [2];
  string *local_438;
  ulonglong local_430;
  ulonglong local_428 [2];
  string *local_418;
  longlong local_410;
  undefined8 local_408 [2];
  string *local_3f8;
  ulonglong local_3f0;
  ulonglong local_3e8 [2];
  string *local_3d8;
  ulonglong local_3d0;
  ulonglong local_3c8 [2];
  string *local_3b8;
  longlong local_3b0;
  undefined8 local_3a8 [2];
  string *local_398;
  longlong local_390;
  undefined8 local_388 [2];
  undefined1 *local_378 [2];
  undefined1 local_368 [16];
  undefined1 *local_358;
  longlong local_350;
  undefined1 local_348 [16];
  string *local_338;
  longlong local_330;
  undefined8 local_328 [2];
  undefined1 *local_318 [2];
  undefined1 local_308 [16];
  undefined1 *local_2f8;
  longlong local_2f0;
  undefined1 local_2e8 [16];
  string *local_2d8;
  ulonglong local_2d0;
  ulonglong local_2c8 [2];
  string *local_2b8;
  ulonglong local_2b0;
  ulonglong local_2a8 [2];
  string *local_298;
  longlong local_290;
  undefined8 local_288 [2];
  string *local_278;
  ulonglong local_270;
  ulonglong local_268 [2];
  string *local_258;
  ulonglong local_250;
  ulonglong local_248 [2];
  string *local_238;
  longlong local_230;
  longlong local_228 [2];
  string *local_218;
  longlong local_210;
  undefined8 local_208 [2];
  undefined1 *local_1f8 [2];
  undefined1 local_1e8 [16];
  undefined1 *local_1d8;
  longlong local_1d0;
  undefined1 local_1c8 [16];
  string *local_1b8;
  ulonglong local_1b0;
  ulonglong local_1a8 [2];
  string *local_198;
  ulonglong local_190;
  ulonglong local_188 [2];
  string *local_178;
  longlong local_170;
  longlong local_168 [2];
  string *local_158;
  ulonglong local_150;
  ulonglong local_148 [2];
  uint local_138;
  undefined4 uStack_134;
  ulonglong local_130;
  ulonglong local_128 [2];
  undefined1 local_118 [16];
  undefined8 local_108 [2];
  string *local_f8;
  ulonglong local_f0;
  ulonglong local_e8 [2];
  wstring *local_d8;
  ulonglong local_d0;
  ulonglong local_c8 [2];
  undefined8 local_b8;
  undefined8 uStack_b0;
  wchar_t *local_a8;
  LPWSTR pWStack_a0;
  DWORD local_7c;
  WORD local_78;
  HANDLE local_58;
  
  local_608[0] = 0;
  local_610 = 0;
  auVar1._8_8_ = 0;
  auVar1._0_8_ = local_118._8_8_;
  local_118 = auVar1 << 0x40;
  local_618 = local_608;
  HVar5 = CoCreateInstance((IID *)&CLSID_FileSaveDialog,(LPUNKNOWN)0x0,1,
                           (IID *)&__mingw_uuidof_s<>::__uuid_inst,(LPVOID *)local_118);
  if (HVar5 < 0) goto LAB_140007370;
  local_b8._0_4_ = 0x400c396e;
  local_b8._4_4_ = 1;
  uStack_b0._0_4_ = 0x400c3982;
  uStack_b0._4_4_ = 1;
  local_a8 = L"All Files";
  pWStack_a0 = L"*.*";
  (**(code **)(*(longlong *)local_118._0_8_ + 0x20))(local_118._0_8_,2,(LPSTARTUPINFOW)&local_b8);
  (**(code **)(*(longlong *)local_118._0_8_ + 0xb0))(local_118._0_8_,&DAT_1400c398e);
  (**(code **)(*(longlong *)local_118._0_8_ + 0x28))(local_118._0_8_,1);
  (**(code **)(*(longlong *)local_118._0_8_ + 0x78))(local_118._0_8_,L"myos.iso");
  (**(code **)(*(longlong *)local_118._0_8_ + 0x88))(local_118._0_8_,&DAT_1400c39a8);
  (**(code **)(*(longlong *)local_118._0_8_ + 0x50))(local_118._0_8_,(string *)&local_138);
  (**(code **)(*(longlong *)local_118._0_8_ + 0x48))(local_118._0_8_,local_138 | 0x842);
  iVar6 = (**(code **)(*(longlong *)local_118._0_8_ + 0x18))(local_118._0_8_,hMain);
  if (iVar6 < 0) {
    (**(code **)(*(longlong *)local_118._0_8_ + 0x10))();
    goto LAB_140007370;
  }
  local_f8 = (string *)0x0;
  iVar6 = (**(code **)(*(longlong *)local_118._0_8_ + 0xa0))(local_118._0_8_,(string *)&local_f8);
  if (iVar6 < 0) {
    (**(code **)(*(longlong *)local_118._0_8_ + 0x10))();
    goto LAB_140007370;
  }
  local_d8 = (wstring *)0x0;
  iVar6 = (**(code **)(*(longlong *)local_f8 + 0x28))(local_f8,0x80058000,(wstring *)&local_d8);
  pwVar12 = local_d8;
  if (-1 < iVar6) {
    sVar7 = wcslen((wchar_t *)local_d8);
    std::__cxx11::wstring::_M_replace((wstring *)&local_618,0,local_610,pwVar12,sVar7);
    CoTaskMemFree(local_d8);
  }
  (**(code **)(*(longlong *)local_f8 + 0x10))();
  (**(code **)(*(longlong *)local_118._0_8_ + 0x10))();
  if (-1 >= iVar6) goto LAB_140007370;
  cVar4 = HasWsl();
  if (cVar4 == '\0') {
    MessageBoxW(hMain,L"WSL이 필요합니다.",L"오류",0x10);
    goto LAB_140007370;
  }
  TmpDir_abi_cxx11_(&local_5f8);
  sVar7 = wcslen(L"iso\\boot\\");
  uVar15 = local_5f0;
  puVar2 = local_5f8;
  local_5d0 = 0;
  local_5c8[0] = L'\0';
  local_5d8 = local_5c8;
  std::__cxx11::wstring::reserve((wstring *)&local_5d8,sVar7 + local_5f0);
  if (0x1fffffffffffffff - local_5d0 < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_5d8,puVar2,uVar15);
  if (0x1fffffffffffffff - local_5d0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_5d8,L"iso\\boot\\",sVar7);
  sVar7 = wcslen(L"grub\\");
  uVar15 = local_5d0;
  pWVar3 = local_5d8;
  local_5b0 = 0;
  local_5a8[0] = L'\0';
  local_5b8 = local_5a8;
  std::__cxx11::wstring::reserve((wstring *)&local_5b8,sVar7 + local_5d0);
  if (0x1fffffffffffffff - local_5b0 < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_5b8,pWVar3,uVar15);
  if (0x1fffffffffffffff - local_5b0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_5b8,L"grub\\",sVar7);
  sVar7 = wcslen(L"iso\\");
  uVar15 = local_5f0;
  puVar2 = local_5f8;
  local_590 = 0;
  local_588[0] = L'\0';
  local_598 = local_588;
  std::__cxx11::wstring::reserve((wstring *)&local_598,sVar7 + local_5f0);
  if (0x1fffffffffffffffU - local_590 < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_598,puVar2,uVar15);
  if (0x1fffffffffffffffU - local_590 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_598,L"iso\\",sVar7);
  CreateDirectoryW(local_598,(LPSECURITY_ATTRIBUTES)0x0);
  CreateDirectoryW(local_5d8,(LPSECURITY_ATTRIBUTES)0x0);
  CreateDirectoryW(local_5b8,(LPSECURITY_ATTRIBUTES)0x0);
  GetEdText_abi_cxx11_((wstring *)&local_d8);
  W2U((longlong *)&local_b8,(undefined8 *)&local_d8);
  StripAndRename((string *)&local_578,&local_b8);
  if ((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8) != (string *)&local_a8) {
    operator_delete((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8));
  }
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  local_b8._0_4_ = 0x38a;
  local_b8._4_4_ = 0;
  local_118._0_8_ = (string *)local_108;
  local_118._0_8_ =
       std::__cxx11::string::_M_create((LPPROCESS_INFORMATION)local_118,(ulonglong *)&local_b8,0);
  local_108[0]._4_4_ = local_b8._4_4_;
  local_108[0]._0_4_ = (DWORD)local_b8;
  builtin_strncpy((char *)local_118._0_8_,"volatile",8);
  builtin_strncpy((char *)(local_118._0_8_ + 0x382),"i]=0;\n}\n",8);
  lVar8 = local_118._0_8_ - (longlong)((ulonglong)(local_118._0_8_ + 8) & 0xfffffffffffffff8);
  pcVar19 = "volatile unsigned short* const VGA=(volatile unsigned short*)0xB8000;\nstatic int _cx=0,_cy=0;\nstatic void vcls(){for(int i=0;i<80*25;i++)VGA[i]=\' \'|0x0700;_cx=_cy=0;}\nstatic void _vscroll(){\n    for(int y=0;y<24;y++)for(int x=0;x<80;x++)VGA[y*80+x]=VGA[(y+1)*80+x];\n    for(int x=0;x<80;x++)VGA[24*80+x]=\' \'|0x0700;_cy=24;\n}\nstatic void _vputc(char c){\n    if(c==\'\\n\'||_cx>=80){_cx=0;_cy++;if(_cy>=25)_vscroll();}\n    if(c!=\'\\n\'){VGA[_cy*80+_cx]=(unsigned short)c|0x0700;_cx++;}\n}\nstatic void printf(const char*s){while(*s)_vputc(*s++);}\nstatic void putchar(char c){_vputc(c);}\nstatic int strlen(const char*s){int n=0;while(s[n])n++;return n;}\nstatic void itoa(int v,char*b,int r){\n    if(!v){b[0]=\'0\';b[1]=0;return;}\n    int neg=v<0&&r==10;if(neg)v=-v;\n    int i=0;char t[32];\n    while(v){int q=v%r;t[i++]=q<10?\'0\'+q:\'a\'+q-10;v/=r;}\n    if(neg)t[i++]=\'-\';\n    for(int j=0;j<i;j++)b[j]=t[i-1-j];b[i]=0;\n}\n"
            + -lVar8;
  puVar11 = (undefined8 *)((ulonglong)(local_118._0_8_ + 8) & 0xfffffffffffffff8);
  for (uVar15 = (ulonglong)((int)lVar8 + 0x38aU >> 3); uVar15 != 0; uVar15 = uVar15 - 1) {
    *puVar11 = *(undefined8 *)pcVar19;
    pcVar19 = pcVar19 + 8;
    puVar11 = puVar11 + 1;
  }
  local_118._8_8_ = CONCAT44(local_b8._4_4_,(DWORD)local_b8);
  *(char *)(local_118._0_8_ + local_118._8_8_) = '\0';
  if (local_118._8_8_ == 0x3fffffffffffffff) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)local_118,(string *)&DAT_1400c3945,1);
  psVar17 = psVar9 + 0x10;
  local_f8 = (string *)local_e8;
  if (*(string **)psVar9 == psVar17) {
    uVar15 = *(longlong *)(psVar9 + 8) + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_e8;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_e8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_e8 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
  }
  else {
    local_e8[0] = *(ulonglong *)(psVar9 + 0x10);
    local_f8 = *(string **)psVar9;
  }
  local_f0 = *(ulonglong *)(psVar9 + 8);
  *(undefined8 *)(psVar9 + 8) = 0;
  *(string **)psVar9 = psVar17;
  psVar9[0x10] = (string)0x0;
  if (0x3fffffffffffffff - local_f0 < local_570) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_f8,local_578,local_570);
  psVar17 = psVar9 + 0x10;
  local_d8 = (wstring *)local_c8;
  if (*(string **)psVar9 == psVar17) {
    uVar15 = *(longlong *)(psVar9 + 8) + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_c8;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_c8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_c8 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
  }
  else {
    local_c8[0] = *(ulonglong *)(psVar9 + 0x10);
    local_d8 = (wstring *)*(string **)psVar9;
  }
  local_d0 = *(ulonglong *)(psVar9 + 8);
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  if (local_d0 == 0x3fffffffffffffff) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_d8,(string *)&DAT_1400c3945,1);
  psVar17 = psVar9 + 0x10;
  local_b8 = (string *)&local_a8;
  if (*(string **)psVar9 == psVar17) {
    uVar15 = *(longlong *)(psVar9 + 8) + 1;
    psVar18 = psVar17;
    psVar20 = (string *)&local_a8;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)&local_a8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)&local_a8 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
  }
  else {
    local_a8 = *(wchar_t **)(psVar9 + 0x10);
    local_b8 = *(string **)psVar9;
  }
  lVar8 = *(longlong *)(psVar9 + 8);
  uStack_b0._0_4_ = (undefined4)lVar8;
  uStack_b0._4_4_ = (undefined4)((ulonglong)lVar8 >> 0x20);
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  *(string **)psVar9 = psVar17;
  if (0x3fffffffffffffffU - lVar8 < 0x66) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append
                     ((string *)&local_b8,
                      (string *)
                      "extern \"C\" void kernel_main(){\n    vcls();\n    _user_main();\n    while(1){__asm__ volatile(\"hlt\");}\n}\n"
                      ,0x66);
  psVar17 = psVar9 + 0x10;
  local_550 = *(longlong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    uVar15 = local_550 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_548;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_548 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_548 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_550 = *(longlong *)(psVar9 + 8);
    local_558 = (string *)local_548;
  }
  else {
    local_548[0] = *(undefined8 *)(psVar9 + 0x10);
    local_558 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  if (local_f8 != (string *)local_e8) {
    operator_delete(local_f8);
  }
  if ((string *)local_118._0_8_ != (string *)local_108) {
    operator_delete((void *)local_118._0_8_);
  }
  local_d8 = (wstring *)0x1be;
  local_b8 = (string *)&local_a8;
  pcVar10 = (char *)std::__cxx11::string::_M_create
                              ((LPSTARTUPINFOW)&local_b8,(ulonglong *)&local_d8,0);
  local_b8._0_4_ = (DWORD)pcVar10;
  local_b8._4_4_ = (DWORD)((ulonglong)pcVar10 >> 0x20);
  local_a8 = (wchar_t *)local_d8;
  builtin_strncpy(pcVar10,".set MB_",8);
  builtin_strncpy(pcVar10 + 0x1b6," jmp 1b\n",8);
  lVar8 = (longlong)pcVar10 - (longlong)((ulonglong)(pcVar10 + 8) & 0xfffffffffffffff8);
  pcVar19 = ".set MB_MAGIC,0xE85250D6\n.set MB_ARCH,0\n.set MB_HDRLEN,(mb_end-mb_start)\n.set MB_CHECKSUM,-(MB_MAGIC+MB_ARCH+MB_HDRLEN)\n.section .multiboot\n.align 8\nmb_start:\n    .long MB_MAGIC\n    .long MB_ARCH\n    .long MB_HDRLEN\n    .long MB_CHECKSUM\n    .short 0\n    .short 0\n    .long 8\nmb_end:\n.section .bss\n.align 16\nstk_bot: .skip 65536\nstk_top:\n.section .text\n.global _start\n_start:\n    movl $stk_top,%esp\n    call kernel_main\n    cli\n1: hlt\n    jmp 1b\n"
            + -lVar8;
  puVar11 = (undefined8 *)((ulonglong)(pcVar10 + 8) & 0xfffffffffffffff8);
  for (uVar15 = (ulonglong)((int)lVar8 + 0x1beU >> 3); uVar15 != 0; uVar15 = uVar15 - 1) {
    *puVar11 = *(undefined8 *)pcVar19;
    pcVar19 = pcVar19 + 8;
    puVar11 = puVar11 + 1;
  }
  uStack_b0._0_4_ = SUB84(local_d8,0);
  uStack_b0._4_4_ = (undefined4)((ulonglong)local_d8 >> 0x20);
  pcVar10[(longlong)local_d8] = '\0';
  sVar7 = wcslen(L"boot.s");
  uVar15 = local_5f0;
  puVar2 = local_5f8;
  local_d0 = 0;
  local_c8[0] = local_c8[0] & 0xffffffffffff0000;
  local_d8 = (wstring *)local_c8;
  std::__cxx11::wstring::reserve((wstring *)&local_d8,sVar7 + local_5f0);
  if (0x1fffffffffffffff - local_d0 < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,puVar2,uVar15);
  if (0x1fffffffffffffff - local_d0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"boot.s",sVar7);
  WriteUTF8((undefined8 *)&local_d8,&local_b8);
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  if ((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8) != (string *)&local_a8) {
    operator_delete((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8));
  }
  local_d8 = (wstring *)0xed;
  local_b8 = (string *)&local_a8;
  puVar11 = (undefined8 *)
            std::__cxx11::string::_M_create((LPSTARTUPINFOW)&local_b8,(ulonglong *)&local_d8,0);
  local_b8._0_4_ = (DWORD)puVar11;
  local_b8._4_4_ = (DWORD)((ulonglong)puVar11 >> 0x20);
  local_a8 = (wchar_t *)local_d8;
  *puVar11 = 0x735f285952544e45;
  puVar11[1] = 0x45530a2974726174;
  puVar11[2] = 0x7b0a534e4f495443;
  puVar11[3] = 0x3d202e202020200a;
  puVar11[4] = 0x2020200a3b4d3120;
  puVar11[5] = 0x6269746c756d2e20;
  puVar11[6] = 0x207b203a20746f6f;
  puVar11[7] = 0x69746c756d2e282a;
  puVar11[8] = 0xa7d2029746f6f62;
  puVar11[9] = 0x7865742e20202020;
  puVar11[10] = 0x47494c4120202074;
  puVar11[0xb] = 0x203a20294b34284e;
  puVar11[0xc] = 0x7865742e282a207b;
  puVar11[0xd] = 0x20200a7d20292a74;
  puVar11[0xe] = 0x7461646f722e2020;
  puVar11[0xf] = 0x284e47494c412061;
  puVar11[0x10] = 0x207b203a20294b34;
  puVar11[0x11] = 0x7461646f722e282a;
  puVar11[0x12] = 0x20200a7d20292a61;
  puVar11[0x13] = 0x20617461642e2020;
  puVar11[0x14] = 0x284e47494c412020;
  puVar11[0x15] = 0x207b203a20294b34;
  puVar11[0x16] = 0x2a617461642e282a;
  puVar11[0x17] = 0x202020200a7d2029;
  puVar11[0x18] = 0x202020207373622e;
  puVar11[0x19] = 0x4b34284e47494c41;
  puVar11[0x1b] = 0x20294e4f4d4d4f43;
  puVar11[0x1a] = 0x282a207b203a2029;
  *(undefined8 *)((longlong)puVar11 + 0xdd) = 0x73622e282a20294e;
  *(undefined8 *)((longlong)puVar11 + 0xe5) = 0xa7d0a7d20292a73;
  uStack_b0._0_4_ = SUB84(local_d8,0);
  uStack_b0._4_4_ = (undefined4)((ulonglong)local_d8 >> 0x20);
  *(undefined1 *)((longlong)puVar11 + (longlong)local_d8) = 0;
  sVar7 = wcslen(L"linker.ld");
  uVar15 = local_5f0;
  puVar2 = local_5f8;
  local_d0 = 0;
  local_c8[0] = local_c8[0] & 0xffffffffffff0000;
  local_d8 = (wstring *)local_c8;
  std::__cxx11::wstring::reserve((wstring *)&local_d8,sVar7 + local_5f0);
  if (0x1fffffffffffffff - local_d0 < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,puVar2,uVar15);
  if (0x1fffffffffffffff - local_d0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"linker.ld",sVar7);
  WriteUTF8((undefined8 *)&local_d8,&local_b8);
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  if ((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8) != (string *)&local_a8) {
    operator_delete((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8));
  }
  sVar7 = wcslen(L"kernel.cpp");
  uVar15 = local_5f0;
  puVar2 = local_5f8;
  uStack_b0._0_4_ = 0;
  uStack_b0._4_4_ = 0;
  local_a8 = (wchar_t *)((ulonglong)local_a8 & 0xffffffffffff0000);
  local_b8 = (string *)&local_a8;
  std::__cxx11::wstring::reserve((wstring *)&local_b8,sVar7 + local_5f0);
  if (0x1fffffffffffffffU - CONCAT44(uStack_b0._4_4_,(undefined4)uStack_b0) < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_b8,puVar2,uVar15);
  if (0x1fffffffffffffffU - CONCAT44(uStack_b0._4_4_,(undefined4)uStack_b0) < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_b8,L"kernel.cpp",sVar7);
  WriteUTF8(&local_b8,&local_558);
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  local_d8 = (wstring *)0x62;
  local_b8 = (string *)&local_a8;
  puVar11 = (undefined8 *)
            std::__cxx11::string::_M_create((LPSTARTUPINFOW)&local_b8,(ulonglong *)&local_d8,0);
  local_b8._0_4_ = (DWORD)puVar11;
  local_b8._4_4_ = (DWORD)((ulonglong)puVar11 >> 0x20);
  local_a8 = (wchar_t *)local_d8;
  *puVar11 = 0x656d697420746573;
  puVar11[1] = 0x65730a303d74756f;
  puVar11[2] = 0x6c75616665642074;
  puVar11[3] = 0x756e656d0a303d74;
  puVar11[4] = 0x4f22207972746e65;
  puVar11[5] = 0x7265646c69754253;
  puVar11[6] = 0x200a7b2022534f20;
  puVar11[7] = 0x69746c756d202020;
  puVar11[8] = 0x622f2032746f6f62;
  puVar11[9] = 0x6e72656b2f746f6f;
  puVar11[10] = 0x200a666c652e6c65;
  puVar11[0xb] = 0xa746f6f62202020;
  *(undefined2 *)(puVar11 + 0xc) = 0xa7d;
  uStack_b0._0_4_ = SUB84(local_d8,0);
  uStack_b0._4_4_ = (undefined4)((ulonglong)local_d8 >> 0x20);
  *(undefined1 *)((longlong)puVar11 + (longlong)local_d8) = 0;
  sVar7 = wcslen(L"grub.cfg");
  uVar15 = local_5b0;
  pWVar3 = local_5b8;
  local_d0 = 0;
  local_c8[0] = local_c8[0] & 0xffffffffffff0000;
  local_d8 = (wstring *)local_c8;
  std::__cxx11::wstring::reserve((wstring *)&local_d8,sVar7 + local_5b0);
  if (0x1fffffffffffffff - local_d0 < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,pWVar3,uVar15);
  if (0x1fffffffffffffff - local_d0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"grub.cfg",sVar7);
  WriteUTF8((undefined8 *)&local_d8,&local_b8);
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  if ((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8) != (string *)&local_a8) {
    operator_delete((string *)CONCAT44(local_b8._4_4_,(DWORD)local_b8));
  }
  local_b8 = (string *)&local_a8;
  std::__cxx11::wstring::_M_construct<wchar_t*>
            (&local_b8,local_5f8,(longlong)(local_5f8 + local_5f0));
  ToWsl(local_538,&local_b8);
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  local_b8 = (string *)&local_a8;
  std::__cxx11::wstring::_M_construct<wchar_t*>
            (&local_b8,local_5d8,(longlong)(local_5d8 + local_5d0));
  ToWsl(local_518,&local_b8);
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  local_b8 = (string *)&local_a8;
  std::__cxx11::wstring::_M_construct<wchar_t*>
            (&local_b8,local_618,(longlong)(local_618 + local_610));
  ToWsl(local_4f8,&local_b8);
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  local_b8 = (string *)&local_a8;
  std::__cxx11::wstring::_M_construct<wchar_t*>
            (&local_b8,local_598,(longlong)(local_598 + local_590));
  ToWsl(local_4d8,&local_b8);
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  W2U((longlong *)&local_d8,&local_618);
  W2U((longlong *)&local_138,local_4d8);
  W2U((longlong *)&local_198,local_4f8);
  W2U((longlong *)local_1f8,local_518);
  W2U((longlong *)&local_258,local_538);
  W2U((longlong *)&local_2b8,local_538);
  W2U((longlong *)local_318,local_538);
  W2U((longlong *)local_378,local_538);
  W2U((longlong *)&local_3d8,local_538);
  W2U((longlong *)&local_438,local_538);
  W2U((longlong *)local_498,local_538);
  psVar9 = std::__cxx11::string::_M_replace
                     ((string *)local_498,0,0,
                      (string *)
                      "@echo off\ncolor 0A\necho ================================\necho  OSBuilder - ISO Build Log\necho ================================\n\necho [1/4] Assembling boot stub...\nwsl i686-linux-gnu-as \""
                      ,0xba);
  psVar17 = psVar9 + 0x10;
  local_470 = *(longlong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    uVar15 = local_470 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_468;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_468 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_468 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_470 = *(longlong *)(psVar9 + 8);
    local_478 = (string *)local_468;
  }
  else {
    local_468[0] = *(undefined8 *)(psVar9 + 0x10);
    local_478 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  if (0x3fffffffffffffffU - local_470 < 0xc) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_478,(string *)"boot.s\" -o \"",0xc);
  psVar17 = psVar9 + 0x10;
  local_450 = *(ulonglong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    local_450 = local_450 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_448;
    if (7 < (uint)local_450) {
      uVar15 = 0;
      do {
        uVar16 = (int)uVar15 + 8;
        uVar13 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_448 + uVar15) = *(undefined8 *)(psVar17 + uVar15);
        uVar15 = uVar13;
      } while (uVar16 < ((uint)local_450 & 0xfffffff8));
      psVar20 = (string *)local_448 + uVar13;
      psVar18 = psVar17 + uVar13;
    }
    lVar8 = 0;
    if ((local_450 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((local_450 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((local_450 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_450 = *(ulonglong *)(psVar9 + 8);
    local_458 = (string *)local_448;
  }
  else {
    local_448[0] = *(ulonglong *)(psVar9 + 0x10);
    local_458 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  uVar15 = local_450 + local_430;
  if (local_458 == (string *)local_448) {
    if ((0xf < uVar15) && (local_438 != (string *)local_428)) goto LAB_140005e28;
LAB_140005e34:
    if (0x3fffffffffffffff - local_450 < local_430) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append((string *)&local_458,local_438,local_430);
    local_418 = (string *)local_408;
    psVar17 = psVar9 + 0x10;
    local_410 = *(longlong *)(psVar9 + 8);
    if (*(string **)psVar9 == psVar17) {
      uVar15 = local_410 + 1;
      psVar18 = psVar17;
      psVar20 = local_418;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)(local_418 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = local_418 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
      local_410 = *(longlong *)(psVar9 + 8);
    }
    else {
      local_408[0] = *(undefined8 *)(psVar9 + 0x10);
      local_418 = *(string **)psVar9;
    }
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  else {
    if (uVar15 <= local_448[0]) goto LAB_140005e34;
    if (local_438 == (string *)local_428) {
      local_428[0] = 0xf;
    }
LAB_140005e28:
    if (local_428[0] < uVar15) goto LAB_140005e34;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_438,0,0,local_458,local_450);
    local_418 = (string *)local_408;
    psVar17 = psVar9 + 0x10;
    local_410 = *(longlong *)(psVar9 + 8);
    if (*(string **)psVar9 == psVar17) {
      uVar15 = local_410 + 1;
      psVar18 = psVar17;
      psVar20 = local_418;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)(local_418 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)((longlong)local_408 + uVar14);
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
      local_410 = *(longlong *)(psVar9 + 8);
    }
    else {
      local_408[0] = *(undefined8 *)(psVar9 + 0x10);
      local_418 = *(string **)psVar9;
    }
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  local_748 = (string *)local_408;
  if (0x3fffffffffffffffU - local_410 < 0x99) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append
                     ((string *)&local_418,
                      (string *)
                      "boot.o\"\nif errorlevel 1 goto fail\n\necho [2/4] Compiling kernel...\nwsl i686-linux-gnu-g++ -ffreestanding -fno-exceptions -fno-rtti -nostdlib -O2 -m32 -c \""
                      ,0x99);
  psVar17 = psVar9 + 0x10;
  local_3f0 = *(ulonglong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    local_3f0 = local_3f0 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_3e8;
    if (7 < (uint)local_3f0) {
      uVar15 = 0;
      do {
        uVar16 = (int)uVar15 + 8;
        uVar13 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_3e8 + uVar15) = *(undefined8 *)(psVar17 + uVar15);
        uVar15 = uVar13;
      } while (uVar16 < ((uint)local_3f0 & 0xfffffff8));
      psVar20 = (string *)local_3e8 + uVar13;
      psVar18 = psVar17 + uVar13;
    }
    lVar8 = 0;
    if ((local_3f0 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((local_3f0 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((local_3f0 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_3f0 = *(ulonglong *)(psVar9 + 8);
    local_3f8 = (string *)local_3e8;
  }
  else {
    local_3e8[0] = *(ulonglong *)(psVar9 + 0x10);
    local_3f8 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  uVar15 = local_3f0 + local_3d0;
  if (local_3f8 == (string *)local_3e8) {
    if ((0xf < uVar15) && (local_3d8 != (string *)local_3c8)) goto LAB_140005fa4;
LAB_140005fb0:
    if (0x3fffffffffffffff - local_3f0 < local_3d0) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append((string *)&local_3f8,local_3d8,local_3d0);
    local_3b8 = (string *)local_3a8;
    psVar17 = psVar9 + 0x10;
    local_3b0 = *(longlong *)(psVar9 + 8);
    if (*(string **)psVar9 == psVar17) {
      uVar15 = local_3b0 + 1;
      psVar18 = psVar17;
      psVar20 = local_3b8;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)(local_3b8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = local_3b8 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
      local_3b0 = *(longlong *)(psVar9 + 8);
    }
    else {
      local_3a8[0] = *(undefined8 *)(psVar9 + 0x10);
      local_3b8 = *(string **)psVar9;
    }
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  else {
    if (uVar15 <= local_3e8[0]) goto LAB_140005fb0;
    if (local_3d8 == (string *)local_3c8) {
      local_3c8[0] = 0xf;
    }
LAB_140005fa4:
    if (local_3c8[0] < uVar15) goto LAB_140005fb0;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_3d8,0,0,local_3f8,local_3f0);
    local_3b8 = (string *)local_3a8;
    psVar17 = psVar9 + 0x10;
    local_3b0 = *(longlong *)(psVar9 + 8);
    if (*(string **)psVar9 == psVar17) {
      uVar15 = local_3b0 + 1;
      psVar18 = psVar17;
      psVar20 = local_3b8;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)(local_3b8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)((longlong)local_3a8 + uVar14);
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
      local_3b0 = *(longlong *)(psVar9 + 8);
    }
    else {
      local_3a8[0] = *(undefined8 *)(psVar9 + 0x10);
      local_3b8 = *(string **)psVar9;
    }
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  local_740 = (string *)local_3a8;
  if (0x3fffffffffffffffU - local_3b0 < 0x10) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_3b8,(string *)"kernel.cpp\" -o \"",0x10)
  ;
  psVar17 = psVar9 + 0x10;
  local_390 = *(longlong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    uVar15 = local_390 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_388;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_388 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_388 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_390 = *(longlong *)(psVar9 + 8);
    local_398 = (string *)local_388;
  }
  else {
    local_388[0] = *(undefined8 *)(psVar9 + 0x10);
    local_398 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  std::operator+((longlong *)&local_358,(string *)&local_398,(string *)local_378);
  if (0x3fffffffffffffffU - local_350 < 0x55) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append
                     ((string *)&local_358,
                      (string *)
                      "kernel.o\"\nif errorlevel 1 goto fail\n\necho [3/4] Linking...\nwsl i686-linux-gnu-ld -T \""
                      ,0x55);
  psVar17 = psVar9 + 0x10;
  local_330 = *(longlong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    uVar15 = local_330 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_328;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_328 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_328 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_330 = *(longlong *)(psVar9 + 8);
    local_338 = (string *)local_328;
  }
  else {
    local_328[0] = *(undefined8 *)(psVar9 + 0x10);
    local_338 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  std::operator+((longlong *)&local_2f8,(string *)&local_338,(string *)local_318);
  if (0x3fffffffffffffffU - local_2f0 < 0xc) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_2f8,(string *)"linker.ld\" \"",0xc);
  psVar17 = psVar9 + 0x10;
  local_2d0 = *(ulonglong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    local_2d0 = local_2d0 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_2c8;
    if (7 < (uint)local_2d0) {
      uVar15 = 0;
      do {
        uVar16 = (int)uVar15 + 8;
        uVar13 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_2c8 + uVar15) = *(undefined8 *)(psVar17 + uVar15);
        uVar15 = uVar13;
      } while (uVar16 < ((uint)local_2d0 & 0xfffffff8));
      psVar20 = (string *)local_2c8 + uVar13;
      psVar18 = psVar17 + uVar13;
    }
    lVar8 = 0;
    if ((local_2d0 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((local_2d0 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((local_2d0 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_2d0 = *(ulonglong *)(psVar9 + 8);
    local_2d8 = (string *)local_2c8;
  }
  else {
    local_2c8[0] = *(ulonglong *)(psVar9 + 0x10);
    local_2d8 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  uVar15 = local_2d0 + local_2b0;
  if (local_2d8 == (string *)local_2c8) {
    if ((0xf < uVar15) && (local_2b8 != (string *)local_2a8)) goto LAB_14000629e;
LAB_1400062aa:
    if (0x3fffffffffffffff - local_2d0 < local_2b0) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append((string *)&local_2d8,local_2b8,local_2b0);
    local_298 = (string *)local_288;
    psVar17 = psVar9 + 0x10;
    local_290 = *(longlong *)(psVar9 + 8);
    if (*(string **)psVar9 == psVar17) {
      uVar15 = local_290 + 1;
      psVar18 = psVar17;
      psVar20 = local_298;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)(local_298 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = local_298 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
      local_290 = *(longlong *)(psVar9 + 8);
    }
    else {
      local_288[0] = *(undefined8 *)(psVar9 + 0x10);
      local_298 = *(string **)psVar9;
    }
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  else {
    if (uVar15 <= local_2c8[0]) goto LAB_1400062aa;
    if (local_2b8 == (string *)local_2a8) {
      local_2a8[0] = 0xf;
    }
LAB_14000629e:
    if (local_2a8[0] < uVar15) goto LAB_1400062aa;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_2b8,0,0,local_2d8,local_2d0);
    local_298 = (string *)local_288;
    psVar17 = psVar9 + 0x10;
    local_290 = *(longlong *)(psVar9 + 8);
    if (*(string **)psVar9 == psVar17) {
      uVar15 = local_290 + 1;
      psVar18 = psVar17;
      psVar20 = local_298;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)(local_298 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)((longlong)local_288 + uVar14);
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
      local_290 = *(longlong *)(psVar9 + 8);
    }
    else {
      local_288[0] = *(undefined8 *)(psVar9 + 0x10);
      local_298 = *(string **)psVar9;
    }
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  local_728 = (string *)local_288;
  if (0x3fffffffffffffffU - local_290 < 9) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_298,(string *)"boot.o\" \"",9);
  psVar17 = psVar9 + 0x10;
  local_270 = *(ulonglong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    local_270 = local_270 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_268;
    if (7 < (uint)local_270) {
      uVar15 = 0;
      do {
        uVar16 = (int)uVar15 + 8;
        uVar13 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_268 + uVar15) = *(undefined8 *)(psVar17 + uVar15);
        uVar15 = uVar13;
      } while (uVar16 < ((uint)local_270 & 0xfffffff8));
      psVar20 = (string *)local_268 + uVar13;
      psVar18 = psVar17 + uVar13;
    }
    lVar8 = 0;
    if ((local_270 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((local_270 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((local_270 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_270 = *(ulonglong *)(psVar9 + 8);
    local_278 = (string *)local_268;
  }
  else {
    local_268[0] = *(ulonglong *)(psVar9 + 0x10);
    local_278 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  uVar15 = local_270 + local_250;
  if (local_278 == (string *)local_268) {
    if ((0xf < uVar15) && (local_258 != (string *)local_248)) goto LAB_140006418;
LAB_140006424:
    if (0x3fffffffffffffff - local_270 < local_250) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append((string *)&local_278,local_258,local_250);
    plVar21 = local_228;
    local_238 = *(string **)psVar9;
    psVar17 = psVar9 + 0x10;
    local_230 = *(longlong *)(psVar9 + 8);
    if (local_238 != psVar17) goto LAB_140006479;
    uVar15 = local_230 + 1;
    psVar20 = psVar17;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((longlong)plVar21 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
LAB_1400081d7:
      plVar21 = (longlong *)((longlong)local_228 + uVar14);
      psVar17 = psVar20 + uVar14;
    }
LAB_140007640:
    local_238 = (string *)local_228;
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)plVar21 = *(undefined4 *)psVar17;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)((longlong)plVar21 + lVar8) = *(undefined2 *)(psVar17 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      *(string *)((longlong)plVar21 + lVar8) = psVar17[lVar8];
    }
    local_230 = *(longlong *)(psVar9 + 8);
  }
  else {
    if (uVar15 <= local_268[0]) goto LAB_140006424;
    if (local_258 == (string *)local_248) {
      local_248[0] = 0xf;
    }
LAB_140006418:
    if (local_248[0] < uVar15) goto LAB_140006424;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_258,0,0,local_278,local_270);
    plVar21 = local_228;
    local_238 = *(string **)psVar9;
    psVar17 = psVar9 + 0x10;
    local_230 = *(longlong *)(psVar9 + 8);
    if (local_238 == psVar17) {
      uVar15 = local_230 + 1;
      psVar20 = psVar17;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)((longlong)plVar21 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        goto LAB_1400081d7;
      }
      goto LAB_140007640;
    }
LAB_140006479:
    local_228[0] = *(longlong *)(psVar9 + 0x10);
    psVar20 = psVar17;
  }
  local_720 = (string *)local_228;
  *(longlong *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  *(string **)psVar9 = psVar20;
  if (0x3fffffffffffffffU - local_230 < 0xe) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_238,(string *)"kernel.o\" -o \"",0xe);
  psVar17 = psVar9 + 0x10;
  local_210 = *(longlong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    uVar15 = local_210 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_208;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_208 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_208 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_210 = *(longlong *)(psVar9 + 8);
    local_218 = (string *)local_208;
  }
  else {
    local_208[0] = *(undefined8 *)(psVar9 + 0x10);
    local_218 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  std::operator+((longlong *)&local_1d8,(string *)&local_218,(string *)local_1f8);
  if (0x3fffffffffffffffU - local_1d0 < 100) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append
                     ((string *)&local_1d8,
                      (string *)
                      "kernel.elf\" -m elf_i386\nif errorlevel 1 goto fail\n\necho [4/4] Creating ISO...\nwsl grub-mkrescue -o \""
                      ,100);
  psVar17 = psVar9 + 0x10;
  local_1b0 = *(ulonglong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    local_1b0 = local_1b0 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_1a8;
    if (7 < (uint)local_1b0) {
      uVar15 = 0;
      do {
        uVar16 = (int)uVar15 + 8;
        uVar13 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_1a8 + uVar15) = *(undefined8 *)(psVar17 + uVar15);
        uVar15 = uVar13;
      } while (uVar16 < ((uint)local_1b0 & 0xfffffff8));
      psVar20 = (string *)local_1a8 + uVar13;
      psVar18 = psVar17 + uVar13;
    }
    lVar8 = 0;
    if ((local_1b0 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((local_1b0 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((local_1b0 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_1b0 = *(ulonglong *)(psVar9 + 8);
    local_1b8 = (string *)local_1a8;
  }
  else {
    local_1a8[0] = *(ulonglong *)(psVar9 + 0x10);
    local_1b8 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  uVar15 = local_1b0 + local_190;
  if (local_1b8 == (string *)local_1a8) {
    if ((0xf < uVar15) && (local_198 != (string *)local_188)) goto LAB_140006642;
LAB_14000664e:
    if (0x3fffffffffffffff - local_1b0 < local_190) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append((string *)&local_1b8,local_198,local_190);
    plVar21 = local_168;
    local_178 = *(string **)psVar9;
    psVar17 = psVar9 + 0x10;
    local_170 = *(longlong *)(psVar9 + 8);
    if (local_178 != psVar17) goto LAB_1400066a3;
    uVar15 = local_170 + 1;
    psVar20 = psVar17;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((longlong)plVar21 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
LAB_140008227:
      plVar21 = (longlong *)((longlong)local_168 + uVar14);
      psVar17 = psVar20 + uVar14;
    }
LAB_1400076f0:
    local_178 = (string *)local_168;
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)plVar21 = *(undefined4 *)psVar17;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)((longlong)plVar21 + lVar8) = *(undefined2 *)(psVar17 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      *(string *)((longlong)plVar21 + lVar8) = psVar17[lVar8];
    }
    local_170 = *(longlong *)(psVar9 + 8);
  }
  else {
    if (uVar15 <= local_1a8[0]) goto LAB_14000664e;
    if (local_198 == (string *)local_188) {
      local_188[0] = 0xf;
    }
LAB_140006642:
    if (local_188[0] < uVar15) goto LAB_14000664e;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_198,0,0,local_1b8,local_1b0);
    plVar21 = local_168;
    local_178 = *(string **)psVar9;
    psVar17 = psVar9 + 0x10;
    local_170 = *(longlong *)(psVar9 + 8);
    if (local_178 == psVar17) {
      uVar15 = local_170 + 1;
      psVar20 = psVar17;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)((longlong)plVar21 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        goto LAB_140008227;
      }
      goto LAB_1400076f0;
    }
LAB_1400066a3:
    local_168[0] = *(longlong *)(psVar9 + 0x10);
    psVar20 = psVar17;
  }
  local_710 = (string *)local_168;
  *(longlong *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  *(string **)psVar9 = psVar20;
  if (0x3fffffffffffffffU - local_170 < 3) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append((string *)&local_178,(string *)&DAT_1400c3d35,3);
  psVar17 = psVar9 + 0x10;
  local_150 = *(ulonglong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    local_150 = local_150 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_148;
    if (7 < (uint)local_150) {
      uVar15 = 0;
      do {
        uVar16 = (int)uVar15 + 8;
        uVar13 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_148 + uVar15) = *(undefined8 *)(psVar17 + uVar15);
        uVar15 = uVar13;
      } while (uVar16 < ((uint)local_150 & 0xfffffff8));
      psVar20 = (string *)local_148 + uVar13;
      psVar18 = psVar17 + uVar13;
    }
    lVar8 = 0;
    if ((local_150 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((local_150 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((local_150 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_150 = *(ulonglong *)(psVar9 + 8);
    local_158 = (string *)local_148;
  }
  else {
    local_148[0] = *(ulonglong *)(psVar9 + 0x10);
    local_158 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  uVar15 = local_150 + local_130;
  if (local_158 == (string *)local_148) {
    if ((0xf < uVar15) && ((ulonglong *)CONCAT44(uStack_134,local_138) != local_128))
    goto LAB_1400067ac;
LAB_1400067b8:
    if (0x3fffffffffffffff - local_150 < local_130) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append
                       ((string *)&local_158,(string *)CONCAT44(uStack_134,local_138),local_130);
    psVar17 = psVar9 + 0x10;
    if (*(string **)psVar9 == psVar17) {
      uVar15 = *(longlong *)(psVar9 + 8) + 1;
      psVar18 = psVar17;
      psVar20 = (string *)local_108;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)((string *)local_108 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)local_108 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      local_118._0_8_ = (string *)local_108;
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
    }
    else {
      local_108[0] = *(undefined8 *)(psVar9 + 0x10);
      local_118._0_8_ = *(string **)psVar9;
    }
    local_118._8_8_ = *(undefined8 *)(psVar9 + 8);
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  else {
    if (uVar15 <= local_148[0]) goto LAB_1400067b8;
    if ((ulonglong *)CONCAT44(uStack_134,local_138) == local_128) {
      local_128[0] = 0xf;
    }
LAB_1400067ac:
    if (local_128[0] < uVar15) goto LAB_1400067b8;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_138,0,0,local_158,local_150);
    psVar17 = psVar9 + 0x10;
    if (*(string **)psVar9 == psVar17) {
      uVar15 = *(longlong *)(psVar9 + 8) + 1;
      psVar18 = psVar17;
      psVar20 = (string *)local_108;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)((string *)local_108 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)local_108 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      local_118._0_8_ = (string *)local_108;
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
    }
    else {
      local_108[0] = *(undefined8 *)(psVar9 + 0x10);
      local_118._0_8_ = *(string **)psVar9;
    }
    local_118._8_8_ = *(undefined8 *)(psVar9 + 8);
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  if (0x3fffffffffffffff - local_118._8_8_ < 0x5e) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append
                     ((string *)local_118,
                      (string *)
                      "\"\nif errorlevel 1 goto fail\n\necho.\necho ================================\necho  SUCCESS!\necho  "
                      ,0x5e);
  psVar17 = psVar9 + 0x10;
  if (*(string **)psVar9 == psVar17) {
    uVar15 = *(longlong *)(psVar9 + 8) + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_e8;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_e8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_e8 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    local_f8 = (string *)local_e8;
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
  }
  else {
    local_e8[0] = *(ulonglong *)(psVar9 + 0x10);
    local_f8 = *(string **)psVar9;
  }
  local_f0 = *(ulonglong *)(psVar9 + 8);
  psVar9[0x10] = (string)0x0;
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  uVar15 = local_f0 + local_d0;
  uVar13 = local_c8[0];
  if (local_f8 == (string *)local_e8) {
    if ((0xf < uVar15) && (local_d8 != (wstring *)local_c8)) goto LAB_14000690f;
LAB_14000691b:
    if (0x3fffffffffffffff - local_f0 < local_d0) {
                    // WARNING: Subroutine does not return
      std::__throw_length_error("basic_string::append");
    }
    psVar9 = std::__cxx11::string::_M_append((string *)&local_f8,(string *)local_d8,local_d0);
    psVar17 = psVar9 + 0x10;
    if (*(string **)psVar9 == psVar17) {
      uVar15 = *(longlong *)(psVar9 + 8) + 1;
      psVar18 = psVar17;
      psVar20 = (string *)&local_a8;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)((string *)&local_a8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)&local_a8 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      local_b8 = (string *)&local_a8;
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
    }
    else {
      local_a8 = *(wchar_t **)(psVar9 + 0x10);
      local_b8 = *(string **)psVar9;
    }
    uStack_b0._0_4_ = (undefined4)*(undefined8 *)(psVar9 + 8);
    uStack_b0._4_4_ = (undefined4)((ulonglong)*(undefined8 *)(psVar9 + 8) >> 0x20);
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  else {
    if (uVar15 <= local_e8[0]) goto LAB_14000691b;
    if (local_d8 == (wstring *)local_c8) {
      uVar13 = 0xf;
    }
LAB_14000690f:
    if (uVar13 < uVar15) goto LAB_14000691b;
    psVar9 = std::__cxx11::string::_M_replace((string *)&local_d8,0,0,local_f8,local_f0);
    psVar17 = psVar9 + 0x10;
    if (*(string **)psVar9 == psVar17) {
      uVar15 = *(longlong *)(psVar9 + 8) + 1;
      psVar18 = psVar17;
      psVar20 = (string *)&local_a8;
      if (7 < (uint)uVar15) {
        uVar13 = 0;
        do {
          uVar16 = (int)uVar13 + 8;
          uVar14 = (ulonglong)uVar16;
          *(undefined8 *)((string *)&local_a8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
          uVar13 = uVar14;
        } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
        psVar20 = (string *)&local_a8 + uVar14;
        psVar18 = psVar17 + uVar14;
      }
      lVar8 = 0;
      if ((uVar15 & 4) != 0) {
        *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
        lVar8 = 4;
      }
      if ((uVar15 & 2) != 0) {
        *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
        lVar8 = lVar8 + 2;
      }
      local_b8 = (string *)&local_a8;
      if ((uVar15 & 1) != 0) {
        psVar20[lVar8] = psVar18[lVar8];
      }
    }
    else {
      local_a8 = *(wchar_t **)(psVar9 + 0x10);
      local_b8 = *(string **)psVar9;
    }
    uStack_b0._0_4_ = (undefined4)*(undefined8 *)(psVar9 + 8);
    uStack_b0._4_4_ = (undefined4)((ulonglong)*(undefined8 *)(psVar9 + 8) >> 0x20);
    *(string **)psVar9 = psVar17;
    *(undefined8 *)(psVar9 + 8) = 0;
    psVar9[0x10] = (string)0x0;
  }
  if (0x3fffffffffffffffU - CONCAT44(uStack_b0._4_4_,(undefined4)uStack_b0) < 0xa8) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  psVar9 = std::__cxx11::string::_M_append
                     ((string *)&local_b8,
                      (string *)
                      "\necho ================================\ngoto done\n:fail\necho.\necho ================================\necho  BUILD FAILED\necho ================================\n:done\npause\n"
                      ,0xa8);
  psVar17 = psVar9 + 0x10;
  local_4b0 = *(longlong *)(psVar9 + 8);
  if (*(string **)psVar9 == psVar17) {
    uVar15 = local_4b0 + 1;
    psVar18 = psVar17;
    psVar20 = (string *)local_4a8;
    if (7 < (uint)uVar15) {
      uVar13 = 0;
      do {
        uVar16 = (int)uVar13 + 8;
        uVar14 = (ulonglong)uVar16;
        *(undefined8 *)((string *)local_4a8 + uVar13) = *(undefined8 *)(psVar17 + uVar13);
        uVar13 = uVar14;
      } while (uVar16 < ((uint)uVar15 & 0xfffffff8));
      psVar20 = (string *)local_4a8 + uVar14;
      psVar18 = psVar17 + uVar14;
    }
    lVar8 = 0;
    if ((uVar15 & 4) != 0) {
      *(undefined4 *)psVar20 = *(undefined4 *)psVar18;
      lVar8 = 4;
    }
    if ((uVar15 & 2) != 0) {
      *(undefined2 *)(psVar20 + lVar8) = *(undefined2 *)(psVar18 + lVar8);
      lVar8 = lVar8 + 2;
    }
    if ((uVar15 & 1) != 0) {
      psVar20[lVar8] = psVar18[lVar8];
    }
    local_4b0 = *(longlong *)(psVar9 + 8);
    local_4b8 = (string *)local_4a8;
  }
  else {
    local_4a8[0] = *(undefined8 *)(psVar9 + 0x10);
    local_4b8 = *(string **)psVar9;
  }
  *(string **)psVar9 = psVar17;
  *(undefined8 *)(psVar9 + 8) = 0;
  psVar9[0x10] = (string)0x0;
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  if (local_f8 != (string *)local_e8) {
    operator_delete(local_f8);
  }
  if ((string *)local_118._0_8_ != (string *)local_108) {
    operator_delete((void *)local_118._0_8_);
  }
  if (local_158 != (string *)local_148) {
    operator_delete(local_158);
  }
  if (local_178 != local_710) {
    operator_delete(local_178);
  }
  if (local_1b8 != (string *)local_1a8) {
    operator_delete(local_1b8);
  }
  if (local_1d8 != local_1c8) {
    operator_delete(local_1d8);
  }
  if (local_218 != (string *)local_208) {
    operator_delete(local_218);
  }
  if (local_238 != local_720) {
    operator_delete(local_238);
  }
  if (local_278 != (string *)local_268) {
    operator_delete(local_278);
  }
  if (local_298 != local_728) {
    operator_delete(local_298);
  }
  if (local_2d8 != (string *)local_2c8) {
    operator_delete(local_2d8);
  }
  if (local_2f8 != local_2e8) {
    operator_delete(local_2f8);
  }
  if (local_338 != (string *)local_328) {
    operator_delete(local_338);
  }
  if (local_358 != local_348) {
    operator_delete(local_358);
  }
  if (local_398 != (string *)local_388) {
    operator_delete(local_398);
  }
  if (local_3b8 != local_740) {
    operator_delete(local_3b8);
  }
  if (local_3f8 != (string *)local_3e8) {
    operator_delete(local_3f8);
  }
  if (local_418 != local_748) {
    operator_delete(local_418);
  }
  if (local_458 != (string *)local_448) {
    operator_delete(local_458);
  }
  if (local_478 != (string *)local_468) {
    operator_delete(local_478);
  }
  if (local_498[0] != local_488) {
    operator_delete(local_498[0]);
  }
  if (local_438 != (string *)local_428) {
    operator_delete(local_438);
  }
  if (local_3d8 != (string *)local_3c8) {
    operator_delete(local_3d8);
  }
  if (local_378[0] != local_368) {
    operator_delete(local_378[0]);
  }
  if (local_318[0] != local_308) {
    operator_delete(local_318[0]);
  }
  if (local_2b8 != (string *)local_2a8) {
    operator_delete(local_2b8);
  }
  if (local_258 != (string *)local_248) {
    operator_delete(local_258);
  }
  if (local_1f8[0] != local_1e8) {
    operator_delete(local_1f8[0]);
  }
  if (local_198 != (string *)local_188) {
    operator_delete(local_198);
  }
  if ((ulonglong *)CONCAT44(uStack_134,local_138) != local_128) {
    operator_delete((ulonglong *)CONCAT44(uStack_134,local_138));
  }
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  sVar7 = wcslen(L"build.bat");
  uVar15 = local_5f0;
  puVar2 = local_5f8;
  uStack_b0._0_4_ = 0;
  uStack_b0._4_4_ = 0;
  local_a8 = (wchar_t *)((ulonglong)local_a8 & 0xffffffffffff0000);
  local_b8 = (string *)&local_a8;
  std::__cxx11::wstring::reserve((wstring *)&local_b8,sVar7 + local_5f0);
  if (0x1fffffffffffffffU - CONCAT44(uStack_b0._4_4_,(undefined4)uStack_b0) < uVar15) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_b8,puVar2,uVar15);
  if (0x1fffffffffffffffU - CONCAT44(uStack_b0._4_4_,(undefined4)uStack_b0) < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_b8,L"build.bat",sVar7);
  WriteUTF8(&local_b8,&local_4b8);
  if (local_b8 != (string *)&local_a8) {
    operator_delete(local_b8);
  }
  puVar2 = local_5f8;
  local_b8._4_4_ = 0;
  uStack_b0._0_4_ = 0;
  local_58 = (HANDLE)0x0;
  puVar11 = &uStack_b0;
  for (lVar8 = 0xc; lVar8 != 0; lVar8 = lVar8 + -1) {
    *puVar11 = 0;
    puVar11 = puVar11 + 1;
  }
  local_78 = 5;
  local_b8._0_4_ = 0x68;
  local_118 = (undefined1  [16])0x0;
  local_7c = 1;
  local_108[0]._0_4_ = 0;
  local_108[0]._4_4_ = 0;
  sVar7 = wcslen(L"cmd.exe /C \"");
  local_c8[0] = local_c8[0] & 0xffffffffffff0000;
  local_d0 = 0;
  local_d8 = (wstring *)local_c8;
  std::__cxx11::wstring::reserve((wstring *)&local_d8,local_5f0 + sVar7);
  if (0x1fffffffffffffff - local_d0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"cmd.exe /C \"",sVar7);
  if (0x1fffffffffffffff - local_d0 < local_5f0) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  std::__cxx11::wstring::_M_append((wstring *)&local_d8,puVar2,local_5f0);
  sVar7 = wcslen(L"build.bat\"");
  if (0x1fffffffffffffff - local_d0 < sVar7) {
                    // WARNING: Subroutine does not return
    std::__throw_length_error("basic_string::append");
  }
  pwVar12 = std::__cxx11::wstring::_M_append((wstring *)&local_d8,L"build.bat\"",sVar7);
  psVar17 = (string *)(pwVar12 + 0x10);
  lVar8 = *(longlong *)(pwVar12 + 8);
  local_f8 = *(string **)pwVar12;
  if (local_f8 == psVar17) {
    local_f8 = (string *)local_e8;
    memcpy((string *)local_e8,psVar17,lVar8 * 2 + 2);
    lVar8 = *(longlong *)(pwVar12 + 8);
  }
  else {
    local_e8[0] = *(ulonglong *)(pwVar12 + 0x10);
  }
  *(string **)pwVar12 = psVar17;
  *(undefined8 *)(pwVar12 + 8) = 0;
  *(undefined2 *)(pwVar12 + 0x10) = 0;
  local_f0 = lVar8;
  if (local_d8 != (wstring *)local_c8) {
    operator_delete(local_d8);
  }
  CreateProcessW((LPCWSTR)0x0,(LPWSTR)local_f8,(LPSECURITY_ATTRIBUTES)0x0,(LPSECURITY_ATTRIBUTES)0x0
                 ,0,0x10,(LPVOID)0x0,(LPCWSTR)0x0,(LPSTARTUPINFOW)&local_b8,
                 (LPPROCESS_INFORMATION)local_118);
  if ((HANDLE)local_118._0_8_ != (HANDLE)0x0) {
    CloseHandle((HANDLE)local_118._0_8_);
    CloseHandle((HANDLE)local_118._8_8_);
  }
  if (local_f8 != (string *)local_e8) {
    operator_delete(local_f8);
  }
  if (local_4b8 != (string *)local_4a8) {
    operator_delete(local_4b8);
  }
  if (local_4d8[0] != local_4c8) {
    operator_delete(local_4d8[0]);
  }
  if (local_4f8[0] != local_4e8) {
    operator_delete(local_4f8[0]);
  }
  if (local_518[0] != local_508) {
    operator_delete(local_518[0]);
  }
  if (local_538[0] != local_528) {
    operator_delete(local_538[0]);
  }
  if (local_558 != (string *)local_548) {
    operator_delete(local_558);
  }
  if (local_578 != local_568) {
    operator_delete(local_578);
  }
  if (local_598 != local_588) {
    operator_delete(local_598);
  }
  if (local_5b8 != local_5a8) {
    operator_delete(local_5b8);
  }
  if (local_5d8 != local_5c8) {
    operator_delete(local_5d8);
  }
  if (local_5f8 != local_5e8) {
    operator_delete(local_5f8);
  }
LAB_140007370:
  if (local_618 != local_608) {
    operator_delete(local_618);
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// WndProc(HWND__*, unsigned int, unsigned long long, long long)

HBRUSH WndProc(HWND param_1,uint param_2,HDC param_3,HWND param_4)

{
  HWND hWnd;
  int iVar1;
  uint uVar2;
  HBRUSH pHVar3;
  HPEN h;
  HGDIOBJ h_00;
  uint uVar4;
  longlong lVar5;
  wchar_t *lpClassName;
  ulonglong uVar6;
  undefined8 *puVar7;
  LONG *pLVar8;
  bool bVar9;
  tagRECT local_e8;
  undefined1 local_d8 [12];
  int iStack_cc;
  HWND local_c8;
  undefined8 local_c0;
  RECT local_b8;
  undefined4 local_a4;
  wchar_t local_9e [55];
  
  if (0x138 < param_2) {
switchD_140009541_caseD_112:
                    // WARNING: Could not recover jumptable at 0x000140009560. Too many branches
                    // WARNING: Treating indirect jump as call
    pHVar3 = (HBRUSH)DefWindowProcW(param_1,param_2,(WPARAM)param_3,(LPARAM)param_4);
    return pHVar3;
  }
  if (param_2 < 0x111) {
    if (param_2 == 0x14) {
      GetClientRect(param_1,(LPRECT)local_d8);
      FillRect(param_3,(LPRECT)local_d8,hBrBg);
      local_b8.left = 0;
      local_b8.top = 0;
      local_b8.right = 0xb9;
      local_b8.bottom = iStack_cc;
      FillRect(param_3,&local_b8,hBrPanel);
      h = CreatePen(0,1,0x3e2d2d);
      h_00 = SelectObject(param_3,h);
      MoveToEx(param_3,0xb9,0,(LPPOINT)0x0);
      LineTo(param_3,0xb9,iStack_cc);
      SelectObject(param_3,h_00);
      DeleteObject(h);
      return (HBRUSH)0x1;
    }
    if (param_2 < 0x15) {
      if (param_2 == 2) {
        DeleteObject(hMono);
        DeleteObject(hBtn);
        DeleteObject(hBrBg);
        DeleteObject(hBrPanel);
        DeleteObject(hBrEd);
        if (hRichLib != (HMODULE)0x0) {
          FreeLibrary(hRichLib);
        }
        PostQuitMessage(0);
        return (HBRUSH)0x0;
      }
      if (param_2 == 5) {
        uVar2 = (uint)((ulonglong)param_4 >> 0x10) & 0xffff;
        if (hLineNos != (HWND)0x0) {
          MoveWindow(hLineNos,0xb9,0,0x34,uVar2,1);
        }
        if (hEditor != (HWND)0x0) {
          MoveWindow(hEditor,0xed,0,((uint)param_4 & 0xffff) - 0xed,uVar2,1);
        }
        InvalidateRect(param_1,(RECT *)0x0,1);
        return (HBRUSH)0x0;
      }
      if (param_2 != 1) goto switchD_140009541_caseD_112;
      hMain = param_1;
      hRichLib = LoadLibraryW(L"Msftedit.dll");
      if (hRichLib == (HMODULE)0x0) {
        hRichLib = LoadLibraryW(L"Riched20.dll");
      }
      hMono = CreateFontW(0x11,0,0,0,400,0,0,0,0,4,0,5,0x31,L"Cascadia Code");
      if (hMono == (HFONT)0x0) {
        hMono = CreateFontW(0x11,0,0,0,400,0,0,0,0,4,0,5,0x31,L"Consolas");
      }
      hBtn = CreateFontW(0xd,0,0,0,600,0,0,0,1,0,0,5,0x20,L"Segoe UI");
      hBrBg = CreateSolidBrush(0x1a1414);
      hBrPanel = CreateSolidBrush(0x221a1a);
      hBrEd = CreateSolidBrush(0x201818);
      GetClientRect(param_1,&local_e8);
      hLineNos = CreateWindowExW(0,L"EDIT",L"",0x50000806,0xb9,0,0x34,local_e8.bottom,param_1,
                                 (HMENU)0x3ea,(HINSTANCE)0x0,(LPVOID)0x0);
      SendMessageW(hLineNos,0x30,(WPARAM)hMono,1);
      lpClassName = L"RichEdit20W";
      if (hRichLib != (HMODULE)0x0) {
        lpClassName = L"RICHEDIT50W";
      }
      hEditor = CreateWindowExW(0,lpClassName,L"",0x503001c4,0xed,0,local_e8.right + -0xed,
                                local_e8.bottom,param_1,(HMENU)0x3e9,(HINSTANCE)0x0,(LPVOID)0x0);
      SendMessageW(hEditor,0x30,(WPARAM)hMono,1);
      SendMessageW(hEditor,0x445,0,5);
      SendMessageW(hEditor,0x443,0,0x201818);
      SendMessageW(hEditor,0xc5,0xa00000,0);
      pLVar8 = &local_b8.right;
      for (lVar5 = 0xd; lVar5 != 0; lVar5 = lVar5 + -1) {
        *(undefined8 *)pLVar8 = 0;
        pLVar8 = pLVar8 + 2;
      }
      *pLVar8 = 0;
      local_b8.left = 0x74;
      local_b8.top = -0x18000000;
      local_a4 = 0xf0e8e2;
      local_b8.bottom = 0xaa;
      wcscpy(local_9e,L"Cascadia Code");
      SendMessageW(hEditor,0x444,4,(LPARAM)&local_b8);
      SetWindowTextW(hEditor,
                     L"#include <cstdio>\r\n\r\nint main() {\r\n    printf(\"Hello, World!\\n\");\r\n    return 0;\r\n}\r\n"
                    );
      hBtnIso = CreateWindowExW(0,L"BUTTON",L"Build ISO & Download",0x5000000b,0xe,0x14,0x9d,0x32,
                                param_1,(HMENU)0x3ec,(HINSTANCE)0x0,(LPVOID)0x0);
      hBtnSave = CreateWindowExW(0,L"BUTTON",L"Save .cpp",0x5000000b,0xe,0x54,0x9d,0x24,param_1,
                                 (HMENU)0x3ed,(HINSTANCE)0x0,(LPVOID)0x0);
      _hBtnSetup = CreateWindowExW(0,L"BUTTON",L"Setup (WSL tools)",0x5000000b,0xe,0x86,0x9d,0x24,
                                   param_1,(HMENU)0x3ef,(HINSTANCE)0x0,(LPVOID)0x0);
      puVar7 = (undefined8 *)local_d8;
      local_c8 = _hBtnSetup;
      local_d8._0_8_ = hBtnIso;
      stack0xffffffffffffff30 = hBtnSave;
      do {
        hWnd = (HWND)*puVar7;
        puVar7 = puVar7 + 1;
        SendMessageW(hWnd,0x30,(WPARAM)hBtn,1);
      } while (&local_c0 != puVar7);
      UpdateLineNos();
      ApplySyntaxHighlight();
    }
    else {
      if (param_2 == 0x2b) {
        uVar6 = 0xeb6325;
        if ((*(HWND *)(param_4 + 6) != hBtnIso) &&
           (uVar6 = 0x4aa316, *(HWND *)(param_4 + 6) != hBtnSave)) {
          uVar6 = 0xd9286d;
        }
        DrawBtn((longlong)param_4,uVar6);
        return (HBRUSH)0x1;
      }
      if (param_2 != 0x4e) goto switchD_140009541_caseD_112;
      if (*(HWND *)param_4 == hEditor) {
        iVar1 = param_4[4].unused;
        if (iVar1 == 0x700) {
          UpdateLineNos();
          if (*(HWND *)param_4 != hEditor) goto LAB_14000951c;
          iVar1 = param_4[4].unused;
        }
        if (iVar1 == 0x602) goto switchD_140009541_caseD_115;
      }
    }
    goto LAB_14000951c;
  }
  switch(param_2) {
  case 0x111:
    uVar4 = (uint)param_3 & 0xffff;
    uVar2 = (uint)((ulonglong)param_3 >> 0x10) & 0xffff;
    bVar9 = (short)param_3 == 0x3e9;
    if ((uVar2 == 0x300) && (bVar9)) {
      UpdateLineNos();
      SetTimer(param_1,1,400,(TIMERPROC)0x0);
      return (HBRUSH)0x0;
    }
    if ((uVar2 == 0x602) && (bVar9)) goto switchD_140009541_caseD_115;
    if (uVar4 == 0x3ec) {
      DoBuildIso();
      return (HBRUSH)0x0;
    }
    if (uVar4 == 0x3ed) {
      DoSave();
      return (HBRUSH)0x0;
    }
    if (uVar4 == 0x3ef) {
      DoSetup();
      return (HBRUSH)0x0;
    }
    goto LAB_14000951c;
  default:
    goto switchD_140009541_caseD_112;
  case 0x113:
    if (param_3 == (HDC)0x1) {
      KillTimer(param_1,1);
      ApplySyntaxHighlight();
      return (HBRUSH)0x0;
    }
LAB_14000951c:
    pHVar3 = (HBRUSH)0x0;
    break;
  case 0x115:
switchD_140009541_caseD_115:
    UpdateLineNos();
    pHVar3 = (HBRUSH)0x0;
    break;
  case 0x133:
    pHVar3 = hBrEd;
    if (hLineNos == param_4) {
      SetBkColor(param_3,0x201818);
      SetTextColor(param_3,0x645046);
      pHVar3 = hBrEd;
    }
    break;
  case 0x135:
    pHVar3 = hBrPanel;
    break;
  case 0x138:
    pHVar3 = hBrBg;
  }
  return pHVar3;
}



COLORREF __stdcall SetTextColor(HDC hdc,COLORREF color)

{
  COLORREF CVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099a0. Too many branches
                    // WARNING: Treating indirect jump as call
  CVar1 = SetTextColor(hdc,color);
  return CVar1;
}



int __stdcall SetBkMode(HDC hdc,int mode)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099a8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = SetBkMode(hdc,mode);
  return iVar1;
}



COLORREF __stdcall SetBkColor(HDC hdc,COLORREF color)

{
  COLORREF CVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099b0. Too many branches
                    // WARNING: Treating indirect jump as call
  CVar1 = SetBkColor(hdc,color);
  return CVar1;
}



HGDIOBJ __stdcall SelectObject(HDC hdc,HGDIOBJ h)

{
  HGDIOBJ pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099b8. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = SelectObject(hdc,h);
  return pvVar1;
}



BOOL __stdcall RoundRect(HDC hdc,int left,int top,int right,int bottom,int width,int height)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099c0. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = RoundRect(hdc,left,top,right,bottom,width,height);
  return BVar1;
}



BOOL __stdcall MoveToEx(HDC hdc,int x,int y,LPPOINT lppt)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099c8. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = MoveToEx(hdc,x,y,lppt);
  return BVar1;
}



BOOL __stdcall LineTo(HDC hdc,int x,int y)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099d0. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = LineTo(hdc,x,y);
  return BVar1;
}



HGDIOBJ __stdcall GetStockObject(int i)

{
  HGDIOBJ pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099d8. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = GetStockObject(i);
  return pvVar1;
}



BOOL __stdcall DeleteObject(HGDIOBJ ho)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099e0. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = DeleteObject(ho);
  return BVar1;
}



HBRUSH __stdcall CreateSolidBrush(COLORREF color)

{
  HBRUSH pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099e8. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = CreateSolidBrush(color);
  return pHVar1;
}



HPEN __stdcall CreatePen(int iStyle,int cWidth,COLORREF color)

{
  HPEN pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099f0. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = CreatePen(iStyle,cWidth,color);
  return pHVar1;
}



HFONT __stdcall
CreateFontW(int cHeight,int cWidth,int cEscapement,int cOrientation,int cWeight,DWORD bItalic,
           DWORD bUnderline,DWORD bStrikeOut,DWORD iCharSet,DWORD iOutPrecision,DWORD iClipPrecision
           ,DWORD iQuality,DWORD iPitchAndFamily,LPCWSTR pszFaceName)

{
  HFONT pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400099f8. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = CreateFontW(cHeight,cWidth,cEscapement,cOrientation,cWeight,bItalic,bUnderline,bStrikeOut
                       ,iCharSet,iOutPrecision,iClipPrecision,iQuality,iPitchAndFamily,pszFaceName);
  return pHVar1;
}



BOOL __stdcall InitCommonControlsEx(INITCOMMONCONTROLSEX *picce)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a00. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = InitCommonControlsEx(picce);
  return BVar1;
}



BOOL __stdcall UpdateWindow(HWND hWnd)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a10. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = UpdateWindow(hWnd);
  return BVar1;
}



BOOL __stdcall TranslateMessage(MSG *lpMsg)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a18. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = TranslateMessage(lpMsg);
  return BVar1;
}



BOOL __stdcall ShowWindow(HWND hWnd,int nCmdShow)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a20. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = ShowWindow(hWnd,nCmdShow);
  return BVar1;
}



BOOL __stdcall SetWindowTextW(HWND hWnd,LPCWSTR lpString)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a28. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = SetWindowTextW(hWnd,lpString);
  return BVar1;
}



UINT_PTR __stdcall SetTimer(HWND hWnd,UINT_PTR nIDEvent,UINT uElapse,TIMERPROC lpTimerFunc)

{
  UINT_PTR UVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a30. Too many branches
                    // WARNING: Treating indirect jump as call
  UVar1 = SetTimer(hWnd,nIDEvent,uElapse,lpTimerFunc);
  return UVar1;
}



LRESULT __stdcall SendMessageW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)

{
  LRESULT LVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a38. Too many branches
                    // WARNING: Treating indirect jump as call
  LVar1 = SendMessageW(hWnd,Msg,wParam,lParam);
  return LVar1;
}



ATOM __stdcall RegisterClassExW(WNDCLASSEXW *param_1)

{
  ATOM AVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a40. Too many branches
                    // WARNING: Treating indirect jump as call
  AVar1 = RegisterClassExW(param_1);
  return AVar1;
}



void __stdcall PostQuitMessage(int nExitCode)

{
                    // WARNING: Could not recover jumptable at 0x000140009a48. Too many branches
                    // WARNING: Treating indirect jump as call
  PostQuitMessage(nExitCode);
  return;
}



BOOL __stdcall MoveWindow(HWND hWnd,int X,int Y,int nWidth,int nHeight,BOOL bRepaint)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a50. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = MoveWindow(hWnd,X,Y,nWidth,nHeight,bRepaint);
  return BVar1;
}



int __stdcall MessageBoxW(HWND hWnd,LPCWSTR lpText,LPCWSTR lpCaption,UINT uType)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a58. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = MessageBoxW(hWnd,lpText,lpCaption,uType);
  return iVar1;
}



HICON __stdcall LoadIconW(HINSTANCE hInstance,LPCWSTR lpIconName)

{
  HICON pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a60. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = LoadIconW(hInstance,lpIconName);
  return pHVar1;
}



HCURSOR __stdcall LoadCursorW(HINSTANCE hInstance,LPCWSTR lpCursorName)

{
  HCURSOR pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a68. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = LoadCursorW(hInstance,lpCursorName);
  return pHVar1;
}



BOOL __stdcall KillTimer(HWND hWnd,UINT_PTR uIDEvent)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a70. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = KillTimer(hWnd,uIDEvent);
  return BVar1;
}



BOOL __stdcall InvalidateRect(HWND hWnd,RECT *lpRect,BOOL bErase)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a78. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = InvalidateRect(hWnd,lpRect,bErase);
  return BVar1;
}



int __stdcall GetWindowTextW(HWND hWnd,LPWSTR lpString,int nMaxCount)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a80. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = GetWindowTextW(hWnd,lpString,nMaxCount);
  return iVar1;
}



int __stdcall GetWindowTextLengthW(HWND hWnd)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a88. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = GetWindowTextLengthW(hWnd);
  return iVar1;
}



BOOL __stdcall GetMessageW(LPMSG lpMsg,HWND hWnd,UINT wMsgFilterMin,UINT wMsgFilterMax)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a90. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = GetMessageW(lpMsg,hWnd,wMsgFilterMin,wMsgFilterMax);
  return BVar1;
}



BOOL __stdcall GetClientRect(HWND hWnd,LPRECT lpRect)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009a98. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = GetClientRect(hWnd,lpRect);
  return BVar1;
}



int __stdcall FillRect(HDC hDC,RECT *lprc,HBRUSH hbr)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009aa0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = FillRect(hDC,lprc,hbr);
  return iVar1;
}



int __stdcall DrawTextW(HDC hdc,LPCWSTR lpchText,int cchText,LPRECT lprc,UINT format)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009aa8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = DrawTextW(hdc,lpchText,cchText,lprc,format);
  return iVar1;
}



LRESULT __stdcall DispatchMessageW(MSG *lpMsg)

{
  LRESULT LVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009ab0. Too many branches
                    // WARNING: Treating indirect jump as call
  LVar1 = DispatchMessageW(lpMsg);
  return LVar1;
}



LRESULT __stdcall DefWindowProcW(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM lParam)

{
  LRESULT LVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009ab8. Too many branches
                    // WARNING: Treating indirect jump as call
  LVar1 = DefWindowProcW(hWnd,Msg,wParam,lParam);
  return LVar1;
}



HWND __stdcall
CreateWindowExW(DWORD dwExStyle,LPCWSTR lpClassName,LPCWSTR lpWindowName,DWORD dwStyle,int X,int Y,
               int nWidth,int nHeight,HWND hWndParent,HMENU hMenu,HINSTANCE hInstance,LPVOID lpParam
               )

{
  HWND pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009ac0. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = CreateWindowExW(dwExStyle,lpClassName,lpWindowName,dwStyle,X,Y,nWidth,nHeight,hWndParent,
                           hMenu,hInstance,lpParam);
  return pHVar1;
}



void __stdcall CoTaskMemFree(LPVOID pv)

{
                    // WARNING: Could not recover jumptable at 0x000140009ad0. Too many branches
                    // WARNING: Treating indirect jump as call
  CoTaskMemFree(pv);
  return;
}



HRESULT __stdcall CoInitialize(LPVOID pvReserved)

{
  HRESULT HVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009ad8. Too many branches
                    // WARNING: Treating indirect jump as call
  HVar1 = CoInitialize(pvReserved);
  return HVar1;
}



HRESULT __stdcall
CoCreateInstance(IID *rclsid,LPUNKNOWN pUnkOuter,DWORD dwClsContext,IID *riid,LPVOID *ppv)

{
  HRESULT HVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140009ae0. Too many branches
                    // WARNING: Treating indirect jump as call
  HVar1 = CoCreateInstance(rclsid,pUnkOuter,dwClsContext,riid,ppv);
  return HVar1;
}



uint * _text(longlong param_1,uint param_2,longlong param_3,longlong param_4)

{
  int iVar1;
  longlong lVar2;
  ulonglong uVar3;
  uint *puVar4;
  
  if (param_2 < 0x32) {
    if (param_2 < 0x29) {
      uVar3 = 1L << ((byte)param_2 & 0x3f);
      if ((uVar3 & 0x17c00fff600) != 0) goto switchD_140009b1b_caseD_30;
      if ((uVar3 & 0x1fe000000) != 0) goto switchD_140009b1b_caseD_29;
      if ((uVar3 & 0x20000081e) == 0) {
        return (uint *)0x0;
      }
      goto switchD_140009b1b_caseD_2b;
    }
    switch(param_2) {
    case 0x29:
    case 0x2e:
    case 0x2f:
      goto switchD_140009b1b_caseD_29;
    case 0x2a:
    case 0x31:
      goto switchD_140009b1b_caseD_2a;
    case 0x2b:
    case 0x2d:
      goto switchD_140009b1b_caseD_2b;
    default:
      return (uint *)0x0;
    case 0x30:
switchD_140009b1b_caseD_30:
      lVar2 = param_3;
    }
  }
  else {
    if (0x4f < param_2) {
      switch(param_2) {
      case 0x52:
      case 0x56:
      case 0x57:
      case 0x59:
      case 0x5a:
      case 0x5b:
        goto switchD_140009b1b_caseD_30;
      case 0x53:
      case 0x54:
        goto switchD_140009b1b_caseD_2a;
      case 0x55:
        goto switchD_140009b1b_caseD_2b;
      default:
        goto switchD_140009b1b_caseD_29;
      }
    }
    if (param_2 < 0x34) {
      return (uint *)0x0;
    }
    uVar3 = 1L << ((byte)param_2 - 0x34 & 0x3f);
    if ((uVar3 & 0x1c71107) != 0) goto switchD_140009b1b_caseD_30;
    if ((uVar3 & 0xa002ef8) == 0) {
      if (param_2 != 0x4e) {
        return (uint *)0x0;
      }
      goto switchD_140009b1b_caseD_29;
    }
switchD_140009b1b_caseD_2b:
    if (param_3 == 0) {
      return (uint *)0x0;
    }
switchD_140009b1b_caseD_2a:
    lVar2 = param_4;
  }
  if (lVar2 == 0) {
    return (uint *)0x0;
  }
switchD_140009b1b_caseD_29:
  iVar1 = *(int *)(param_1 + 0x28);
  if (*(int *)(param_1 + 0x2c) <= iVar1) {
    return (uint *)0x0;
  }
  puVar4 = (uint *)((longlong)iVar1 * 0x20 + *(longlong *)(param_1 + 0x20));
  puVar4[1] = 0;
  puVar4[2] = 0;
  *(int *)(param_1 + 0x28) = iVar1 + 1;
  *puVar4 = param_2;
  *(longlong *)(puVar4 + 4) = param_3;
  *(longlong *)(puVar4 + 6) = param_4;
  return puVar4;
}



undefined4 * FUN_140009c00(longlong param_1,longlong param_2,int param_3)

{
  int iVar1;
  undefined4 *puVar2;
  
  iVar1 = *(int *)(param_1 + 0x28);
  if (iVar1 < *(int *)(param_1 + 0x2c)) {
    puVar2 = (undefined4 *)((longlong)iVar1 * 0x20 + *(longlong *)(param_1 + 0x20));
    *(undefined8 *)(puVar2 + 1) = 0;
    *(int *)(param_1 + 0x28) = iVar1 + 1;
    if ((param_2 != 0) && (0 < param_3)) {
      *(undefined8 *)(puVar2 + 1) = 0;
      *puVar2 = 0;
      *(longlong *)(puVar2 + 4) = param_2;
      puVar2[6] = param_3;
      return puVar2;
    }
  }
  return (undefined4 *)0x0;
}



int FUN_140009c60(longlong param_1)

{
  char cVar1;
  char *pcVar2;
  bool bVar3;
  int iVar4;
  char *pcVar5;
  int iVar6;
  
  pcVar2 = *(char **)(param_1 + 0x18);
  cVar1 = *pcVar2;
  if (cVar1 == 'n') {
    pcVar5 = pcVar2 + 1;
    *(char **)(param_1 + 0x18) = pcVar5;
    cVar1 = pcVar2[1];
    if (9 < (byte)(cVar1 - 0x30U)) {
      return 0;
    }
    bVar3 = true;
  }
  else {
    if (9 < (byte)(cVar1 - 0x30U)) {
      return 0;
    }
    bVar3 = false;
    pcVar5 = pcVar2;
  }
  iVar6 = 0;
  iVar4 = (int)(char)(cVar1 + -0x30);
  do {
    pcVar5 = pcVar5 + 1;
    *(char **)(param_1 + 0x18) = pcVar5;
    iVar6 = iVar4 + iVar6 * 10;
    if (9 < (byte)(*pcVar5 - 0x30U)) {
      if (bVar3) {
        iVar6 = -iVar6;
      }
      return iVar6;
    }
    iVar4 = *pcVar5 + -0x30;
  } while (iVar6 <= (int)((0x7fffffffU - iVar4) / 10));
  return -1;
}



undefined8 FUN_140009d20(longlong param_1,int param_2)

{
  char *pcVar1;
  
  if (param_2 == 0) {
    pcVar1 = *(char **)(param_1 + 0x18);
    if (*pcVar1 == '\0') {
      return 0;
    }
    *(char **)(param_1 + 0x18) = pcVar1 + 1;
    param_2 = (int)*pcVar1;
  }
  if (param_2 != 0x68) {
    if (param_2 != 0x76) {
      return 0;
    }
    FUN_140009c60(param_1);
    if (**(char **)(param_1 + 0x18) != '_') {
      return 0;
    }
    *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
  }
  FUN_140009c60(param_1);
  if (**(char **)(param_1 + 0x18) != '_') {
    return 0;
  }
  *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
  return 1;
}



uint * FUN_140009da0(longlong param_1,uint *param_2)

{
  char cVar1;
  uint *puVar2;
  int iVar3;
  uint uVar4;
  
  cVar1 = **(char **)(param_1 + 0x18);
  if ((cVar1 != 'R') && (cVar1 != 'O')) {
    return param_2;
  }
  uVar4 = 0x20;
  iVar3 = *(int *)(param_1 + 0x48) + 3;
  if (cVar1 == 'R') {
    iVar3 = *(int *)(param_1 + 0x48) + 2;
    uVar4 = 0x1f;
  }
  *(int *)(param_1 + 0x48) = iVar3;
  *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
  puVar2 = _text(param_1,uVar4,(longlong)param_2,0);
  return puVar2;
}



undefined8 FUN_140009e00(longlong param_1)

{
  char *pcVar1;
  int iVar2;
  
  pcVar1 = *(char **)(param_1 + 0x18);
  if (*pcVar1 == '_') {
    *(char **)(param_1 + 0x18) = pcVar1 + 1;
    if (pcVar1[1] == '_') {
      *(char **)(param_1 + 0x18) = pcVar1 + 2;
      iVar2 = FUN_140009c60(param_1);
      if (iVar2 < 0) {
        return 0;
      }
      if (9 < iVar2) {
        if (**(char **)(param_1 + 0x18) != '_') {
          return 0;
        }
        *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      }
    }
    else {
      iVar2 = FUN_140009c60(param_1);
      if (iVar2 < 0) {
        return 0;
      }
    }
  }
  return 1;
}



void FUN_140009e80(longlong param_1,uint *param_2)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  ulonglong uVar4;
  
  do {
    while( true ) {
      if (param_2 == (uint *)0x0) {
        return;
      }
      if (1 < (int)param_2[2]) {
        return;
      }
      iVar1 = *(int *)(param_1 + 0x134);
      if (0x400 < iVar1) {
        return;
      }
      uVar2 = *param_2;
      param_2[2] = param_2[2] + 1;
      if (0x33 < uVar2) break;
      if (8 < uVar2) {
        uVar4 = 1L << ((byte)uVar2 & 0x3f);
        if ((uVar4 & 0x3ef67fefffe00) == 0) {
          if ((uVar4 & 0x1800000000) != 0) {
            puVar3 = *(uint **)(param_2 + 4);
            if (*puVar3 == 5) {
              *(int *)(param_1 + 0x15c) = *(int *)(param_1 + 0x15c) + 1;
            }
            goto LAB_140009ee0;
          }
          if (uVar2 != 0x33) {
            return;
          }
          goto LAB_140009f40;
        }
        goto LAB_140009edc;
      }
      if ((uVar2 != 7) && (uVar2 != 8)) {
        if (uVar2 < 4) {
          if (uVar2 == 0) {
            return;
          }
        }
        else {
          if (uVar2 != 4) {
            return;
          }
          *(int *)(param_1 + 0x16c) = *(int *)(param_1 + 0x16c) + 1;
        }
        goto LAB_140009edc;
      }
LAB_140009f40:
      param_2 = *(uint **)(param_2 + 6);
    }
    if (0x21 < uVar2 - 0x34) {
      return;
    }
    uVar4 = 1L << ((byte)(uVar2 - 0x34) & 0x3f);
    if ((uVar4 & 0x3fc13fff) != 0) {
LAB_140009edc:
      puVar3 = *(uint **)(param_2 + 4);
LAB_140009ee0:
      *(int *)(param_1 + 0x134) = iVar1 + 1;
      FUN_140009e80(param_1,puVar3);
      FUN_140009e80(param_1,*(uint **)(param_2 + 6));
      *(int *)(param_1 + 0x134) = *(int *)(param_1 + 0x134) + -1;
      return;
    }
    if (((uVar4 & 0x200060000) == 0) && ((uVar4 & 0x180000) == 0)) {
      return;
    }
    param_2 = *(uint **)(param_2 + 4);
  } while( true );
}



int FUN_140009fc0(int *param_1)

{
  int iVar1;
  
  iVar1 = 0;
  for (; ((param_1 != (int *)0x0 && (*param_1 == 0x2f)) && (*(longlong *)(param_1 + 4) != 0));
      param_1 = *(int **)(param_1 + 6)) {
    iVar1 = iVar1 + 1;
  }
  return iVar1;
}



undefined8 FUN_140009ff0(int *param_1,int param_2)

{
  for (; (param_1 != (int *)0x0 && (*param_1 == 0x2f)); param_1 = *(int **)(param_1 + 6)) {
    if (param_2 == 0) {
      return *(undefined8 *)(param_1 + 4);
    }
    param_2 = param_2 + -1;
  }
  return 0;
}



void FUN_14000a030(void *param_1,size_t param_2,longlong *param_3)

{
  ulonglong uVar1;
  void *pvVar2;
  ulonglong _NewSize;
  
  _NewSize = param_3[2];
  uVar1 = param_2 + 1 + param_3[1];
  if (_NewSize < uVar1) {
    if ((int)param_3[3] != 0) {
      return;
    }
    if ((_NewSize != 0) || (_NewSize = 2, 2 < uVar1)) {
      do {
        _NewSize = _NewSize * 2;
      } while (_NewSize < uVar1);
    }
    pvVar2 = realloc((void *)*param_3,_NewSize);
    if (pvVar2 == (void *)0x0) {
      free((void *)*param_3);
      *(undefined4 *)(param_3 + 3) = 1;
      *param_3 = 0;
      *(undefined1 (*) [16])(param_3 + 1) = (undefined1  [16])0x0;
      return;
    }
    *param_3 = (longlong)pvVar2;
    param_3[2] = _NewSize;
  }
  if ((int)param_3[3] == 0) {
    memcpy((void *)(param_3[1] + *param_3),param_1,param_2);
    *(undefined1 *)(*param_3 + param_2 + param_3[1]) = 0;
    param_3[1] = param_3[1] + param_2;
  }
  return;
}



void FUN_14000a100(char *param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  undefined8 local_res18;
  undefined8 local_res20;
  
  local_res18 = param_3;
  local_res20 = param_4;
  __mingw_vsprintf(param_1,"%d",(va_list)&local_res18);
  return;
}



bool FUN_14000a130(longlong param_1)

{
  uint uVar1;
  
  if ((*(char *)**(undefined8 **)(param_1 + 0x10) == 'd') &&
     (uVar1 = (byte)((char *)**(undefined8 **)(param_1 + 0x10))[1] - 0x58, (byte)uVar1 < 0x21)) {
    return (0x100020001U >> ((ulonglong)uVar1 & 0x3f) & 1) != 0;
  }
  return false;
}



bool FUN_14000a170(byte *param_1)

{
  uint uVar1;
  
  uVar1 = *param_1 - 0x4b;
  if ((byte)uVar1 < 0x28) {
    return (0xffffff7ffffff7feU >> ((ulonglong)uVar1 & 0x3f) & 1) == 0;
  }
  if ((*param_1 == 0x44) && ((byte)(param_1[1] - 0x4f) < 0x2a)) {
    return (0x30100000001U >> ((ulonglong)(param_1[1] - 0x4f) & 0x3f) & 1) != 0;
  }
  return false;
}



void FUN_14000a1d0(longlong param_1,undefined1 param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)(param_1 + 0x100);
  if (lVar1 == 0xff) {
    *(undefined1 *)(param_1 + 0xff) = 0;
    (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
    *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
    lVar2 = 1;
    lVar1 = 0;
  }
  else {
    lVar2 = lVar1 + 1;
  }
  *(longlong *)(param_1 + 0x100) = lVar2;
  *(undefined1 *)(param_1 + lVar1) = param_2;
  *(undefined1 *)(param_1 + 0x108) = param_2;
  return;
}



int * FUN_14000a240(longlong param_1,longlong param_2)

{
  int *piVar1;
  int iVar2;
  
  if (*(longlong *)(param_1 + 0x120) == 0) {
    *(undefined4 *)(param_1 + 0x130) = 1;
    piVar1 = (int *)0x0;
  }
  else {
    iVar2 = *(int *)(param_2 + 0x10);
    piVar1 = *(int **)(*(longlong *)(*(longlong *)(param_1 + 0x120) + 8) + 0x18);
    if (-1 < iVar2) {
      for (; (piVar1 != (int *)0x0 && (*piVar1 == 0x2f)); piVar1 = *(int **)(piVar1 + 6)) {
        if (iVar2 == 0) {
          return *(int **)(piVar1 + 4);
        }
        iVar2 = iVar2 + -1;
      }
      piVar1 = (int *)0x0;
    }
  }
  return piVar1;
}



void FUN_14000a2a0(longlong param_1,char *param_2)

{
  char *pcVar1;
  char cVar2;
  size_t sVar3;
  longlong lVar4;
  longlong lVar5;
  
  sVar3 = strlen(param_2);
  if (sVar3 != 0) {
    pcVar1 = param_2 + sVar3;
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar2 = *param_2;
      if (lVar4 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar5 = 1;
        lVar4 = 0;
      }
      else {
        lVar5 = lVar4 + 1;
      }
      param_2 = param_2 + 1;
      *(longlong *)(param_1 + 0x100) = lVar5;
      *(char *)(param_1 + lVar4) = cVar2;
      *(char *)(param_1 + 0x108) = cVar2;
      lVar4 = lVar5;
    } while (param_2 != pcVar1);
  }
  return;
}



int * FUN_14000a340(longlong param_1,int *param_2)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  
joined_r0x00014000a34f:
  if (param_2 == (int *)0x0) {
    return (int *)0x0;
  }
  do {
    switch(*param_2) {
    case 0:
    case 6:
    case 0x18:
      return (int *)0x0;
    case 1:
    case 2:
    case 3:
    case 4:
    case 9:
    case 10:
    case 0xb:
    case 0xc:
    case 0xd:
    case 0xe:
    case 0xf:
    case 0x10:
    case 0x11:
    case 0x12:
    case 0x13:
    case 0x14:
    case 0x15:
    case 0x16:
    case 0x17:
      goto switchD_14000a366_caseD_1;
    case 5:
      if (*(longlong *)(param_1 + 0x120) == 0) {
        *(undefined4 *)(param_1 + 0x130) = 1;
        return (int *)0x0;
      }
      iVar3 = param_2[4];
      piVar2 = *(int **)(*(longlong *)(*(longlong *)(param_1 + 0x120) + 8) + 0x18);
      if (-1 < iVar3) {
        while( true ) {
          if (piVar2 == (int *)0x0) {
            return (int *)0x0;
          }
          if (*piVar2 != 0x2f) {
            return (int *)0x0;
          }
          if (iVar3 == 0) break;
          piVar2 = *(int **)(piVar2 + 6);
          iVar3 = iVar3 + -1;
        }
        piVar2 = *(int **)(piVar2 + 4);
      }
      if ((piVar2 != (int *)0x0) && (*piVar2 == 0x2f)) {
        return piVar2;
      }
      return (int *)0x0;
    default:
      uVar1 = *param_2 - 0x27;
      if (0x35 < uVar1) goto switchD_14000a366_caseD_1;
      if ((0x20006718000801U >> ((ulonglong)uVar1 & 0x3f) & 1) != 0) {
        return (int *)0x0;
      }
      if (uVar1 != 0xc) goto switchD_14000a366_caseD_1;
    case 7:
    case 8:
      param_2 = *(int **)(param_2 + 6);
      if (param_2 == (int *)0x0) {
        return (int *)0x0;
      }
    }
  } while( true );
switchD_14000a366_caseD_1:
  piVar2 = FUN_14000a340(param_1,*(int **)(param_2 + 4));
  if (piVar2 != (int *)0x0) {
    return piVar2;
  }
  param_2 = *(int **)(param_2 + 6);
  goto joined_r0x00014000a34f;
}



undefined4 * FUN_14000a440(longlong param_1)

{
  int iVar1;
  char *pcVar2;
  int iVar3;
  undefined4 *puVar4;
  char *pcVar5;
  
  pcVar2 = *(char **)(param_1 + 0x18);
  if (*pcVar2 != 'T') {
    return (undefined4 *)0x0;
  }
  pcVar5 = pcVar2 + 1;
  *(char **)(param_1 + 0x18) = pcVar5;
  if (pcVar2[1] == '_') {
    iVar3 = 0;
  }
  else {
    if (pcVar2[1] == 'n') {
      return (undefined4 *)0x0;
    }
    iVar3 = FUN_140009c60(param_1);
    iVar3 = iVar3 + 1;
    if (iVar3 < 0) {
      return (undefined4 *)0x0;
    }
    pcVar5 = *(char **)(param_1 + 0x18);
    if (*pcVar5 != '_') {
      return (undefined4 *)0x0;
    }
  }
  *(char **)(param_1 + 0x18) = pcVar5 + 1;
  iVar1 = *(int *)(param_1 + 0x28);
  if (*(int *)(param_1 + 0x2c) <= iVar1) {
    return (undefined4 *)0x0;
  }
  puVar4 = (undefined4 *)((longlong)iVar1 * 0x20 + *(longlong *)(param_1 + 0x20));
  *(undefined8 *)(puVar4 + 1) = 0;
  *(int *)(param_1 + 0x28) = iVar1 + 1;
  *puVar4 = 5;
  puVar4[4] = iVar3;
  return puVar4;
}



void FUN_14000a4d0(longlong param_1,uint param_2,undefined8 param_3,undefined8 param_4)

{
  char *pcVar1;
  char cVar2;
  size_t sVar3;
  longlong lVar4;
  longlong lVar5;
  char *_Str;
  char local_48 [40];
  
  _Str = local_48;
  FUN_14000a100(_Str,&DAT_1400c654c,(ulonglong)param_2,param_4);
  sVar3 = strlen(_Str);
  if (sVar3 != 0) {
    pcVar1 = _Str + sVar3;
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar2 = *_Str;
      if (lVar4 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar5 = 1;
        lVar4 = 0;
      }
      else {
        lVar5 = lVar4 + 1;
      }
      _Str = _Str + 1;
      *(longlong *)(param_1 + 0x100) = lVar5;
      *(char *)(param_1 + lVar4) = cVar2;
      *(char *)(param_1 + 0x108) = cVar2;
      lVar4 = lVar5;
    } while (_Str != pcVar1);
  }
  return;
}



void FUN_14000a580(longlong param_1,int param_2,uint param_3,undefined8 param_4)

{
  char *pcVar1;
  char cVar2;
  undefined1 uVar3;
  size_t sVar4;
  longlong lVar5;
  char *_Str;
  undefined *puVar6;
  undefined *puVar7;
  longlong lVar8;
  char local_48 [32];
  
  if (param_2 == 0x59) {
    lVar8 = 2;
    puVar6 = &DAT_1400c65bb;
  }
  else if (param_2 == 0x5a) {
    lVar8 = 3;
    puVar6 = &DAT_1400c65b4;
  }
  else {
    if (param_2 != 0x58) {
      *(undefined4 *)(param_1 + 0x130) = 1;
      goto LAB_14000a5b5;
    }
    lVar8 = 2;
    puVar6 = &DAT_1400c65b8;
  }
  puVar7 = puVar6 + lVar8;
  lVar8 = *(longlong *)(param_1 + 0x100);
  do {
    uVar3 = *puVar6;
    if (lVar8 == 0xff) {
      *(undefined1 *)(param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
      *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
      lVar5 = 1;
      lVar8 = 0;
    }
    else {
      lVar5 = lVar8 + 1;
    }
    puVar6 = puVar6 + 1;
    *(longlong *)(param_1 + 0x100) = lVar5;
    *(undefined1 *)(param_1 + lVar8) = uVar3;
    *(undefined1 *)(param_1 + 0x108) = uVar3;
    lVar8 = lVar5;
  } while (puVar6 != puVar7);
LAB_14000a5b5:
  _Str = local_48;
  FUN_14000a100(_Str,&DAT_1400c654c,(ulonglong)param_3,param_4);
  sVar4 = strlen(_Str);
  if (sVar4 != 0) {
    pcVar1 = _Str + sVar4;
    lVar8 = *(longlong *)(param_1 + 0x100);
    do {
      cVar2 = *_Str;
      if (lVar8 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar5 = 1;
        lVar8 = 0;
      }
      else {
        lVar5 = lVar8 + 1;
      }
      _Str = _Str + 1;
      *(longlong *)(param_1 + 0x100) = lVar5;
      *(char *)(param_1 + lVar8) = cVar2;
      *(char *)(param_1 + 0x108) = cVar2;
      lVar8 = lVar5;
    } while (pcVar1 != _Str);
  }
  return;
}



undefined4 * FUN_14000a710(longlong param_1)

{
  int iVar1;
  longlong *plVar2;
  int iVar3;
  char *pcVar4;
  undefined4 *puVar5;
  
  iVar3 = FUN_140009c60(param_1);
  if (iVar3 < 1) {
    return (undefined4 *)0x0;
  }
  plVar2 = *(longlong **)(param_1 + 0x18);
  if ((longlong)iVar3 <= *(longlong *)(param_1 + 8) - (longlong)plVar2) {
    pcVar4 = (char *)((longlong)iVar3 + (longlong)plVar2);
    *(char **)(param_1 + 0x18) = pcVar4;
    if (((*(byte *)(param_1 + 0x10) & 4) != 0) && (*pcVar4 == '$')) {
      *(char **)(param_1 + 0x18) = pcVar4 + 1;
    }
    if ((((iVar3 < 10) || (*plVar2 != 0x5f4c41424f4c475f)) ||
        (0x3b < (byte)(*(byte *)(plVar2 + 1) - 0x24))) ||
       (((0x800000000000401U >> ((ulonglong)(*(byte *)(plVar2 + 1) - 0x24) & 0x3f) & 1) == 0 ||
        (*(char *)((longlong)plVar2 + 9) != 'N')))) {
      puVar5 = FUN_140009c00(param_1,(longlong)plVar2,iVar3);
      goto LAB_14000a790;
    }
    iVar1 = *(int *)(param_1 + 0x28);
    *(int *)(param_1 + 0x48) = (*(int *)(param_1 + 0x48) + 0x16) - iVar3;
    if (iVar1 < *(int *)(param_1 + 0x2c)) {
      *(int *)(param_1 + 0x28) = iVar1 + 1;
      puVar5 = (undefined4 *)((longlong)iVar1 * 0x20 + *(longlong *)(param_1 + 0x20));
      *(undefined8 *)(puVar5 + 1) = 0;
      *puVar5 = 0;
      *(char **)(puVar5 + 4) = "(anonymous namespace)";
      puVar5[6] = 0x15;
      goto LAB_14000a790;
    }
  }
  puVar5 = (undefined4 *)0x0;
LAB_14000a790:
  *(undefined4 **)(param_1 + 0x40) = puVar5;
  return puVar5;
}



uint * FUN_14000a800(longlong param_1,uint param_2)

{
  int iVar1;
  undefined4 uVar2;
  longlong lVar3;
  char cVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  ulonglong uVar8;
  longlong lVar9;
  undefined4 *puVar10;
  undefined8 uVar11;
  char *pcVar12;
  uint *puVar13;
  bool bVar14;
  
  pcVar12 = *(char **)(param_1 + 0x18);
  if (*pcVar12 == 'S') {
    *(char **)(param_1 + 0x18) = pcVar12 + 1;
    cVar4 = '\0';
    if (pcVar12[1] != '\0') {
      *(char **)(param_1 + 0x18) = pcVar12 + 2;
      cVar4 = pcVar12[1];
      iVar5 = (int)cVar4;
      if (((byte)(iVar5 - 0x30U) < 0x30) &&
         ((0x87fffffe03ffU >> ((ulonglong)(iVar5 - 0x30U) & 0x3f) & 1) != 0)) {
        uVar7 = 0;
        if (cVar4 == '_') {
          uVar8 = 0;
        }
        else {
          do {
            if ((byte)((char)iVar5 - 0x30U) < 10) {
              uVar6 = iVar5 + -0x30 + uVar7 * 0x24;
            }
            else {
              if (0x19 < (byte)((char)iVar5 + 0xbfU)) {
                return (uint *)0x0;
              }
              uVar6 = iVar5 + -0x37 + uVar7 * 0x24;
            }
            if (uVar6 < uVar7) {
              return (uint *)0x0;
            }
            pcVar12 = *(char **)(param_1 + 0x18);
            if (*pcVar12 == '\0') {
              return (uint *)0x0;
            }
            *(char **)(param_1 + 0x18) = pcVar12 + 1;
            iVar5 = (int)*pcVar12;
            uVar7 = uVar6;
          } while (*pcVar12 != '_');
          uVar8 = (ulonglong)(uVar6 + 1);
        }
        if (*(uint *)(param_1 + 0x38) <= (uint)uVar8) {
          return (uint *)0x0;
        }
        return *(uint **)(*(longlong *)(param_1 + 0x30) + uVar8 * 8);
      }
    }
    uVar7 = *(uint *)(param_1 + 0x10) & 8;
    if ((uVar7 == 0) && ((param_2 & 1) != 0)) {
      bVar14 = (byte)(**(char **)(param_1 + 0x18) + 0xbdU) < 2;
    }
    else {
      bVar14 = uVar7 != 0;
    }
    pcVar12 = "t";
    do {
      if (*pcVar12 == cVar4) {
        lVar3 = *(longlong *)(pcVar12 + 0x28);
        iVar5 = *(int *)(param_1 + 0x28);
        iVar1 = *(int *)(param_1 + 0x2c);
        if (lVar3 != 0) {
          uVar2 = *(undefined4 *)(pcVar12 + 0x30);
          if (iVar5 < iVar1) {
            lVar9 = (longlong)iVar5;
            iVar5 = iVar5 + 1;
            puVar10 = (undefined4 *)(lVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
            *(undefined8 *)(puVar10 + 1) = 0;
            *(int *)(param_1 + 0x28) = iVar5;
            *puVar10 = 0x18;
            *(longlong *)(puVar10 + 4) = lVar3;
            puVar10[6] = uVar2;
          }
          else {
            puVar10 = (undefined4 *)0x0;
          }
          *(undefined4 **)(param_1 + 0x40) = puVar10;
        }
        if (bVar14) {
          uVar11 = *(undefined8 *)(pcVar12 + 0x18);
          uVar7 = *(uint *)(pcVar12 + 0x20);
        }
        else {
          uVar11 = *(undefined8 *)(pcVar12 + 8);
          uVar7 = *(uint *)(pcVar12 + 0x10);
        }
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + uVar7;
        if (iVar5 < iVar1) {
          puVar13 = (uint *)((longlong)iVar5 * 0x20 + *(longlong *)(param_1 + 0x20));
          puVar13[1] = 0;
          puVar13[2] = 0;
          *(int *)(param_1 + 0x28) = iVar5 + 1;
          *puVar13 = 0x18;
          *(undefined8 *)(puVar13 + 4) = uVar11;
          puVar13[6] = uVar7;
        }
        else {
          puVar13 = (uint *)0x0;
        }
        pcVar12 = *(char **)(param_1 + 0x18);
        if (*pcVar12 == 'B') {
          uVar11 = *(undefined8 *)(param_1 + 0x40);
          do {
            *(char **)(param_1 + 0x18) = pcVar12 + 1;
            puVar10 = FUN_14000a710(param_1);
            puVar13 = _text(param_1,0x4d,(longlong)puVar13,(longlong)puVar10);
            pcVar12 = *(char **)(param_1 + 0x18);
          } while (*pcVar12 == 'B');
          *(undefined8 *)(param_1 + 0x40) = uVar11;
          if (puVar13 == (uint *)0x0) {
            return (uint *)0x0;
          }
          iVar5 = *(int *)(param_1 + 0x38);
          if (*(int *)(param_1 + 0x3c) <= iVar5) {
            return (uint *)0x0;
          }
          *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar5 * 8) = puVar13;
          *(int *)(param_1 + 0x38) = iVar5 + 1;
          return puVar13;
        }
        return puVar13;
      }
      pcVar12 = pcVar12 + 0x38;
    } while (pcVar12 != "aN");
  }
  return (uint *)0x0;
}



undefined8 FUN_14000aa50(longlong param_1,longlong *param_2)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  undefined4 *puVar4;
  uint *puVar5;
  uint uVar6;
  
  pcVar3 = *(char **)(param_1 + 0x18);
  cVar1 = *pcVar3;
  while( true ) {
    if (cVar1 != 'W') {
      return 1;
    }
    uVar6 = 0x53;
    *(char **)(param_1 + 0x18) = pcVar3 + 1;
    if (pcVar3[1] == 'P') {
      uVar6 = 0x54;
      *(char **)(param_1 + 0x18) = pcVar3 + 2;
    }
    puVar4 = FUN_14000a710(param_1);
    puVar5 = _text(param_1,uVar6,*param_2,(longlong)puVar4);
    *param_2 = (longlong)puVar5;
    if ((puVar5 == (uint *)0x0) ||
       (iVar2 = *(int *)(param_1 + 0x38), *(int *)(param_1 + 0x3c) <= iVar2)) break;
    *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar2 * 8) = puVar5;
    pcVar3 = *(char **)(param_1 + 0x18);
    *(int *)(param_1 + 0x38) = iVar2 + 1;
    cVar1 = *pcVar3;
  }
  return 0;
}



uint * FUN_14000aaf0(longlong param_1,undefined8 param_2,undefined8 param_3,uint *param_4)

{
  undefined4 uVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  byte *pbVar4;
  code *pcVar5;
  bool bVar6;
  char cVar7;
  uint uVar8;
  int iVar9;
  undefined7 extraout_var;
  undefined4 *puVar10;
  uint *puVar11;
  uint *puVar12;
  size_t sVar13;
  longlong lVar14;
  byte bVar15;
  uint *puVar16;
  uint **ppuVar17;
  ulonglong uVar18;
  char *pcVar19;
  ulonglong uVar20;
  undefined8 uVar21;
  char *pcVar22;
  char *pcVar23;
  uint *local_50;
  char local_44 [20];
  
  puVar12 = *(uint **)(param_1 + 0x18);
  bVar6 = FUN_14000a170((byte *)puVar12);
  if ((int)CONCAT71(extraout_var,bVar6) != 0) {
    ppuVar17 = &local_50;
    uVar21 = 0;
    puVar12 = FUN_14000ccf0(param_1,(uint *)ppuVar17,0);
    if (puVar12 == (uint *)0x0) {
      return (uint *)0x0;
    }
    if (**(char **)(param_1 + 0x18) == 'F') {
      puVar11 = FUN_14000b700(param_1);
    }
    else {
      puVar11 = FUN_14000aaf0(param_1,ppuVar17,uVar21,param_4);
    }
    *(uint **)puVar12 = puVar11;
    if (puVar11 == (uint *)0x0) {
      return (uint *)0x0;
    }
    if (*puVar11 - 0x1f < 2) {
      uVar21 = *(undefined8 *)(puVar11 + 4);
      *(uint **)(puVar11 + 4) = local_50;
      local_50 = *(uint **)puVar12;
      *(undefined8 *)puVar12 = uVar21;
    }
    if (local_50 == (uint *)0x0) {
      return (uint *)0x0;
    }
    iVar9 = *(int *)(param_1 + 0x38);
    if (*(int *)(param_1 + 0x3c) <= iVar9) {
      return (uint *)0x0;
    }
    *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar9 * 8) = local_50;
    *(int *)(param_1 + 0x38) = iVar9 + 1;
    return local_50;
  }
  cVar7 = (char)*puVar12;
  if ('T' < cVar7) {
    bVar15 = cVar7 + 0xab;
    if (0x25 < bVar15) goto switchD_14000ab3f_caseD_1;
    param_4 = (uint *)0x3ec7bff000;
    uVar18 = 1L << (bVar15 & 0x3f);
    if ((uVar18 & 0x3ec7bff000) != 0) {
      iVar9 = *(int *)(param_1 + 0x28);
      lVar14 = (longlong)(cVar7 + -0x61);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar11 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar11[1] = 0;
        puVar11[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *(undefined ***)(puVar11 + 4) = &PTR_s_signed_char_1400c7b60 + lVar14 * 4;
        iVar9 = *(int *)(&DAT_1400c7b68 + lVar14 * 0x20);
        *puVar11 = 0x27;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + iVar9;
        *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
        return puVar11;
      }
      goto LAB_1400becc5;
    }
    uVar20 = (ulonglong)((uint)uVar18 & 1);
    if ((uVar18 & 1) == 0) {
      if (bVar15 != 0x20) goto switchD_14000ab3f_caseD_1;
      *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
      puVar10 = FUN_14000a710(param_1);
      puVar11 = _text(param_1,0x28,(longlong)puVar10,0);
      local_50 = puVar11;
    }
    else {
      puVar12 = (uint *)((longlong)puVar12 + 1);
      *(uint **)(param_1 + 0x18) = puVar12;
      puVar11 = FUN_14000a710(param_1);
      local_50 = puVar11;
      if (**(char **)(param_1 + 0x18) == 'I') {
        *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
        param_4 = FUN_14000c300(param_1,uVar20,puVar12,(longlong)param_4);
        uVar20 = 4;
        puVar12 = puVar11;
        puVar11 = _text(param_1,4,(longlong)puVar11,(longlong)param_4);
      }
      puVar12 = FUN_14000aaf0(param_1,uVar20,puVar12,param_4);
      puVar11 = _text(param_1,0x21,(longlong)puVar12,(longlong)puVar11);
      local_50 = puVar11;
    }
    goto LAB_14000ac50;
  }
  if (cVar7 < 'A') {
switchD_14000ab3f_caseD_1:
    puVar12 = FUN_14000d600(param_1,1,puVar12,(longlong)param_4);
    return puVar12;
  }
  puVar16 = &switchD_14000ab3f::switchdataD_1400c65e8;
  switch((int)cVar7 - 0x41U & 0xff) {
  case 0:
    pcVar19 = (char *)((longlong)puVar12 + 1);
    *(char **)(param_1 + 0x18) = pcVar19;
    if (*(char *)((longlong)puVar12 + 1) == '_') {
      puVar11 = (uint *)0x0;
    }
    else {
      pcVar22 = pcVar19;
      if ((byte)(*(char *)((longlong)puVar12 + 1) - 0x30U) < 10) {
        do {
          pcVar23 = pcVar22;
          pcVar22 = pcVar23 + 1;
          *(char **)(param_1 + 0x18) = pcVar22;
        } while ((byte)(*pcVar22 - 0x30U) < 10);
        uVar8 = (int)pcVar23 - (int)puVar12;
        puVar12 = (uint *)(ulonglong)uVar8;
        puVar11 = FUN_140009c00(param_1,(longlong)pcVar19,uVar8);
        if (puVar11 == (uint *)0x0) {
          return (uint *)0x0;
        }
        cVar7 = pcVar23[1];
        pcVar19 = pcVar22;
      }
      else {
        uVar1 = *(undefined4 *)(param_1 + 0x4c);
        *(undefined4 *)(param_1 + 0x4c) = 1;
        puVar11 = FUN_14000c530(param_1,pcVar19,puVar12,(longlong)param_4);
        *(undefined4 *)(param_1 + 0x4c) = uVar1;
        if (puVar11 == (uint *)0x0) {
          return (uint *)0x0;
        }
        pcVar19 = *(char **)(param_1 + 0x18);
        cVar7 = *pcVar19;
      }
      if (cVar7 != '_') {
        return (uint *)0x0;
      }
    }
    *(char **)(param_1 + 0x18) = pcVar19 + 1;
    puVar12 = FUN_14000aaf0(param_1,pcVar19 + 1,puVar12,param_4);
    puVar11 = _text(param_1,0x2a,(longlong)puVar11,(longlong)puVar12);
    local_50 = puVar11;
    break;
  default:
    goto switchD_14000ab3f_caseD_1;
  case 2:
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
    puVar12 = FUN_14000aaf0(param_1,&switchD_14000ab3f::switchdataD_1400c65e8,(longlong)puVar12 + 1,
                            param_4);
    puVar11 = _text(param_1,0x25,(longlong)puVar12,0);
    local_50 = puVar11;
    break;
  case 3:
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
    if (*(char *)((longlong)puVar12 + 1) == '\0') {
      return (uint *)0x0;
    }
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 2;
    puVar11 = &switchD_14000ad1c::switchdataD_1400c6638;
    switch(*(undefined1 *)((longlong)puVar12 + 1)) {
    case 0x46:
      uVar8 = FUN_140009c60(param_1);
      pcVar19 = *(char **)(param_1 + 0x18);
      cVar7 = *pcVar19;
      if (cVar7 == 'b') {
        if (uVar8 != 0x10) {
          return (uint *)0x0;
        }
        *(char **)(param_1 + 0x18) = pcVar19 + 1;
        iVar9 = *(int *)(param_1 + 0x28);
        if (*(int *)(param_1 + 0x2c) <= iVar9) break;
        local_50 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        local_50[1] = 0;
        local_50[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *local_50 = 0x27;
        *(undefined ***)(local_50 + 4) = &PTR_s_std_bfloat16_t_1400c7fc0;
        iVar9 = *(int *)(param_1 + 0x48) + 0xf;
      }
      else {
        if (cVar7 != 'x') {
          if (cVar7 != '_') {
            return (uint *)0x0;
          }
          cVar7 = '\0';
        }
        iVar9 = *(int *)(param_1 + 0x28);
        if (*(int *)(param_1 + 0x2c) <= iVar9) {
          *(char **)(param_1 + 0x18) = pcVar19 + 1;
          FUN_14000a100(local_44,&DAT_1400c654c,(ulonglong)uVar8,param_4);
          break;
        }
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *(short *)(puVar12 + 6) = (short)uVar8;
        *puVar12 = 0x5c;
        *(undefined ***)(puVar12 + 4) = &PTR_s__Float_1400c7fa0;
        *(char *)((longlong)puVar12 + 0x1a) = cVar7;
        *(char **)(param_1 + 0x18) = pcVar19 + 1;
        local_50 = puVar12;
        FUN_14000a100(local_44,&DAT_1400c654c,(ulonglong)uVar8,param_4);
        sVar13 = strlen(local_44);
        iVar9 = ((*(int *)(param_1 + 0x48) + *(int *)(*(longlong *)(puVar12 + 4) + 8) + 1) -
                (uint)(cVar7 == '\0')) + (int)sVar13;
      }
      *(int *)(param_1 + 0x48) = iVar9;
      return local_50;
    default:
      goto LAB_14000abce;
    case 0x54:
    case 0x74:
      uVar1 = *(undefined4 *)(param_1 + 0x4c);
      *(undefined4 *)(param_1 + 0x4c) = 1;
      puVar12 = FUN_14000c530(param_1,&switchD_14000ad1c::switchdataD_1400c6638,puVar12,
                              (longlong)param_4);
      *(undefined4 *)(param_1 + 0x4c) = uVar1;
      puVar11 = _text(param_1,0x44,(longlong)puVar12,0);
      if (puVar11 == (uint *)0x0) {
        return (uint *)0x0;
      }
      pcVar19 = *(char **)(param_1 + 0x18);
      if (*pcVar19 == '\0') {
        return (uint *)0x0;
      }
      *(char **)(param_1 + 0x18) = pcVar19 + 1;
      local_50 = puVar11;
      if (*pcVar19 != 'E') {
        return (uint *)0x0;
      }
      goto LAB_14000ac59;
    case 0x61:
      iVar9 = *(int *)(param_1 + 0x28);
      if (*(int *)(param_1 + 0x2c) <= iVar9) {
        return (uint *)0x0;
      }
      *(int *)(param_1 + 0x28) = iVar9 + 1;
      puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
      puVar12[1] = 0;
      puVar12[2] = 0;
      *puVar12 = 0;
      *(undefined **)(puVar12 + 4) = &DAT_1400c65d4;
      puVar12[6] = 4;
      return puVar12;
    case 99:
      iVar9 = *(int *)(param_1 + 0x28);
      if (*(int *)(param_1 + 0x2c) <= iVar9) {
        return (uint *)0x0;
      }
      *(int *)(param_1 + 0x28) = iVar9 + 1;
      puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
      puVar12[1] = 0;
      puVar12[2] = 0;
      *puVar12 = 0;
      *(char **)(puVar12 + 4) = "decltype(auto)";
      puVar12[6] = 0xe;
      return puVar12;
    case 100:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_decimal64_1400c7ec0;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 9;
        return puVar12;
      }
      break;
    case 0x65:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_decimal128_1400c7ee0;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 10;
        return puVar12;
      }
      break;
    case 0x66:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_decimal32_1400c7ea0;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 9;
        return puVar12;
      }
      break;
    case 0x68:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_DAT_1400c7f00;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 4;
        return puVar12;
      }
      break;
    case 0x69:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_char32_t_1400c7f60;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 8;
        return puVar12;
      }
      break;
    case 0x6e:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_decltype_nullptr__1400c7f80;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 0x11;
        return puVar12;
      }
      break;
    case 0x70:
      puVar12 = FUN_14000aaf0(param_1,&switchD_14000ad1c::switchdataD_1400c6638,puVar12,param_4);
      puVar11 = _text(param_1,0x4c,(longlong)puVar12,0);
      local_50 = puVar11;
      goto LAB_14000ac50;
    case 0x73:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_char16_t_1400c7f40;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 8;
        return puVar12;
      }
      break;
    case 0x75:
      iVar9 = *(int *)(param_1 + 0x28);
      if (iVar9 < *(int *)(param_1 + 0x2c)) {
        puVar12 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar12[1] = 0;
        puVar12[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar12 = 0x27;
        *(undefined ***)(puVar12 + 4) = &PTR_s_char8_t_1400c7f20;
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 7;
        return puVar12;
      }
      break;
    case 0x76:
      if (*(char *)((longlong)puVar12 + 2) == '_') {
        puVar12 = (uint *)((longlong)puVar12 + 3);
        uVar1 = *(undefined4 *)(param_1 + 0x4c);
        *(undefined4 *)(param_1 + 0x4c) = 1;
        *(uint **)(param_1 + 0x18) = puVar12;
        puVar16 = FUN_14000c530(param_1,&switchD_14000ad1c::switchdataD_1400c6638,puVar12,
                                (longlong)param_4);
        *(undefined4 *)(param_1 + 0x4c) = uVar1;
        if (puVar16 == (uint *)0x0) {
          return (uint *)0x0;
        }
      }
      else {
        iVar9 = *(int *)(param_1 + 0x28);
        if (*(int *)(param_1 + 0x2c) <= iVar9) {
          return (uint *)0x0;
        }
        puVar16 = (uint *)((longlong)iVar9 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar16[1] = 0;
        puVar16[2] = 0;
        *(int *)(param_1 + 0x28) = iVar9 + 1;
        *puVar16 = 0x43;
        uVar8 = FUN_140009c60(param_1);
        puVar16[4] = uVar8;
      }
      if (**(char **)(param_1 + 0x18) != '_') {
        return (uint *)0x0;
      }
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      puVar12 = FUN_14000aaf0(param_1,puVar11,puVar12,param_4);
      puVar11 = _text(param_1,0x2d,(longlong)puVar16,(longlong)puVar12);
      local_50 = puVar11;
      goto LAB_14000ac50;
    }
LAB_1400becc5:
                    // WARNING: Does not return
    pcVar5 = (code *)invalidInstructionException();
    (*pcVar5)();
  case 5:
    puVar11 = FUN_14000b700(param_1);
    local_50 = puVar11;
    break;
  case 6:
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
    puVar12 = FUN_14000aaf0(param_1,&switchD_14000ab3f::switchdataD_1400c65e8,(longlong)puVar12 + 1,
                            param_4);
    puVar11 = _text(param_1,0x26,(longlong)puVar12,0);
    local_50 = puVar11;
    break;
  case 0xc:
    lVar14 = (longlong)puVar12 + 1;
    *(longlong *)(param_1 + 0x18) = lVar14;
    puVar12 = FUN_14000aaf0(param_1,&switchD_14000ab3f::switchdataD_1400c65e8,lVar14,param_4);
    if (puVar12 == (uint *)0x0) {
      return (uint *)0x0;
    }
    puVar11 = FUN_14000aaf0(param_1,puVar16,lVar14,param_4);
    if (puVar11 == (uint *)0x0) {
      return (uint *)0x0;
    }
    puVar11 = _text(param_1,0x2b,(longlong)puVar12,(longlong)puVar11);
    local_50 = puVar11;
    break;
  case 0xe:
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
    puVar12 = FUN_14000aaf0(param_1,&switchD_14000ab3f::switchdataD_1400c65e8,(longlong)puVar12 + 1,
                            param_4);
    puVar11 = _text(param_1,0x24,(longlong)puVar12,0);
    local_50 = puVar11;
    break;
  case 0xf:
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
    puVar12 = FUN_14000aaf0(param_1,&switchD_14000ab3f::switchdataD_1400c65e8,(longlong)puVar12 + 1,
                            param_4);
    puVar11 = _text(param_1,0x22,(longlong)puVar12,0);
    local_50 = puVar11;
    break;
  case 0x11:
    *(longlong *)(param_1 + 0x18) = (longlong)puVar12 + 1;
    puVar12 = FUN_14000aaf0(param_1,&switchD_14000ab3f::switchdataD_1400c65e8,(longlong)puVar12 + 1,
                            param_4);
    puVar11 = _text(param_1,0x23,(longlong)puVar12,0);
    local_50 = puVar11;
    break;
  case 0x13:
    puVar11 = FUN_14000a440(param_1);
    pbVar4 = *(byte **)(param_1 + 0x18);
    local_50 = puVar11;
    if (*pbVar4 == 0x49) {
      if (*(uint *)(param_1 + 0x50) == 0) {
        if (puVar11 == (uint *)0x0) {
          return (uint *)0x0;
        }
        iVar9 = *(int *)(param_1 + 0x38);
        if (*(int *)(param_1 + 0x3c) <= iVar9) {
          return (uint *)0x0;
        }
        puVar16 = (uint *)0x0;
        *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar9 * 8) = puVar11;
        *(int *)(param_1 + 0x38) = iVar9 + 1;
        bVar15 = *pbVar4;
        if ((byte)(bVar15 - 0x49) < 2) {
          *(byte **)(param_1 + 0x18) = pbVar4 + 1;
          puVar16 = FUN_14000c300(param_1,(ulonglong)(bVar15 - 0x49),puVar12,0);
        }
      }
      else {
        uVar1 = *(undefined4 *)(param_1 + 0x28);
        uVar2 = *(undefined4 *)(param_1 + 0x38);
        *(byte **)(param_1 + 0x18) = pbVar4 + 1;
        uVar3 = *(undefined4 *)(param_1 + 0x48);
        puVar16 = FUN_14000c300(param_1,puVar16,puVar12,(ulonglong)*(uint *)(param_1 + 0x50));
        if (**(char **)(param_1 + 0x18) != 'I') {
          *(byte **)(param_1 + 0x18) = pbVar4;
          *(undefined4 *)(param_1 + 0x28) = uVar1;
          *(undefined4 *)(param_1 + 0x38) = uVar2;
          *(undefined4 *)(param_1 + 0x48) = uVar3;
          break;
        }
        if (puVar11 == (uint *)0x0) {
          return (uint *)0x0;
        }
        iVar9 = *(int *)(param_1 + 0x38);
        if (*(int *)(param_1 + 0x3c) <= iVar9) {
          return (uint *)0x0;
        }
        *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar9 * 8) = puVar11;
        *(int *)(param_1 + 0x38) = iVar9 + 1;
      }
      puVar11 = _text(param_1,4,(longlong)puVar11,(longlong)puVar16);
      local_50 = puVar11;
    }
  }
LAB_14000ac50:
  if (puVar11 != (uint *)0x0) {
LAB_14000ac59:
    iVar9 = *(int *)(param_1 + 0x38);
    if (iVar9 < *(int *)(param_1 + 0x3c)) {
      *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar9 * 8) = puVar11;
      *(int *)(param_1 + 0x38) = iVar9 + 1;
      return local_50;
    }
  }
LAB_14000abce:
  return (uint *)0x0;
}



longlong FUN_14000b5a0(longlong param_1)

{
  char cVar1;
  longlong lVar2;
  uint *puVar3;
  uint *puVar4;
  char *pcVar5;
  bool bVar6;
  undefined8 in_RDX;
  undefined8 uVar7;
  uint *puVar8;
  undefined8 in_R8;
  undefined8 uVar9;
  undefined8 in_R9;
  longlong local_20 [2];
  
  local_20[0] = 0;
  pcVar5 = *(char **)(param_1 + 0x18);
  cVar1 = *pcVar5;
  uVar9 = CONCAT71((int7)((ulonglong)in_R8 >> 8),cVar1 == 'E');
  if (cVar1 != '\0' && cVar1 != 'E') {
    puVar8 = (uint *)local_20;
    uVar7 = CONCAT71((int7)((ulonglong)in_RDX >> 8),cVar1 == '.');
    if (cVar1 != '.') {
      while (((cVar1 != 'R' && (cVar1 != 'O')) || (pcVar5[1] != 'E'))) {
        puVar4 = FUN_14000aaf0(param_1,uVar7,uVar9,in_R9);
        if (puVar4 == (uint *)0x0) {
          return 0;
        }
        in_R9 = 0;
        uVar7 = 0;
        puVar3 = _text(param_1,0x2e,(longlong)puVar4,0);
        *(uint **)puVar8 = puVar3;
        if (puVar3 == (uint *)0x0) {
          return 0;
        }
        pcVar5 = *(char **)(param_1 + 0x18);
        puVar8 = puVar3 + 6;
        cVar1 = *pcVar5;
        uVar9 = CONCAT71((int7)((ulonglong)puVar4 >> 8),cVar1 == 'E');
        bVar6 = cVar1 == '\0' || cVar1 == 'E';
        uVar7 = CONCAT71((int7)((ulonglong)uVar7 >> 8),bVar6);
        if ((bVar6) || (cVar1 == '.')) break;
      }
      if (local_20[0] != 0) {
        if (*(longlong *)(local_20[0] + 0x18) != 0) {
          return local_20[0];
        }
        if (**(int **)(local_20[0] + 0x10) == 0x27) {
          lVar2 = *(longlong *)(*(int **)(local_20[0] + 0x10) + 4);
          if (*(int *)(lVar2 + 0x1c) == 9) {
            *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) - *(int *)(lVar2 + 8);
            *(undefined8 *)(local_20[0] + 0x10) = 0;
            return local_20[0];
          }
          return local_20[0];
        }
        return local_20[0];
      }
    }
  }
  return 0;
}



uint * FUN_14000b680(longlong param_1,int param_2)

{
  uint *puVar1;
  longlong lVar2;
  undefined4 in_register_00000014;
  undefined8 in_R8;
  undefined8 in_R9;
  
  if (**(char **)(param_1 + 0x18) == 'J') {
    *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
  }
  else if (param_2 == 0) {
    puVar1 = (uint *)0x0;
    lVar2 = FUN_14000b5a0(param_1);
    if (lVar2 == 0) {
      return (uint *)0x0;
    }
    goto LAB_14000b6b6;
  }
  puVar1 = FUN_14000aaf0(param_1,CONCAT44(in_register_00000014,param_2),in_R8,in_R9);
  if ((puVar1 == (uint *)0x0) || (lVar2 = FUN_14000b5a0(param_1), lVar2 == 0)) {
    return (uint *)0x0;
  }
LAB_14000b6b6:
  puVar1 = _text(param_1,0x29,(longlong)puVar1,lVar2);
  return puVar1;
}



uint * FUN_14000b700(longlong param_1)

{
  uint *puVar1;
  uint uVar2;
  char *pcVar3;
  
  if ((*(byte *)(param_1 + 0x12) & 4) == 0) {
    uVar2 = *(uint *)(param_1 + 0x58);
    if (0x800 < uVar2) {
      return (uint *)0x0;
    }
    pcVar3 = *(char **)(param_1 + 0x18);
    *(uint *)(param_1 + 0x58) = uVar2 + 1;
    puVar1 = (uint *)0x0;
    if (*pcVar3 != 'F') goto LAB_14000b72a;
  }
  else {
    pcVar3 = *(char **)(param_1 + 0x18);
    if (*pcVar3 != 'F') {
      return (uint *)0x0;
    }
  }
  *(char **)(param_1 + 0x18) = pcVar3 + 1;
  if (pcVar3[1] == 'Y') {
    *(char **)(param_1 + 0x18) = pcVar3 + 2;
  }
  puVar1 = FUN_14000b680(param_1,1);
  puVar1 = FUN_140009da0(param_1,puVar1);
  if (**(char **)(param_1 + 0x18) == 'E') {
    *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
  }
  else {
    puVar1 = (uint *)0x0;
  }
  if ((*(byte *)(param_1 + 0x12) & 4) != 0) {
    return puVar1;
  }
  uVar2 = *(int *)(param_1 + 0x58) - 1;
LAB_14000b72a:
  *(uint *)(param_1 + 0x58) = uVar2;
  return puVar1;
}



uint * FUN_14000b7b0(longlong param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  char *pcVar2;
  uint *puVar3;
  uint uVar4;
  
  pcVar2 = *(char **)(param_1 + 0x18);
  if (*pcVar2 == 'T') {
    cVar1 = pcVar2[1];
    if (cVar1 == 't') {
      *(char **)(param_1 + 0x18) = pcVar2 + 2;
      puVar3 = FUN_14000b8a0(param_1,param_2,param_3,param_4);
      if ((puVar3 != (uint *)0x0) && (**(char **)(param_1 + 0x18) == 'E')) {
        uVar4 = 0x5a;
        *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
        goto LAB_14000b825;
      }
    }
    else {
      if ('t' < cVar1) {
        if (cVar1 != 'y') {
          return (uint *)0x0;
        }
        uVar4 = 0x58;
        puVar3 = (uint *)0x0;
        *(char **)(param_1 + 0x18) = pcVar2 + 2;
LAB_14000b825:
        puVar3 = _text(param_1,uVar4,(longlong)puVar3,0);
        return puVar3;
      }
      if (cVar1 == 'n') {
        *(char **)(param_1 + 0x18) = pcVar2 + 2;
        puVar3 = FUN_14000aaf0(param_1,0x6e,param_3,param_4);
        if (puVar3 != (uint *)0x0) {
          uVar4 = 0x59;
          goto LAB_14000b825;
        }
      }
      else {
        if (cVar1 != 'p') {
          return (uint *)0x0;
        }
        *(char **)(param_1 + 0x18) = pcVar2 + 2;
        puVar3 = FUN_14000b7b0(param_1,param_2,param_3,param_4);
        uVar4 = 0x5b;
        if (puVar3 != (uint *)0x0) goto LAB_14000b825;
      }
    }
    *param_2 = 1;
  }
  return (uint *)0x0;
}



uint * FUN_14000b8a0(longlong param_1,undefined4 *param_2,undefined8 param_3,undefined8 param_4)

{
  uint *puVar1;
  uint *puVar2;
  longlong local_20;
  
  local_20 = 0;
  puVar2 = (uint *)&local_20;
  while( true ) {
    puVar1 = FUN_14000b7b0(param_1,param_2,param_3,param_4);
    if (puVar1 == (uint *)0x0) break;
    *(uint **)puVar2 = puVar1;
    puVar2 = puVar1 + 6;
  }
  if (local_20 != 0) {
    puVar2 = _text(param_1,0x57,local_20,0);
    return puVar2;
  }
  return (uint *)0x0;
}



uint * FUN_14000b910(longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  char cVar1;
  undefined4 uVar2;
  char *pcVar3;
  char cVar4;
  int iVar5;
  undefined4 *puVar6;
  uint *puVar7;
  int iVar8;
  char cVar9;
  int iVar10;
  char cVar11;
  bool bVar12;
  
  pcVar3 = *(char **)(param_1 + 0x18);
  if (*pcVar3 == '\0') {
    cVar9 = '\0';
    cVar11 = '\0';
  }
  else {
    *(char **)(param_1 + 0x18) = pcVar3 + 1;
    cVar11 = *pcVar3;
    cVar9 = '\0';
    if (pcVar3[1] != '\0') {
      *(char **)(param_1 + 0x18) = pcVar3 + 2;
      cVar9 = pcVar3[1];
      if (cVar11 == 'v') {
        if ((byte)(cVar9 - 0x30U) < 10) {
          puVar6 = FUN_14000a710(param_1);
          iVar8 = *(int *)(param_1 + 0x28);
          if (*(int *)(param_1 + 0x2c) <= iVar8) {
            return (uint *)0x0;
          }
          puVar7 = (uint *)((longlong)iVar8 * 0x20 + *(longlong *)(param_1 + 0x20));
          puVar7[1] = 0;
          puVar7[2] = 0;
          *(int *)(param_1 + 0x28) = iVar8 + 1;
          if (puVar6 == (undefined4 *)0x0) {
            return (uint *)0x0;
          }
          puVar7[1] = 0;
          puVar7[2] = 0;
          *puVar7 = 0x33;
          puVar7[4] = (int)cVar9 - 0x30;
          *(undefined4 **)(puVar7 + 6) = puVar6;
          return puVar7;
        }
      }
      else if ((cVar11 == 'c') && (cVar9 == 'v')) {
        uVar2 = *(undefined4 *)(param_1 + 0x50);
        *(uint *)(param_1 + 0x50) = (uint)(*(uint *)(param_1 + 0x4c) == 0);
        puVar7 = FUN_14000aaf0(param_1,(ulonglong)*(uint *)(param_1 + 0x4c),param_3,param_4);
        if (*(int *)(param_1 + 0x50) == 0) {
          puVar7 = _text(param_1,0x34,(longlong)puVar7,0);
        }
        else {
          puVar7 = _text(param_1,0x35,(longlong)puVar7,0);
        }
        *(undefined4 *)(param_1 + 0x50) = uVar2;
        return puVar7;
      }
    }
  }
  iVar10 = 0x48;
  iVar8 = 0;
  do {
    iVar5 = (iVar10 - iVar8) / 2 + iVar8;
    pcVar3 = (&PTR_DAT_1400c7340)[(longlong)iVar5 * 3];
    cVar1 = *pcVar3;
    bVar12 = SBORROW1(cVar1,cVar11);
    cVar4 = cVar1 - cVar11;
    if (cVar1 == cVar11) {
      cVar4 = pcVar3[1];
      bVar12 = SBORROW1(cVar4,cVar9);
      cVar4 = cVar4 - cVar9;
      if (cVar4 == '\0') {
        iVar8 = *(int *)(param_1 + 0x28);
        if (*(int *)(param_1 + 0x2c) <= iVar8) {
          return (uint *)0x0;
        }
        puVar7 = (uint *)((longlong)iVar8 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar7[1] = 0;
        puVar7[2] = 0;
        *(int *)(param_1 + 0x28) = iVar8 + 1;
        *puVar7 = 0x32;
        *(undefined ***)(puVar7 + 4) = &PTR_DAT_1400c7340 + (longlong)iVar5 * 3;
        return puVar7;
      }
    }
    if (bVar12 != cVar4 < '\0') {
      iVar8 = iVar5 + 1;
      iVar5 = iVar10;
    }
    iVar10 = iVar5;
  } while (iVar8 != iVar10);
  return (uint *)0x0;
}



uint * FUN_14000bab0(longlong param_1,longlong param_2,ulonglong param_3,undefined8 param_4)

{
  undefined4 uVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  undefined8 uVar5;
  uint *puVar6;
  undefined4 *puVar7;
  uint *puVar8;
  char *pcVar9;
  char *pcVar10;
  uint *unaff_RSI;
  uint *puVar11;
  ulonglong local_res18 [2];
  int local_2c;
  
  local_res18[0] = param_3;
  uVar5 = FUN_14000aa50(param_1,(longlong *)local_res18);
  if ((int)uVar5 == 0) {
    return (uint *)0x0;
  }
  pcVar10 = *(char **)(param_1 + 0x18);
  cVar2 = *pcVar10;
  if ((byte)(cVar2 - 0x30U) < 10) {
    puVar6 = FUN_14000a710(param_1);
LAB_14000bc6b:
    if (local_res18[0] != 0) goto LAB_14000bc75;
  }
  else {
    if ((byte)(cVar2 + 0x9fU) < 0x1a) {
      uVar1 = *(undefined4 *)(param_1 + 0x4c);
      if ((cVar2 == 'o') && (pcVar10[1] == 'n')) {
        pcVar10 = pcVar10 + 2;
        *(undefined4 *)(param_1 + 0x4c) = 0;
        *(char **)(param_1 + 0x18) = pcVar10;
      }
      puVar6 = FUN_14000b910(param_1,pcVar10,param_3,param_4);
      *(undefined4 *)(param_1 + 0x4c) = uVar1;
      if (puVar6 == (uint *)0x0) goto switchD_14000bd23_caseD_33;
      if (*puVar6 == 0x32) {
        pcVar10 = (char *)**(undefined8 **)(puVar6 + 4);
        *(int *)(param_1 + 0x48) =
             *(int *)(param_1 + 0x48) + 7 + *(int *)(*(undefined8 **)(puVar6 + 4) + 2);
        if (((*pcVar10 == 'l') && (pcVar10[1] == 'i')) && (pcVar10[2] == '\0')) {
          puVar7 = FUN_14000a710(param_1);
          puVar6 = _text(param_1,0x37,(longlong)puVar6,(longlong)puVar7);
        }
      }
      goto LAB_14000bc6b;
    }
    if (cVar2 == 'D') {
      cVar2 = pcVar10[1];
      if (cVar2 != 'C') {
        puVar8 = *(uint **)(param_1 + 0x40);
        if (puVar8 != (uint *)0x0) {
          uVar4 = *puVar8;
          param_3 = (ulonglong)uVar4;
          if ((uVar4 == 0) || (uVar4 == 0x18)) goto LAB_14000be90;
        }
LAB_14000bd0b:
        switch(cVar2) {
        case '0':
          uVar4 = 1;
          break;
        case '1':
          uVar4 = 2;
          break;
        case '2':
          uVar4 = 3;
          break;
        default:
          goto switchD_14000bd23_caseD_33;
        case '4':
          uVar4 = 4;
          break;
        case '5':
          uVar4 = 5;
        }
        iVar3 = *(int *)(param_1 + 0x28);
        *(char **)(param_1 + 0x18) = pcVar10 + 2;
        if (iVar3 < *(int *)(param_1 + 0x2c)) {
          puVar6 = (uint *)((longlong)iVar3 * 0x20 + *(longlong *)(param_1 + 0x20));
          puVar6[1] = 0;
          puVar6[2] = 0;
          *(int *)(param_1 + 0x28) = iVar3 + 1;
          if (puVar8 != (uint *)0x0) {
            puVar6[1] = 0;
            puVar6[2] = 0;
            *puVar6 = 8;
            puVar6[4] = uVar4;
            *(uint **)(puVar6 + 6) = puVar8;
            goto LAB_14000bc6b;
          }
        }
        goto switchD_14000bd23_caseD_33;
      }
      puVar8 = (uint *)0x0;
      *(char **)(param_1 + 0x18) = pcVar10 + 2;
      do {
        puVar7 = FUN_14000a710(param_1);
        puVar11 = puVar8;
        puVar8 = _text(param_1,0x52,(longlong)puVar7,0);
        puVar6 = puVar8;
        if (puVar11 != (uint *)0x0) {
          *(uint **)(puVar11 + 6) = puVar8;
          puVar6 = unaff_RSI;
        }
        if (puVar8 == (uint *)0x0) goto switchD_14000bd23_caseD_33;
        unaff_RSI = puVar6;
      } while (**(char **)(param_1 + 0x18) != 'E');
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      goto LAB_14000bc6b;
    }
    if ((byte)(cVar2 + 0xbdU) < 2) {
      puVar8 = *(uint **)(param_1 + 0x40);
      if ((puVar8 != (uint *)0x0) && ((*puVar8 == 0 || (*puVar8 == 0x18)))) {
LAB_14000be90:
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + puVar8[6];
        if (*pcVar10 != 'C') {
          if (*pcVar10 != 'D') goto switchD_14000bd23_caseD_33;
          cVar2 = pcVar10[1];
          goto LAB_14000bd0b;
        }
      }
      cVar2 = pcVar10[1];
      if (cVar2 == 'I') {
        *(char **)(param_1 + 0x18) = pcVar10 + 1;
        cVar2 = pcVar10[2];
        if ((byte)(cVar2 - 0x31U) < 5) {
          *(char **)(param_1 + 0x18) = pcVar10 + 3;
          FUN_14000aaf0(param_1,pcVar10 + 3,param_3,param_4);
          puVar8 = *(uint **)(param_1 + 0x40);
          goto LAB_14000bec6;
        }
      }
      else if ((byte)(cVar2 - 0x31U) < 5) {
        *(char **)(param_1 + 0x18) = pcVar10 + 2;
LAB_14000bec6:
        iVar3 = *(int *)(param_1 + 0x28);
        if (iVar3 < *(int *)(param_1 + 0x2c)) {
          puVar6 = (uint *)((longlong)iVar3 * 0x20 + *(longlong *)(param_1 + 0x20));
          puVar6[1] = 0;
          puVar6[2] = 0;
          *(int *)(param_1 + 0x28) = iVar3 + 1;
          if (puVar8 != (uint *)0x0) {
            puVar6[1] = 0;
            puVar6[2] = 0;
            *puVar6 = 7;
            puVar6[4] = (int)cVar2 - 0x30;
            *(uint **)(puVar6 + 6) = puVar8;
            goto LAB_14000bc6b;
          }
        }
      }
      goto switchD_14000bd23_caseD_33;
    }
    if (cVar2 == 'L') {
      *(char **)(param_1 + 0x18) = pcVar10 + 1;
      puVar6 = FUN_14000a710(param_1);
      if (puVar6 == (uint *)0x0) {
        return (uint *)0x0;
      }
      uVar5 = FUN_140009e00(param_1);
      if ((int)uVar5 == 0) {
        return (uint *)0x0;
      }
      goto LAB_14000bc6b;
    }
    if (cVar2 != 'U') {
      return (uint *)0x0;
    }
    if (pcVar10[1] == 'l') {
      *(char **)(param_1 + 0x18) = pcVar10 + 1;
      if (pcVar10[1] == 'l') {
        local_2c = 0;
        *(char **)(param_1 + 0x18) = pcVar10 + 2;
        puVar6 = FUN_14000b8a0(param_1,&local_2c,param_3,param_4);
        if ((local_2c == 0) && (puVar8 = (uint *)FUN_14000b5a0(param_1), puVar8 != (uint *)0x0)) {
          if (puVar6 != (uint *)0x0) {
            *(uint **)(puVar6 + 6) = puVar8;
            puVar8 = puVar6;
          }
          pcVar10 = *(char **)(param_1 + 0x18);
          if (*pcVar10 == 'E') {
            pcVar9 = pcVar10 + 1;
            *(char **)(param_1 + 0x18) = pcVar9;
            uVar4 = 0;
            if (pcVar10[1] == '_') {
LAB_14000bfb6:
              *(char **)(param_1 + 0x18) = pcVar9 + 1;
              iVar3 = *(int *)(param_1 + 0x28);
              if (iVar3 < *(int *)(param_1 + 0x2c)) {
                puVar6 = (uint *)((longlong)iVar3 * 0x20 + *(longlong *)(param_1 + 0x20));
                puVar6[1] = 0;
                puVar6[2] = 0;
                *(int *)(param_1 + 0x28) = iVar3 + 1;
                *puVar6 = 0x47;
                *(uint **)(puVar6 + 4) = puVar8;
                puVar6[6] = uVar4;
                goto LAB_14000bc6b;
              }
            }
            else if (pcVar10[1] != 'n') {
              iVar3 = FUN_140009c60(param_1);
              uVar4 = iVar3 + 1;
              if ((-1 < (int)uVar4) && (pcVar9 = *(char **)(param_1 + 0x18), *pcVar9 == '_'))
              goto LAB_14000bfb6;
            }
          }
        }
      }
switchD_14000bd23_caseD_33:
      puVar6 = (uint *)0x0;
      goto LAB_14000bc6b;
    }
    if (pcVar10[1] != 't') {
      return (uint *)0x0;
    }
    *(char **)(param_1 + 0x18) = pcVar10 + 1;
    if (pcVar10[1] != 't') goto switchD_14000bd23_caseD_33;
    pcVar9 = pcVar10 + 2;
    *(char **)(param_1 + 0x18) = pcVar9;
    if (pcVar10[2] == '_') {
      uVar4 = 0;
LAB_14000bc01:
      iVar3 = *(int *)(param_1 + 0x28);
      *(char **)(param_1 + 0x18) = pcVar9 + 1;
      if (iVar3 < *(int *)(param_1 + 0x2c)) {
        puVar6 = (uint *)((longlong)iVar3 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar6[1] = 0;
        puVar6[2] = 0;
        *(int *)(param_1 + 0x28) = iVar3 + 1;
        puVar6[4] = uVar4;
        iVar3 = *(int *)(param_1 + 0x38);
        *puVar6 = 0x49;
        if (iVar3 < *(int *)(param_1 + 0x3c)) {
          *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar3 * 8) = puVar6;
          *(int *)(param_1 + 0x38) = iVar3 + 1;
          goto LAB_14000bc6b;
        }
      }
      goto switchD_14000bd23_caseD_33;
    }
    if (pcVar10[2] != 'n') {
      iVar3 = FUN_140009c60(param_1);
      uVar4 = iVar3 + 1;
      if (((int)uVar4 < 0) || (pcVar9 = *(char **)(param_1 + 0x18), *pcVar9 != '_'))
      goto switchD_14000bd23_caseD_33;
      goto LAB_14000bc01;
    }
    puVar6 = (uint *)0x0;
    if (local_res18[0] == 0) goto LAB_14000bc95;
    puVar6 = (uint *)0x0;
LAB_14000bc75:
    puVar6 = _text(param_1,0x55,(longlong)puVar6,local_res18[0]);
  }
  pcVar10 = *(char **)(param_1 + 0x18);
  if (*pcVar10 == 'B') {
    uVar5 = *(undefined8 *)(param_1 + 0x40);
    do {
      *(char **)(param_1 + 0x18) = pcVar10 + 1;
      puVar7 = FUN_14000a710(param_1);
      puVar6 = _text(param_1,0x4d,(longlong)puVar6,(longlong)puVar7);
      pcVar10 = *(char **)(param_1 + 0x18);
    } while (*pcVar10 == 'B');
    *(undefined8 *)(param_1 + 0x40) = uVar5;
  }
LAB_14000bc95:
  if (param_2 != 0) {
    puVar6 = _text(param_1,1,param_2,(longlong)puVar6);
  }
  return puVar6;
}



uint * FUN_14000c080(longlong param_1,undefined8 param_2,undefined8 param_3,longlong param_4)

{
  undefined8 *puVar1;
  uint *puVar2;
  undefined4 *puVar3;
  char cVar4;
  longlong lVar5;
  char *pcVar6;
  char *pcVar7;
  int iVar8;
  uint uVar9;
  
  pcVar7 = *(char **)(param_1 + 0x18);
  if (*pcVar7 != 'L') {
    return (uint *)0x0;
  }
  pcVar6 = pcVar7 + 1;
  *(char **)(param_1 + 0x18) = pcVar6;
  if (pcVar7[1] == '_') {
    pcVar6 = pcVar7 + 2;
    puVar2 = (uint *)0x0;
    *(char **)(param_1 + 0x18) = pcVar6;
    cVar4 = pcVar7[2];
    if (cVar4 != 'Z') goto LAB_14000c159;
  }
  else if (pcVar7[1] != 'Z') {
    puVar2 = FUN_14000aaf0(param_1,pcVar7,param_3,param_4);
    if (puVar2 == (uint *)0x0) {
      return (uint *)0x0;
    }
    pcVar6 = *(char **)(param_1 + 0x18);
    pcVar7 = pcVar6;
    if (*puVar2 == 0x27) {
      puVar1 = *(undefined8 **)(puVar2 + 4);
      if (*(int *)((longlong)puVar1 + 0x1c) != 0) {
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) - *(int *)(puVar1 + 1);
      }
      iVar8 = strcmp((char *)*puVar1,"decltype(nullptr)");
      cVar4 = *pcVar6;
      if (iVar8 != 0) goto LAB_14000c0cd;
      if (cVar4 == 'E') {
        *(char **)(param_1 + 0x18) = pcVar6 + 1;
        return puVar2;
      }
      uVar9 = 0x3d;
      if (cVar4 == 'n') goto LAB_14000c1c0;
LAB_14000c107:
      do {
        pcVar6 = pcVar6 + 1;
        if (cVar4 == '\0') {
          return (uint *)0x0;
        }
        *(char **)(param_1 + 0x18) = pcVar6;
        cVar4 = *pcVar6;
      } while (cVar4 != 'E');
      iVar8 = (int)pcVar6 - (int)pcVar7;
    }
    else {
      cVar4 = *pcVar6;
LAB_14000c0cd:
      uVar9 = 0x3d;
      if (cVar4 == 'n') {
LAB_14000c1c0:
        pcVar7 = pcVar6 + 1;
        uVar9 = 0x3e;
        *(char **)(param_1 + 0x18) = pcVar7;
        cVar4 = pcVar6[1];
      }
      pcVar6 = pcVar7;
      if (cVar4 != 'E') goto LAB_14000c107;
      iVar8 = 0;
    }
    lVar5 = param_1;
    puVar3 = FUN_140009c00(param_1,(longlong)pcVar7,iVar8);
    puVar2 = _text(lVar5,uVar9,(longlong)puVar2,(longlong)puVar3);
    pcVar6 = *(char **)(param_1 + 0x18);
    cVar4 = *pcVar6;
    goto LAB_14000c159;
  }
  *(char **)(param_1 + 0x18) = pcVar6 + 1;
  if ((pcVar6[1] == 'G') || (pcVar6[1] == 'T')) {
    puVar2 = FUN_14000cfd0(param_1,pcVar6 + 1,param_3,param_4);
    pcVar6 = *(char **)(param_1 + 0x18);
    cVar4 = *pcVar6;
  }
  else {
    puVar2 = FUN_14000da60(param_1,0,param_3,param_4);
    pcVar6 = *(char **)(param_1 + 0x18);
    cVar4 = *pcVar6;
  }
LAB_14000c159:
  if (cVar4 != 'E') {
    return (uint *)0x0;
  }
  *(char **)(param_1 + 0x18) = pcVar6 + 1;
  return puVar2;
}



uint * FUN_14000c260(longlong param_1,undefined8 param_2,uint *param_3,longlong param_4)

{
  byte bVar1;
  undefined4 uVar2;
  byte *pbVar3;
  uint *puVar4;
  ulonglong uVar5;
  
  pbVar3 = *(byte **)(param_1 + 0x18);
  bVar1 = *pbVar3;
  uVar5 = (ulonglong)bVar1;
  if (bVar1 == 0x4c) {
    puVar4 = FUN_14000c080(param_1,0x4c,param_3,param_4);
    return puVar4;
  }
  if ((char)bVar1 < 'M') {
    uVar5 = (ulonglong)(bVar1 - 0x49);
    if ((byte)(bVar1 - 0x49) < 2) {
      *(byte **)(param_1 + 0x18) = pbVar3 + 1;
      puVar4 = FUN_14000c300(param_1,uVar5,param_3,param_4);
      return puVar4;
    }
  }
  else if (bVar1 == 0x58) {
    uVar2 = *(undefined4 *)(param_1 + 0x4c);
    *(undefined4 *)(param_1 + 0x4c) = 1;
    *(byte **)(param_1 + 0x18) = pbVar3 + 1;
    puVar4 = FUN_14000c530(param_1,0x58,param_3,param_4);
    *(undefined4 *)(param_1 + 0x4c) = uVar2;
    if (**(char **)(param_1 + 0x18) == 'E') {
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
    }
    else {
      puVar4 = (uint *)0x0;
    }
    return puVar4;
  }
  puVar4 = FUN_14000aaf0(param_1,uVar5,param_3,param_4);
  return puVar4;
}



uint * FUN_14000c300(longlong param_1,undefined8 param_2,uint *param_3,longlong param_4)

{
  undefined8 uVar1;
  uint *puVar2;
  uint **ppuVar3;
  uint *local_20;
  
  uVar1 = *(undefined8 *)(param_1 + 0x40);
  if (**(char **)(param_1 + 0x18) == 'E') {
    *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
    puVar2 = _text(param_1,0x2f,0,0);
    return puVar2;
  }
  local_20 = (uint *)0x0;
  ppuVar3 = &local_20;
  while( true ) {
    param_3 = FUN_14000c260(param_1,param_2,param_3,param_4);
    if (param_3 == (uint *)0x0) {
      return (uint *)0x0;
    }
    param_4 = 0;
    param_2 = 0x2f;
    puVar2 = _text(param_1,0x2f,(longlong)param_3,0);
    *ppuVar3 = puVar2;
    if (puVar2 == (uint *)0x0) break;
    ppuVar3 = (uint **)(puVar2 + 6);
    if (**(char **)(param_1 + 0x18) == 'E') {
      *(undefined8 *)(param_1 + 0x40) = uVar1;
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      return local_20;
    }
  }
  return (uint *)0x0;
}



uint * FUN_14000c3b0(longlong param_1,int param_2,uint *param_3,longlong param_4)

{
  byte bVar1;
  int iVar2;
  uint *puVar3;
  byte *pbVar4;
  char cVar5;
  ulonglong uVar6;
  uint *puVar7;
  
  puVar7 = (uint *)0x0;
  do {
    pbVar4 = *(byte **)(param_1 + 0x18);
    bVar1 = *pbVar4;
    uVar6 = (ulonglong)bVar1;
    if (bVar1 == 0x44) goto LAB_14000c4a0;
    if (bVar1 == 0x49) {
      uVar6 = 0x49;
      if (puVar7 != (uint *)0x0) goto LAB_14000c41f;
      return (uint *)0x0;
    }
LAB_14000c3d7:
    cVar5 = (char)uVar6;
    if (cVar5 == 'T') {
      if (puVar7 != (uint *)0x0) {
        return (uint *)0x0;
      }
      puVar3 = FUN_14000a440(param_1);
      goto LAB_14000c3f0;
    }
    if (cVar5 != 'M') {
      if (cVar5 != 'S') goto LAB_14000c500;
      param_3 = FUN_14000a800(param_1,1);
      if (param_3 == (uint *)0x0) {
        return (uint *)0x0;
      }
      if (*param_3 - 0x53 < 2) goto LAB_14000c503;
      if (puVar7 != (uint *)0x0) {
        return (uint *)0x0;
      }
      pbVar4 = *(byte **)(param_1 + 0x18);
      bVar1 = *pbVar4;
      puVar7 = param_3;
      do {
        uVar6 = (ulonglong)bVar1;
        if (bVar1 == 0x44) {
LAB_14000c4a0:
          if ((pbVar4[1] & 0xdf) == 0x54) {
            if (puVar7 != (uint *)0x0) {
              return (uint *)0x0;
            }
            puVar3 = FUN_14000aaf0(param_1,uVar6,param_3,param_4);
          }
          else {
LAB_14000c500:
            param_3 = (uint *)0x0;
LAB_14000c503:
            puVar3 = FUN_14000bab0(param_1,(longlong)puVar7,(ulonglong)param_3,param_4);
          }
        }
        else {
          if (bVar1 != 0x49) goto LAB_14000c3d7;
LAB_14000c41f:
          *(byte **)(param_1 + 0x18) = pbVar4 + 1;
          param_4 = (longlong)FUN_14000c300(param_1,uVar6,param_3,param_4);
          if ((uint *)param_4 == (uint *)0x0) {
            return (uint *)0x0;
          }
          puVar3 = _text(param_1,4,(longlong)puVar7,param_4);
          param_3 = puVar7;
        }
LAB_14000c3f0:
        if (puVar3 == (uint *)0x0) {
          return (uint *)0x0;
        }
        pbVar4 = *(byte **)(param_1 + 0x18);
        if (*pbVar4 == 0x45) {
          return puVar3;
        }
        if (param_2 != 0) {
          iVar2 = *(int *)(param_1 + 0x38);
          if (*(int *)(param_1 + 0x3c) <= iVar2) {
            return (uint *)0x0;
          }
          param_3 = (uint *)(longlong)iVar2;
          *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)param_3 * 8) = puVar3;
          *(int *)(param_1 + 0x38) = iVar2 + 1;
        }
        bVar1 = *pbVar4;
        puVar7 = puVar3;
      } while( true );
    }
    *(byte **)(param_1 + 0x18) = pbVar4 + 1;
  } while( true );
}



uint * FUN_14000c530(longlong param_1,undefined8 param_2,uint *param_3,longlong param_4)

{
  char cVar1;
  byte bVar2;
  byte *pbVar3;
  bool bVar4;
  byte bVar5;
  int iVar6;
  uint *puVar7;
  uint *puVar8;
  uint *puVar9;
  uint *puVar10;
  uint uVar11;
  ulonglong uVar12;
  char *pcVar13;
  undefined8 uVar14;
  undefined8 *puVar15;
  
  pcVar13 = *(char **)(param_1 + 0x18);
  cVar1 = *pcVar13;
  if (cVar1 == 'L') {
    puVar8 = FUN_14000c080(param_1,pcVar13,param_3,param_4);
    return puVar8;
  }
  if (cVar1 == 'T') {
    puVar8 = FUN_14000a440(param_1);
    return puVar8;
  }
  if (cVar1 == 's') {
    if (pcVar13[1] == 'r') {
      *(char **)(param_1 + 0x18) = pcVar13 + 2;
      bVar5 = pcVar13[2];
      uVar12 = (ulonglong)*(uint *)(param_1 + 0x54);
      if (*(uint *)(param_1 + 0x54) == 0) {
LAB_14000ca65:
        puVar8 = FUN_14000aaf0(param_1,uVar12,param_3,param_4);
      }
      else {
        if ((char)bVar5 < ':') {
          if ((char)bVar5 < '0') goto LAB_14000ca65;
        }
        else if ((0x37 < (byte)(bVar5 - 0x43)) ||
                (uVar12 = 0xffffffc0040201,
                (0xffffffc0040201U >> ((ulonglong)(bVar5 - 0x43) & 0x3f) & 1) == 0))
        goto LAB_14000ca65;
        *(undefined4 *)(param_1 + 0x54) = 0xffffffff;
        puVar8 = FUN_14000c3b0(param_1,0,param_3,param_4);
        if (**(char **)(param_1 + 0x18) == 'E') {
          *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
        }
      }
      puVar9 = (uint *)0x0;
      puVar7 = FUN_14000bab0(param_1,(longlong)puVar8,0,param_4);
      pcVar13 = *(char **)(param_1 + 0x18);
      cVar1 = *pcVar13;
joined_r0x00014000c77d:
      if (cVar1 != 'I') {
        return puVar7;
      }
      *(char **)(param_1 + 0x18) = pcVar13 + 1;
      puVar8 = FUN_14000c300(param_1,puVar8,puVar9,param_4);
      uVar11 = 4;
      goto LAB_14000c7a3;
    }
    if (pcVar13[1] == 'p') {
      *(char **)(param_1 + 0x18) = pcVar13 + 2;
      puVar7 = FUN_14000c530(param_1,pcVar13 + 2,param_3,param_4);
      puVar8 = (uint *)0x0;
      uVar11 = 0x4c;
      goto LAB_14000c7a3;
    }
  }
  else if (cVar1 == 'f') {
    if (pcVar13[1] == 'p') {
      *(char **)(param_1 + 0x18) = pcVar13 + 2;
      cVar1 = pcVar13[2];
      if (cVar1 == 'T') {
        *(char **)(param_1 + 0x18) = pcVar13 + 3;
        uVar11 = 0;
      }
      else if (cVar1 == '_') {
        *(char **)(param_1 + 0x18) = pcVar13 + 3;
        uVar11 = 1;
      }
      else {
        if (cVar1 == 'n') {
          return (uint *)0x0;
        }
        iVar6 = FUN_140009c60(param_1);
        if (iVar6 + 1 < 0) {
          return (uint *)0x0;
        }
        if (**(char **)(param_1 + 0x18) != '_') {
          return (uint *)0x0;
        }
        *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
        if (iVar6 + 1 == 0x7fffffff) {
          return (uint *)0x0;
        }
        uVar11 = iVar6 + 2;
      }
      iVar6 = *(int *)(param_1 + 0x28);
      if (*(int *)(param_1 + 0x2c) <= iVar6) {
        return (uint *)0x0;
      }
      puVar8 = (uint *)((longlong)iVar6 * 0x20 + *(longlong *)(param_1 + 0x20));
      puVar8[1] = 0;
      puVar8[2] = 0;
      *(int *)(param_1 + 0x28) = iVar6 + 1;
      *puVar8 = 6;
      puVar8[4] = uVar11;
      return puVar8;
    }
  }
  else {
    if ((byte)(cVar1 - 0x30U) < 10) {
LAB_14000c57c:
      puVar9 = (uint *)0x0;
      puVar8 = (uint *)0x0;
      puVar7 = FUN_14000bab0(param_1,0,0,param_4);
      if (puVar7 == (uint *)0x0) {
        return (uint *)0x0;
      }
      pcVar13 = *(char **)(param_1 + 0x18);
      cVar1 = *pcVar13;
      goto joined_r0x00014000c77d;
    }
    if (cVar1 == 'o') {
      if (pcVar13[1] == 'n') {
        *(char **)(param_1 + 0x18) = pcVar13 + 2;
        goto LAB_14000c57c;
      }
    }
    else if ((cVar1 == 'i') || (cVar1 == 't')) {
      if (pcVar13[1] == 'l') {
        pcVar13 = pcVar13 + 2;
        puVar7 = (uint *)0x0;
        *(char **)(param_1 + 0x18) = pcVar13;
        if (cVar1 == 't') {
          puVar7 = FUN_14000aaf0(param_1,pcVar13,param_3,param_4);
          pcVar13 = *(char **)(param_1 + 0x18);
        }
        if (*pcVar13 == '\0') {
          return (uint *)0x0;
        }
        if (pcVar13[1] == '\0') {
          return (uint *)0x0;
        }
        puVar8 = FUN_14000cf20(param_1,'E');
        uVar11 = 0x31;
        goto LAB_14000c7a3;
      }
    }
    else if (cVar1 == 'u') {
      pcVar13 = pcVar13 + 1;
      *(char **)(param_1 + 0x18) = pcVar13;
      puVar7 = FUN_14000a710(param_1);
      puVar8 = FUN_14000c300(param_1,pcVar13,param_3,param_4);
      uVar11 = 0x3f;
      goto LAB_14000c7a3;
    }
  }
  puVar7 = FUN_14000b910(param_1,pcVar13,param_3,param_4);
  if (puVar7 == (uint *)0x0) {
    return (uint *)0x0;
  }
  uVar11 = *puVar7;
  if (uVar11 == 0x32) {
    puVar15 = *(undefined8 **)(puVar7 + 4);
    pbVar3 = (byte *)*puVar15;
    *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + *(int *)(puVar15 + 2) + -2;
    bVar5 = *pbVar3;
    if (((bVar5 == 0x73) && (pbVar3[1] == 0x74)) && (pbVar3[2] == 0)) {
      puVar8 = FUN_14000aaf0(param_1,puVar15,param_3,param_4);
      uVar11 = 0x37;
      goto LAB_14000c7a3;
    }
    iVar6 = *(int *)((longlong)puVar15 + 0x14);
    if (iVar6 == 2) {
      bVar2 = *pbVar3;
      uVar12 = (ulonglong)bVar2;
      if ((pbVar3[1] == 99) && (((byte)(bVar2 + 0x9d) < 2 || ((byte)(bVar2 + 0x8e) < 2)))) {
        puVar8 = FUN_14000aaf0(param_1,uVar12,param_3,param_4);
      }
      else if (bVar2 == 0x66) {
        puVar8 = FUN_14000b910(param_1,0x66,param_3,param_4);
      }
      else if (((bVar5 == 100) && (pbVar3[1] == 0x69)) && (pbVar3[2] == 0)) {
        param_3 = (uint *)0x0;
        uVar12 = 0;
        puVar8 = FUN_14000bab0(param_1,0,0,param_4);
      }
      else {
        puVar8 = FUN_14000c530(param_1,uVar12,param_3,param_4);
      }
      bVar5 = *pbVar3;
      if (((bVar5 == 99) && (pbVar3[1] == 0x6c)) && (pbVar3[2] == 0)) {
        puVar9 = FUN_14000cf20(param_1,'E');
      }
      else {
        if ((((bVar5 == 100) && (pbVar3[1] == 0x74)) && (pbVar3[2] == 0)) ||
           (((bVar5 == 0x70 && (pbVar3[1] == 0x74)) && (pbVar3[2] == 0)))) {
          pbVar3 = *(byte **)(param_1 + 0x18);
          bVar5 = *pbVar3;
          uVar12 = (ulonglong)bVar5;
          if (bVar5 == 0x67) {
            if (pbVar3[1] != 0x73) goto LAB_14000cbec;
          }
          else if ((bVar5 != 0x73) || (pbVar3[1] != 0x72)) {
LAB_14000cbec:
            puVar10 = (uint *)0x0;
            uVar14 = 0;
            puVar9 = FUN_14000bab0(param_1,0,0,param_4);
            if (**(char **)(param_1 + 0x18) == 'I') {
              *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
              puVar10 = FUN_14000c300(param_1,uVar14,puVar10,param_4);
              puVar9 = _text(param_1,4,(longlong)puVar9,(longlong)puVar10);
            }
            goto LAB_14000c993;
          }
        }
        puVar9 = FUN_14000c530(param_1,uVar12,param_3,param_4);
      }
LAB_14000c993:
      puVar8 = _text(param_1,0x39,(longlong)puVar8,(longlong)puVar9);
      uVar11 = 0x38;
      goto LAB_14000c7a3;
    }
    if (iVar6 < 3) {
      if (iVar6 == 0) goto LAB_14000c90d;
      if (iVar6 != 1) {
        return (uint *)0x0;
      }
      bVar2 = *pbVar3;
      pcVar13 = (char *)(ulonglong)bVar2;
      if (((bVar2 == 0x70) || (bVar2 == 0x6d)) && (pbVar3[1] == bVar2)) {
        pcVar13 = *(char **)(param_1 + 0x18);
        bVar4 = true;
        if (*pcVar13 == '_') {
          pcVar13 = pcVar13 + 1;
          *(char **)(param_1 + 0x18) = pcVar13;
          bVar5 = *pbVar3;
          goto LAB_14000c7f0;
        }
      }
      else {
LAB_14000c7f0:
        bVar4 = false;
      }
      if (((bVar5 == 0x73) && (pbVar3[1] == 0x50)) && (pbVar3[2] == 0)) {
        puVar8 = FUN_14000c300(param_1,pcVar13,param_3,param_4);
      }
      else {
        puVar8 = FUN_14000c530(param_1,pcVar13,param_3,param_4);
      }
      if (bVar4) {
        puVar8 = _text(param_1,0x39,(longlong)puVar8,(longlong)puVar8);
      }
      goto LAB_14000c60d;
    }
    if (iVar6 != 3) {
      return (uint *)0x0;
    }
    if ((((bVar5 == 0x71) && (pbVar3[1] == 0x75)) && (pbVar3[2] == 0)) ||
       (((bVar5 == 100 && (pbVar3[1] == 0x58)) && (pbVar3[2] == 0)))) {
      puVar8 = FUN_14000c530(param_1,puVar15,param_3,param_4);
LAB_14000caa2:
      puVar9 = FUN_14000c530(param_1,puVar15,param_3,param_4);
      puVar10 = FUN_14000c530(param_1,puVar15,param_3,param_4);
      if (puVar10 == (uint *)0x0) {
        return (uint *)0x0;
      }
    }
    else {
      if (*pbVar3 == 0x66) {
        puVar8 = FUN_14000b910(param_1,puVar15,param_3,param_4);
        goto LAB_14000caa2;
      }
      if (*pbVar3 != 0x6e) {
        return (uint *)0x0;
      }
      if ((pbVar3[1] != 0x77) && (pbVar3[1] != 0x61)) {
        return (uint *)0x0;
      }
      uVar14 = 0x5f;
      puVar8 = FUN_14000cf20(param_1,'_');
      puVar9 = FUN_14000aaf0(param_1,uVar14,param_3,param_4);
      pcVar13 = *(char **)(param_1 + 0x18);
      cVar1 = *pcVar13;
      if (cVar1 == 'E') {
        puVar10 = (uint *)0x0;
        *(char **)(param_1 + 0x18) = pcVar13 + 1;
      }
      else if (cVar1 == 'p') {
        if (pcVar13[1] != 'i') {
          return (uint *)0x0;
        }
        *(char **)(param_1 + 0x18) = pcVar13 + 2;
        puVar10 = FUN_14000cf20(param_1,'E');
      }
      else {
        if (cVar1 != 'i') {
          return (uint *)0x0;
        }
        if (pcVar13[1] != 'l') {
          return (uint *)0x0;
        }
        puVar10 = FUN_14000c530(param_1,0x69,param_3,param_4);
      }
    }
    puVar9 = _text(param_1,0x3c,(longlong)puVar9,(longlong)puVar10);
    puVar8 = _text(param_1,0x3b,(longlong)puVar8,(longlong)puVar9);
    uVar11 = 0x3a;
    goto LAB_14000c7a3;
  }
  if (uVar11 == 0x33) {
    uVar11 = puVar7[4];
    if (uVar11 != 1) {
      if (uVar11 == 3) {
        return (uint *)0x0;
      }
      if (uVar11 != 0) {
        return (uint *)0x0;
      }
LAB_14000c90d:
      puVar8 = (uint *)0x0;
      uVar11 = 0x36;
      goto LAB_14000c7a3;
    }
LAB_14000c602:
    puVar8 = FUN_14000c530(param_1,pcVar13,param_3,param_4);
  }
  else {
    if (uVar11 != 0x34) {
      return (uint *)0x0;
    }
    if (**(char **)(param_1 + 0x18) != '_') goto LAB_14000c602;
    *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
    puVar8 = FUN_14000cf20(param_1,'E');
  }
LAB_14000c60d:
  uVar11 = 0x37;
LAB_14000c7a3:
  puVar8 = _text(param_1,uVar11,(longlong)puVar7,(longlong)puVar8);
  return puVar8;
}



uint * FUN_14000ccf0(longlong param_1,uint *param_2,uint param_3)

{
  byte bVar1;
  undefined4 uVar2;
  int iVar3;
  int *piVar4;
  bool bVar5;
  uint *puVar6;
  undefined7 extraout_var;
  uint *puVar7;
  byte *pbVar8;
  uint uVar9;
  uint *puVar10;
  char cVar11;
  
  pbVar8 = *(byte **)(param_1 + 0x18);
  bVar1 = *pbVar8;
  puVar10 = param_2;
  do {
    puVar6 = (uint *)(ulonglong)bVar1;
    bVar5 = FUN_14000a170(pbVar8);
    cVar11 = (char)puVar6;
    if ((int)CONCAT71(extraout_var,bVar5) == 0) {
      if (((param_3 & 1) == 0) && (cVar11 == 'F')) {
        while (puVar10 != param_2) {
          piVar4 = *(int **)param_2;
          iVar3 = *piVar4;
          if (iVar3 == 0x1a) {
            *piVar4 = 0x1d;
          }
          else if (iVar3 == 0x1b) {
            *piVar4 = 0x1e;
          }
          else if (iVar3 == 0x19) {
            *piVar4 = 0x1c;
          }
          param_2 = (uint *)(piVar4 + 4);
        }
      }
      return puVar10;
    }
    *(byte **)(param_1 + 0x18) = pbVar8 + 1;
    if (cVar11 == 'r') {
      *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 9;
      puVar7 = (uint *)0x0;
      uVar9 = (-(uint)((param_3 & 1) == 0) & 0xfffffffd) + 0x1c;
    }
    else if (cVar11 == 'V') {
      *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 9;
      puVar7 = (uint *)0x0;
      uVar9 = (-(uint)((param_3 & 1) == 0) & 0xfffffffd) + 0x1d;
    }
    else if (cVar11 == 'K') {
      *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 6;
      puVar7 = (uint *)0x0;
      uVar9 = (-(uint)((param_3 & 1) == 0) & 0xfffffffd) + 0x1e;
    }
    else {
      if (pbVar8[1] == 0) {
        return (uint *)0x0;
      }
      *(byte **)(param_1 + 0x18) = pbVar8 + 2;
      bVar1 = pbVar8[1];
      if (bVar1 == 0x78) {
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 0x11;
        puVar7 = (uint *)0x0;
        uVar9 = 0x4e;
      }
      else if ((bVar1 & 0xdf) == 0x4f) {
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 9;
        puVar7 = (uint *)0x0;
        uVar9 = 0x50;
        if (bVar1 == 0x4f) {
          uVar2 = *(undefined4 *)(param_1 + 0x4c);
          *(undefined4 *)(param_1 + 0x4c) = 1;
          puVar7 = FUN_14000c530(param_1,0x50,puVar6,0);
          *(undefined4 *)(param_1 + 0x4c) = uVar2;
          if (puVar7 == (uint *)0x0) {
            return (uint *)0x0;
          }
          if (**(char **)(param_1 + 0x18) != 'E') {
            return (uint *)0x0;
          }
          *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
          uVar9 = 0x50;
        }
      }
      else {
        if (bVar1 != 0x77) {
          return (uint *)0x0;
        }
        *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 6;
        puVar7 = (uint *)FUN_14000b5a0(param_1);
        if (puVar7 == (uint *)0x0) {
          return (uint *)0x0;
        }
        if (**(char **)(param_1 + 0x18) != 'E') {
          return (uint *)0x0;
        }
        *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
        uVar9 = 0x51;
      }
    }
    puVar6 = _text(param_1,uVar9,0,(longlong)puVar7);
    *(uint **)puVar10 = puVar6;
    if (puVar6 == (uint *)0x0) {
      return (uint *)0x0;
    }
    pbVar8 = *(byte **)(param_1 + 0x18);
    puVar10 = puVar6 + 4;
    bVar1 = *pbVar8;
  } while( true );
}



uint * FUN_14000cf20(longlong param_1,char param_2)

{
  undefined4 uVar1;
  uint *puVar2;
  undefined7 in_register_00000011;
  undefined8 uVar3;
  uint **ppuVar4;
  uint *in_R8;
  longlong in_R9;
  uint *local_30 [2];
  
  uVar3 = CONCAT71(in_register_00000011,param_2);
  local_30[0] = (uint *)0x0;
  ppuVar4 = local_30;
  if (**(char **)(param_1 + 0x18) == param_2) {
    *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
    puVar2 = _text(param_1,0x2e,0,0);
    return puVar2;
  }
  while( true ) {
    uVar1 = *(undefined4 *)(param_1 + 0x4c);
    *(undefined4 *)(param_1 + 0x4c) = 1;
    in_R8 = FUN_14000c530(param_1,uVar3,in_R8,in_R9);
    *(undefined4 *)(param_1 + 0x4c) = uVar1;
    if (in_R8 == (uint *)0x0) {
      return (uint *)0x0;
    }
    in_R9 = 0;
    uVar3 = 0x2e;
    puVar2 = _text(param_1,0x2e,(longlong)in_R8,0);
    *ppuVar4 = puVar2;
    if (puVar2 == (uint *)0x0) break;
    ppuVar4 = (uint **)(puVar2 + 6);
    if (**(char **)(param_1 + 0x18) == param_2) {
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      return local_30[0];
    }
  }
  return (uint *)0x0;
}



uint * FUN_14000cfd0(longlong param_1,undefined8 param_2,uint *param_3,longlong param_4)

{
  char cVar1;
  char *pcVar2;
  uint uVar3;
  int iVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  uint *puVar7;
  int iVar8;
  uint *puVar9;
  longlong lVar10;
  char *pcVar11;
  uint *local_20;
  
  iVar4 = *(int *)(param_1 + 0x48);
  *(int *)(param_1 + 0x48) = iVar4 + 0x14;
  pcVar2 = *(char **)(param_1 + 0x18);
  if (*pcVar2 == 'T') {
    *(char **)(param_1 + 0x18) = pcVar2 + 1;
    if (pcVar2[1] == '\0') {
      return (uint *)0x0;
    }
    *(char **)(param_1 + 0x18) = pcVar2 + 2;
    puVar9 = &switchD_14000d081::switchdataD_1400c6780;
    switch(pcVar2[1]) {
    case 'A':
      puVar9 = FUN_14000c260(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0x30;
      break;
    default:
switchD_14000d035_caseD_42:
      return (uint *)0x0;
    case 'C':
      puVar7 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      iVar4 = FUN_140009c60(param_1);
      if (iVar4 < 0) {
        return (uint *)0x0;
      }
      if (**(char **)(param_1 + 0x18) != '_') {
        return (uint *)0x0;
      }
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      puVar9 = FUN_14000aaf0(param_1,puVar9,param_3,param_4);
      *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 5;
      uVar3 = 0xb;
      break;
    case 'F':
      puVar9 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0xe;
      break;
    case 'H':
      puVar9 = FUN_14000d600(param_1,0,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0x14;
      break;
    case 'I':
      puVar9 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0xc;
      break;
    case 'J':
      puVar9 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0x12;
      break;
    case 'S':
      puVar9 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0xd;
      break;
    case 'T':
      *(int *)(param_1 + 0x48) = iVar4 + 10;
      puVar9 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 10;
      break;
    case 'V':
      *(int *)(param_1 + 0x48) = iVar4 + 0xf;
      puVar9 = FUN_14000aaf0(param_1,&switchD_14000d081::switchdataD_1400c6780,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 9;
      break;
    case 'W':
      puVar9 = FUN_14000d600(param_1,0,param_3,param_4);
      puVar7 = (uint *)0x0;
      uVar3 = 0x15;
      break;
    case 'c':
      uVar5 = FUN_140009d20(param_1,0);
      if ((int)uVar5 == 0) {
        return (uint *)0x0;
      }
      uVar6 = 0;
      uVar5 = FUN_140009d20(param_1,0);
      if ((int)uVar5 == 0) {
        return (uint *)0x0;
      }
      if ((**(char **)(param_1 + 0x18) == 'G') || (**(char **)(param_1 + 0x18) == 'T')) {
        puVar9 = FUN_14000cfd0(param_1,uVar6,param_3,param_4);
      }
      else {
        puVar9 = FUN_14000da60(param_1,0,param_3,param_4);
      }
      puVar7 = (uint *)0x0;
      uVar3 = 0x11;
      break;
    case 'h':
      uVar6 = 0x68;
      uVar5 = FUN_140009d20(param_1,0x68);
      if ((int)uVar5 == 0) {
        return (uint *)0x0;
      }
      if ((**(char **)(param_1 + 0x18) == 'G') || (**(char **)(param_1 + 0x18) == 'T')) {
        puVar9 = FUN_14000cfd0(param_1,uVar6,param_3,param_4);
      }
      else {
        puVar9 = FUN_14000da60(param_1,0,param_3,param_4);
      }
      puVar7 = (uint *)0x0;
      uVar3 = 0xf;
      break;
    case 'v':
      uVar6 = 0x76;
      uVar5 = FUN_140009d20(param_1,0x76);
      if ((int)uVar5 == 0) {
        return (uint *)0x0;
      }
      if ((**(char **)(param_1 + 0x18) == 'G') || (**(char **)(param_1 + 0x18) == 'T')) {
        puVar9 = FUN_14000cfd0(param_1,uVar6,param_3,param_4);
      }
      else {
        puVar9 = FUN_14000da60(param_1,0,param_3,param_4);
      }
      puVar7 = (uint *)0x0;
      uVar3 = 0x10;
    }
    goto LAB_14000d09d;
  }
  if (*pcVar2 != 'G') {
    return (uint *)0x0;
  }
  *(char **)(param_1 + 0x18) = pcVar2 + 1;
  if (pcVar2[1] == '\0') {
    return (uint *)0x0;
  }
  *(char **)(param_1 + 0x18) = pcVar2 + 2;
  cVar1 = pcVar2[1];
  if ('V' < cVar1) {
    if (cVar1 != 'r') {
      return (uint *)0x0;
    }
    iVar4 = FUN_140009c60(param_1);
    if (iVar4 < 2) {
      return (uint *)0x0;
    }
    pcVar2 = *(char **)(param_1 + 0x18);
    if (*pcVar2 == '\0') {
      return (uint *)0x0;
    }
    pcVar11 = pcVar2 + 1;
    *(char **)(param_1 + 0x18) = pcVar11;
    if (*pcVar2 != '_') {
      return (uint *)0x0;
    }
    iVar4 = iVar4 + -1;
    puVar7 = (uint *)0x0;
    do {
      if (*pcVar11 == '\0') {
        return (uint *)0x0;
      }
      lVar10 = 0;
      if (*pcVar11 == '$') {
        cVar1 = pcVar11[1];
        if (cVar1 == 'S') {
          uVar3 = 0x2f;
        }
        else if (cVar1 == '_') {
          uVar3 = 0x2e;
        }
        else {
          if (cVar1 != '$') {
            return (uint *)0x0;
          }
          uVar3 = 0x24;
        }
        iVar8 = *(int *)(param_1 + 0x28);
        pcVar11 = (char *)(*(longlong *)(param_1 + 0x18) + 2);
        if (*(int *)(param_1 + 0x2c) <= iVar8) {
          *(char **)(param_1 + 0x18) = pcVar11;
          return (uint *)0x0;
        }
        iVar4 = iVar4 + -2;
        puVar9 = (uint *)((longlong)iVar8 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar9[1] = 0;
        puVar9[2] = 0;
        *(int *)(param_1 + 0x28) = iVar8 + 1;
        *puVar9 = 0x42;
        puVar9[4] = uVar3;
        *(char **)(param_1 + 0x18) = pcVar11;
      }
      else {
        do {
          iVar8 = (int)lVar10;
          if ((pcVar11[lVar10] == '\0') || (pcVar11[lVar10] == '$')) goto LAB_14000d2d8;
          lVar10 = lVar10 + 1;
        } while (lVar10 != iVar4);
        iVar8 = iVar8 + 1;
        lVar10 = (longlong)iVar8;
LAB_14000d2d8:
        iVar4 = iVar4 - iVar8;
        puVar9 = FUN_140009c00(param_1,(longlong)pcVar11,iVar8);
        pcVar11 = (char *)(*(longlong *)(param_1 + 0x18) + lVar10);
        *(char **)(param_1 + 0x18) = pcVar11;
        if (puVar9 == (uint *)0x0) {
          return (uint *)0x0;
        }
      }
      if ((puVar7 != (uint *)0x0) &&
         (puVar9 = _text(param_1,0x41,(longlong)puVar7,(longlong)puVar9), puVar9 == (uint *)0x0)) {
        return (uint *)0x0;
      }
      puVar7 = puVar9;
    } while (0 < iVar4);
    puVar7 = (uint *)0x0;
    uVar3 = 0x40;
    goto LAB_14000d09d;
  }
  if (cVar1 < 'A') {
    return (uint *)0x0;
  }
  if (0x15 < (byte)(cVar1 + 0xbfU)) {
    return (uint *)0x0;
  }
  switch(cVar1) {
  case 'A':
    if ((pcVar2[2] == 'G') || (pcVar2[2] == 'T')) {
      puVar9 = FUN_14000cfd0(param_1,(longlong)&switchD_14000d035::switchdataD_1400c6728 +
                                     (longlong)
                                     (int)(&switchD_14000d035::switchdataD_1400c6728)
                                          [(byte)(cVar1 + 0xbfU)],param_3,param_4);
    }
    else {
      puVar9 = FUN_14000da60(param_1,0,param_3,param_4);
    }
    puVar7 = (uint *)0x0;
    uVar3 = 0x17;
    break;
  default:
    goto switchD_14000d035_caseD_42;
  case 'I':
    local_20 = (uint *)0x0;
    uVar5 = FUN_14000aa50(param_1,(longlong *)&local_20);
    if ((int)uVar5 == 0) {
      return (uint *)0x0;
    }
    if (local_20 == (uint *)0x0) {
      return (uint *)0x0;
    }
    puVar7 = (uint *)0x0;
    uVar3 = 0x56;
    puVar9 = local_20;
    break;
  case 'R':
    puVar9 = FUN_14000d600(param_1,0,param_3,param_4);
    iVar4 = *(int *)(param_1 + 0x28);
    if (iVar4 < *(int *)(param_1 + 0x2c)) {
      puVar7 = (uint *)((longlong)iVar4 * 0x20 + *(longlong *)(param_1 + 0x20));
      puVar7[1] = 0;
      puVar7[2] = 0;
      *(int *)(param_1 + 0x28) = iVar4 + 1;
      *puVar7 = 0x43;
      uVar3 = FUN_140009c60(param_1);
      puVar7[4] = uVar3;
    }
    else {
      puVar7 = (uint *)0x0;
    }
    uVar3 = 0x16;
    break;
  case 'T':
    if (pcVar2[2] == '\0') {
LAB_14000d320:
      puVar9 = FUN_14000da60(param_1,0,param_3,param_4);
    }
    else {
      pcVar11 = pcVar2 + 3;
      *(char **)(param_1 + 0x18) = pcVar11;
      cVar1 = pcVar2[3];
      if (pcVar2[2] == 'n') {
        if ((cVar1 == 'G') || (cVar1 == 'T')) {
          puVar9 = FUN_14000cfd0(param_1,pcVar11,param_3,param_4);
        }
        else {
          puVar9 = FUN_14000da60(param_1,0,param_3,param_4);
        }
        puVar7 = (uint *)0x0;
        uVar3 = 0x4b;
        break;
      }
      if ((cVar1 != 'G') && (cVar1 != 'T')) goto LAB_14000d320;
      puVar9 = FUN_14000cfd0(param_1,pcVar11,param_3,param_4);
    }
    puVar7 = (uint *)0x0;
    uVar3 = 0x4a;
    break;
  case 'V':
    puVar9 = FUN_14000d600(param_1,0,param_3,param_4);
    puVar7 = (uint *)0x0;
    uVar3 = 0x13;
  }
LAB_14000d09d:
  puVar9 = _text(param_1,uVar3,(longlong)puVar9,(longlong)puVar7);
  return puVar9;
}



uint * FUN_14000d600(longlong param_1,int param_2,undefined8 param_3,longlong param_4)

{
  char cVar1;
  char *pcVar2;
  int *piVar3;
  int iVar4;
  uint uVar5;
  uint *puVar6;
  byte *pbVar7;
  uint *puVar8;
  uint *puVar9;
  undefined8 uVar10;
  ulonglong uVar11;
  char *pcVar12;
  undefined4 *puVar13;
  uint *local_30;
  
  pcVar2 = *(char **)(param_1 + 0x18);
  cVar1 = *pcVar2;
  if (cVar1 == 'U') {
    local_30 = FUN_14000bab0(param_1,0,0,param_4);
    goto LAB_14000d6a8;
  }
  if (cVar1 < 'V') {
    if (cVar1 == 'N') {
      puVar8 = (uint *)0x1;
      *(char **)(param_1 + 0x18) = pcVar2 + 1;
      puVar6 = FUN_14000ccf0(param_1,(uint *)&local_30,1);
      if (puVar6 == (uint *)0x0) {
        return (uint *)0x0;
      }
      puVar9 = FUN_140009da0(param_1,(uint *)0x0);
      puVar8 = FUN_14000c3b0(param_1,1,puVar8,param_4);
      *(uint **)puVar6 = puVar8;
      if (puVar8 == (uint *)0x0) {
        return (uint *)0x0;
      }
      if (puVar9 != (uint *)0x0) {
        *(uint **)(puVar9 + 4) = local_30;
        local_30 = puVar9;
      }
      if (**(char **)(param_1 + 0x18) != 'E') {
        return (uint *)0x0;
      }
      *(char **)(param_1 + 0x18) = *(char **)(param_1 + 0x18) + 1;
      goto LAB_14000d6a8;
    }
    if (cVar1 != 'S') goto LAB_14000d790;
    puVar13 = (undefined4 *)0x0;
    if (pcVar2[1] == 't') {
      *(char **)(param_1 + 0x18) = pcVar2 + 2;
      iVar4 = *(int *)(param_1 + 0x28);
      if (iVar4 < *(int *)(param_1 + 0x2c)) {
        *(int *)(param_1 + 0x28) = iVar4 + 1;
        puVar13 = (undefined4 *)((longlong)iVar4 * 0x20 + *(longlong *)(param_1 + 0x20));
        *(undefined8 *)(puVar13 + 1) = 0;
        *puVar13 = 0;
        *(undefined **)(puVar13 + 4) = &DAT_1400c6867;
        puVar13[6] = 3;
      }
      *(int *)(param_1 + 0x48) = *(int *)(param_1 + 0x48) + 3;
      if (pcVar2[2] != 'S') {
        puVar6 = (uint *)0x0;
        goto LAB_14000d795;
      }
    }
    uVar11 = 0;
    puVar6 = FUN_14000a800(param_1,0);
    if (puVar6 == (uint *)0x0) {
      return (uint *)0x0;
    }
    if (*puVar6 - 0x53 < 2) goto LAB_14000d795;
    if (puVar13 != (undefined4 *)0x0) {
      return (uint *)0x0;
    }
    pbVar7 = *(byte **)(param_1 + 0x18);
    if (*pbVar7 != 0x49) {
      return puVar6;
    }
LAB_14000d676:
    *(byte **)(param_1 + 0x18) = pbVar7 + 1;
    puVar8 = FUN_14000c300(param_1,uVar11,puVar6,param_4);
    local_30 = puVar6;
  }
  else {
    if (cVar1 == 'Z') {
      *(char **)(param_1 + 0x18) = pcVar2 + 1;
      if ((pcVar2[1] == 'G') || (pcVar2[1] == 'T')) {
        puVar6 = FUN_14000cfd0(param_1,pcVar2,param_3,param_4);
      }
      else {
        puVar6 = FUN_14000da60(param_1,0,param_3,param_4);
      }
      if (puVar6 == (uint *)0x0) {
        return (uint *)0x0;
      }
      pcVar2 = *(char **)(param_1 + 0x18);
      if (*pcVar2 != 'E') {
        return (uint *)0x0;
      }
      *(char **)(param_1 + 0x18) = pcVar2 + 1;
      if (pcVar2[1] == 's') {
        *(char **)(param_1 + 0x18) = pcVar2 + 2;
        uVar10 = FUN_140009e00(param_1);
        if ((int)uVar10 == 0) {
          return (uint *)0x0;
        }
        iVar4 = *(int *)(param_1 + 0x28);
        if (*(int *)(param_1 + 0x2c) <= iVar4) goto LAB_14000d9d0;
        *(int *)(param_1 + 0x28) = iVar4 + 1;
        puVar8 = (uint *)((longlong)iVar4 * 0x20 + *(longlong *)(param_1 + 0x20));
        puVar8[1] = 0;
        puVar8[2] = 0;
        *puVar8 = 0;
        *(char **)(puVar8 + 4) = "string literal";
        puVar8[6] = 0xe;
      }
      else if (pcVar2[1] == 'd') {
        pcVar12 = pcVar2 + 2;
        *(char **)(param_1 + 0x18) = pcVar12;
        if (pcVar2[2] == '_') {
          uVar5 = 0;
        }
        else {
          if (pcVar2[2] == 'n') {
            return (uint *)0x0;
          }
          iVar4 = FUN_140009c60(param_1);
          uVar5 = iVar4 + 1;
          if ((int)uVar5 < 0) {
            return (uint *)0x0;
          }
          pcVar12 = *(char **)(param_1 + 0x18);
          if (*pcVar12 != '_') {
            return (uint *)0x0;
          }
        }
        *(char **)(param_1 + 0x18) = pcVar12 + 1;
        puVar9 = FUN_14000d600(param_1,0,param_3,param_4);
        if (((puVar9 != (uint *)0x0) && ((*puVar9 - 0x47 & 0xfffffffd) != 0)) &&
           (uVar10 = FUN_140009e00(param_1), (int)uVar10 == 0)) {
          return (uint *)0x0;
        }
        iVar4 = *(int *)(param_1 + 0x28);
        if (iVar4 < *(int *)(param_1 + 0x2c)) {
          puVar8 = (uint *)((longlong)iVar4 * 0x20 + *(longlong *)(param_1 + 0x20));
          puVar8[1] = 0;
          puVar8[2] = 0;
          *(int *)(param_1 + 0x28) = iVar4 + 1;
          *puVar8 = 0x48;
          puVar8[6] = uVar5;
          *(uint **)(puVar8 + 4) = puVar9;
        }
        else {
LAB_14000d9d0:
          puVar8 = (uint *)0x0;
        }
      }
      else {
        puVar8 = FUN_14000d600(param_1,0,param_3,param_4);
        if (puVar8 == (uint *)0x0) goto LAB_14000d9d0;
        if (((*puVar8 - 0x47 & 0xfffffffd) != 0) &&
           (uVar10 = FUN_140009e00(param_1), (int)uVar10 == 0)) {
          return (uint *)0x0;
        }
      }
      if ((*puVar6 == 3) && (piVar3 = *(int **)(puVar6 + 6), *piVar3 == 0x29)) {
        piVar3[4] = 0;
        piVar3[5] = 0;
      }
      local_30 = _text(param_1,2,(longlong)puVar6,(longlong)puVar8);
      goto LAB_14000d6a8;
    }
LAB_14000d790:
    puVar6 = (uint *)0x0;
    puVar13 = (undefined4 *)0x0;
LAB_14000d795:
    local_30 = FUN_14000bab0(param_1,(longlong)puVar13,(ulonglong)puVar6,param_4);
    pbVar7 = *(byte **)(param_1 + 0x18);
    if (*pbVar7 != 0x49) goto LAB_14000d6a8;
    if (local_30 == (uint *)0x0) {
      return (uint *)0x0;
    }
    iVar4 = *(int *)(param_1 + 0x38);
    if (*(int *)(param_1 + 0x3c) <= iVar4) {
      return (uint *)0x0;
    }
    param_4 = (longlong)iVar4;
    *(uint **)(*(longlong *)(param_1 + 0x30) + param_4 * 8) = local_30;
    *(int *)(param_1 + 0x38) = iVar4 + 1;
    uVar11 = (ulonglong)(*pbVar7 - 0x49);
    puVar6 = local_30;
    if ((byte)(*pbVar7 - 0x49) < 2) goto LAB_14000d676;
    puVar8 = (uint *)0x0;
  }
  local_30 = _text(param_1,4,(longlong)local_30,(longlong)puVar8);
LAB_14000d6a8:
  if (param_2 == 0) {
    return local_30;
  }
  if ((local_30 != (uint *)0x0) &&
     (iVar4 = *(int *)(param_1 + 0x38), iVar4 < *(int *)(param_1 + 0x3c))) {
    *(uint **)(*(longlong *)(param_1 + 0x30) + (longlong)iVar4 * 8) = local_30;
    *(int *)(param_1 + 0x38) = iVar4 + 1;
    return local_30;
  }
  return (uint *)0x0;
}



uint * FUN_14000da60(longlong param_1,int param_2,undefined8 param_3,longlong param_4)

{
  int *piVar1;
  uint *puVar2;
  uint *puVar3;
  uint uVar4;
  
  puVar2 = FUN_14000d600(param_1,0,param_3,param_4);
  if (puVar2 == (uint *)0x0) {
    return (uint *)0x0;
  }
  if ((param_2 != 0) && ((*(byte *)(param_1 + 0x10) & 1) == 0)) {
    uVar4 = *puVar2;
    while (uVar4 - 0x1c < 0x36) {
      if ((0x3400000000001fU >> ((ulonglong)(uVar4 - 0x1c) & 0x3f) & 1) == 0) {
        return puVar2;
      }
      puVar2 = *(uint **)(puVar2 + 4);
      uVar4 = *puVar2;
    }
    if (uVar4 == 2) {
      piVar1 = *(int **)(puVar2 + 6);
      while( true ) {
        if (piVar1 == (int *)0x0) {
          return (uint *)0x0;
        }
        if (0x35 < *piVar1 - 0x1cU) break;
        if ((0x3400000000001fU >> ((ulonglong)(*piVar1 - 0x1cU) & 0x3f) & 1) == 0) {
          return puVar2;
        }
        piVar1 = *(int **)(piVar1 + 4);
        *(int **)(puVar2 + 6) = piVar1;
      }
      return puVar2;
    }
    return puVar2;
  }
  if (**(char **)(param_1 + 0x18) == '\0') {
    return puVar2;
  }
  puVar3 = puVar2;
  if (**(char **)(param_1 + 0x18) == 'E') {
    return puVar2;
  }
  do {
    uVar4 = *puVar3;
    if (uVar4 == 4) {
      puVar3 = *(uint **)(puVar3 + 4);
      goto joined_r0x00014000db87;
    }
    if (uVar4 < 5) {
      if (uVar4 != 2) break;
      puVar3 = *(uint **)(puVar3 + 6);
    }
    else {
      if ((0x35 < uVar4 - 0x1c) ||
         ((0x3400000000001fU >> ((ulonglong)(uVar4 - 0x1c) & 0x3f) & 1) == 0)) break;
      puVar3 = *(uint **)(puVar3 + 4);
    }
  } while (puVar3 != (uint *)0x0);
LAB_14000db38:
  uVar4 = 0;
LAB_14000db3a:
  puVar3 = FUN_14000b680(param_1,uVar4);
  if (puVar3 == (uint *)0x0) {
    return (uint *)0x0;
  }
  if (((param_2 == 0) && (*puVar2 == 2)) && (*puVar3 == 0x29)) {
    puVar3[4] = 0;
    puVar3[5] = 0;
  }
  puVar2 = _text(param_1,3,(longlong)puVar2,(longlong)puVar3);
  return puVar2;
joined_r0x00014000db87:
  if (puVar3 == (uint *)0x0) goto LAB_14000dbb0;
  uVar4 = *puVar3;
  if (8 < uVar4) {
    uVar4 = (uint)(uVar4 != 0x35);
    goto LAB_14000db3a;
  }
  if (6 < uVar4) goto LAB_14000db38;
  if (1 < uVar4 - 1) goto LAB_14000dbb0;
  puVar3 = *(uint **)(puVar3 + 6);
  goto joined_r0x00014000db87;
LAB_14000dbb0:
  uVar4 = 1;
  goto LAB_14000db3a;
}



// WARNING: Type propagation algorithm not settling

void FUN_14000dbf0(undefined2 *param_1,undefined8 param_2,uint *param_3,longlong *param_4)

{
  byte bVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  uint *puVar4;
  byte *pbVar5;
  longlong *plVar6;
  longlong **pplVar7;
  longlong lVar8;
  undefined8 uVar9;
  longlong lVar10;
  longlong *plVar11;
  int *piVar12;
  size_t sVar13;
  uint *puVar14;
  uint *puVar15;
  undefined8 *puVar16;
  uint uVar17;
  undefined2 *puVar18;
  undefined1 uVar19;
  uint uVar20;
  ulonglong uVar21;
  longlong lVar22;
  char *pcVar23;
  longlong **pplVar24;
  undefined8 *puVar25;
  char cVar26;
  undefined8 unaff_RDI;
  char *pcVar27;
  undefined1 *puVar28;
  longlong **pplVar29;
  longlong *plVar30;
  int iVar31;
  longlong lVar32;
  undefined1 *puVar33;
  uint uVar34;
  int iVar35;
  longlong *local_c8;
  uint *puStack_c0;
  longlong *local_b8 [2];
  longlong local_a8;
  longlong *local_a0 [2];
  longlong alStack_90 [2];
  longlong *aplStack_80 [9];
  
  if (param_3 == (uint *)0x0) goto switchD_14000dc30_caseD_2c;
  if (*(int *)(param_1 + 0x98) != 0) {
    return;
  }
  uVar20 = *param_3;
  iVar31 = 0;
  plVar30 = param_4;
  switch(uVar20) {
  case 0:
    puVar28 = *(undefined1 **)(param_3 + 4);
    if ((longlong)(int)param_3[6] == 0) {
      return;
    }
    puVar33 = puVar28 + (int)param_3[6];
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != puVar33);
    return;
  case 1:
  case 2:
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    FUN_14000a2a0((longlong)param_1,"::");
    puVar14 = *(uint **)(param_3 + 6);
    if (*puVar14 == 0x48) {
      pplVar29 = local_b8;
      FUN_14000a2a0((longlong)param_1,"{default arg#");
      FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)(puVar14[6] + 1),param_4);
      sVar13 = strlen((char *)pplVar29);
      if (sVar13 != 0) {
        pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
        lVar32 = *(longlong *)(param_1 + 0x80);
        do {
          cVar26 = *(char *)pplVar29;
          if (lVar32 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar32 = 0;
          }
          else {
            lVar10 = lVar32 + 1;
          }
          pplVar29 = (longlong **)((longlong)pplVar29 + 1);
          *(longlong *)(param_1 + 0x80) = lVar10;
          *(char *)((longlong)param_1 + lVar32) = cVar26;
          *(char *)(param_1 + 0x84) = cVar26;
          lVar32 = lVar10;
        } while (pplVar24 != pplVar29);
      }
      FUN_14000a2a0((longlong)param_1,"}::");
      puVar14 = *(uint **)(puVar14 + 4);
    }
    goto LAB_14000dcac;
  case 3:
    puVar14 = *(uint **)(param_3 + 4);
    uVar9 = *(undefined8 *)(param_1 + 0x94);
    *(undefined8 *)(param_1 + 0x94) = 0;
    if (puVar14 != (uint *)0x0) {
      plVar30 = *(longlong **)(param_1 + 0x90);
      pplVar29 = local_b8;
      pplVar24 = (longlong **)0x0;
      uVar20 = 0;
      do {
        pplVar7 = pplVar29;
        *pplVar7 = (longlong *)pplVar24;
        uVar34 = uVar20 + 1;
        *(undefined4 *)(pplVar7 + 2) = 0;
        uVar17 = *puVar14;
        pplVar7[1] = (longlong *)puVar14;
        uVar21 = (ulonglong)(uVar17 - 0x1c);
        pplVar7[3] = plVar30;
        if ((0x35 < uVar17 - 0x1c) || ((0x3400000000001fU >> (uVar21 & 0x3f) & 1) == 0)) {
          *(longlong ***)(param_1 + 0x94) = pplVar7;
          if (uVar17 != 2) goto LAB_140010352;
          puVar14 = *(uint **)(puVar14 + 6);
          if ((*puVar14 == 0x48) && (puVar14 = *(uint **)(puVar14 + 4), puVar14 == (uint *)0x0))
          goto switchD_14000dc30_caseD_2c;
          pplVar29 = local_b8 + (ulonglong)uVar20 * 4;
          pplVar24 = local_b8 + (ulonglong)uVar34 * 4;
          goto LAB_140010a90;
        }
        puVar14 = *(uint **)(puVar14 + 4);
        if (puVar14 == (uint *)0x0) {
          *(longlong ***)(param_1 + 0x94) = pplVar7;
          goto switchD_14000dc30_caseD_2c;
        }
        pplVar29 = pplVar7 + 4;
        pplVar24 = pplVar7;
        uVar20 = uVar34;
      } while (uVar34 != 4);
      *(longlong ***)(param_1 + 0x94) = pplVar7;
    }
    goto switchD_14000dc30_caseD_2c;
  case 4:
    uVar9 = *(undefined8 *)(param_1 + 0xb8);
    uVar3 = *(undefined8 *)(param_1 + 0x94);
    *(uint **)(param_1 + 0xb8) = param_3;
    *(undefined8 *)(param_1 + 0x94) = 0;
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    if (*(char *)(param_1 + 0x84) == '<') {
      FUN_14000a1d0((longlong)param_1,0x20);
    }
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x3c;
    *(undefined1 *)(param_1 + 0x84) = 0x3c;
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),param_4);
    if (*(char *)(param_1 + 0x84) == '>') {
      FUN_14000a1d0((longlong)param_1,0x20);
    }
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x3e;
    *(undefined1 *)(param_1 + 0x84) = 0x3e;
    *(undefined8 *)(param_1 + 0x94) = uVar3;
    *(undefined8 *)(param_1 + 0xb8) = uVar9;
    return;
  case 5:
    uVar20 = param_3[4];
    if ((int)(uVar20 + 1) < *(int *)(param_1 + 0x9c)) {
      uVar17 = uVar20;
      for (piVar12 = *(int **)(*(longlong *)(*(longlong *)(param_1 + 0x90) + 8) + 0x10);
          piVar12 != (int *)0x0; piVar12 = *(int **)(piVar12 + 6)) {
        if (uVar17 == 0) {
          if (piVar12 == (int *)0x0) break;
          iVar31 = *piVar12;
          if (iVar31 == 0x5b) {
            if (*(int **)(piVar12 + 4) == (int *)0x0) break;
            iVar31 = **(int **)(piVar12 + 4);
          }
          FUN_14000a580((longlong)param_1,iVar31,uVar20,param_4);
          return;
        }
        uVar17 = uVar17 - 1;
      }
    }
    else {
      if (*(int *)(param_1 + 0x9c) != 0) {
        puVar28 = &DAT_1400c6889;
        lVar32 = *(longlong *)(param_1 + 0x80);
        do {
          uVar19 = *puVar28;
          if (lVar32 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar32 = 0;
          }
          else {
            lVar10 = lVar32 + 1;
          }
          puVar28 = puVar28 + 1;
          *(longlong *)(param_1 + 0x80) = lVar10;
          *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
          *(undefined1 *)(param_1 + 0x84) = uVar19;
          lVar32 = lVar10;
        } while (puVar28 != &DAT_1400c688e);
        pplVar29 = local_b8;
        FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)(param_3[4] + 1),param_4);
        sVar13 = strlen((char *)pplVar29);
        if (sVar13 == 0) {
          return;
        }
        pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
        lVar32 = *(longlong *)(param_1 + 0x80);
        do {
          cVar26 = *(char *)pplVar29;
          if (lVar32 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar32 = 0;
          }
          else {
            lVar10 = lVar32 + 1;
          }
          pplVar29 = (longlong **)((longlong)pplVar29 + 1);
          *(longlong *)(param_1 + 0x80) = lVar10;
          *(char *)((longlong)param_1 + lVar32) = cVar26;
          *(char *)(param_1 + 0x84) = cVar26;
          lVar32 = lVar10;
        } while (pplVar24 != pplVar29);
        return;
      }
      puVar18 = param_1;
      puVar14 = (uint *)FUN_14000a240((longlong)param_1,(longlong)param_3);
      if ((puVar14 != (uint *)0x0) &&
         (((*puVar14 != 0x2f || (*(int *)(puVar18 + 0x9e) < 0)) ||
          (puVar14 = (uint *)FUN_140009ff0((int *)puVar14,*(int *)(puVar18 + 0x9e)),
          puVar14 != (uint *)0x0)))) {
        puVar16 = *(undefined8 **)(param_1 + 0x90);
        *(undefined8 *)(param_1 + 0x90) = *puVar16;
        FUN_140011370(param_1,0x11,puVar14,param_4);
        *(undefined8 **)(param_1 + 0x90) = puVar16;
        return;
      }
    }
    goto switchD_14000dc30_caseD_2c;
  case 6:
    uVar20 = param_3[4];
    if (uVar20 != 0) {
      pplVar29 = local_b8;
      FUN_14000a2a0((longlong)param_1,"{parm#");
      FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)uVar20,param_4);
      sVar13 = strlen((char *)pplVar29);
      if (sVar13 != 0) {
        pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
        lVar32 = *(longlong *)(param_1 + 0x80);
        do {
          cVar26 = *(char *)pplVar29;
          if (lVar32 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar32 = 0;
          }
          else {
            lVar10 = lVar32 + 1;
          }
          pplVar29 = (longlong **)((longlong)pplVar29 + 1);
          *(longlong *)(param_1 + 0x80) = lVar10;
          *(char *)((longlong)param_1 + lVar32) = cVar26;
          *(char *)(param_1 + 0x84) = cVar26;
          lVar32 = lVar10;
        } while (pplVar24 != pplVar29);
      }
      uVar19 = 0x7d;
      goto LAB_14000dea6;
    }
    pcVar27 = "this";
    goto LAB_14000f248;
  case 7:
    goto switchD_14000dc30_caseD_7;
  case 8:
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x7e;
    *(undefined1 *)(param_1 + 0x84) = 0x7e;
    goto switchD_14000dc30_caseD_7;
  case 9:
    pcVar27 = "vtable for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 10:
    pcVar27 = "VTT for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0xb:
    pcVar27 = "construction vtable for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    puVar28 = &DAT_1400c68f5;
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != &DAT_1400c68f9);
    goto switchD_14000dc30_caseD_7;
  case 0xc:
    pcVar27 = "typeinfo for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0xd:
    pcVar27 = "typeinfo name for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0xe:
    pcVar27 = "typeinfo fn for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0xf:
    pcVar27 = "non-virtual thunk to ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x10:
    pcVar27 = "virtual thunk to ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x11:
    pcVar27 = "covariant return thunk to ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x12:
    pcVar27 = "java Class for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x13:
    pcVar27 = "guard variable for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x14:
    pcVar27 = "TLS init function for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x15:
    pcVar27 = "TLS wrapper function for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x16:
    pcVar27 = "reference temporary #";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    puVar28 = &DAT_1400c69da;
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),plVar30);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != &DAT_1400c69df);
    break;
  case 0x17:
    pcVar27 = "hidden alias for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x18:
    puVar28 = *(undefined1 **)(param_3 + 4);
    if ((longlong)(int)param_3[6] == 0) {
      return;
    }
    puVar33 = puVar28 + (int)param_3[6];
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar33 != puVar28);
    return;
  case 0x19:
  case 0x1a:
  case 0x1b:
    plVar30 = *(longlong **)(param_1 + 0x94);
    plVar11 = plVar30;
    if (plVar30 == (longlong *)0x0) {
      puVar14 = *(uint **)(param_3 + 4);
      goto LAB_14000e02b;
    }
    do {
      param_4 = plVar30;
      if ((int)plVar11[2] == 0) {
        if (2 < *(uint *)plVar11[1] - 0x19) break;
        if (uVar20 == *(uint *)plVar11[1]) goto switchD_14000dc30_caseD_28;
      }
      plVar11 = (longlong *)*plVar11;
    } while (plVar11 != (longlong *)0x0);
    goto LAB_14000dd07;
  case 0x1c:
  case 0x1d:
  case 0x1e:
  case 0x1f:
  case 0x20:
  case 0x21:
  case 0x22:
  case 0x25:
  case 0x26:
  case 0x4e:
  case 0x50:
  case 0x51:
    plVar30 = *(longlong **)(param_1 + 0x94);
LAB_14000dd07:
    *(longlong ***)(param_1 + 0x94) = local_b8;
    local_a0[0] = *(longlong **)(param_1 + 0x90);
    local_b8[0] = plVar30;
LAB_14000dd2f:
    plVar30 = param_4;
    puVar14 = *(uint **)(param_3 + 4);
    local_b8[1] = (longlong *)param_3;
LAB_14000dd38:
    plVar11 = local_b8[1];
    local_a8._0_4_ = 0;
    FUN_140011370(param_1,0x11,puVar14,plVar30);
    if ((int)local_a8 == 0) {
      FUN_140011410((undefined1 *)param_1,0x11,(undefined4 *)plVar11);
    }
    *(longlong **)(param_1 + 0x94) = local_b8[0];
    if (iVar31 == 0) {
      return;
    }
    *(undefined8 *)(param_1 + 0x90) = unaff_RDI;
    return;
  case 0x23:
  case 0x24:
    puVar15 = *(uint **)(param_3 + 4);
    iVar35 = *(int *)(param_1 + 0x9c);
    uVar17 = *puVar15;
    puVar14 = puVar15;
    if ((iVar35 == 0) && (iVar31 = 0, uVar17 == 5)) {
      iVar31 = *(int *)(param_1 + 0xac);
      if (0 < iVar31) {
        puVar16 = *(undefined8 **)(param_1 + 0xa8);
        puVar25 = puVar16 + (longlong)iVar31 * 2;
        do {
          if (puVar15 == (uint *)*puVar16) {
            puVar25 = *(undefined8 **)(param_1 + 0xa4);
            goto joined_r0x000140010db7;
          }
          puVar16 = puVar16 + 2;
        } while (puVar16 != puVar25);
      }
      if (*(int *)(param_1 + 0xae) <= iVar31) goto switchD_14000dc30_caseD_2c;
      plVar30 = *(longlong **)(param_1 + 0x90);
      puVar16 = (undefined8 *)((longlong)iVar31 * 0x10 + *(longlong *)(param_1 + 0xa8));
      *(int *)(param_1 + 0xac) = iVar31 + 1;
      puVar25 = puVar16 + 1;
      *puVar16 = puVar15;
      if (plVar30 != (longlong *)0x0) {
        uVar21 = (ulonglong)*(int *)(param_1 + 0xb4);
        iVar31 = *(int *)(param_1 + 0xb6);
        lVar32 = uVar21 << 4;
        puVar16 = puVar25;
        do {
          if (iVar31 <= (int)uVar21) goto switchD_14000dc30_caseD_2c;
          lVar10 = plVar30[1];
          uVar17 = (int)uVar21 + 1;
          uVar21 = (ulonglong)uVar17;
          *(uint *)(param_1 + 0xb4) = uVar17;
          puVar25 = (undefined8 *)(*(longlong *)(param_1 + 0xb0) + lVar32);
          lVar32 = lVar32 + 0x10;
          puVar25[1] = lVar10;
          *puVar16 = puVar25;
          plVar30 = (longlong *)*plVar30;
          puVar16 = puVar25;
        } while (plVar30 != (longlong *)0x0);
      }
      *puVar25 = 0;
LAB_140010ddf:
      iVar31 = iVar35;
      puVar15 = (uint *)FUN_14000a240((longlong)param_1,(longlong)puVar15);
      if (puVar15 == (uint *)0x0) goto switchD_14000dc30_caseD_2c;
      goto LAB_140010df6;
    }
    goto LAB_14000e009;
  case 0x27:
    lVar32 = (longlong)*(int *)(*(undefined8 **)(param_3 + 4) + 1);
    puVar28 = (undefined1 *)**(undefined8 **)(param_3 + 4);
    if (lVar32 == 0) {
      return;
    }
    puVar33 = puVar28 + lVar32;
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar33 != puVar28);
    return;
  case 0x28:
  case 0x59:
    break;
  case 0x29:
    puVar14 = *(uint **)(param_3 + 4);
    plVar30 = *(longlong **)(param_1 + 0x94);
    if (puVar14 != (uint *)0x0) {
      *(longlong ***)(param_1 + 0x94) = local_b8;
      local_a0[0] = *(longlong **)(param_1 + 0x90);
      local_a8._0_4_ = 0;
      local_b8[0] = plVar30;
      local_b8[1] = (longlong *)param_3;
      FUN_140011370(param_1,0x11,puVar14,plVar30);
      *(longlong **)(param_1 + 0x94) = local_b8[0];
      if ((int)local_a8 != 0) {
        return;
      }
      FUN_14000a1d0((longlong)param_1,0x20);
      plVar30 = *(longlong **)(param_1 + 0x94);
    }
    FUN_140011d00(param_1,0x11,(longlong)param_3,plVar30);
    return;
  case 0x2a:
    plVar30 = *(longlong **)(param_1 + 0x94);
    local_a0[0] = *(longlong **)(param_1 + 0x90);
    *(longlong ***)(param_1 + 0x94) = local_b8;
    uVar20 = 1;
    local_a8._0_4_ = 0;
    plVar11 = plVar30;
    pplVar29 = local_b8;
    local_b8[0] = plVar30;
    if (plVar30 == (longlong *)0x0) {
      local_b8[1] = (longlong *)param_3;
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),local_b8);
      *(undefined8 *)(param_1 + 0x94) = 0;
      if ((int)local_a8 != 0) {
        return;
      }
    }
    else {
      do {
        if (2 < *(int *)plVar11[1] - 0x19U) break;
        if ((int)plVar11[2] == 0) {
          if (3 < uVar20) goto switchD_14000dc30_caseD_2c;
          lVar32 = plVar11[1];
          uVar21 = (ulonglong)uVar20;
          uVar20 = uVar20 + 1;
          local_b8[uVar21 * 4] = (longlong *)*plVar11;
          (&local_a8)[uVar21 * 4 + -1] = lVar32;
          lVar32 = plVar11[2];
          plVar6 = (longlong *)plVar11[3];
          local_b8[uVar21 * 4] = (longlong *)pplVar29;
          pplVar29 = local_b8 + uVar21 * 4;
          *(longlong ***)(param_1 + 0x94) = pplVar29;
          (&local_a8)[uVar21 * 4] = lVar32;
          local_a0[uVar21 * 4] = plVar6;
          *(undefined4 *)(plVar11 + 2) = 1;
        }
        plVar11 = (longlong *)*plVar11;
      } while (plVar11 != (longlong *)0x0);
      local_b8[1] = (longlong *)param_3;
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),pplVar29);
      *(longlong **)(param_1 + 0x94) = plVar30;
      if ((int)local_a8 != 0) {
        return;
      }
      if (1 < uVar20) {
        uVar21 = (ulonglong)(uVar20 - 1);
        pplVar29 = local_b8 + uVar21 * 4;
        while( true ) {
          pplVar24 = pplVar29 + 1;
          pplVar29 = pplVar29 + -4;
          FUN_140011410((undefined1 *)param_1,0x11,(undefined4 *)*pplVar24);
          if ((int)uVar21 == 1) break;
          uVar21 = (ulonglong)((int)uVar21 - 1);
        }
      }
    }
    FUN_1400123d0(param_1,0x11,(longlong)param_3,*(longlong **)(param_1 + 0x94));
    return;
  case 0x2b:
  case 0x2d:
    local_b8[0] = *(longlong **)(param_1 + 0x94);
    puVar14 = *(uint **)(param_3 + 6);
    *(longlong ***)(param_1 + 0x94) = local_b8;
    local_a0[0] = *(longlong **)(param_1 + 0x90);
    local_a8._0_4_ = 0;
    local_b8[1] = (longlong *)param_3;
    FUN_140011370(param_1,0x11,puVar14,param_4);
    if ((int)local_a8 == 0) {
      FUN_140011410((undefined1 *)param_1,0x11,param_3);
    }
    *(longlong **)(param_1 + 0x94) = local_b8[0];
    return;
  default:
    goto switchD_14000dc30_caseD_2c;
  case 0x2e:
  case 0x2f:
    if (*(uint **)(param_3 + 4) != (uint *)0x0) {
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    }
    if (*(longlong *)(param_3 + 6) == 0) {
      return;
    }
    uVar21 = *(ulonglong *)(param_1 + 0x80);
    if (0xfd < uVar21) {
      *(undefined1 *)((longlong)param_1 + uVar21) = 0;
      (**(code **)(param_1 + 0x88))(param_1,uVar21,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      *(undefined8 *)(param_1 + 0x80) = 0;
    }
    FUN_14000a2a0((longlong)param_1,", ");
    iVar31 = *(int *)(param_1 + 0xa0);
    lVar32 = *(longlong *)(param_1 + 0x80);
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),param_4);
    if (*(int *)(param_1 + 0xa0) != iVar31) {
      return;
    }
    if (*(longlong *)(param_1 + 0x80) != lVar32) {
      return;
    }
    *(longlong *)(param_1 + 0x80) = *(longlong *)(param_1 + 0x80) + -2;
    return;
  case 0x30:
    pcVar27 = "template parameter object for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x31:
    puVar14 = *(uint **)(param_3 + 6);
    if (*(uint **)(param_3 + 4) != (uint *)0x0) {
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    }
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x7b;
    *(undefined1 *)(param_1 + 0x84) = 0x7b;
    FUN_140011370(param_1,0x11,puVar14,param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x7d;
    *(undefined1 *)(param_1 + 0x84) = 0x7d;
    return;
  case 0x32:
    lVar32 = *(longlong *)(param_3 + 4);
    pcVar27 = "operator";
    lVar22 = (longlong)*(int *)(lVar32 + 0x10);
    lVar10 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar10 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar8 = 1;
        lVar10 = 0;
      }
      else {
        lVar8 = lVar10 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar8;
      *(char *)((longlong)param_1 + lVar10) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar10 = lVar8;
    } while (pcVar27 != "");
    pcVar27 = *(char **)(lVar32 + 8);
    if ((byte)(*pcVar27 + 0x9fU) < 0x1a) {
      FUN_14000a1d0((longlong)param_1,0x20);
      pcVar27 = *(char **)(lVar32 + 8);
    }
    if (pcVar27[lVar22 + -1] == ' ') {
      lVar22 = lVar22 + -1;
    }
    if (lVar22 == 0) {
      return;
    }
    pcVar23 = pcVar27 + lVar22;
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar23 != pcVar27);
    return;
  case 0x33:
    pcVar27 = "operator ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    goto switchD_14000dc30_caseD_7;
  case 0x35:
    pcVar27 = "operator ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    if (*(uint **)(param_1 + 0xb8) != (uint *)0x0) {
      local_b8[0] = *(longlong **)(param_1 + 0x90);
      *(longlong ***)(param_1 + 0x90) = local_b8;
      local_b8[1] = (longlong *)*(uint **)(param_1 + 0xb8);
    }
    puVar14 = *(uint **)(param_3 + 4);
    if (*puVar14 != 4) {
      FUN_140011370(param_1,0x11,puVar14,param_4);
      if (*(longlong *)(param_1 + 0xb8) == 0) {
        return;
      }
      *(longlong **)(param_1 + 0x90) = local_b8[0];
      return;
    }
    FUN_140011370(param_1,0x11,*(uint **)(puVar14 + 4),param_4);
    if (*(longlong *)(param_1 + 0xb8) != 0) {
      *(longlong **)(param_1 + 0x90) = local_b8[0];
    }
    if (*(char *)(param_1 + 0x84) == '<') {
      FUN_14000a1d0((longlong)param_1,0x20);
    }
    FUN_14000a1d0((longlong)param_1,0x3c);
    FUN_140011370(param_1,0x11,*(uint **)(*(longlong *)(param_3 + 4) + 0x18),param_4);
    if (*(char *)(param_1 + 0x84) == '>') {
      FUN_14000a1d0((longlong)param_1,0x20);
    }
    FUN_14000a1d0((longlong)param_1,0x3e);
    return;
  case 0x36:
    piVar12 = *(int **)(param_3 + 4);
LAB_14000e5d3:
    FUN_1400126a0((longlong)param_1,0x11,piVar12);
    return;
  case 0x37:
    piVar12 = *(int **)(param_3 + 4);
    puVar14 = *(uint **)(param_3 + 6);
    if (*piVar12 == 0x32) {
      pbVar5 = (byte *)**(undefined8 **)(piVar12 + 4);
      bVar1 = *pbVar5;
      uVar20 = bVar1 - 0x61;
      if ((uVar20 == 0) && (uVar20 = pbVar5[1] - 100, uVar20 == 0)) {
        uVar20 = (uint)pbVar5[2];
      }
      if ((uVar20 == 0) && (*puVar14 == 3)) {
        if ((**(uint **)(puVar14 + 4) == 1) && (**(int **)(puVar14 + 6) == 0x29)) {
          puVar14 = *(uint **)(puVar14 + 4);
        }
      }
      else if (*puVar14 == 0x39) {
        FUN_140012d20((longlong)param_1,0x11,*(uint **)(puVar14 + 4));
        goto LAB_14000e5d3;
      }
      if (bVar1 == 0x73) {
        if ((pbVar5[1] == 0x5a) && (pbVar5[2] == 0)) {
          piVar12 = FUN_14000a340((longlong)param_1,(int *)puVar14);
          uVar20 = FUN_140009fc0(piVar12);
LAB_14001066b:
          FUN_14000a4d0((longlong)param_1,uVar20,param_3,param_4);
          return;
        }
        if (((bVar1 == 0x73) && (pbVar5[1] == 0x50)) && (param_3 = (uint *)0x0, pbVar5[2] == 0)) {
          do {
            if ((*puVar14 != 0x2f) || (piVar12 = *(int **)(puVar14 + 4), piVar12 == (int *)0x0))
            break;
            if (*piVar12 == 0x4c) {
              piVar12 = FUN_14000a340((longlong)param_1,*(int **)(piVar12 + 4));
              iVar31 = 0;
              for (; ((piVar12 != (int *)0x0 && (*piVar12 == 0x2f)) &&
                     (*(longlong *)(piVar12 + 4) != 0)); piVar12 = *(int **)(piVar12 + 6)) {
                iVar31 = iVar31 + 1;
              }
              uVar20 = (int)param_3 + iVar31;
            }
            else {
              uVar20 = (int)param_3 + 1;
            }
            param_3 = (uint *)(ulonglong)uVar20;
            puVar14 = *(uint **)(puVar14 + 6);
          } while (puVar14 != (uint *)0x0);
          uVar20 = (uint)param_3;
          goto LAB_14001066b;
        }
      }
      FUN_1400126a0((longlong)param_1,0x11,piVar12);
      if (((*pbVar5 == 0x67) && (pbVar5[1] == 0x73)) && (pbVar5[2] == 0)) goto LAB_14000dcac;
      if (((*pbVar5 == 0x73) && (pbVar5[1] == 0x74)) && (pbVar5[2] == 0)) {
        FUN_14000a1d0((longlong)param_1,0x28);
        FUN_140011370(param_1,0x11,puVar14,param_4);
        uVar19 = 0x29;
        goto LAB_14000dea6;
      }
    }
    else if (*piVar12 == 0x34) {
      FUN_14000a1d0((longlong)param_1,0x28);
      FUN_140011370(param_1,0x11,*(uint **)(piVar12 + 4),param_4);
      FUN_14000a1d0((longlong)param_1,0x29);
    }
    else {
      FUN_1400126a0((longlong)param_1,0x11,piVar12);
    }
LAB_14000e5ae:
    FUN_140012d20((longlong)param_1,0x11,puVar14);
    return;
  case 0x38:
    if (**(int **)(param_3 + 6) == 0x39) {
      pcVar27 = (char *)**(undefined8 **)(*(int **)(param_3 + 4) + 4);
      if ((pcVar27[1] == 'c') &&
         ((cVar26 = *pcVar27, (byte)(cVar26 + 0x8eU) < 2 || ((byte)(cVar26 + 0x9dU) < 2)))) {
        FUN_1400126a0((longlong)param_1,0x11,*(int **)(param_3 + 4));
        FUN_14000a1d0((longlong)param_1,0x3c);
        FUN_140011370(param_1,0x11,*(uint **)(*(longlong *)(param_3 + 6) + 0x10),param_4);
        FUN_14000a2a0((longlong)param_1,">(");
        FUN_140011370(param_1,0x11,*(uint **)(*(longlong *)(param_3 + 6) + 0x18),param_4);
        uVar19 = 0x29;
      }
      else {
        uVar9 = FUN_140012ec0((longlong)param_1,0x11,(longlong)param_3);
        if ((int)uVar9 != 0) {
          return;
        }
        uVar9 = FUN_140013250((longlong)param_1,0x11,param_3);
        if ((int)uVar9 != 0) {
          return;
        }
        piVar12 = *(int **)(param_3 + 4);
        if (((*piVar12 == 0x32) && (*(int *)(*(longlong *)(piVar12 + 4) + 0x10) == 1)) &&
           (**(char **)(*(longlong *)(piVar12 + 4) + 8) == '>')) {
          FUN_14000a1d0((longlong)param_1,0x28);
          piVar12 = *(int **)(param_3 + 4);
        }
        iVar31 = strcmp((char *)**(undefined8 **)(piVar12 + 4),"cl");
        puVar14 = *(uint **)(*(longlong *)(param_3 + 6) + 0x10);
        if ((iVar31 == 0) && (*puVar14 == 3)) {
          if (**(int **)(puVar14 + 6) != 0x29) {
            *(undefined4 *)(param_1 + 0x98) = 1;
          }
          FUN_140012d20((longlong)param_1,0x11,*(uint **)(puVar14 + 4));
        }
        else {
          FUN_140012d20((longlong)param_1,0x11,puVar14);
        }
        piVar12 = *(int **)(param_3 + 4);
        pcVar27 = (char *)**(undefined8 **)(piVar12 + 4);
        iVar31 = strcmp(pcVar27,"ix");
        if (iVar31 == 0) {
          FUN_14000a1d0((longlong)param_1,0x5b);
          FUN_140011370(param_1,0x11,*(uint **)(*(longlong *)(param_3 + 6) + 0x18),param_4);
          FUN_14000a1d0((longlong)param_1,0x5d);
        }
        else {
          iVar31 = strcmp(pcVar27,"cl");
          if (iVar31 != 0) {
            FUN_1400126a0((longlong)param_1,0x11,piVar12);
          }
          FUN_140012d20((longlong)param_1,0x11,*(uint **)(*(longlong *)(param_3 + 6) + 0x18));
        }
        if (**(int **)(param_3 + 4) != 0x32) {
          return;
        }
        lVar32 = *(longlong *)(*(int **)(param_3 + 4) + 4);
        if (*(int *)(lVar32 + 0x10) != 1) {
          return;
        }
        uVar19 = 0x29;
        if (**(char **)(lVar32 + 8) != '>') {
          return;
        }
      }
      goto LAB_14000dea6;
    }
    goto switchD_14000dc30_caseD_2c;
  case 0x3a:
    if ((**(int **)(param_3 + 6) == 0x3b) && (**(int **)(*(int **)(param_3 + 6) + 6) == 0x3c)) {
      uVar9 = FUN_140012ec0((longlong)param_1,0x11,(longlong)param_3);
      if ((int)uVar9 != 0) {
        return;
      }
      uVar9 = FUN_140013250((longlong)param_1,0x11,param_3);
      if ((int)uVar9 != 0) {
        return;
      }
      piVar12 = *(int **)(param_3 + 4);
      puVar15 = *(uint **)(*(longlong *)(param_3 + 6) + 0x10);
      lVar32 = *(longlong *)(*(longlong *)(param_3 + 6) + 0x18);
      puVar4 = *(uint **)(lVar32 + 0x10);
      puVar14 = *(uint **)(lVar32 + 0x18);
      iVar31 = strcmp((char *)**(undefined8 **)(piVar12 + 4),"qu");
      if (iVar31 == 0) {
        FUN_140012d20((longlong)param_1,0x11,puVar15);
        FUN_1400126a0((longlong)param_1,0x11,piVar12);
        FUN_140012d20((longlong)param_1,0x11,puVar4);
        FUN_14000a2a0((longlong)param_1," : ");
      }
      else {
        FUN_14000a2a0((longlong)param_1,"new ");
        if (*(longlong *)(puVar15 + 4) != 0) {
          FUN_140012d20((longlong)param_1,0x11,puVar15);
          FUN_14000a1d0((longlong)param_1,0x20);
        }
        FUN_140011370(param_1,0x11,puVar4,param_4);
        if (puVar14 == (uint *)0x0) {
          return;
        }
      }
      goto LAB_14000e5ae;
    }
switchD_14000dc30_caseD_2c:
    *(undefined4 *)(param_1 + 0x98) = 1;
    return;
  case 0x3d:
  case 0x3e:
    puVar14 = *(uint **)(param_3 + 4);
    if (*puVar14 != 0x27) {
      uVar17 = 0;
LAB_14000de12:
      lVar32 = *(longlong *)(param_1 + 0x80);
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        puVar14 = *(uint **)(param_3 + 4);
        lVar32 = 0;
        lVar10 = 1;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = 0x28;
      *(undefined1 *)(param_1 + 0x84) = 0x28;
      FUN_140011370(param_1,0x11,puVar14,param_4);
      lVar32 = *(longlong *)(param_1 + 0x80);
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = 0x29;
      *(undefined1 *)(param_1 + 0x84) = 0x29;
      if (*param_3 == 0x3e) {
        FUN_14000a1d0((longlong)param_1,0x2d);
      }
      if (uVar17 == 8) {
        FUN_14000a1d0((longlong)param_1,0x5b);
        FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),param_4);
        uVar19 = 0x5d;
        goto LAB_14000dea6;
      }
      goto switchD_14000dc30_caseD_7;
    }
    uVar17 = *(uint *)(*(longlong *)(puVar14 + 4) + 0x1c);
    if (6 < uVar17) {
      if ((((uVar17 == 7) && (piVar12 = *(int **)(param_3 + 6), *piVar12 == 0)) && (piVar12[6] == 1)
          ) && (uVar20 == 0x3d)) {
        if (**(char **)(piVar12 + 4) == '0') {
          pcVar27 = "false";
          goto LAB_14000f248;
        }
        if (**(char **)(piVar12 + 4) == '1') {
          pcVar27 = "true";
          goto LAB_14000f248;
        }
      }
      goto LAB_14000de12;
    }
    if (uVar17 == 0) goto LAB_14000de12;
    puVar15 = *(uint **)(param_3 + 6);
    param_4 = (longlong *)(ulonglong)*puVar15;
    if (*puVar15 != 0) goto LAB_14000de12;
    if (uVar20 == 0x3e) {
      FUN_14000a1d0((longlong)param_1,0x2d);
      puVar15 = *(uint **)(param_3 + 6);
    }
    FUN_140011370(param_1,0x11,puVar15,param_4);
    switch(uVar17) {
    case 2:
      uVar19 = 0x75;
      goto LAB_14000dea6;
    case 3:
      uVar19 = 0x6c;
LAB_14000dea6:
      FUN_14000a1d0((longlong)param_1,uVar19);
      return;
    case 4:
      pcVar27 = "ul";
      break;
    case 5:
      pcVar27 = "ll";
      break;
    case 6:
      pcVar27 = "ull";
      break;
    default:
      goto switchD_140011149_default;
    }
    goto LAB_14000f248;
  case 0x3f:
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x28;
    *(undefined1 *)(param_1 + 0x84) = 0x28;
    puVar14 = *(uint **)(param_3 + 6);
    goto LAB_14000f536;
  case 0x40:
    pcVar27 = "java resource ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x41:
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    goto switchD_14000dc30_caseD_7;
  case 0x42:
    cVar26 = (char)param_3[4];
    goto LAB_14000f962;
  case 0x43:
    pplVar29 = local_b8;
    FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)param_3[4],param_4);
    sVar13 = strlen((char *)pplVar29);
    if (sVar13 == 0) {
      return;
    }
    pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *(char *)pplVar29;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pplVar29 = (longlong **)((longlong)pplVar29 + 1);
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pplVar24 != pplVar29);
    return;
  case 0x44:
    pcVar27 = "decltype (";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    puVar14 = *(uint **)(param_3 + 4);
LAB_14000f536:
    FUN_140011370(param_1,0x11,puVar14,param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x29;
    *(undefined1 *)(param_1 + 0x84) = 0x29;
    return;
  case 0x45:
    pcVar27 = "global constructors keyed to ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x46:
    pcVar27 = "global destructors keyed to ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x47:
    puVar28 = &DAT_1400c6ac6;
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != &DAT_1400c6acd);
    local_c8 = *(longlong **)(param_1 + 0x90);
    puVar14 = *(uint **)(param_3 + 4);
    puStack_c0 = (uint *)0x0;
    uVar2 = *(undefined4 *)(param_1 + 0x9c);
    *(undefined4 *)(param_1 + 0x9c) = 0;
    *(longlong ***)(param_1 + 0x90) = &local_c8;
    iVar31 = 1;
    if ((puVar14 != (uint *)0x0) && (*puVar14 == 0x57)) {
      puStack_c0 = puVar14;
      FUN_14000a1d0((longlong)param_1,0x3c);
      for (puVar15 = *(uint **)(puVar14 + 4); puVar15 != (uint *)0x0;
          puVar15 = *(uint **)(puVar15 + 6)) {
        iVar31 = *(int *)(param_1 + 0x9c);
        *(int *)(param_1 + 0x9c) = iVar31 + 1;
        if (iVar31 != 0) {
          FUN_14000a2a0((longlong)param_1,", ");
        }
        FUN_140011370(param_1,0x11,puVar15,param_4);
        lVar32 = *(longlong *)(param_1 + 0x80);
        if (lVar32 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar10 = 1;
          lVar32 = 0;
        }
        else {
          lVar10 = lVar32 + 1;
        }
        *(longlong *)(param_1 + 0x80) = lVar10;
        *(undefined1 *)((longlong)param_1 + lVar32) = 0x20;
        *(undefined1 *)(param_1 + 0x84) = 0x20;
        uVar20 = *puVar15;
        if (uVar20 == 0x5b) {
          puVar15 = *(uint **)(puVar15 + 4);
          uVar20 = *puVar15;
        }
        FUN_14000a580((longlong)param_1,uVar20,*(int *)(param_1 + 0x9c) - 1,param_4);
      }
      FUN_14000a1d0((longlong)param_1,0x3e);
      puVar14 = *(uint **)(puVar14 + 6);
      iVar31 = *(int *)(param_1 + 0x9c) + 1;
      lVar10 = *(longlong *)(param_1 + 0x80);
    }
    *(int *)(param_1 + 0x9c) = iVar31;
    if (lVar10 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar32 = 1;
      lVar10 = 0;
    }
    else {
      lVar32 = lVar10 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar32;
    *(undefined1 *)((longlong)param_1 + lVar10) = 0x28;
    puVar28 = &DAT_1400c6ace;
    *(undefined1 *)(param_1 + 0x84) = 0x28;
    FUN_140011370(param_1,0x11,puVar14,param_4);
    *(undefined4 *)(param_1 + 0x9c) = uVar2;
    *(longlong **)(param_1 + 0x90) = local_c8;
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != &DAT_1400c6ad0);
    pplVar29 = local_b8;
    FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)(param_3[6] + 1),param_4);
    sVar13 = strlen((char *)pplVar29);
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (sVar13 != 0) {
      pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
      lVar10 = lVar32;
      do {
        cVar26 = *(char *)pplVar29;
        if (lVar10 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar32 = 1;
          lVar10 = 0;
        }
        else {
          lVar32 = lVar10 + 1;
        }
        pplVar29 = (longlong **)((longlong)pplVar29 + 1);
        *(longlong *)(param_1 + 0x80) = lVar32;
        *(char *)((longlong)param_1 + lVar10) = cVar26;
        *(char *)(param_1 + 0x84) = cVar26;
        lVar10 = lVar32;
      } while (pplVar24 != pplVar29);
    }
    goto LAB_14000fdd8;
  case 0x49:
    pcVar27 = "{unnamed type#";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    pplVar29 = local_b8;
    FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)(param_3[4] + 1),param_4);
    sVar13 = strlen((char *)pplVar29);
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (sVar13 != 0) {
      pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
      lVar10 = lVar32;
      do {
        cVar26 = *(char *)pplVar29;
        if (lVar10 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar32 = 1;
          lVar10 = 0;
        }
        else {
          lVar32 = lVar10 + 1;
        }
        pplVar29 = (longlong **)((longlong)pplVar29 + 1);
        *(longlong *)(param_1 + 0x80) = lVar32;
        *(char *)((longlong)param_1 + lVar10) = cVar26;
        *(char *)(param_1 + 0x84) = cVar26;
        lVar10 = lVar32;
      } while (pplVar29 != pplVar24);
    }
LAB_14000fdd8:
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x7d;
    *(undefined1 *)(param_1 + 0x84) = 0x7d;
    return;
  case 0x4a:
    pcVar27 = "transaction clone for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x4b:
    pcVar27 = "non-transaction clone for ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x4c:
    puVar14 = *(uint **)(param_3 + 4);
    if (*(int *)(param_1 + 0x9c) == 0) {
      iVar31 = 0;
      piVar12 = FUN_14000a340((longlong)param_1,(int *)puVar14);
      if (piVar12 != (int *)0x0) {
        while ((*piVar12 == 0x2f && (*(longlong *)(piVar12 + 4) != 0))) {
          piVar12 = *(int **)(piVar12 + 6);
          iVar31 = iVar31 + 1;
          if (piVar12 == (int *)0x0) {
LAB_14000f7b2:
            iVar35 = 0;
            while( true ) {
              *(int *)(param_1 + 0x9e) = iVar35;
              iVar35 = iVar35 + 1;
              FUN_140011370(param_1,0x11,puVar14,param_4);
              if (iVar35 == iVar31) break;
              puVar28 = &DAT_1400c6871;
              lVar32 = *(longlong *)(param_1 + 0x80);
              do {
                uVar19 = *puVar28;
                if (lVar32 == 0xff) {
                  *(undefined1 *)((longlong)param_1 + 0xff) = 0;
                  (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
                  *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
                  lVar10 = 1;
                  lVar32 = 0;
                }
                else {
                  lVar10 = lVar32 + 1;
                }
                puVar28 = puVar28 + 1;
                *(longlong *)(param_1 + 0x80) = lVar10;
                *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
                *(undefined1 *)(param_1 + 0x84) = uVar19;
                lVar32 = lVar10;
              } while (puVar28 != &DAT_1400c6873);
            }
            return;
          }
        }
        if (iVar31 == 0) {
          return;
        }
        goto LAB_14000f7b2;
      }
    }
    FUN_140012d20((longlong)param_1,0x11,puVar14);
    pcVar27 = "...";
LAB_14000f248:
    FUN_14000a2a0((longlong)param_1,pcVar27);
    return;
  case 0x4d:
    puVar28 = &DAT_1400c686b;
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != &DAT_1400c6870);
    goto LAB_14000fc58;
  case 0x4f:
    pcVar27 = " [clone ";
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
LAB_14000fc58:
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
LAB_14000fc70:
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x5d;
    *(undefined1 *)(param_1 + 0x84) = 0x5d;
    return;
  case 0x52:
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x5b;
    *(undefined1 *)(param_1 + 0x84) = 0x5b;
    while( true ) {
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
      param_3 = *(uint **)(param_3 + 6);
      lVar32 = *(longlong *)(param_1 + 0x80);
      if (param_3 == (uint *)0x0) break;
      puVar28 = &DAT_1400c6871;
      do {
        uVar19 = *puVar28;
        if (lVar32 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar10 = 1;
          lVar32 = 0;
        }
        else {
          lVar10 = lVar32 + 1;
        }
        puVar28 = puVar28 + 1;
        *(longlong *)(param_1 + 0x80) = lVar10;
        *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
        *(undefined1 *)(param_1 + 0x84) = uVar19;
        lVar32 = lVar10;
      } while (puVar28 != &DAT_1400c6873);
    }
    goto LAB_14000fc70;
  case 0x53:
  case 0x54:
    if (*(uint **)(param_3 + 4) == (uint *)0x0) {
      if (uVar20 == 0x54) goto LAB_14001059e;
    }
    else {
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
      if (*param_3 == 0x54) {
LAB_14001059e:
        uVar19 = 0x3a;
      }
      else {
        if (*(longlong *)(param_3 + 4) == 0) goto switchD_14000dc30_caseD_7;
        uVar19 = 0x2e;
      }
      lVar32 = *(longlong *)(param_1 + 0x80);
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
    }
switchD_14000dc30_caseD_7:
    puVar14 = *(uint **)(param_3 + 6);
    goto LAB_14000dcac;
  case 0x55:
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x40;
    *(undefined1 *)(param_1 + 0x84) = 0x40;
    puVar14 = *(uint **)(param_3 + 6);
    goto LAB_14000dcac;
  case 0x56:
    pcVar27 = "initializer for module ";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    break;
  case 0x57:
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    iVar31 = 0;
    *(undefined1 *)((longlong)param_1 + lVar32) = 0x3c;
    *(undefined1 *)(param_1 + 0x84) = 0x3c;
    for (puVar14 = *(uint **)(param_3 + 4); puVar14 != (uint *)0x0;
        puVar14 = *(uint **)(puVar14 + 6)) {
      if (iVar31 != 0) {
        puVar28 = &DAT_1400c6871;
        lVar32 = *(longlong *)(param_1 + 0x80);
        do {
          uVar19 = *puVar28;
          if (lVar32 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar32 = 0;
          }
          else {
            lVar10 = lVar32 + 1;
          }
          puVar28 = puVar28 + 1;
          *(longlong *)(param_1 + 0x80) = lVar10;
          *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
          *(undefined1 *)(param_1 + 0x84) = uVar19;
          lVar32 = lVar10;
        } while (puVar28 != &DAT_1400c6873);
      }
      iVar31 = iVar31 + 1;
      FUN_140011370(param_1,0x11,puVar14,param_4);
    }
    lVar10 = *(longlong *)(param_1 + 0x80);
    lVar32 = lVar10 + 1;
    if (lVar10 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar32 = 1;
      lVar10 = 0;
    }
    *(longlong *)(param_1 + 0x80) = lVar32;
    *(undefined1 *)((longlong)param_1 + lVar10) = 0x3e;
    *(undefined1 *)(param_1 + 0x84) = 0x3e;
    return;
  case 0x58:
    pcVar27 = "typename";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    return;
  case 0x5a:
    pcVar27 = "template";
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    pcVar27 = " class";
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      cVar26 = *pcVar27;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      pcVar27 = pcVar27 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(char *)((longlong)param_1 + lVar32) = cVar26;
      *(char *)(param_1 + 0x84) = cVar26;
      lVar32 = lVar10;
    } while (pcVar27 != "");
    return;
  case 0x5b:
    puVar28 = &DAT_1400c6a7b;
    FUN_140011370(param_1,0x11,*(uint **)(param_3 + 4),param_4);
    lVar32 = *(longlong *)(param_1 + 0x80);
    do {
      uVar19 = *puVar28;
      if (lVar32 == 0xff) {
        *(undefined1 *)((longlong)param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
        *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
        lVar10 = 1;
        lVar32 = 0;
      }
      else {
        lVar10 = lVar32 + 1;
      }
      puVar28 = puVar28 + 1;
      *(longlong *)(param_1 + 0x80) = lVar10;
      *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
      *(undefined1 *)(param_1 + 0x84) = uVar19;
      lVar32 = lVar10;
    } while (puVar28 != &DAT_1400c6a7e);
    return;
  case 0x5c:
    lVar32 = (longlong)*(int *)(*(undefined8 **)(param_3 + 4) + 1);
    puVar28 = (undefined1 *)**(undefined8 **)(param_3 + 4);
    if (lVar32 != 0) {
      puVar33 = puVar28 + lVar32;
      lVar32 = *(longlong *)(param_1 + 0x80);
      do {
        uVar19 = *puVar28;
        if (lVar32 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar10 = 1;
          lVar32 = 0;
        }
        else {
          lVar10 = lVar32 + 1;
        }
        puVar28 = puVar28 + 1;
        *(longlong *)(param_1 + 0x80) = lVar10;
        *(undefined1 *)((longlong)param_1 + lVar32) = uVar19;
        *(undefined1 *)(param_1 + 0x84) = uVar19;
        lVar32 = lVar10;
      } while (puVar28 != puVar33);
    }
    pplVar29 = local_b8;
    FUN_14000a100((char *)pplVar29,&DAT_1400c654c,(ulonglong)(uint)(int)(short)param_3[6],param_4);
    sVar13 = strlen((char *)pplVar29);
    if (sVar13 != 0) {
      pplVar24 = (longlong **)((longlong)pplVar29 + sVar13);
      lVar32 = *(longlong *)(param_1 + 0x80);
      do {
        cVar26 = *(char *)pplVar29;
        if (lVar32 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar10 = 1;
          lVar32 = 0;
        }
        else {
          lVar10 = lVar32 + 1;
        }
        pplVar29 = (longlong **)((longlong)pplVar29 + 1);
        *(longlong *)(param_1 + 0x80) = lVar10;
        *(char *)((longlong)param_1 + lVar32) = cVar26;
        *(char *)(param_1 + 0x84) = cVar26;
        lVar32 = lVar10;
      } while (pplVar24 != pplVar29);
    }
    cVar26 = *(char *)((longlong)param_3 + 0x1a);
    if (cVar26 == '\0') {
      return;
    }
LAB_14000f962:
    lVar32 = *(longlong *)(param_1 + 0x80);
    if (lVar32 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar10 = 1;
      lVar32 = 0;
    }
    else {
      lVar10 = lVar32 + 1;
    }
    *(longlong *)(param_1 + 0x80) = lVar10;
    *(char *)((longlong)param_1 + lVar32) = cVar26;
    *(char *)(param_1 + 0x84) = cVar26;
switchD_140011149_default:
    return;
  }
switchD_14000dc30_caseD_28:
  puVar14 = *(uint **)(param_3 + 4);
  param_4 = plVar30;
LAB_14000dcac:
  FUN_140011370(param_1,0x11,puVar14,param_4);
  return;
joined_r0x000140010db7:
  if (puVar25 == (undefined8 *)0x0) goto LAB_140011098;
  if (((uint *)*puVar25 == puVar15) ||
     (((uint *)*puVar25 == param_3 && (*(undefined8 **)(param_1 + 0xa4) != puVar25))))
  goto LAB_140010ddf;
  puVar25 = (undefined8 *)puVar25[1];
  goto joined_r0x000140010db7;
LAB_140011098:
  unaff_RDI = *(undefined8 *)(param_1 + 0x90);
  *(undefined8 *)(param_1 + 0x90) = puVar16[1];
  puVar15 = (uint *)FUN_14000a240((longlong)param_1,(longlong)puVar15);
  if (puVar15 == (uint *)0x0) {
LAB_140011350:
    *(undefined8 *)(param_1 + 0x90) = unaff_RDI;
    goto switchD_14000dc30_caseD_2c;
  }
  iVar31 = 1;
LAB_140010df6:
  uVar17 = *puVar15;
  if (uVar17 == 0x2f) {
    if (-1 < *(int *)(param_1 + 0x9e)) {
      iVar35 = iVar31;
      puVar15 = (uint *)FUN_140009ff0((int *)puVar15,*(int *)(param_1 + 0x9e));
      if (puVar15 == (uint *)0x0) {
        if (iVar35 == 0) goto switchD_14000dc30_caseD_2c;
        goto LAB_140011350;
      }
      uVar17 = *puVar15;
      goto LAB_14000e009;
    }
    plVar30 = *(longlong **)(param_1 + 0x94);
    if (uVar20 != 0x2f) goto LAB_14000e02b;
LAB_140010454:
    puVar14 = *(uint **)(puVar15 + 4);
    param_3 = puVar15;
LAB_14000e02b:
    *(longlong ***)(param_1 + 0x94) = local_b8;
    local_a0[0] = *(longlong **)(param_1 + 0x90);
    local_b8[0] = plVar30;
    local_b8[1] = (longlong *)param_3;
    goto LAB_14000dd38;
  }
LAB_14000e009:
  plVar30 = *(longlong **)(param_1 + 0x94);
  if ((uVar20 == uVar17) || (uVar17 == 0x23)) goto LAB_140010454;
  if (uVar17 != 0x24) goto LAB_14000e02b;
  puVar14 = *(uint **)(puVar15 + 4);
  *(longlong ***)(param_1 + 0x94) = local_b8;
  local_a0[0] = *(longlong **)(param_1 + 0x90);
  param_4 = plVar30;
  local_b8[0] = plVar30;
  local_b8[1] = (longlong *)param_3;
  if (puVar14 != (uint *)0x0) goto LAB_14000dd38;
  goto LAB_14000dd2f;
  while( true ) {
    plVar11 = *pplVar29;
    plVar6 = pplVar29[1];
    *(longlong ***)(param_1 + 0x94) = pplVar24;
    uVar34 = uVar34 + 1;
    *pplVar24 = plVar11;
    pplVar24[1] = plVar6;
    plVar11 = pplVar29[3];
    pplVar24[2] = pplVar29[2];
    pplVar24[3] = plVar11;
    pplVar29[1] = (longlong *)puVar14;
    *(undefined4 *)(pplVar29 + 2) = 0;
    pplVar29[3] = plVar30;
    pplVar29[4] = (longlong *)pplVar29;
    puVar14 = *(uint **)(puVar14 + 4);
    pplVar29 = pplVar29 + 4;
    pplVar24 = pplVar24 + 4;
    if (puVar14 == (uint *)0x0) break;
LAB_140010a90:
    uVar17 = *puVar14;
    uVar21 = (ulonglong)(uVar17 - 0x1c);
    if ((0x35 < uVar17 - 0x1c) || ((0x3400000000001fU >> (uVar21 & 0x3f) & 1) == 0)) {
LAB_140010352:
      if (uVar17 == 4) {
        *(longlong ***)(param_1 + 0x90) = &local_c8;
        local_c8 = plVar30;
        puStack_c0 = puVar14;
      }
      FUN_140011370(param_1,0x11,*(uint **)(param_3 + 6),uVar21);
      if (*puVar14 == 4) {
        *(longlong **)(param_1 + 0x90) = local_c8;
      }
      iVar31 = (int)(&local_a8)[(ulonglong)(uVar34 - 1) * 4];
      pplVar29 = local_b8 + (ulonglong)(uVar34 - 1) * 4;
      while( true ) {
        if (iVar31 == 0) {
          lVar32 = *(longlong *)(param_1 + 0x80);
          if (lVar32 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar32 = 0;
          }
          else {
            lVar10 = lVar32 + 1;
          }
          *(longlong *)(param_1 + 0x80) = lVar10;
          plVar30 = pplVar29[1];
          *(undefined1 *)((longlong)param_1 + lVar32) = 0x20;
          *(undefined1 *)(param_1 + 0x84) = 0x20;
          FUN_140011410((undefined1 *)param_1,0x11,(undefined4 *)plVar30);
        }
        if (pplVar29 == local_b8) break;
        iVar31 = *(int *)(pplVar29 + -2);
        pplVar29 = pplVar29 + -4;
      }
      *(undefined8 *)(param_1 + 0x94) = uVar9;
      return;
    }
    if (uVar34 == 4) break;
  }
  goto switchD_14000dc30_caseD_2c;
}



void FUN_140011370(undefined2 *param_1,undefined8 param_2,uint *param_3,undefined8 param_4)

{
  int iVar1;
  uint *local_28;
  undefined8 uStack_20;
  
  if (((param_3 != (uint *)0x0) && ((int)param_3[1] < 2)) &&
     (iVar1 = *(int *)(param_1 + 0x9a), iVar1 < 0x401)) {
    param_3[1] = param_3[1] + 1;
    uStack_20 = *(undefined8 *)(param_1 + 0xa4);
    *(int *)(param_1 + 0x9a) = iVar1 + 1;
    *(uint ***)(param_1 + 0xa4) = &local_28;
    local_28 = param_3;
    FUN_14000dbf0(param_1,0x11,param_3,param_4);
    *(undefined8 *)(param_1 + 0xa4) = uStack_20;
    param_3[1] = param_3[1] - 1;
    *(int *)(param_1 + 0x9a) = *(int *)(param_1 + 0x9a) + -1;
    return;
  }
  *(undefined4 *)(param_1 + 0x98) = 1;
  return;
}



void FUN_140011410(undefined1 *param_1,undefined8 param_2,undefined4 *param_3)

{
  char cVar1;
  undefined1 uVar2;
  longlong lVar3;
  longlong lVar4;
  undefined1 *puVar5;
  char *pcVar6;
  uint *puVar7;
  undefined8 in_R9;
  
  switch(*param_3) {
  case 3:
    param_3 = *(undefined4 **)(param_3 + 4);
    goto LAB_140011443;
  default:
    goto LAB_140011443;
  case 0x19:
  case 0x1c:
    pcVar6 = " restrict";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    break;
  case 0x1a:
  case 0x1d:
    pcVar6 = " volatile";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    break;
  case 0x1b:
  case 0x1e:
    pcVar6 = " const";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    break;
  case 0x1f:
    lVar3 = *(longlong *)(param_1 + 0x100);
    if (lVar3 != 0xff) {
      lVar4 = lVar3 + 1;
      *(longlong *)(param_1 + 0x100) = lVar4;
      param_1[lVar3] = 0x20;
      param_1[0x108] = 0x20;
      goto LAB_1400116ef;
    }
    param_1[0xff] = 0;
    (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
    *param_1 = 0x20;
    lVar4 = 1;
    *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
LAB_1400116fb:
    lVar3 = lVar4 + 1;
    goto LAB_1400116ff;
  case 0x20:
    lVar3 = *(longlong *)(param_1 + 0x100);
    if (lVar3 == 0xff) {
      param_1[0xff] = 0;
      (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
      *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
      lVar4 = 1;
      lVar3 = 0;
    }
    else {
      lVar4 = lVar3 + 1;
    }
    *(longlong *)(param_1 + 0x100) = lVar4;
    param_1[lVar3] = 0x20;
    param_1[0x108] = 0x20;
    goto LAB_140011727;
  case 0x21:
    lVar4 = *(longlong *)(param_1 + 0x100);
    if (lVar4 == 0xff) {
      param_1[0xff] = 0;
      (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
      *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
      lVar3 = 1;
      lVar4 = 0;
    }
    else {
      lVar3 = lVar4 + 1;
    }
    *(longlong *)(param_1 + 0x100) = lVar3;
    param_1[lVar4] = 0x20;
    param_1[0x108] = 0x20;
    param_3 = *(undefined4 **)(param_3 + 6);
LAB_140011443:
    FUN_140011370((undefined2 *)param_1,0x11,param_3,in_R9);
    return;
  case 0x22:
    lVar4 = *(longlong *)(param_1 + 0x100);
    if (lVar4 == 0xff) {
      param_1[0xff] = 0;
      (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
      *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
      lVar3 = 1;
      lVar4 = 0;
    }
    else {
      lVar3 = lVar4 + 1;
    }
    *(longlong *)(param_1 + 0x100) = lVar3;
    param_1[lVar4] = 0x2a;
    param_1[0x108] = 0x2a;
    break;
  case 0x23:
    lVar4 = *(longlong *)(param_1 + 0x100);
LAB_1400116ef:
    if (lVar4 != 0xff) goto LAB_1400116fb;
    param_1[0xff] = 0;
    (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
    *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
    lVar3 = 1;
    lVar4 = 0;
LAB_1400116ff:
    *(longlong *)(param_1 + 0x100) = lVar3;
    param_1[lVar4] = 0x26;
    param_1[0x108] = 0x26;
    break;
  case 0x24:
    lVar4 = *(longlong *)(param_1 + 0x100);
LAB_140011727:
    puVar5 = &DAT_1400c6cca;
    do {
      uVar2 = *puVar5;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      puVar5 = puVar5 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = uVar2;
      param_1[0x108] = uVar2;
      lVar4 = lVar3;
    } while (puVar5 != &DAT_1400c6ccc);
    break;
  case 0x25:
    pcVar6 = " _Complex";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    break;
  case 0x26:
    pcVar6 = " _Imaginary";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    break;
  case 0x2b:
    if (param_1[0x108] != '(') {
      lVar4 = *(longlong *)(param_1 + 0x100);
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = 0x20;
      param_1[0x108] = 0x20;
    }
    puVar5 = &DAT_1400c6ce3;
    FUN_140011370((undefined2 *)param_1,0x11,*(uint **)(param_3 + 4),in_R9);
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      uVar2 = *puVar5;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      puVar5 = puVar5 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = uVar2;
      param_1[0x108] = uVar2;
      lVar4 = lVar3;
    } while (puVar5 != &DAT_1400c6ce6);
    break;
  case 0x2d:
    pcVar6 = " __vector(";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    puVar7 = *(uint **)(param_3 + 4);
    goto LAB_140011ac4;
  case 0x4e:
    pcVar6 = " transaction_safe";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    break;
  case 0x50:
    pcVar6 = " noexcept";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
    goto LAB_140011a88;
  case 0x51:
    pcVar6 = " throw";
    lVar4 = *(longlong *)(param_1 + 0x100);
    do {
      cVar1 = *pcVar6;
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      pcVar6 = pcVar6 + 1;
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = cVar1;
      param_1[0x108] = cVar1;
      lVar4 = lVar3;
    } while (pcVar6 != "");
LAB_140011a88:
    puVar7 = *(uint **)(param_3 + 6);
    if (puVar7 != (uint *)0x0) {
      if (lVar3 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        puVar7 = *(uint **)(param_3 + 6);
        lVar3 = 0;
        lVar4 = 1;
      }
      else {
        lVar4 = lVar3 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar4;
      param_1[lVar3] = 0x28;
      param_1[0x108] = 0x28;
LAB_140011ac4:
      FUN_140011370((undefined2 *)param_1,0x11,puVar7,in_R9);
      lVar4 = *(longlong *)(param_1 + 0x100);
      if (lVar4 == 0xff) {
        param_1[0xff] = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar4 = 0;
      }
      else {
        lVar3 = lVar4 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar3;
      param_1[lVar4] = 0x29;
      param_1[0x108] = 0x29;
      return;
    }
  }
  return;
}



void FUN_140011d00(undefined2 *param_1,undefined8 param_2,longlong param_3,undefined8 *param_4)

{
  undefined8 *puVar1;
  longlong lVar2;
  byte bVar3;
  ulonglong uVar4;
  longlong lVar5;
  undefined8 uVar6;
  uint *puVar7;
  undefined8 uVar8;
  
  for (puVar1 = param_4; (puVar1 != (undefined8 *)0x0 && (*(int *)(puVar1 + 2) == 0));
      puVar1 = (undefined8 *)*puVar1) {
    if (*(uint *)puVar1[1] < 0x2c) {
      uVar4 = 1L << ((byte)*(uint *)puVar1[1] & 0x3f);
      if ((uVar4 & 0x8620e000000) != 0) {
        bVar3 = *(byte *)(param_1 + 0x84);
LAB_140011f27:
        lVar2 = *(longlong *)(param_1 + 0x80);
        if (bVar3 == 0x20) {
joined_r0x000140011f62:
          if (lVar2 != 0xff) goto LAB_140011d90;
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar5 = 1;
          lVar2 = 0;
        }
        else {
          if (lVar2 != 0xff) {
            *(longlong *)(param_1 + 0x80) = lVar2 + 1;
            *(undefined1 *)((longlong)param_1 + lVar2) = 0x20;
            *(undefined1 *)(param_1 + 0x84) = 0x20;
            lVar2 = lVar2 + 1;
            goto joined_r0x000140011f62;
          }
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(undefined1 *)param_1 = 0x20;
          lVar2 = 1;
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
LAB_140011d90:
          lVar5 = lVar2 + 1;
        }
        *(longlong *)(param_1 + 0x80) = lVar5;
        uVar8 = 0;
        *(undefined1 *)((longlong)param_1 + lVar2) = 0x28;
        uVar6 = *(undefined8 *)(param_1 + 0x94);
        *(undefined1 *)(param_1 + 0x84) = 0x28;
        *(undefined8 *)(param_1 + 0x94) = 0;
        FUN_140012030(param_1,0x11,param_4,0);
        lVar2 = *(longlong *)(param_1 + 0x80);
        if (lVar2 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(undefined1 *)param_1 = 0x29;
          lVar5 = 1;
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          goto LAB_140011e01;
        }
        lVar5 = lVar2 + 1;
        *(longlong *)(param_1 + 0x80) = lVar5;
        *(undefined1 *)((longlong)param_1 + lVar2) = 0x29;
        *(undefined1 *)(param_1 + 0x84) = 0x29;
        goto joined_r0x000140011ec3;
      }
      if ((uVar4 & 0x1c00000000) != 0) {
        bVar3 = *(byte *)(param_1 + 0x84);
        if ((bVar3 & 0xfd) != 0x28) goto LAB_140011f27;
        lVar2 = *(longlong *)(param_1 + 0x80);
        goto joined_r0x000140011f62;
      }
    }
  }
  uVar6 = *(undefined8 *)(param_1 + 0x94);
  uVar8 = 0;
  *(undefined8 *)(param_1 + 0x94) = 0;
  FUN_140012030(param_1,0x11,param_4,0);
  lVar5 = *(longlong *)(param_1 + 0x80);
joined_r0x000140011ec3:
  if (lVar5 == 0xff) {
    *(undefined1 *)((longlong)param_1 + 0xff) = 0;
    (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
    *(undefined1 *)param_1 = 0x28;
    *(undefined1 *)(param_1 + 0x84) = 0x28;
    puVar7 = *(uint **)(param_3 + 0x18);
    *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
    *(undefined8 *)(param_1 + 0x80) = 1;
    if (puVar7 != (uint *)0x0) {
LAB_140011e20:
      FUN_140011370(param_1,0x11,puVar7,uVar8);
      lVar2 = *(longlong *)(param_1 + 0x80);
      goto LAB_140011e34;
    }
    lVar2 = 1;
  }
  else {
LAB_140011e01:
    lVar2 = lVar5 + 1;
    *(longlong *)(param_1 + 0x80) = lVar2;
    *(undefined1 *)((longlong)param_1 + lVar5) = 0x28;
    *(undefined1 *)(param_1 + 0x84) = 0x28;
    puVar7 = *(uint **)(param_3 + 0x18);
    if (puVar7 != (uint *)0x0) goto LAB_140011e20;
LAB_140011e34:
    if (lVar2 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar5 = 1;
      lVar2 = 0;
      goto LAB_140011e44;
    }
  }
  lVar5 = lVar2 + 1;
LAB_140011e44:
  *(longlong *)(param_1 + 0x80) = lVar5;
  *(undefined1 *)((longlong)param_1 + lVar2) = 0x29;
  *(undefined1 *)(param_1 + 0x84) = 0x29;
  FUN_140012030(param_1,0x11,param_4,1);
  *(undefined8 *)(param_1 + 0x94) = uVar6;
  return;
}



void FUN_140012030(undefined2 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 param_4)

{
  undefined1 uVar1;
  char cVar2;
  int iVar3;
  uint uVar4;
  int *piVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  uint *puVar8;
  longlong lVar9;
  longlong lVar10;
  size_t sVar11;
  char *pcVar12;
  undefined1 *puVar13;
  undefined8 uVar14;
  char *pcVar15;
  char local_58 [40];
  
  uVar14 = param_4;
  do {
    while( true ) {
      if ((param_3 == (undefined8 *)0x0) || (*(int *)(param_1 + 0x98) != 0)) {
        return;
      }
      if (*(int *)(param_3 + 2) == 0) break;
LAB_140012078:
      param_3 = (undefined8 *)*param_3;
    }
    piVar5 = (int *)param_3[1];
    iVar3 = *piVar5;
    if ((int)param_4 == 0) {
      if (iVar3 - 0x1cU < 0x36) {
        if ((0x3400000000001fU >> ((ulonglong)(iVar3 - 0x1cU) & 0x3f) & 1) != 0) goto LAB_140012078;
        goto LAB_14001209c;
      }
      *(undefined4 *)(param_3 + 2) = 1;
      uVar6 = *(undefined8 *)(param_1 + 0x90);
      *(undefined8 *)(param_1 + 0x90) = param_3[3];
    }
    else {
LAB_14001209c:
      *(undefined4 *)(param_3 + 2) = 1;
      uVar6 = *(undefined8 *)(param_1 + 0x90);
      *(undefined8 *)(param_1 + 0x90) = param_3[3];
      if (iVar3 == 0x29) {
        FUN_140011d00(param_1,0x11,(longlong)piVar5,(undefined8 *)*param_3);
        *(undefined8 *)(param_1 + 0x90) = uVar6;
        return;
      }
      if (iVar3 == 0x2a) {
        FUN_1400123d0(param_1,0x11,(longlong)piVar5,(longlong *)*param_3);
        *(undefined8 *)(param_1 + 0x90) = uVar6;
        return;
      }
    }
    if (iVar3 == 2) {
      uVar7 = *(undefined8 *)(param_1 + 0x94);
      puVar8 = *(uint **)(piVar5 + 4);
      *(undefined8 *)(param_1 + 0x94) = 0;
      FUN_140011370(param_1,0x11,puVar8,uVar14);
      *(undefined8 *)(param_1 + 0x94) = uVar7;
      puVar13 = &DAT_1400c6874;
      lVar10 = *(longlong *)(param_1 + 0x80);
      do {
        uVar1 = *puVar13;
        if (lVar10 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar9 = 1;
          lVar10 = 0;
        }
        else {
          lVar9 = lVar10 + 1;
        }
        puVar13 = puVar13 + 1;
        *(longlong *)(param_1 + 0x80) = lVar9;
        *(undefined1 *)((longlong)param_1 + lVar10) = uVar1;
        *(undefined1 *)(param_1 + 0x84) = uVar1;
        lVar10 = lVar9;
      } while (puVar13 != &DAT_1400c6876);
      puVar8 = *(uint **)(param_3[1] + 0x18);
      uVar4 = *puVar8;
      if (uVar4 == 0x48) {
        pcVar12 = "{default arg#";
        do {
          cVar2 = *pcVar12;
          if (lVar9 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar10 = 1;
            lVar9 = 0;
          }
          else {
            lVar10 = lVar9 + 1;
          }
          pcVar12 = pcVar12 + 1;
          *(longlong *)(param_1 + 0x80) = lVar10;
          *(char *)((longlong)param_1 + lVar9) = cVar2;
          *(char *)(param_1 + 0x84) = cVar2;
          lVar9 = lVar10;
        } while (pcVar12 != "");
        pcVar12 = local_58;
        FUN_14000a100(pcVar12,&DAT_1400c654c,(ulonglong)(puVar8[6] + 1),uVar14);
        sVar11 = strlen(pcVar12);
        lVar10 = *(longlong *)(param_1 + 0x80);
        if (sVar11 != 0) {
          pcVar15 = pcVar12 + sVar11;
          lVar9 = lVar10;
          do {
            cVar2 = *pcVar12;
            if (lVar9 == 0xff) {
              *(undefined1 *)((longlong)param_1 + 0xff) = 0;
              (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
              *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
              lVar10 = 1;
              lVar9 = 0;
            }
            else {
              lVar10 = lVar9 + 1;
            }
            pcVar12 = pcVar12 + 1;
            *(longlong *)(param_1 + 0x80) = lVar10;
            *(char *)((longlong)param_1 + lVar9) = cVar2;
            *(char *)(param_1 + 0x84) = cVar2;
            lVar9 = lVar10;
          } while (pcVar12 != pcVar15);
        }
        puVar13 = &DAT_1400c6885;
        do {
          uVar1 = *puVar13;
          if (lVar10 == 0xff) {
            *(undefined1 *)((longlong)param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
            *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
            lVar9 = 1;
            lVar10 = 0;
          }
          else {
            lVar9 = lVar10 + 1;
          }
          puVar13 = puVar13 + 1;
          *(longlong *)(param_1 + 0x80) = lVar9;
          *(undefined1 *)((longlong)param_1 + lVar10) = uVar1;
          *(undefined1 *)(param_1 + 0x84) = uVar1;
          lVar10 = lVar9;
        } while (puVar13 != &DAT_1400c6888);
        puVar8 = *(uint **)(puVar8 + 4);
        uVar4 = *puVar8;
      }
      while ((uVar4 - 0x1c < 0x36 &&
             ((0x3400000000001fU >> ((ulonglong)(uVar4 - 0x1c) & 0x3f) & 1) != 0))) {
        puVar8 = *(uint **)(puVar8 + 4);
        uVar4 = *puVar8;
      }
      FUN_140011370(param_1,0x11,puVar8,uVar14);
      *(undefined8 *)(param_1 + 0x90) = uVar6;
      return;
    }
    FUN_140011410((undefined1 *)param_1,0x11,piVar5);
    param_3 = (undefined8 *)*param_3;
    *(undefined8 *)(param_1 + 0x90) = uVar6;
  } while( true );
}



void FUN_1400123d0(undefined2 *param_1,undefined8 param_2,longlong param_3,longlong *param_4)

{
  undefined1 uVar1;
  longlong *plVar2;
  longlong lVar3;
  longlong lVar4;
  undefined1 *puVar5;
  uint *puVar6;
  undefined8 uVar7;
  
  plVar2 = param_4;
  if (param_4 != (longlong *)0x0) {
LAB_140012404:
    if ((int)plVar2[2] != 0) goto LAB_1400123f8;
    if (*(int *)plVar2[1] != 0x2a) {
      puVar5 = &DAT_1400c6e30;
      lVar4 = *(longlong *)(param_1 + 0x80);
      do {
        uVar1 = *puVar5;
        if (lVar4 == 0xff) {
          *(undefined1 *)((longlong)param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
          *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
          lVar3 = 1;
          lVar4 = 0;
        }
        else {
          lVar3 = lVar4 + 1;
        }
        puVar5 = puVar5 + 1;
        *(longlong *)(param_1 + 0x80) = lVar3;
        *(undefined1 *)((longlong)param_1 + lVar4) = uVar1;
        *(undefined1 *)(param_1 + 0x84) = uVar1;
        lVar4 = lVar3;
      } while (puVar5 != &DAT_1400c6e32);
      uVar7 = 0;
      FUN_140012030(param_1,0x11,param_4,0);
      lVar4 = *(longlong *)(param_1 + 0x80);
      if (lVar4 != 0xff) {
        lVar3 = lVar4 + 1;
        *(longlong *)(param_1 + 0x80) = lVar3;
        *(undefined1 *)((longlong)param_1 + lVar4) = 0x29;
        *(undefined1 *)(param_1 + 0x84) = 0x29;
        goto joined_r0x000140012627;
      }
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      lVar4 = 2;
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      *param_1 = 0x2029;
      goto LAB_14001243f;
    }
    uVar7 = 0;
    FUN_140012030(param_1,0x11,param_4,0);
    lVar4 = *(longlong *)(param_1 + 0x80);
    goto joined_r0x000140012439;
  }
  uVar7 = 0;
LAB_1400124bb:
  lVar3 = *(longlong *)(param_1 + 0x80);
joined_r0x000140012627:
  if (lVar3 == 0xff) {
    *(undefined1 *)((longlong)param_1 + 0xff) = 0;
    (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
    *(undefined1 *)param_1 = 0x20;
    lVar4 = 1;
    *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
LAB_14001243f:
    lVar3 = lVar4 + 1;
    *(longlong *)(param_1 + 0x80) = lVar3;
    *(undefined1 *)((longlong)param_1 + lVar4) = 0x5b;
    *(undefined1 *)(param_1 + 0x84) = 0x5b;
    puVar6 = *(uint **)(param_3 + 0x10);
    if (puVar6 != (uint *)0x0) {
LAB_14001245e:
      FUN_140011370(param_1,0x11,puVar6,uVar7);
      lVar3 = *(longlong *)(param_1 + 0x80);
    }
    if (lVar3 == 0xff) {
      *(undefined1 *)((longlong)param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
      *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
      lVar4 = 1;
      lVar3 = 0;
      goto LAB_140012482;
    }
  }
  else {
    lVar4 = lVar3 + 1;
    *(longlong *)(param_1 + 0x80) = lVar4;
    *(undefined1 *)((longlong)param_1 + lVar3) = 0x20;
    *(undefined1 *)(param_1 + 0x84) = 0x20;
joined_r0x000140012439:
    if (lVar4 != 0xff) goto LAB_14001243f;
    *(undefined1 *)((longlong)param_1 + 0xff) = 0;
    (**(code **)(param_1 + 0x88))(param_1,0xff,*(undefined8 *)(param_1 + 0x8c));
    *(undefined1 *)param_1 = 0x5b;
    *(undefined1 *)(param_1 + 0x84) = 0x5b;
    puVar6 = *(uint **)(param_3 + 0x10);
    *(int *)(param_1 + 0xa0) = *(int *)(param_1 + 0xa0) + 1;
    *(undefined8 *)(param_1 + 0x80) = 1;
    if (puVar6 != (uint *)0x0) goto LAB_14001245e;
    lVar3 = 1;
  }
  lVar4 = lVar3 + 1;
LAB_140012482:
  *(longlong *)(param_1 + 0x80) = lVar4;
  *(undefined1 *)((longlong)param_1 + lVar3) = 0x5d;
  *(undefined1 *)(param_1 + 0x84) = 0x5d;
  return;
LAB_1400123f8:
  plVar2 = (longlong *)*plVar2;
  if (plVar2 == (longlong *)0x0) goto LAB_1400124a8;
  goto LAB_140012404;
LAB_1400124a8:
  uVar7 = 0;
  FUN_140012030(param_1,0x11,param_4,0);
  goto LAB_1400124bb;
}



void FUN_1400126a0(longlong param_1,undefined8 param_2,int *param_3)

{
  undefined1 uVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 *puVar4;
  undefined1 *puVar5;
  undefined8 in_R9;
  
  if (*param_3 != 0x32) {
    FUN_140011370((undefined2 *)param_1,0x11,(uint *)param_3,in_R9);
    return;
  }
  lVar3 = (longlong)*(int *)(*(longlong *)(param_3 + 4) + 0x10);
  puVar5 = *(undefined1 **)(*(longlong *)(param_3 + 4) + 8);
  if (lVar3 != 0) {
    puVar4 = puVar5 + lVar3;
    lVar3 = *(longlong *)(param_1 + 0x100);
    do {
      uVar1 = *puVar5;
      if (lVar3 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar2 = 1;
        lVar3 = 0;
      }
      else {
        lVar2 = lVar3 + 1;
      }
      puVar5 = puVar5 + 1;
      *(longlong *)(param_1 + 0x100) = lVar2;
      *(undefined1 *)(param_1 + lVar3) = uVar1;
      *(undefined1 *)(param_1 + 0x108) = uVar1;
      lVar3 = lVar2;
    } while (puVar5 != puVar4);
  }
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe

bool FUN_140012760(undefined *param_1,undefined *param_2,undefined8 param_3,undefined4 *param_4)

{
  longlong lVar1;
  longlong lVar2;
  bool bVar3;
  uint uVar4;
  code *pcVar5;
  undefined8 uVar6;
  char cVar7;
  int iVar8;
  int iVar9;
  size_t sVar10;
  longlong lVar11;
  undefined **ppuVar12;
  char *pcVar13;
  uint *puVar14;
  char *pcVar15;
  char *pcVar16;
  ulonglong uVar17;
  bool bVar18;
  undefined8 auStack_10270 [8197];
  undefined8 local_248;
  uint local_23c;
  uint *local_238;
  undefined **local_230;
  undefined *local_228;
  undefined *local_220;
  uint local_218;
  char *local_210;
  uint *local_208;
  undefined4 local_200;
  uint local_1fc;
  longlong local_1f8;
  undefined4 local_1f0;
  int local_1ec;
  undefined8 local_1e8;
  undefined8 local_1e0;
  undefined4 local_1d8;
  int local_1d4;
  undefined4 local_1d0;
  undefined2 local_1c8 [128];
  longlong local_c8;
  undefined1 local_c0;
  code *local_b8;
  undefined8 local_b0;
  undefined8 local_a8;
  undefined8 local_a0;
  undefined1 local_98 [16];
  undefined4 local_88;
  undefined8 local_80;
  longlong local_78;
  undefined8 local_70;
  longlong local_68;
  undefined8 local_60;
  undefined8 local_58;
  
  if ((*param_1 == '_') && (param_1[1] == 'Z')) {
    bVar3 = false;
    iVar8 = 1;
    pcVar13 = param_2;
  }
  else {
    pcVar13 = "_GLOBAL_";
    auStack_10270[0x2000] = 0x1400127a6;
    iVar8 = strncmp(param_1,"_GLOBAL_",8);
    if ((iVar8 == 0) && ((byte)((byte)param_1[8] - 0x24) < 0x3c)) {
      pcVar13 = (char *)0x800000000000401;
      iVar8 = 0;
      bVar3 = false;
      if ((0x800000000000401U >> ((ulonglong)((byte)param_1[8] - 0x24) & 0x3f) & 1) != 0) {
        cVar7 = param_1[9];
        bVar18 = cVar7 == 'I';
        pcVar13 = (char *)CONCAT71(0x8000000000004,bVar18);
        bVar3 = cVar7 == 'D' || bVar18;
        if (cVar7 == 'D' || bVar18) {
          if (param_1[10] == '_') {
            iVar8 = (cVar7 != 'I') + 2;
            bVar3 = cVar7 == 'I' && bVar3;
          }
          else {
            bVar3 = false;
          }
        }
      }
    }
    else {
      bVar3 = false;
      iVar8 = 0;
    }
  }
  local_248 = param_1 + 1;
  local_1d4 = 1;
  local_230 = &local_228;
  local_23c = ((int)((uint)bVar3 << 0x1f) >> 0x1f) + 0x46;
  do {
    auStack_10270[0x2000] = 0x1400128b3;
    sVar10 = strlen(param_1);
    ppuVar12 = local_230;
    local_220 = param_1 + sVar10;
    local_218 = 0x11;
    local_1ec = (int)sVar10;
    uVar4 = local_1ec * 2;
    local_200 = 0;
    local_1f0 = 0;
    local_1e8 = 0;
    local_1e0 = 0;
    local_1d8 = 0;
    local_1d0 = 0;
    if (0x800 < uVar4) {
      return false;
    }
    auStack_10270[0x2000] = 0x140012920;
    lVar1 = (ulonglong)uVar4 * -0x20;
    uVar17 = (longlong)&local_248 + lVar1 + 7;
    puVar14 = (uint *)(uVar17 & 0xfffffffffffffff8);
    uVar17 = uVar17 >> 3;
    auStack_10270[(ulonglong)uVar4 * -4 + 0x2000] = 0x140012947;
    lVar2 = -((longlong)local_1ec * 8 + 0xfU & 0xfffffffffffffff0);
    local_1f8 = (longlong)&local_248 + lVar2 + lVar1;
    local_228 = param_1;
    local_210 = param_1;
    local_208 = puVar14;
    local_1fc = uVar4;
    if (iVar8 == 1) {
      if ((*param_1 == '_') && (local_210 = local_248, param_1[1] == 'Z')) {
        local_210 = param_1 + 2;
        if ((param_1[2] == 'G') || (param_1[2] == 'T')) {
          *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012b5f;
          puVar14 = FUN_14000cfd0((longlong)&local_228,pcVar13,puVar14,param_4);
        }
        else {
          *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x1400129a9;
          puVar14 = FUN_14000da60((longlong)&local_228,1,puVar14,(longlong)param_4);
        }
        cVar7 = *local_210;
        pcVar13 = local_210;
        pcVar16 = local_210;
        if ((local_218 & 1) != 0) {
          while (cVar7 == '.') {
            cVar7 = pcVar16[1];
            if (((0x19 < (byte)(cVar7 + 0x9fU)) && (cVar7 != '_')) && (9 < (byte)(cVar7 - 0x30U))) {
              cVar7 = *local_210;
              pcVar13 = pcVar16;
              break;
            }
            cVar7 = pcVar16[2];
            pcVar15 = pcVar16 + 2;
            if (9 < (byte)(cVar7 - 0x30U) && 0x19 < (byte)(cVar7 + 0x9fU)) goto LAB_140012a2b;
            do {
              do {
                cVar7 = pcVar15[1];
                pcVar15 = pcVar15 + 1;
              } while ((byte)(cVar7 + 0x9fU) < 0x1a || (byte)(cVar7 - 0x30U) < 10);
LAB_140012a2b:
            } while (cVar7 == '_');
            while (cVar7 == '.') {
              while( true ) {
                if (9 < (byte)(pcVar15[1] - 0x30U)) goto LAB_140012a6d;
                cVar7 = pcVar15[2];
                pcVar15 = pcVar15 + 2;
                if (9 < (byte)(cVar7 - 0x30U)) break;
                do {
                  pcVar13 = pcVar15 + 1;
                  pcVar15 = pcVar15 + 1;
                } while ((byte)(*pcVar13 - 0x30U) < 10);
                if (*pcVar13 != '.') goto LAB_140012a6d;
              }
            }
LAB_140012a6d:
            local_210 = pcVar15;
            *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012a7f;
            ppuVar12 = &local_228;
            param_4 = FUN_140009c00((longlong)&local_228,(longlong)pcVar16,
                                    (int)pcVar15 - (int)pcVar16);
            pcVar13 = (char *)0x4f;
            *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012a8f;
            puVar14 = _text((longlong)ppuVar12,0x4f,(longlong)puVar14,(longlong)param_4);
            pcVar16 = pcVar15;
            cVar7 = *pcVar15;
          }
        }
        goto LAB_14001288a;
      }
    }
    else {
      if (iVar8 - 2U < 2) {
        pcVar16 = param_1 + 0xb;
        if ((param_1[0xb] == '_') && (param_1[0xc] == 'Z')) {
          local_210 = param_1 + 0xd;
          ppuVar12 = &local_228;
          if ((param_1[0xd] == 'G') || (param_1[0xd] == 'T')) {
            *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012b4b;
            puVar14 = FUN_14000cfd0((longlong)ppuVar12,pcVar13,puVar14,param_4);
            pcVar16 = local_210;
          }
          else {
            *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012ae0;
            puVar14 = FUN_14000da60((longlong)ppuVar12,0,puVar14,(longlong)param_4);
            pcVar16 = local_210;
          }
        }
        else {
          local_238 = puVar14;
          local_210 = pcVar16;
          *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x14001281d;
          sVar10 = strlen(pcVar16);
          if (uVar4 != 0) {
            local_200 = 1;
            *(undefined8 *)(uVar17 * 8 + 4) = 0;
            if (0 < (int)sVar10) {
              *(undefined4 *)(uVar17 * 8) = 0;
              *(char **)(uVar17 * 8 + 0x10) = pcVar16;
              *(int *)(uVar17 * 8 + 0x18) = (int)sVar10;
              puVar14 = local_238;
              ppuVar12 = local_230;
              goto LAB_140012865;
            }
          }
          puVar14 = (uint *)0x0;
          ppuVar12 = &local_228;
        }
LAB_140012865:
        uVar4 = local_23c;
        pcVar13 = (char *)(ulonglong)local_23c;
        param_4 = (undefined4 *)0x0;
        *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012873;
        puVar14 = _text((longlong)ppuVar12,uVar4,(longlong)puVar14,0);
        *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x14001287e;
        sVar10 = strlen(pcVar16);
        local_210 = pcVar16 + sVar10;
        cVar7 = *local_210;
      }
      else {
        *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012aaf;
        puVar14 = FUN_14000aaf0((longlong)ppuVar12,pcVar13,puVar14,param_4);
        cVar7 = *local_210;
      }
LAB_14001288a:
      if ((cVar7 == '\0') && (puVar14 != (uint *)0x0)) {
        local_c8 = 0;
        local_c0 = 0;
        local_a8 = 0;
        local_a0 = 0;
        local_88 = 0;
        local_80 = 0;
        local_70 = 0;
        local_60 = 0;
        local_98 = (undefined1  [16])0x0;
        local_b8 = (code *)param_2;
        local_b0 = param_3;
        *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012c34;
        FUN_140009e80((longlong)local_1c8,puVar14);
        if ((int)local_98._4_4_ < 0x800) {
          local_98._4_4_ = 0;
        }
        lVar11 = (longlong)local_70._4_4_;
        local_58 = 0;
        iVar8 = local_60._4_4_ * local_70._4_4_;
        if (local_70._4_4_ < 1) {
          lVar11 = 1;
        }
        local_60 = CONCAT44(iVar8,(undefined4)local_60);
        *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012c82;
        lVar11 = lVar11 * -0x10;
        iVar9 = 1;
        if (0 < iVar8) {
          iVar9 = iVar8;
        }
        *(undefined8 *)((longlong)auStack_10270 + lVar11 + lVar2 + lVar1 + 0x10000) = 0x140012c9f;
        local_68 = (longlong)&local_248 + (longlong)iVar9 * -0x10 + lVar11 + lVar2 + lVar1;
        local_78 = (longlong)&local_248 + lVar11 + lVar2 + lVar1;
        *(undefined8 *)
         ((longlong)auStack_10270 + (longlong)iVar9 * -0x10 + lVar11 + lVar2 + lVar1 + 0x10000) =
             0x140012cc5;
        FUN_140011370(local_1c8,0x11,puVar14,param_4);
        uVar6 = local_b0;
        lVar11 = local_c8;
        *(undefined1 *)((longlong)local_1c8 + local_c8) = 0;
        pcVar5 = local_b8;
        *(undefined8 *)((longlong)auStack_10270 + lVar2 + lVar1 + 0x10000) = 0x140012ce4;
        (*pcVar5)(local_1c8,lVar11,uVar6);
        return local_98._0_4_ == 0;
      }
    }
    if (local_1d4 != -1) {
      return false;
    }
    local_1d4 = 0;
  } while( true );
}



void FUN_140012d20(longlong param_1,undefined8 param_2,uint *param_3)

{
  bool bVar1;
  uint uVar2;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  undefined8 in_R9;
  uint *local_28;
  undefined8 uStack_20;
  
  if ((*param_3 < 0x32) && ((0x2000000000043U >> ((ulonglong)*param_3 & 0x3f) & 1) != 0)) {
    uVar2 = param_3[1];
    if ((int)uVar2 < 2) {
      iVar4 = *(int *)(param_1 + 0x134);
      bVar1 = true;
      if (iVar4 < 0x401) goto LAB_140012dc0;
    }
    *(undefined4 *)(param_1 + 0x130) = 1;
  }
  else {
    lVar3 = *(longlong *)(param_1 + 0x100);
    if (lVar3 == 0xff) {
      *(undefined1 *)(param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
      *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
      lVar5 = 1;
      lVar3 = 0;
    }
    else {
      lVar5 = lVar3 + 1;
    }
    *(longlong *)(param_1 + 0x100) = lVar5;
    *(undefined1 *)(param_1 + lVar3) = 0x28;
    *(undefined1 *)(param_1 + 0x108) = 0x28;
    uVar2 = param_3[1];
    if ((1 < (int)uVar2) || (iVar4 = *(int *)(param_1 + 0x134), 0x400 < iVar4)) {
      *(undefined4 *)(param_1 + 0x130) = 1;
      goto LAB_140012e32;
    }
    bVar1 = false;
LAB_140012dc0:
    param_3[1] = uVar2 + 1;
    uStack_20 = *(undefined8 *)(param_1 + 0x148);
    *(int *)(param_1 + 0x134) = iVar4 + 1;
    *(uint ***)(param_1 + 0x148) = &local_28;
    local_28 = param_3;
    FUN_14000dbf0((undefined2 *)param_1,0x11,param_3,in_R9);
    *(undefined8 *)(param_1 + 0x148) = uStack_20;
    param_3[1] = param_3[1] - 1;
    *(int *)(param_1 + 0x134) = *(int *)(param_1 + 0x134) + -1;
    if (!bVar1) {
      lVar5 = *(longlong *)(param_1 + 0x100);
LAB_140012e32:
      if (lVar5 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar3 = 1;
        lVar5 = 0;
      }
      else {
        lVar3 = lVar5 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar3;
      *(undefined1 *)(param_1 + lVar5) = 0x29;
      *(undefined1 *)(param_1 + 0x108) = 0x29;
      return;
    }
  }
  return;
}



undefined8 FUN_140012ec0(longlong param_1,undefined8 param_2,longlong param_3)

{
  char cVar1;
  undefined1 uVar2;
  undefined4 uVar3;
  char *pcVar4;
  int *piVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 *puVar8;
  uint *puVar9;
  uint *puVar10;
  
  pcVar4 = (char *)**(undefined8 **)(*(longlong *)(param_3 + 0x10) + 0x10);
  if (*pcVar4 != 'f') {
    return 0;
  }
  puVar10 = (uint *)0x0;
  puVar9 = *(uint **)(*(longlong *)(param_3 + 0x18) + 0x18);
  piVar5 = *(int **)(*(longlong *)(param_3 + 0x18) + 0x10);
  if (*puVar9 == 0x3c) {
    puVar10 = *(uint **)(puVar9 + 6);
    puVar9 = *(uint **)(puVar9 + 4);
  }
  uVar3 = *(undefined4 *)(param_1 + 0x13c);
  *(undefined4 *)(param_1 + 0x13c) = 0xffffffff;
  cVar1 = pcVar4[1];
  if (cVar1 == 'l') {
    puVar8 = &DAT_1400c6e3c;
    lVar7 = *(longlong *)(param_1 + 0x100);
    do {
      uVar2 = *puVar8;
      if (lVar7 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar6 = 1;
        lVar7 = 0;
      }
      else {
        lVar6 = lVar7 + 1;
      }
      puVar8 = puVar8 + 1;
      *(longlong *)(param_1 + 0x100) = lVar6;
      *(undefined1 *)(param_1 + lVar7) = uVar2;
      *(undefined1 *)(param_1 + 0x108) = uVar2;
      lVar7 = lVar6;
    } while (puVar8 != &DAT_1400c6e40);
    FUN_1400126a0(param_1,0x11,piVar5);
  }
  else {
    if ('l' < cVar1) {
      if (cVar1 == 'r') {
        lVar7 = *(longlong *)(param_1 + 0x100);
        if (lVar7 == 0xff) {
          *(undefined1 *)(param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
          *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
          lVar6 = 1;
          lVar7 = 0;
        }
        else {
          lVar6 = lVar7 + 1;
        }
        *(longlong *)(param_1 + 0x100) = lVar6;
        *(undefined1 *)(param_1 + lVar7) = 0x28;
        puVar8 = &DAT_1400c6e41;
        *(undefined1 *)(param_1 + 0x108) = 0x28;
        FUN_140012d20(param_1,0x11,puVar9);
        FUN_1400126a0(param_1,0x11,piVar5);
        lVar7 = *(longlong *)(param_1 + 0x100);
        do {
          uVar2 = *puVar8;
          if (lVar7 == 0xff) {
            *(undefined1 *)(param_1 + 0xff) = 0;
            (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
            *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
            lVar6 = 1;
            lVar7 = 0;
          }
          else {
            lVar6 = lVar7 + 1;
          }
          puVar8 = puVar8 + 1;
          *(longlong *)(param_1 + 0x100) = lVar6;
          *(undefined1 *)(param_1 + lVar7) = uVar2;
          *(undefined1 *)(param_1 + 0x108) = uVar2;
          lVar7 = lVar6;
        } while (puVar8 != &DAT_1400c6e45);
      }
      goto LAB_140013039;
    }
    if ((cVar1 != 'L') && (cVar1 != 'R')) goto LAB_140013039;
    lVar7 = *(longlong *)(param_1 + 0x100);
    if (lVar7 == 0xff) {
      *(undefined1 *)(param_1 + 0xff) = 0;
      (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
      *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
      lVar6 = 1;
      lVar7 = 0;
    }
    else {
      lVar6 = lVar7 + 1;
    }
    *(longlong *)(param_1 + 0x100) = lVar6;
    *(undefined1 *)(param_1 + lVar7) = 0x28;
    puVar8 = &DAT_1400c6a7b;
    *(undefined1 *)(param_1 + 0x108) = 0x28;
    FUN_140012d20(param_1,0x11,puVar9);
    FUN_1400126a0(param_1,0x11,piVar5);
    lVar7 = *(longlong *)(param_1 + 0x100);
    do {
      uVar2 = *puVar8;
      if (lVar7 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar6 = 1;
        lVar7 = 0;
      }
      else {
        lVar6 = lVar7 + 1;
      }
      puVar8 = puVar8 + 1;
      *(longlong *)(param_1 + 0x100) = lVar6;
      *(undefined1 *)(param_1 + lVar7) = uVar2;
      *(undefined1 *)(param_1 + 0x108) = uVar2;
      lVar7 = lVar6;
    } while (puVar8 != &DAT_1400c6a7e);
    FUN_1400126a0(param_1,0x11,piVar5);
    puVar9 = puVar10;
  }
  FUN_140012d20(param_1,0x11,puVar9);
  lVar7 = *(longlong *)(param_1 + 0x100);
  if (lVar7 == 0xff) {
    *(undefined1 *)(param_1 + 0xff) = 0;
    (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
    *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
    lVar6 = 1;
    lVar7 = 0;
  }
  else {
    lVar6 = lVar7 + 1;
  }
  *(longlong *)(param_1 + 0x100) = lVar6;
  *(undefined1 *)(param_1 + lVar7) = 0x29;
  *(undefined1 *)(param_1 + 0x108) = 0x29;
LAB_140013039:
  *(undefined4 *)(param_1 + 0x13c) = uVar3;
  return 1;
}



undefined8 FUN_140013250(longlong param_1,undefined8 param_2,uint *param_3)

{
  uint *puVar1;
  bool bVar2;
  undefined1 uVar3;
  char cVar4;
  undefined7 extraout_var;
  undefined7 extraout_var_00;
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  uint *puVar8;
  undefined1 *puVar9;
  undefined8 in_R9;
  
  if ((*param_3 & 0xfffffffd) != 0x38) {
    return 0;
  }
  lVar6 = *(longlong *)(param_3 + 4);
  bVar2 = FUN_14000a130(lVar6);
  if ((int)CONCAT71(extraout_var,bVar2) != 0) {
    lVar6 = **(longlong **)(lVar6 + 0x10);
    puVar1 = *(uint **)(*(longlong *)(param_3 + 6) + 0x10);
    puVar8 = *(uint **)(*(longlong *)(param_3 + 6) + 0x18);
    lVar7 = *(longlong *)(param_1 + 0x100);
    if (*(char *)(lVar6 + 1) == 'i') {
      if (lVar7 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar5 = 1;
        lVar7 = 0;
      }
      else {
        lVar5 = lVar7 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar5;
      *(undefined1 *)(param_1 + lVar7) = 0x2e;
      uVar3 = 0x2e;
    }
    else {
      if (lVar7 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar5 = 1;
        lVar7 = 0;
      }
      else {
        lVar5 = lVar7 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar5;
      *(undefined1 *)(param_1 + lVar7) = 0x5b;
      uVar3 = 0x5b;
    }
    *(undefined1 *)(param_1 + 0x108) = uVar3;
    FUN_140011370((undefined2 *)param_1,0x11,puVar1,in_R9);
    cVar4 = *(char *)(lVar6 + 1);
    if (cVar4 == 'X') {
      puVar9 = &DAT_1400c6e46;
      lVar7 = *(longlong *)(param_1 + 0x100);
      do {
        uVar3 = *puVar9;
        if (lVar7 == 0xff) {
          *(undefined1 *)(param_1 + 0xff) = 0;
          (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
          *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
          lVar5 = 1;
          lVar7 = 0;
        }
        else {
          lVar5 = lVar7 + 1;
        }
        puVar9 = puVar9 + 1;
        *(longlong *)(param_1 + 0x100) = lVar5;
        *(undefined1 *)(param_1 + lVar7) = uVar3;
        *(undefined1 *)(param_1 + 0x108) = uVar3;
        lVar7 = lVar5;
      } while (puVar9 != &DAT_1400c6e4b);
      FUN_140011370((undefined2 *)param_1,0x11,*(uint **)(puVar8 + 4),in_R9);
      puVar8 = *(uint **)(puVar8 + 6);
      cVar4 = *(char *)(lVar6 + 1);
    }
    if (cVar4 != 'i') {
      lVar6 = *(longlong *)(param_1 + 0x100);
      if (lVar6 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar7 = 1;
        lVar6 = 0;
      }
      else {
        lVar7 = lVar6 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar7;
      *(undefined1 *)(param_1 + lVar6) = 0x5d;
      *(undefined1 *)(param_1 + 0x108) = 0x5d;
    }
    if (((*puVar8 & 0xfffffffd) == 0x38) &&
       (bVar2 = FUN_14000a130(*(longlong *)(puVar8 + 4)), (int)CONCAT71(extraout_var_00,bVar2) != 0)
       ) {
      FUN_140011370((undefined2 *)param_1,0x11,puVar8,in_R9);
    }
    else {
      lVar6 = *(longlong *)(param_1 + 0x100);
      if (lVar6 == 0xff) {
        *(undefined1 *)(param_1 + 0xff) = 0;
        (**(code **)(param_1 + 0x110))(param_1,0xff,*(undefined8 *)(param_1 + 0x118));
        *(int *)(param_1 + 0x140) = *(int *)(param_1 + 0x140) + 1;
        lVar7 = 1;
        lVar6 = 0;
      }
      else {
        lVar7 = lVar6 + 1;
      }
      *(longlong *)(param_1 + 0x100) = lVar7;
      *(undefined1 *)(param_1 + lVar6) = 0x3d;
      *(undefined1 *)(param_1 + 0x108) = 0x3d;
      FUN_140012d20(param_1,0x11,puVar8);
    }
    return 1;
  }
  return CONCAT71(extraout_var,bVar2);
}



char * __cxa_demangle(undefined *param_1,char *param_2,ulonglong *param_3,undefined4 *param_4)

{
  bool bVar1;
  undefined7 extraout_var;
  size_t sVar2;
  char *_Src;
  ulonglong uVar3;
  char *local_48;
  undefined1 local_40 [16];
  int local_30;
  
  if ((param_1 == (undefined *)0x0) || ((param_2 != (char *)0x0 && (param_3 == (ulonglong *)0x0))))
  {
    if (param_4 == (undefined4 *)0x0) {
      return (char *)0x0;
    }
    *param_4 = 0xfffffffd;
    return (char *)0x0;
  }
  local_48 = (char *)0x0;
  local_30 = 0;
  local_40 = (undefined1  [16])0x0;
  bVar1 = FUN_140012760(param_1,FUN_14000a030,&local_48,param_4);
  _Src = local_48;
  if ((int)CONCAT71(extraout_var,bVar1) == 0) {
    free(local_48);
    if (param_4 == (undefined4 *)0x0) {
      return (char *)0x0;
    }
LAB_14001365f:
    *param_4 = 0xfffffffe;
    return (char *)0x0;
  }
  if (local_30 == 0) {
    uVar3 = local_40._8_8_;
    if (local_48 == (char *)0x0) {
      if (param_4 == (undefined4 *)0x0) {
        return (char *)0x0;
      }
      if (local_40._8_8_ != 1) goto LAB_14001365f;
      goto LAB_140013605;
    }
  }
  else {
    uVar3 = 1;
    if (local_48 == (char *)0x0) {
      if (param_4 == (undefined4 *)0x0) {
        return (char *)0x0;
      }
LAB_140013605:
      *param_4 = 0xffffffff;
      return (char *)0x0;
    }
  }
  if (param_2 == (char *)0x0) {
    if (param_3 == (ulonglong *)0x0) goto LAB_1400135ce;
  }
  else {
    sVar2 = strlen(local_48);
    if (sVar2 < *param_3) {
      memcpy(param_2,_Src,sVar2 + 1);
      free(_Src);
      _Src = param_2;
      goto LAB_1400135ce;
    }
    free(param_2);
  }
  *param_3 = uVar3;
LAB_1400135ce:
  if (param_4 != (undefined4 *)0x0) {
    *param_4 = 0;
  }
  return _Src;
}



uint __gcclibcxx_demangle_callback
               (undefined *param_1,undefined *param_2,undefined8 param_3,undefined4 *param_4)

{
  bool bVar1;
  uint uVar2;
  undefined7 extraout_var;
  
  if ((param_1 == (undefined *)0x0) || (param_2 == (undefined *)0x0)) {
    uVar2 = 0xfffffffd;
  }
  else {
    bVar1 = FUN_140012760(param_1,param_2,param_3,param_4);
    uVar2 = -(uint)((int)CONCAT71(extraout_var,bVar1) == 0) & 0xfffffffe;
  }
  return uVar2;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void __do_global_dtors(void)

{
  func_ptr p_Var1;
  
  p_Var1 = *__do_global_dtors::p;
  while (p_Var1 != (func_ptr)0x0) {
    (*p_Var1)();
    p_Var1 = __do_global_dtors::p[1];
    __do_global_dtors::p = __do_global_dtors::p + 1;
  }
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void __do_global_ctors(void)

{
  int iVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  undefined8 *puVar4;
  
  uVar2 = 0;
  do {
    uVar3 = uVar2;
    iVar1 = (int)uVar3;
    uVar2 = (ulonglong)(iVar1 + 1);
  } while ((&___CTOR_LIST__)[iVar1 + 1] != 0);
  if (iVar1 != 0) {
    puVar4 = &___CTOR_LIST__ + uVar3;
    do {
      (*(code *)*puVar4)();
      puVar4 = puVar4 + -1;
    } while (puVar4 != (undefined8 *)(&UNK_1400bf2a8 + (uVar3 - (iVar1 - 1)) * 8));
  }
  atexit(__do_global_dtors);
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void __main(void)

{
  if (initialized != 0) {
    return;
  }
  initialized = 1;
  __do_global_ctors();
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int _setargv(void)

{
  return 0;
}



BOOL __dyn_tls_dtor(HANDLE hDllHandle,DWORD dwReason,LPVOID lpreserved)

{
  if ((dwReason != 3) && (dwReason != 0)) {
    return 1;
  }
  __mingw_TLScallback(hDllHandle,dwReason,lpreserved);
  return 1;
}



// WARNING: Removing unreachable block (ram,0x00014001382b)
// WARNING: Removing unreachable block (ram,0x000140013830)
// WARNING: Removing unreachable block (ram,0x000140013838)
// WARNING: Removing unreachable block (ram,0x00014001383a)
// WARNING: Removing unreachable block (ram,0x000140013843)

BOOL __dyn_tls_init(HANDLE hDllHandle,DWORD dwReason,LPVOID lpreserved)

{
                    // Unresolved local var: _PVFV * pfunc@[???]
                    // Unresolved local var: uintptr_t ps@[???]
  if (_CRT_MT != 2) {
    _CRT_MT = 2;
  }
  if ((dwReason != 2) && (dwReason == 1)) {
    __mingw_TLScallback(hDllHandle,1,lpreserved);
    return 1;
  }
  return 1;
}



int __tlregdtor(_PVFV func)

{
  return 0;
}



int _matherr(_exception *pexcept)

{
  double dVar1;
  double dVar2;
  double dVar3;
  char *pcVar4;
  FILE *_File;
  char *pcVar5;
  
                    // Unresolved local var: char * type@[???]
  switch(pexcept->type) {
  default:
    pcVar5 = "Unknown error";
    break;
  case 1:
    pcVar5 = "Argument domain error (DOMAIN)";
    break;
  case 2:
    pcVar5 = "Argument singularity (SIGN)";
    break;
  case 3:
    pcVar5 = "Overflow range error (OVERFLOW)";
    break;
  case 4:
    pcVar5 = "The result is too small to be represented (UNDERFLOW)";
    break;
  case 5:
    pcVar5 = "Total loss of significance (TLOSS)";
    break;
  case 6:
    pcVar5 = "Partial loss of significance (PLOSS)";
  }
  dVar1 = pexcept->retval;
  dVar2 = pexcept->arg2;
  dVar3 = pexcept->arg1;
  pcVar4 = pexcept->name;
  _File = __acrt_iob_func(2);
  fprintf((FILE *)_File,"_matherr(): %s in %s(%g, %g)  (retval=%g)\n",pcVar5,pcVar4,dVar3,dVar2,
          dVar1);
  return 0;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void _fpreset(void)

{
  return;
}



void __report_error(char *msg,...)

{
  FILE *pFVar1;
  undefined8 in_RDX;
  undefined8 in_R8;
  undefined8 in_R9;
  undefined8 local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  va_list argp;
  
  local_res10 = in_RDX;
  local_res18 = in_R8;
  local_res20 = in_R9;
  pFVar1 = __acrt_iob_func(2);
  fwrite("Mingw-w64 runtime failure:\n",1,0x1b,(FILE *)pFVar1);
  pFVar1 = __acrt_iob_func(2);
  vfprintf((FILE *)pFVar1,msg,(va_list)&local_res10);
                    // WARNING: Subroutine does not return
  abort();
}



void mark_section_writable(LPVOID addr)

{
  uint uVar1;
  BOOL BVar2;
  DWORD DVar3;
  PBYTE *ppBVar4;
  PIMAGE_SECTION_HEADER p_Var5;
  sSecInfo *psVar6;
  PBYTE pBVar7;
  SIZE_T SVar8;
  longlong lVar9;
  int iVar10;
  MEMORY_BASIC_INFORMATION b;
  
                    // Unresolved local var: PIMAGE_SECTION_HEADER h@[???]
                    // Unresolved local var: int i@[???]
  lVar9 = (longlong)maxSections;
  if (maxSections < 1) {
    lVar9 = 0;
  }
  else {
    iVar10 = 0;
    ppBVar4 = &the_secs->sec_start;
    do {
      if ((*ppBVar4 <= addr) &&
         (addr < *ppBVar4 + (((PIMAGE_SECTION_HEADER)ppBVar4[1])->Misc).PhysicalAddress)) {
        return;
      }
      iVar10 = iVar10 + 1;
      ppBVar4 = ppBVar4 + 5;
    } while (iVar10 != maxSections);
  }
  p_Var5 = __mingw_GetSectionForAddress(addr);
  if (p_Var5 == (PIMAGE_SECTION_HEADER)0x0) {
                    // WARNING: Subroutine does not return
    __report_error("Address %p has no image-section",addr);
  }
  psVar6 = the_secs + lVar9;
  psVar6->hash = p_Var5;
  psVar6->old_protect = 0;
  pBVar7 = _GetPEImageBase();
  uVar1 = p_Var5->VirtualAddress;
  the_secs[lVar9].sec_start = pBVar7 + uVar1;
  SVar8 = VirtualQuery(pBVar7 + uVar1,(PMEMORY_BASIC_INFORMATION)&b,0x30);
  if (SVar8 != 0) {
    if (((b.Protect - 4 & 0xfffffffb) != 0) && ((b.Protect - 0x40 & 0xffffffbf) != 0)) {
                    // Unresolved local var: ULONG new_protect@[???]
      DVar3 = 0x40;
      if (b.Protect == 2) {
        DVar3 = 4;
      }
      psVar6 = the_secs + lVar9;
      psVar6->base_address = b.BaseAddress;
      psVar6->region_size = b.RegionSize;
      BVar2 = VirtualProtect(b.BaseAddress,b.RegionSize,DVar3,&psVar6->old_protect);
      if (BVar2 == 0) {
        DVar3 = GetLastError();
                    // WARNING: Subroutine does not return
        __report_error("  VirtualProtect failed with code 0x%x",(ulonglong)DVar3);
      }
    }
    maxSections = maxSections + 1;
    return;
  }
                    // WARNING: Subroutine does not return
  __report_error("  VirtualQuery failed for %d bytes at address %p",
                 (ulonglong)(p_Var5->Misc).PhysicalAddress,the_secs[lVar9].sec_start);
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// WARNING: Removing unreachable block (ram,0x000140013c01)
// WARNING: Removing unreachable block (ram,0x000140013d10)
// WARNING: Removing unreachable block (ram,0x000140013d18)
// WARNING: Removing unreachable block (ram,0x000140013d26)
// WARNING: Removing unreachable block (ram,0x000140013c0d)
// WARNING: Removing unreachable block (ram,0x000140013c17)
// WARNING: Removing unreachable block (ram,0x000140013c1a)
// WARNING: Removing unreachable block (ram,0x000140013c22)
// WARNING: Removing unreachable block (ram,0x000140013ec0)
// WARNING: Removing unreachable block (ram,0x000140013c2e)
// WARNING: Removing unreachable block (ram,0x000140013c3b)
// WARNING: Removing unreachable block (ram,0x000140013caf)
// WARNING: Removing unreachable block (ram,0x000140013ccc)
// WARNING: Removing unreachable block (ram,0x000140013cce)
// WARNING: Removing unreachable block (ram,0x000140013cd7)
// WARNING: Removing unreachable block (ram,0x000140013e30)
// WARNING: Removing unreachable block (ram,0x000140013cee)
// WARNING: Removing unreachable block (ram,0x000140013c50)
// WARNING: Removing unreachable block (ram,0x000140013c59)
// WARNING: Removing unreachable block (ram,0x000140013eb2)
// WARNING: Removing unreachable block (ram,0x000140013c62)
// WARNING: Removing unreachable block (ram,0x000140013e40)
// WARNING: Removing unreachable block (ram,0x000140013e4e)
// WARNING: Removing unreachable block (ram,0x000140013c74)
// WARNING: Removing unreachable block (ram,0x000140013c85)
// WARNING: Removing unreachable block (ram,0x000140013c8e)
// WARNING: Removing unreachable block (ram,0x000140013c97)
// WARNING: Removing unreachable block (ram,0x000140013d30)
// WARNING: Removing unreachable block (ram,0x000140013e68)
// WARNING: Removing unreachable block (ram,0x000140013e76)
// WARNING: Removing unreachable block (ram,0x000140013d42)
// WARNING: Removing unreachable block (ram,0x000140013d53)
// WARNING: Removing unreachable block (ram,0x000140013d5c)
// WARNING: Removing unreachable block (ram,0x000140013d62)
// WARNING: Removing unreachable block (ram,0x000140013d7a)
// WARNING: Removing unreachable block (ram,0x000140013dd8)
// WARNING: Removing unreachable block (ram,0x000140013e58)
// WARNING: Removing unreachable block (ram,0x000140013e62)
// WARNING: Removing unreachable block (ram,0x000140013de4)
// WARNING: Removing unreachable block (ram,0x000140013dfb)
// WARNING: Removing unreachable block (ram,0x000140013e04)
// WARNING: Removing unreachable block (ram,0x000140013cf3)
// WARNING: Removing unreachable block (ram,0x000140013e17)
// WARNING: Removing unreachable block (ram,0x000140013ca2)
// WARNING: Removing unreachable block (ram,0x000140013e80)
// WARNING: Removing unreachable block (ram,0x000140013e89)
// WARNING: Removing unreachable block (ram,0x000140013e90)
// WARNING: Removing unreachable block (ram,0x000140013ead)
// WARNING: Removing unreachable block (ram,0x000140013d80)
// WARNING: Removing unreachable block (ram,0x000140013d8e)
// WARNING: Removing unreachable block (ram,0x000140013da0)
// WARNING: Removing unreachable block (ram,0x000140013db2)
// WARNING: Removing unreachable block (ram,0x000140013dbf)
// WARNING: Removing unreachable block (ram,0x000140013dd0)
// WARNING: Unknown calling convention -- yet parameter storage is locked

void _pei386_runtime_relocator(void)

{
  int iVar1;
  DWORD oldprot;
  
                    // Unresolved local var: int mSecs@[???]
  if (_pei386_runtime_relocator::was_init == 0) {
    _pei386_runtime_relocator::was_init = 1;
    iVar1 = __mingw_GetSectionCount();
                    // Unresolved local var: ptrdiff_t addr_imp@[???]
                    // Unresolved local var: ptrdiff_t reldata@[???]
                    // Unresolved local var: ptrdiff_t reloc_target@[???]
                    // Unresolved local var: runtime_pseudo_reloc_v2 * v2_hdr@[???]
                    // Unresolved local var: runtime_pseudo_reloc_item_v2 * r@[???]
                    // Unresolved local var: uint bits@[???]
    maxSections = 0;
    the_secs = (sSecInfo *)
               (&stack0xffffffffffffffa8 + -((longlong)iVar1 * 0x28 + 0xfU & 0xfffffffffffffff0));
  }
  return;
}



void __mingw_raise_matherr(int typ,char *name,double a1,double a2,double rslt)

{
  _exception ex;
  
  if (stUserMathErr != (fUserMathErr)0x0) {
    ex.retval = rslt;
    ex.type = typ;
    ex.name = name;
    ex.arg1 = a1;
    ex.arg2 = a2;
    (*stUserMathErr)(&ex);
  }
  return;
}



void __mingw_setusermatherr(_func_int__exception_ptr *f)

{
  stUserMathErr = f;
  __setusermatherr();
  return;
}



long _gnu_exception_handler(EXCEPTION_POINTERS *exception_data)

{
  uint uVar1;
  LONG LVar2;
  code *extraout_RAX;
  code *pcVar3;
  code *extraout_RAX_00;
  code *extraout_RAX_01;
  code *extraout_RAX_02;
  
                    // Unresolved local var: _func_void_int * old_handler@[???]
                    // Unresolved local var: long action@[???]
                    // Unresolved local var: int reset_fpu@[???]
  uVar1 = exception_data->ExceptionRecord->ExceptionCode;
  if (((uVar1 & 0x20ffffff) == 0x20474343) &&
     ((exception_data->ExceptionRecord->ExceptionFlags & 1) == 0)) {
    return -1;
  }
  if (0xc0000096 < uVar1) goto LAB_140013f97;
  if (uVar1 < 0xc000008c) {
    if (uVar1 == 0xc0000005) {
      signal(0xb);
      if (extraout_RAX_02 == (code *)0x1) {
        signal(0xb);
        return -1;
      }
      if (extraout_RAX_02 != (code *)0x0) {
        (*extraout_RAX_02)(0xb);
        return -1;
      }
      goto LAB_140013f97;
    }
    if (uVar1 < 0xc0000006) {
      if (uVar1 == 0x80000002) {
        return -1;
      }
      goto LAB_140013f97;
    }
    if (uVar1 == 0xc0000008) {
      return -1;
    }
    if (uVar1 != 0xc000001d) goto LAB_140013f97;
switchD_140013f71_caseD_c0000096:
    signal(4);
    if (extraout_RAX_00 == (code *)0x1) {
      signal(4);
    }
    else {
      if (extraout_RAX_00 == (code *)0x0) goto LAB_140013f97;
      (*extraout_RAX_00)(4);
    }
  }
  else {
    switch(uVar1) {
    case 0xc000008d:
    case 0xc000008e:
    case 0xc000008f:
    case 0xc0000090:
    case 0xc0000091:
    case 0xc0000093:
      signal(8);
      pcVar3 = extraout_RAX;
      if (extraout_RAX == (code *)0x1) {
        signal(8);
        _fpreset();
        return -1;
      }
      break;
    default:
      goto switchD_140013f71_caseD_c0000092;
    case 0xc0000094:
      signal(8);
      pcVar3 = extraout_RAX_01;
      if (extraout_RAX_01 == (code *)0x1) {
        signal(8);
        return -1;
      }
      break;
    case 0xc0000096:
      goto switchD_140013f71_caseD_c0000096;
    }
    if (pcVar3 == (code *)0x0) {
LAB_140013f97:
      if (__mingw_oldexcpt_handler != (LPTOP_LEVEL_EXCEPTION_FILTER)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140013fac. Too many branches
                    // WARNING: Treating indirect jump as call
        LVar2 = (*__mingw_oldexcpt_handler)(exception_data);
        return LVar2;
      }
      return 0;
    }
    (*pcVar3)(8);
  }
switchD_140013f71_caseD_c0000092:
  return -1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void __mingwthr_run_key_dtors(void)

{
  __mingwthr_key_t *p_Var1;
  DWORD DVar2;
  LPVOID pvVar3;
  
                    // Unresolved local var: __mingwthr_key_t * keyp@[???]
  EnterCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  for (p_Var1 = key_dtor_list; p_Var1 != (__mingwthr_key_t *)0x0; p_Var1 = p_Var1->next) {
                    // Unresolved local var: LPVOID value@[???]
    pvVar3 = TlsGetValue(p_Var1->key);
    DVar2 = GetLastError();
    if ((pvVar3 != (LPVOID)0x0) && (DVar2 == 0)) {
      (*p_Var1->dtor)(pvVar3);
    }
  }
                    // WARNING: Could not recover jumptable at 0x000140014154. Too many branches
                    // WARNING: Treating indirect jump as call
  LeaveCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  return;
}



int ___w64_mingwthr_add_key_dtor(DWORD key,_func_void_void_ptr *dtor)

{
  __mingwthr_key_t *p_Var1;
  
                    // Unresolved local var: __mingwthr_key_t * new_key@[???]
  if (__mingwthr_cs_init != 0) {
    p_Var1 = calloc(1,0x18);
    if (p_Var1 == (__mingwthr_key_t *)0x0) {
      return -1;
    }
    p_Var1->dtor = dtor;
    p_Var1->key = key;
    EnterCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
    p_Var1->next = key_dtor_list;
    key_dtor_list = p_Var1;
    LeaveCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  }
  return 0;
}



int ___w64_mingwthr_remove_key_dtor(DWORD key)

{
  __mingwthr_key_t *p_Var1;
  __mingwthr_key_t *_Memory;
  __mingwthr_key_t *p_Var2;
  
                    // Unresolved local var: __mingwthr_key_t * prev_key@[???]
                    // Unresolved local var: __mingwthr_key_t * cur_key@[???]
  if (__mingwthr_cs_init == 0) {
    return 0;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  if (key_dtor_list != (__mingwthr_key_t *)0x0) {
    p_Var1 = key_dtor_list;
    p_Var2 = (__mingwthr_key_t *)0x0;
    do {
      _Memory = p_Var1;
      p_Var1 = _Memory->next;
      if (_Memory->key == key) {
        if (p_Var2 != (__mingwthr_key_t *)0x0) {
          p_Var2->next = p_Var1;
          p_Var1 = key_dtor_list;
        }
        key_dtor_list = p_Var1;
        free(_Memory);
        break;
      }
      p_Var2 = _Memory;
    } while (p_Var1 != (__mingwthr_key_t *)0x0);
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  return 0;
}



WINBOOL __mingw_TLScallback(HANDLE hDllHandle,DWORD reason,LPVOID reserved)

{
  __mingwthr_key_t *p_Var1;
  __mingwthr_key_t *_Memory;
  
  if (reason == 2) {
    _fpreset();
    return 1;
  }
  if (reason < 3) {
    if (reason == 0) {
                    // Unresolved local var: __mingwthr_key_t * keyp@[???]
      if (__mingwthr_cs_init != 0) {
        __mingwthr_run_key_dtors();
      }
      if (__mingwthr_cs_init == 1) {
        __mingwthr_cs_init = 1;
        _Memory = key_dtor_list;
        while (_Memory != (__mingwthr_key_t *)0x0) {
          p_Var1 = _Memory->next;
          free(_Memory);
          _Memory = p_Var1;
        }
        key_dtor_list = (__mingwthr_key_t *)0x0;
        __mingwthr_cs_init = 0;
        DeleteCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
      }
    }
    else {
      if (__mingwthr_cs_init == 0) {
        InitializeCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
      }
      __mingwthr_cs_init = 1;
    }
  }
  else {
                    // Unresolved local var: __mingwthr_key_t * keyp@[???]
    if ((reason == 3) && (__mingwthr_cs_init != 0)) {
      __mingwthr_run_key_dtors();
    }
  }
  return 1;
}



WINBOOL _ValidateImageBase(PBYTE pImageBase)

{
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[DW_OP_reg2(RCX)]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
  if ((*(short *)pImageBase == 0x5a4d) &&
     (*(int *)(pImageBase + *(int *)(pImageBase + 0x3c)) == 0x4550)) {
    return (WINBOOL)((short)*(int *)((longlong)(pImageBase + *(int *)(pImageBase + 0x3c)) + 0x18) ==
                    0x20b);
  }
  return 0;
}



PIMAGE_SECTION_HEADER _FindPESection(PBYTE pImageBase,DWORD_PTR rva)

{
  PIMAGE_SECTION_HEADER p_Var1;
  int iVar2;
  PIMAGE_SECTION_HEADER p_Var3;
  
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: uint iSection@[???]
  iVar2 = *(int *)(pImageBase + 0x3c);
  p_Var3 = (PIMAGE_SECTION_HEADER)
           (pImageBase +
           (ulonglong)*(ushort *)(pImageBase + (longlong)iVar2 + 0x14) + (longlong)iVar2 + 0x18);
  if (*(ushort *)(pImageBase + (longlong)iVar2 + 6) != 0) {
    p_Var1 = p_Var3 + (ulonglong)(*(ushort *)(pImageBase + (longlong)iVar2 + 6) - 1) + 1;
    do {
      if ((p_Var3->VirtualAddress <= rva) &&
         (rva < p_Var3->VirtualAddress + (p_Var3->Misc).PhysicalAddress)) {
        return p_Var3;
      }
      p_Var3 = p_Var3 + 1;
    } while (p_Var3 != p_Var1);
  }
  return (PIMAGE_SECTION_HEADER)0x0;
}



// WARNING: Enum "SectionFlags": Some values do not have unique names

PIMAGE_SECTION_HEADER _FindPESectionByName(char *pName)

{
  int iVar1;
  size_t sVar2;
  IMAGE_SECTION_HEADER *_Str1;
  
                    // Unresolved local var: PBYTE pImageBase@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: uint iSection@[???]
  sVar2 = strlen(pName);
  if (sVar2 < 9) {
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
    _Str1 = &IMAGE_SECTION_HEADER_140000188;
    do {
      iVar1 = strncmp(_Str1->Name,pName,8);
      if (iVar1 == 0) {
        return (PIMAGE_SECTION_HEADER)_Str1;
      }
      _Str1 = _Str1 + 1;
    } while ((PIMAGE_SECTION_HEADER)_Str1 != (PIMAGE_SECTION_HEADER)&DAT_140000480);
  }
  return (PIMAGE_SECTION_HEADER)0x0;
}



// WARNING: Enum "SectionFlags": Some values do not have unique names

PIMAGE_SECTION_HEADER __mingw_GetSectionForAddress(LPVOID p)

{
  IMAGE_SECTION_HEADER *pIVar1;
  
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: uint iSection@[???]
  pIVar1 = &IMAGE_SECTION_HEADER_140000188;
  while (((longlong)p - 0x140000000U < (ulonglong)((PIMAGE_SECTION_HEADER)pIVar1)->VirtualAddress ||
         ((ulonglong)
          (((PIMAGE_SECTION_HEADER)pIVar1)->VirtualAddress +
          ((Misc *)&((PIMAGE_SECTION_HEADER)pIVar1)->Misc)->PhysicalAddress) <=
          (longlong)p - 0x140000000U))) {
    pIVar1 = pIVar1 + 1;
    if ((PIMAGE_SECTION_HEADER)pIVar1 == (PIMAGE_SECTION_HEADER)&DAT_140000480) {
      return (PIMAGE_SECTION_HEADER)0x0;
    }
  }
  return (PIMAGE_SECTION_HEADER)pIVar1;
}



// WARNING: Removing unreachable block (ram,0x00014001454f)
// WARNING: Unknown calling convention -- yet parameter storage is locked

int __mingw_GetSectionCount(void)

{
                    // Unresolved local var: PBYTE pImageBase@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
  return 0x13;
}



// WARNING: Enum "SectionFlags": Some values do not have unique names

PIMAGE_SECTION_HEADER _FindPESectionExec(size_t eNo)

{
  IMAGE_SECTION_HEADER *pIVar1;
  
  pIVar1 = &IMAGE_SECTION_HEADER_140000188;
  do {
    if ((((PIMAGE_SECTION_HEADER)pIVar1)->Characteristics & IMAGE_SCN_MEM_EXECUTE) != 0) {
      if (eNo == 0) {
        return (PIMAGE_SECTION_HEADER)pIVar1;
      }
      eNo = eNo - 1;
    }
    pIVar1 = pIVar1 + 1;
  } while ((PIMAGE_SECTION_HEADER)pIVar1 != (PIMAGE_SECTION_HEADER)&DAT_140000480);
  return (PIMAGE_SECTION_HEADER)0x0;
}



// WARNING: Removing unreachable block (ram,0x00014001460f)
// WARNING: Unknown calling convention -- yet parameter storage is locked

PBYTE _GetPEImageBase(void)

{
                    // Unresolved local var: PBYTE pImageBase@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
  return (PBYTE)&IMAGE_DOS_HEADER_140000000;
}



// WARNING: Removing unreachable block (ram,0x000140014650)
// WARNING: Enum "SectionFlags": Some values do not have unique names

WINBOOL _IsNonwritableInCurrentImage(PBYTE pTarget)

{
  IMAGE_SECTION_HEADER *pIVar1;
  
                    // Unresolved local var: PBYTE pImageBase@[???]
                    // Unresolved local var: DWORD_PTR rvaTarget@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: uint iSection@[???]
  pIVar1 = &IMAGE_SECTION_HEADER_140000188;
  while ((pTarget + -0x140000000 < (PBYTE)(ulonglong)(uint)pIVar1->VirtualAddress ||
         ((PBYTE)(ulonglong)(pIVar1->VirtualAddress + (pIVar1->Misc).PhysicalAddress) <=
          pTarget + -0x140000000))) {
    pIVar1 = pIVar1 + 1;
    if (pIVar1 == (IMAGE_SECTION_HEADER *)&DAT_140000480) {
      return 0;
    }
  }
  return ~pIVar1->Characteristics >> 0x1f;
}



// WARNING: Removing unreachable block (ram,0x0001400146e4)
// WARNING: Enum "SectionFlags": Some values do not have unique names

char * __mingw_enum_import_library_names(int i)

{
  dword *pdVar1;
  IMAGE_SECTION_HEADER *pIVar2;
  
                    // Unresolved local var: PBYTE pImageBase@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_IMPORT_DESCRIPTOR importDesc@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: DWORD importsStartRVA@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_DOS_HEADER pDOSHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_OPTIONAL_HEADER pOptHeader@[???]
                    // Unresolved local var: PIMAGE_NT_HEADERS pNTHeader@[???]
                    // Unresolved local var: PIMAGE_SECTION_HEADER pSection@[???]
                    // Unresolved local var: uint iSection@[???]
  pIVar2 = &IMAGE_SECTION_HEADER_140000188;
  while ((0xfd000 < (uint)pIVar2->VirtualAddress ||
         (pIVar2->VirtualAddress + (pIVar2->Misc).PhysicalAddress < 0xfd001))) {
    pIVar2 = pIVar2 + 1;
    if (pIVar2 == (IMAGE_SECTION_HEADER *)&DAT_140000480) {
      return (char *)0x0;
    }
  }
  for (pdVar1 = &DWORD_1400fd000; (pdVar1[1] != 0 || (pdVar1[3] != 0)); pdVar1 = pdVar1 + 5) {
    if (i < 1) {
      return IMAGE_DOS_HEADER_140000000.e_magic + pdVar1[3];
    }
    i = i + -1;
  }
  return (char *)0x0;
}



// WARNING: This is an inlined function

ulonglong ___chkstk_ms(void)

{
  ulonglong in_RAX;
  ulonglong uVar1;
  undefined8 *puVar2;
  undefined8 local_res8 [4];
  
  puVar2 = local_res8;
  uVar1 = in_RAX;
  if (0xfff < in_RAX) {
    do {
      puVar2 = puVar2 + -0x200;
      *puVar2 = *puVar2;
      uVar1 = uVar1 - 0x1000;
    } while (0x1000 < uVar1);
  }
  *(undefined8 *)((longlong)puVar2 - uVar1) = *(undefined8 *)((longlong)puVar2 - uVar1);
  return in_RAX;
}



void __stdcall __gthr_win32_cond_init_function(PCONDITION_VARIABLE ConditionVariable)

{
                    // WARNING: Could not recover jumptable at 0x0001400147c0. Too many branches
                    // WARNING: Treating indirect jump as call
  InitializeConditionVariable(ConditionVariable);
  return;
}



undefined8 __gthr_win32_cond_broadcast(PCONDITION_VARIABLE param_1)

{
  WakeAllConditionVariable(param_1);
  return 0;
}



undefined8 __gthr_win32_cond_signal(PCONDITION_VARIABLE param_1)

{
  WakeConditionVariable(param_1);
  return 0;
}



DWORD __gthr_win32_cond_wait(PCONDITION_VARIABLE param_1,PCRITICAL_SECTION param_2)

{
  BOOL BVar1;
  DWORD DVar2;
  
  BVar1 = SleepConditionVariableCS(param_1,param_2,0xffffffff);
  if (BVar1 != 0) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140014834. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar2 = GetLastError();
  return DVar2;
}



DWORD __gthr_win32_cond_timedwait
                (PCONDITION_VARIABLE param_1,PCRITICAL_SECTION param_2,longlong *param_3)

{
  BOOL BVar1;
  DWORD DVar2;
  ulonglong uVar3;
  _FILETIME local_20;
  
  GetSystemTimeAsFileTime(&local_20);
  DVar2 = 0;
  uVar3 = (longlong)(((int)param_3[1] + 99) / 100) + *param_3 * 10000000;
  if ((longlong)local_20 + 0xfe624e212ac18000U <= uVar3) {
    DVar2 = (DWORD)(((uVar3 - ((longlong)local_20 + 0xfe624e212ac18000U)) + 9999999) / 10000000);
  }
  BVar1 = SleepConditionVariableCS(param_1,param_2,DVar2);
  if (BVar1 != 0) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x0001400148d7. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar2 = GetLastError();
  return DVar2;
}



ulonglong __gthr_win32_abs_to_rel_time(longlong *param_1)

{
  ulonglong uVar1;
  ulonglong uVar2;
  _FILETIME local_10;
  
  GetSystemTimeAsFileTime(&local_10);
  uVar2 = (longlong)(((int)param_1[1] + 99) / 100) + *param_1 * 10000000;
  uVar1 = 0;
  if ((longlong)local_10 + 0xfe624e212ac18000U <= uVar2) {
    uVar1 = ((uVar2 - ((longlong)local_10 + 0xfe624e212ac18000U)) + 9999999) / 10000000;
  }
  return uVar1;
}



undefined8 __gthr_win32_detach(HANDLE param_1)

{
  CloseHandle(param_1);
  return 0;
}



bool __gthr_win32_equal(HANDLE param_1,HANDLE param_2)

{
  DWORD DVar1;
  DWORD DVar2;
  
  DVar1 = GetThreadId(param_1);
  DVar2 = GetThreadId(param_2);
  return DVar1 == DVar2;
}



undefined8 __gthr_win32_yield(void)

{
  Sleep(0);
  return 0;
}



undefined8 __gthr_win32_once(int *param_1,undefined *param_2)

{
  int *piVar1;
  int iVar2;
  
  if (*param_1 == 0) {
    LOCK();
    piVar1 = param_1 + 1;
    *piVar1 = *piVar1 + 1;
    UNLOCK();
    if (*piVar1 == 0) {
      (*(code *)param_2)();
      *param_1 = 1;
    }
    else {
      iVar2 = *param_1;
      while ((iVar2 == 0 && (Sleep(0), *param_1 == 0))) {
        Sleep(0);
        iVar2 = *param_1;
      }
    }
  }
  return 0;
}



void __gthr_win32_key_create(DWORD *param_1,_func_void_void_ptr *param_2)

{
  DWORD key;
  
  key = TlsAlloc();
  if (key != 0xffffffff) {
    *param_1 = key;
    __mingwthr_key_dtor(key,param_2);
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140014a66. Too many branches
                    // WARNING: Treating indirect jump as call
  GetLastError();
  return;
}



DWORD __gthr_win32_key_delete(DWORD param_1)

{
  BOOL BVar1;
  DWORD DVar2;
  
  BVar1 = TlsFree(param_1);
  if (BVar1 != 0) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140014a8c. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar2 = GetLastError();
  return DVar2;
}



LPVOID __gthr_win32_getspecific(DWORD param_1)

{
  DWORD dwErrCode;
  LPVOID pvVar1;
  
  dwErrCode = GetLastError();
  pvVar1 = TlsGetValue(param_1);
  SetLastError(dwErrCode);
  return pvVar1;
}



DWORD __gthr_win32_setspecific(DWORD param_1,LPVOID param_2)

{
  BOOL BVar1;
  DWORD DVar2;
  
  BVar1 = TlsSetValue(param_1,param_2);
  if (BVar1 != 0) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140014aec. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar2 = GetLastError();
  return DVar2;
}



void __stdcall __gthr_win32_mutex_init_function(LPCRITICAL_SECTION lpCriticalSection)

{
                    // WARNING: Could not recover jumptable at 0x000140014b00. Too many branches
                    // WARNING: Treating indirect jump as call
  InitializeCriticalSection(lpCriticalSection);
  return;
}



void __stdcall __gthr_win32_mutex_destroy(LPCRITICAL_SECTION lpCriticalSection)

{
                    // WARNING: Could not recover jumptable at 0x000140014b10. Too many branches
                    // WARNING: Treating indirect jump as call
  DeleteCriticalSection(lpCriticalSection);
  return;
}



undefined8 __gthr_win32_mutex_lock(LPCRITICAL_SECTION param_1)

{
  EnterCriticalSection(param_1);
  return 0;
}



undefined8 __gthr_win32_mutex_trylock(LPCRITICAL_SECTION param_1)

{
  BOOL BVar1;
  
  BVar1 = TryEnterCriticalSection(param_1);
  if (BVar1 != 0) {
    if (param_1->RecursionCount < 2) {
      return 0;
    }
    LeaveCriticalSection(param_1);
  }
  return 1;
}



undefined8 __gthr_win32_mutex_unlock(LPCRITICAL_SECTION param_1)

{
  LeaveCriticalSection(param_1);
  return 0;
}



bool __gthr_win32_recursive_mutex_trylock(LPCRITICAL_SECTION param_1)

{
  BOOL BVar1;
  
  BVar1 = TryEnterCriticalSection(param_1);
  return BVar1 == 0;
}



undefined8 _text(undefined8 *param_1)

{
  undefined8 *local_res8 [4];
  
  local_res8[0] = param_1;
  RaiseException(0x22474343,0,1,(ULONG_PTR *)local_res8);
  (*(code *)local_res8[0][2])(1,0x1a,*local_res8[0],local_res8[0],0,local_res8[0][6]);
  return 0x10;
}



undefined8 _Unwind_GetGR(longlong param_1,uint param_2)

{
  if (param_2 < 2) {
    return *(undefined8 *)(param_1 + 0x10 + (longlong)(int)param_2 * 8);
  }
                    // WARNING: Subroutine does not return
  abort();
}



void _Unwind_SetGR(longlong param_1,uint param_2,undefined8 param_3)

{
  if (param_2 < 2) {
    *(undefined8 *)(param_1 + 0x10 + (longlong)(int)param_2 * 8) = param_3;
    return;
  }
                    // WARNING: Subroutine does not return
  abort();
}



undefined8 _Unwind_GetCFA(undefined8 *param_1)

{
  return *param_1;
}



undefined8 _Unwind_GetIP(longlong param_1)

{
  return *(undefined8 *)(param_1 + 8);
}



undefined8 _Unwind_GetIPInfo(longlong param_1,undefined4 *param_2)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(param_1 + 8);
  *param_2 = 0;
  return uVar1;
}



void _Unwind_SetIP(longlong param_1,undefined8 param_2)

{
  *(undefined8 *)(param_1 + 8) = param_2;
  return;
}



undefined8 _Unwind_GetLanguageSpecificData(longlong param_1)

{
  return *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x38);
}



longlong _Unwind_GetRegionStart(longlong param_1)

{
  return (ulonglong)**(uint **)(*(longlong *)(param_1 + 0x20) + 0x10) +
         *(longlong *)(*(longlong *)(param_1 + 0x20) + 8);
}



longlong _Unwind_FindEnclosingFunction(DWORD64 param_1)

{
  PRUNTIME_FUNCTION p_Var1;
  longlong lVar2;
  ulonglong local_10 [2];
  
  p_Var1 = RtlLookupFunctionEntry(param_1,local_10,(PUNWIND_HISTORY_TABLE)0x0);
  lVar2 = 0;
  if (p_Var1 != (PRUNTIME_FUNCTION)0x0) {
    lVar2 = p_Var1->BeginAddress + local_10[0];
  }
  return lVar2;
}



undefined8 _Unwind_GetDataRelBase(void)

{
  return 0;
}



undefined8 _Unwind_GetTextRelBase(longlong param_1)

{
  return *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 8);
}



undefined8
_GCC_specific_handler
          (PEXCEPTION_RECORD param_1,PVOID param_2,PCONTEXT param_3,ULONG_PTR *param_4,
          undefined *param_5)

{
  DWORD DVar1;
  undefined8 *ReturnValue;
  PUNWIND_HISTORY_TABLE HistoryTable;
  int iVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 local_68;
  PVOID pvStack_60;
  PVOID local_58;
  ULONG_PTR UStack_50;
  ULONG_PTR *local_48;
  
  DVar1 = param_1->ExceptionCode;
  ReturnValue = (undefined8 *)param_1->ExceptionInformation[0];
  if ((param_1->ExceptionFlags & 0x20) == 0) {
    if (DVar1 == 0x21474343) {
      if (param_2 != (PVOID)param_1->ExceptionInformation[1]) {
        return 1;
      }
      RtlUnwindEx(param_2,(PVOID)param_1->ExceptionInformation[2],param_1,ReturnValue,param_3,
                  (PUNWIND_HISTORY_TABLE)param_4[8]);
                    // WARNING: Subroutine does not return
      abort();
    }
    local_68 = *(undefined8 *)(param_4[5] + 0x98);
    pvStack_60 = (PVOID)*param_4;
    local_58 = (PVOID)0xdeadbeef;
    UStack_50 = 0xdeadbeef;
    local_48 = param_4;
    if (DVar1 == 0x22474343) {
      (*(code *)ReturnValue[2])(1,10,*ReturnValue,ReturnValue,&local_68,ReturnValue[6]);
      uVar4 = *ReturnValue;
      uVar3 = 10;
    }
    else {
      if (DVar1 != 0x20474343) {
        return 1;
      }
      uVar4 = *ReturnValue;
      if ((param_1->ExceptionFlags & 6) == 0) {
        iVar2 = (*(code *)param_5)(1,1,uVar4,ReturnValue,&local_68);
        if (iVar2 == 8) {
          return 1;
        }
        if ((iVar2 == 6) &&
           (iVar2 = (*(code *)param_5)(1,6,*ReturnValue,ReturnValue,&local_68), iVar2 == 7)) {
          ReturnValue[3] = param_2;
          ReturnValue[4] = pvStack_60;
          ReturnValue[5] = UStack_50;
          param_1->ExceptionInformation[3] = UStack_50;
          HistoryTable = (PUNWIND_HISTORY_TABLE)param_4[8];
          param_1->NumberParameters = 4;
          param_1->ExceptionInformation[1] = (ULONG_PTR)param_2;
          param_1->ExceptionInformation[2] = (ULONG_PTR)pvStack_60;
          RtlUnwindEx(param_2,pvStack_60,param_1,local_58,param_3,HistoryTable);
        }
        goto LAB_140014de4;
      }
      uVar3 = 2;
    }
    iVar2 = (*(code *)param_5)(1,uVar3,uVar4,ReturnValue,&local_68);
    if (iVar2 != 8) {
      if (iVar2 == 7) {
        param_1->ExceptionInformation[3] = UStack_50;
        param_1->ExceptionInformation[1] = (ULONG_PTR)param_2;
        param_1->ExceptionInformation[2] = (ULONG_PTR)pvStack_60;
        RaiseException(0x21474343,1,4,param_1->ExceptionInformation);
      }
LAB_140014de4:
                    // WARNING: Subroutine does not return
      abort();
    }
  }
  else {
    *(ULONG_PTR *)(param_4[5] + 0x88) = param_1->ExceptionInformation[3];
  }
  return 1;
}



undefined8 _Unwind_RaiseException(ULONG_PTR param_1)

{
  ULONG_PTR local_res8 [4];
  
  *(undefined1 (*) [16])(param_1 + 0x10) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(param_1 + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(param_1 + 0x30) = (undefined1  [16])0x0;
  local_res8[0] = param_1;
  RaiseException(0x20474343,0,1,local_res8);
  return 5;
}



void _Unwind_Resume(PVOID param_1)

{
  ULONG_PTR UVar1;
  longlong lVar2;
  _EXCEPTION_RECORD **pp_Var3;
  PUNWIND_HISTORY_TABLE p_Var4;
  EXCEPTION_RECORD local_678;
  _UNWIND_HISTORY_TABLE local_5d8;
  _CONTEXT local_4f8;
  
  local_4f8.ContextFlags = 0x10001f;
  UVar1 = *(ULONG_PTR *)((longlong)param_1 + 0x20);
  pp_Var3 = &local_678.ExceptionRecord;
  for (lVar2 = 0x12; lVar2 != 0; lVar2 = lVar2 + -1) {
    *pp_Var3 = (_EXCEPTION_RECORD *)0x0;
    pp_Var3 = pp_Var3 + 1;
  }
  local_678.ExceptionInformation[1] = *(ULONG_PTR *)((longlong)param_1 + 0x18);
  p_Var4 = &local_5d8;
  for (lVar2 = 0x1b; lVar2 != 0; lVar2 = lVar2 + -1) {
    p_Var4->Count = 0;
    p_Var4->LocalHint = '\0';
    p_Var4->GlobalHint = '\0';
    p_Var4->Search = '\0';
    p_Var4->Once = '\0';
    p_Var4 = (PUNWIND_HISTORY_TABLE)&p_Var4->LowAddress;
  }
  local_678.ExceptionInformation[3] = *(ULONG_PTR *)((longlong)param_1 + 0x28);
  local_678.ExceptionCode = 0x20474343;
  local_678.ExceptionFlags = 1;
  local_678.NumberParameters = 4;
  local_678.ExceptionInformation[0] = (ULONG_PTR)param_1;
  local_678.ExceptionInformation[2] = UVar1;
  RtlCaptureContext(&local_4f8);
  RtlUnwindEx(*(PVOID *)((longlong)param_1 + 0x18),*(PVOID *)((longlong)param_1 + 0x20),&local_678,
              param_1,&local_4f8,&local_5d8);
                    // WARNING: Subroutine does not return
  abort();
}



void _Unwind_Resume_or_Rethrow(undefined8 *param_1)

{
  if (param_1[2] == 0) {
    _Unwind_RaiseException((ULONG_PTR)param_1);
  }
  else {
    _text(param_1);
  }
                    // WARNING: Subroutine does not return
  abort();
}



void _Unwind_ForcedUnwind(undefined8 *param_1,undefined8 param_2,undefined8 param_3)

{
  *(undefined1 (*) [16])(param_1 + 5) = (undefined1  [16])0x0;
  param_1[7] = 0;
  param_1[2] = param_2;
  param_1[6] = param_3;
  *(undefined1 (*) [16])(param_1 + 3) = (undefined1  [16])0x0;
  _text(param_1);
  return;
}



void _Unwind_DeleteException(longlong param_1)

{
  if (*(code **)(param_1 + 8) != (code *)0x0) {
                    // WARNING: Could not recover jumptable at 0x000140015081. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)(param_1 + 8))(1,param_1);
    return;
  }
  return;
}



undefined8 _Unwind_Backtrace(undefined *param_1,undefined8 param_2)

{
  DWORD64 *pDVar1;
  DWORD64 *pDVar2;
  DWORD64 ControlPc;
  int iVar3;
  PEXCEPTION_ROUTINE puVar4;
  PRUNTIME_FUNCTION p_Var5;
  longlong lVar6;
  PUNWIND_HISTORY_TABLE p_Var7;
  undefined1 local_678 [16];
  undefined1 local_668 [16];
  DWORD64 *local_658;
  undefined1 local_648 [16];
  undefined1 local_638 [16];
  undefined1 local_628 [16];
  undefined1 local_618 [16];
  undefined1 local_608 [16];
  _UNWIND_HISTORY_TABLE local_5f8;
  _CONTEXT local_518;
  
  local_678 = (undefined1  [16])0x0;
  local_668 = (undefined1  [16])0x0;
  p_Var7 = &local_5f8;
  for (lVar6 = 0x1b; lVar6 != 0; lVar6 = lVar6 + -1) {
    p_Var7->Count = 0;
    p_Var7->LocalHint = '\0';
    p_Var7->GlobalHint = '\0';
    p_Var7->Search = '\0';
    p_Var7->Once = '\0';
    p_Var7 = (PUNWIND_HISTORY_TABLE)&p_Var7->LowAddress;
  }
  local_658 = (DWORD64 *)0x0;
  local_648 = (undefined1  [16])0x0;
  local_518.ContextFlags = 0x10001f;
  local_638 = (undefined1  [16])0x0;
  local_628 = (undefined1  [16])0x0;
  local_618 = (undefined1  [16])0x0;
  local_608 = (undefined1  [16])0x0;
  RtlCaptureContext(&local_518);
  local_628._8_8_ = &local_518;
  local_608._0_8_ = &local_5f8;
  local_658 = (DWORD64 *)local_648;
  while( true ) {
    ControlPc = local_518.Rip;
    pDVar1 = local_658;
    *local_658 = local_518.Rip;
    p_Var5 = RtlLookupFunctionEntry(ControlPc,local_658 + 1,&local_5f8);
    pDVar2 = local_658;
    pDVar1[2] = (DWORD64)p_Var5;
    if ((PRUNTIME_FUNCTION)local_658[2] == (PRUNTIME_FUNCTION)0x0) {
      return 5;
    }
    puVar4 = RtlVirtualUnwind(0,local_658[1],local_518.Rip,(PRUNTIME_FUNCTION)local_658[2],
                              &local_518,(PVOID *)(local_658 + 7),local_658 + 3,
                              (PKNONVOLATILE_CONTEXT_POINTERS)0x0);
    local_678._0_8_ = local_518.Rsp;
    pDVar2[6] = (DWORD64)puVar4;
    local_678._8_8_ = local_518.Rip;
    iVar3 = (*(code *)param_1)(local_678,param_2);
    if (iVar3 != 0) break;
    if (local_518.Rip == 0) {
      return 5;
    }
  }
  return 3;
}



void _text(longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *param_1;
  if (lVar1 != 0) {
    lVar2 = 0;
    do {
      if (param_1[lVar2 + 1] != 0) {
        free(*(void **)(param_1[lVar2 + 1] + -8));
      }
      lVar2 = lVar2 + 1;
    } while (lVar1 != lVar2);
  }
  free(param_1);
  return;
}



void * FUN_140015260(size_t *param_1)

{
  ulonglong uVar1;
  size_t _Size;
  void *pvVar2;
  void *pvVar3;
  
  uVar1 = param_1[1];
  _Size = *param_1;
  if (uVar1 < 9) {
    pvVar2 = malloc(_Size + 8);
    if (pvVar2 == (void *)0x0) {
LAB_1400152f2:
                    // WARNING: Subroutine does not return
      abort();
    }
    pvVar3 = (void *)param_1[3];
    *(void **)pvVar2 = pvVar2;
    pvVar2 = (void *)((longlong)pvVar2 + 8);
  }
  else {
    pvVar3 = malloc(uVar1 + 7 + _Size);
    if (pvVar3 == (void *)0x0) goto LAB_1400152f2;
    pvVar2 = (void *)((longlong)pvVar3 + uVar1 + 7 & -uVar1);
    *(void **)((longlong)pvVar2 + -8) = pvVar3;
    pvVar3 = (void *)param_1[3];
  }
  if (pvVar3 != (void *)0x0) {
    pvVar3 = memcpy(pvVar2,pvVar3,_Size);
    return pvVar3;
  }
  pvVar3 = memset(pvVar2,0,_Size);
  return pvVar3;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void __emutls_get_address(size_t *param_1)

{
  ulonglong uVar1;
  DWORD dwErrCode;
  BOOL BVar2;
  DWORD DVar3;
  ulonglong *_Memory;
  void *pvVar4;
  ulonglong uVar5;
  size_t sVar6;
  
  if (_CRT_MT == 0) {
    if (param_1[2] != 0) {
      return;
    }
    pvVar4 = FUN_140015260(param_1);
    param_1[2] = (size_t)pvVar4;
    return;
  }
  sVar6 = param_1[2];
  if (sVar6 == 0) {
    if (_CRT_MT == 0) {
LAB_1400154e1:
      sVar6 = param_1[2];
      if (sVar6 == 0) goto LAB_1400154ee;
    }
    else {
      if (_data == 0) {
        LOCK();
        _DAT_1400c0254 = _DAT_1400c0254 + 1;
        UNLOCK();
        if (_DAT_1400c0254 == 0) {
          InitializeCriticalSection((LPCRITICAL_SECTION)&DAT_1400fc220);
          DVar3 = TlsAlloc();
          if (DVar3 == 0xffffffff) {
            DVar3 = GetLastError();
          }
          else {
            DAT_1400fc208 = DVar3;
            DVar3 = __mingwthr_key_dtor(DVar3,_text);
          }
          if (DVar3 != 0) goto LAB_140015544;
          _data = 1;
        }
        else {
          do {
            Sleep(0);
          } while (_data == 0);
        }
        if (_CRT_MT == 0) goto LAB_1400154e1;
      }
      EnterCriticalSection((LPCRITICAL_SECTION)&DAT_1400fc220);
      sVar6 = param_1[2];
      if (sVar6 == 0) {
LAB_1400154ee:
        sVar6 = _bss + 1;
        _bss = sVar6;
        param_1[2] = sVar6;
      }
      if (_CRT_MT != 0) {
        LeaveCriticalSection((LPCRITICAL_SECTION)&DAT_1400fc220);
      }
    }
  }
  DVar3 = DAT_1400fc208;
  dwErrCode = GetLastError();
  _Memory = TlsGetValue(DVar3);
  SetLastError(dwErrCode);
  if (_Memory == (ulonglong *)0x0) {
    _Memory = calloc(sVar6 + 0x21,8);
    if (_Memory == (ulonglong *)0x0) {
LAB_140015544:
                    // WARNING: Subroutine does not return
      abort();
    }
    *_Memory = sVar6 + 0x20;
  }
  else {
    uVar1 = *_Memory;
    if (sVar6 <= uVar1) goto LAB_14001537b;
    uVar5 = uVar1 * 2;
    if (uVar1 * 2 < sVar6) {
      uVar5 = sVar6 + 0x20;
    }
    _Memory = realloc(_Memory,uVar5 * 8 + 8);
    if (_Memory == (ulonglong *)0x0) goto LAB_140015544;
    *_Memory = uVar5;
    memset(_Memory + uVar1 + 1,0,(uVar5 - uVar1) * 8);
  }
  BVar2 = TlsSetValue(DAT_1400fc208,_Memory);
  if (BVar2 == 0) {
    GetLastError();
  }
LAB_14001537b:
  if (_Memory[sVar6] == 0) {
    pvVar4 = FUN_140015260(param_1);
    _Memory[sVar6] = (ulonglong)pvVar4;
  }
  return;
}



void __emutls_register_common
               (ulonglong *param_1,ulonglong param_2,ulonglong param_3,ulonglong param_4)

{
  if (*param_1 < param_2) {
    *param_1 = param_2;
    param_1[3] = 0;
  }
  if (param_1[1] < param_3) {
    param_1[1] = param_3;
  }
  if ((param_4 != 0) && (*param_1 == param_2)) {
    param_1[3] = param_4;
    return;
  }
  return;
}



double __strtod(char *s,char **sp)

{
  uint uVar1;
  double unaff_RBX;
  long expo;
  ULong bits [2];
  
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: anon_union_8_2_9472fd79 u@[???]
  uVar1 = __strtodg(s,sp,&__strtod::fpi,&expo,bits);
  switch(uVar1 & 7) {
  case 0:
  case 6:
    unaff_RBX = 0.0;
    goto joined_r0x00014001563b;
  case 1:
    unaff_RBX = (double)CONCAT44((expo + 0x433) * 0x100000 | bits[1] & 0xffefffff,bits[0]);
joined_r0x00014001563b:
    if ((uVar1 & 8) == 0) {
      return unaff_RBX;
    }
    goto LAB_1400155df;
  case 2:
    unaff_RBX = (double)CONCAT44(bits[1],bits[0]);
    break;
  case 3:
    unaff_RBX = INFINITY;
    break;
  case 4:
    unaff_RBX = NAN;
    break;
  case 5:
    unaff_RBX = (double)(CONCAT44(bits[1],bits[0]) | 0x7ff0000000000000);
  default:
  }
  if ((uVar1 & 8) != 0) {
LAB_1400155df:
    unaff_RBX = (double)((ulonglong)unaff_RBX & 0xffffffff |
                        (ulonglong)((uint)((ulonglong)unaff_RBX >> 0x20) | 0x80000000) << 0x20);
  }
  return unaff_RBX;
}



float __strtof(char *s,char **sp)

{
  uint uVar1;
  ULong bits [1];
  long expo;
  
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: anon_union_4_2_9472fd7b u@[???]
  uVar1 = __strtodg(s,sp,&__strtof::fpi0,&expo,bits);
  switch(uVar1 & 7) {
  default:
    bits[0] = 0;
    break;
  case 1:
  case 5:
    bits[0] = (expo + 0x96) * 0x800000 | bits[0] & 0x7fffff;
    break;
  case 2:
    break;
  case 3:
    bits[0] = 0x7f800000;
    break;
  case 4:
    bits[0] = 0x7fc00000;
  }
  if ((uVar1 & 8) != 0) {
    bits[0] = bits[0] | 0x80000000;
  }
  return (float)bits[0];
}



long_double * __strtold(long_double *__return_storage_ptr__,char *src,char **endptr)

{
  uint uVar1;
  long expo;
  ULong bits [2];
  lD ret;
  
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: UShort * L@[???]
  ret.L = (UShort  [5])(float10)0;
  uVar1 = __strtodg(src,endptr,(FPI *)&fpi0_0,&expo,bits);
  switch(uVar1 & 7) {
  case 1:
  case 5:
    ret.L[4] = (short)expo + 0x403e;
  case 2:
    ret._0_4_ = bits[0];
    ret._4_4_ = bits[1];
  default:
    break;
  case 3:
    ret._6_4_ = 0x7fff8000;
    if ((uVar1 & 8) == 0) goto LAB_140015790;
    goto LAB_14001578a;
  case 4:
    ret._6_4_ = 0x7fffc000;
  }
  if ((uVar1 & 8) != 0) {
LAB_14001578a:
    ret.L[4] = ret.L[4] | 0x8000;
  }
LAB_140015790:
  *(UShort (*) [5])__return_storage_ptr__ = ret.L;
  return __return_storage_ptr__;
}



wint_t btowc(int c)

{
  UINT CodePage;
  int iVar1;
  uchar ch;
  wchar_t wc;
  
  if (c != -1) {
    ch = (uchar)c;
    wc = L'\xffff';
    CodePage = ___lc_codepage_func();
    iVar1 = MultiByteToWideChar(CodePage,8,(LPCSTR)&ch,1,&wc,1);
    if (iVar1 != 0) {
      return wc;
    }
  }
  return 0xffff;
}



int wctob(wint_t wc)

{
  UINT CodePage;
  int iVar1;
  char c;
  wchar_t w;
  int invalid_char;
  
  invalid_char = 0;
  w = wc;
  CodePage = ___lc_codepage_func();
  iVar1 = WideCharToMultiByte(CodePage,0,&w,1,&c,1,(LPCSTR)0x0,&invalid_char);
  if ((iVar1 == 0) || (invalid_char != 0)) {
    iVar1 = -1;
  }
  else {
    iVar1 = (int)c;
  }
  return iVar1;
}



wctype_t wctype(char *property)

{
  int iVar1;
  int iVar2;
  anon_struct_16_2_f7718127 *paVar3;
  
                    // Unresolved local var: int i@[???]
  iVar2 = 0;
  paVar3 = cmap;
  do {
    iVar1 = strcmp(property,paVar3->name);
    if (iVar1 == 0) {
      return cmap[iVar2].flags;
    }
    iVar2 = iVar2 + 1;
    paVar3 = paVar3 + 1;
  } while (iVar2 != 0xb);
  return 0;
}



int __mingw_vsnprintf(char *buf,size_t length,char *fmt,va_list argv)

{
  int iVar1;
  int iVar2;
  
                    // Unresolved local var: int retval@[???]
  if (length != 0) {
    iVar2 = (int)length + -1;
    iVar1 = __mingw_pformat(0,buf,iVar2,fmt,argv);
    if (iVar1 <= iVar2) {
      iVar2 = iVar1;
    }
    buf[iVar2] = '\0';
    return iVar1;
  }
  iVar2 = __mingw_pformat(0,buf,0,fmt,argv);
  return iVar2;
}



int __mingw_vsnwprintf(wchar_t *buf,size_t length,wchar_t *fmt,va_list argv)

{
  int iVar1;
  int iVar2;
  int max;
  
                    // Unresolved local var: int retval@[???]
  if (length == 0) {
    iVar2 = __mingw_wpformat(0,buf,0,fmt,argv);
    return iVar2;
  }
  max = (int)length + -1;
  iVar1 = __mingw_wpformat(0,buf,max,fmt,argv);
  iVar2 = iVar1;
  if (max <= iVar1) {
    iVar2 = max;
  }
  buf[iVar2] = L'\0';
  return iVar1;
}



int __mingw_vsprintf(char *buf,char *fmt,va_list argv)

{
  int iVar1;
  
                    // Unresolved local var: int retval@[???]
  iVar1 = __mingw_pformat(0x4000,buf,0,fmt,argv);
  buf[iVar1] = '\0';
  return iVar1;
}



__Bigint * __increment_D2A(__Bigint *b)

{
  ULong *pUVar1;
  ULong *pUVar2;
  __Bigint *p_Var3;
  int iVar4;
  longlong lVar5;
  
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xe@[???]
                    // Unresolved local var: __Bigint * b1@[???]
  iVar4 = b->wds;
  lVar5 = (longlong)iVar4;
  pUVar2 = b->x;
  do {
    if (*pUVar2 != 0xffffffff) {
      *pUVar2 = *pUVar2 + 1;
      return b;
    }
    pUVar1 = pUVar2 + 1;
    *pUVar2 = 0;
    pUVar2 = pUVar1;
  } while (pUVar1 < b->x + lVar5);
  p_Var3 = b;
  if (b->maxwds <= iVar4) {
    p_Var3 = __Balloc_D2A(b->k + 1);
    memcpy(&p_Var3->sign,&b->sign,(longlong)b->wds * 4 + 8);
    __Bfree_D2A(b);
    iVar4 = p_Var3->wds;
    lVar5 = (longlong)iVar4;
  }
  p_Var3->wds = iVar4 + 1;
  p_Var3->x[lVar5] = 1;
  return p_Var3;
}



int rvOK(dbl_union *d,FPI *fpi,long *expo,ULong *bits,int exact,int rd,int *irv)

{
  int k;
  uint n;
  ULong UVar1;
  uint uVar2;
  __Bigint *b;
  int *piVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  int k_00;
  double in_XMM0_Qa;
  int bdif;
  int e;
  
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: ULong carry@[???]
                    // Unresolved local var: ULong inex@[???]
                    // Unresolved local var: ULong lostbits@[???]
                    // Unresolved local var: int j@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int k1@[???]
                    // Unresolved local var: int nb@[???]
                    // Unresolved local var: int rv@[???]
  b = __d2b_D2A(in_XMM0_Qa,&e,&bdif);
  n = fpi->nbits;
  iVar5 = bdif - n;
  e = e + iVar5;
  if (iVar5 < 1) {
    iVar4 = 0;
    if (exact == 0) goto LAB_140015bec;
    if (iVar5 != 0) {
      iVar4 = n - bdif;
      bdif = iVar5;
      b = __lshift_D2A(b,iVar4);
      iVar5 = bdif;
    }
    bdif = iVar5;
    UVar1 = 0;
    uVar2 = 0;
  }
  else if (n == 0x35) {
    iVar4 = 0;
    if ((exact == 0) || (iVar4 = 0, fpi->rounding != 1)) goto LAB_140015bec;
    bdif = iVar5;
    UVar1 = __any_on_D2A(b,iVar5);
    uVar2 = (uint)(UVar1 != 0) << 4;
    __rshift_D2A(b,bdif);
  }
  else if (rd == 1) {
    bdif = iVar5;
    UVar1 = __any_on_D2A(b,iVar5);
    __rshift_D2A(b,bdif);
LAB_140015d6b:
    uVar2 = (uint)(UVar1 != 0) << 4;
  }
  else {
    if (rd == 2) {
      bdif = iVar5;
      UVar1 = __any_on_D2A(b,iVar5);
      __rshift_D2A(b,bdif);
    }
    else {
      iVar4 = iVar5 + -1;
      if (iVar4 == 0) {
        iVar4 = 0;
        if (exact == 0) goto LAB_140015bec;
        uVar2 = b->x[0] >> 1;
      }
      else {
        uVar2 = b->x[iVar4 >> 5] >> ((byte)iVar4 & 0x1f);
      }
      bdif = iVar5;
      UVar1 = __any_on_D2A(b,iVar5);
      __rshift_D2A(b,bdif);
      if ((uVar2 & 1) == 0) goto LAB_140015d6b;
    }
    b = __increment_D2A(b);
    uVar2 = 0;
    if ((n & 0x1f) != 0) {
      uVar2 = 0x20 - (n & 0x1f);
    }
    uVar6 = 0x1f;
    if (b->x[b->wds + -1] != 0) {
      for (; b->x[b->wds + -1] >> uVar6 == 0; uVar6 = uVar6 - 1) {
      }
    }
    if ((uVar6 ^ 0x1f) == uVar2) {
      uVar2 = 0x20;
    }
    else {
      if (UVar1 == 0) {
        UVar1 = b->x[0] & 1;
      }
      __rshift_D2A(b,1);
      uVar2 = 0x20;
      e = e + 1;
    }
  }
  iVar5 = fpi->emin;
  if (e < iVar5) {
    k_00 = iVar5 - e;
    e = iVar5;
    if (((int)n < k_00) || (fpi->sudden_underflow != 0)) {
      b->wds = 0;
      *irv = 0x50;
      uVar6 = 0;
    }
    else {
      k = k_00 + -1;
      if ((0 < k) && (UVar1 == 0)) {
        UVar1 = __any_on_D2A(b,k);
      }
      iVar4 = 0;
      iVar5 = bdif;
      if (UVar1 == 0 && exact == 0) goto LAB_140015bec;
      uVar6 = b->x[k >> 5];
      __rshift_D2A(b,k_00);
      *irv = 2;
      if ((1 << ((byte)k & 0x1f) & uVar6) == 0) {
        uVar6 = 0x50;
        if (UVar1 == 0) {
          uVar6 = uVar2;
        }
      }
      else {
        b = __increment_D2A(b);
        uVar6 = 0x60;
      }
    }
  }
  else {
    uVar6 = uVar2;
    if (fpi->emax < e) {
      e = fpi->emax + 1;
      *irv = 0xa3;
      piVar3 = _errno();
      *piVar3 = 0x22;
      b->wds = 0;
      uVar6 = 0;
    }
  }
  *expo = e;
  __copybits_D2A(bits,n,b);
  *irv = *irv | uVar6;
  iVar4 = 1;
  iVar5 = bdif;
LAB_140015bec:
  bdif = iVar5;
  __Bfree_D2A(b);
  return iVar4;
}



void __decrement_D2A(__Bigint *b)

{
  int iVar1;
  ULong *pUVar2;
  ULong *pUVar3;
  
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xe@[???]
  iVar1 = b->wds;
  pUVar3 = b->x;
  do {
    if (*pUVar3 != 0) {
      *pUVar3 = *pUVar3 - 1;
      return;
    }
    pUVar2 = pUVar3 + 1;
    *pUVar3 = 0xffffffff;
    pUVar3 = pUVar2;
  } while (pUVar2 < b->x + iVar1);
  return;
}



__Bigint * __set_ones_D2A(__Bigint *b,int n)

{
  ULong *pUVar1;
  void *pvVar2;
  int iVar3;
  size_t sVar4;
  ULong *pUVar5;
  
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xe@[???]
  iVar3 = n + 0x1f >> 5;
  if (b->k < iVar3) {
    __Bfree_D2A(b);
    b = __Balloc_D2A(iVar3);
  }
  iVar3 = n >> 5;
  if ((n & 0x1fU) == 0) {
    b->wds = iVar3;
    pUVar5 = b->x;
    pUVar1 = pUVar5 + iVar3;
    if (pUVar5 < pUVar1) {
      sVar4 = ((ulonglong)((longlong)pUVar1 + (-1 - (longlong)pUVar5)) & 0xfffffffffffffffc) + 4;
      if (pUVar1 < (undefined1 *)((longlong)b->x + 1U)) {
        sVar4 = 4;
      }
      memset(pUVar5,0xff,sVar4);
    }
    return b;
  }
  pUVar5 = b->x;
  b->wds = iVar3 + 1;
  pUVar1 = pUVar5 + (iVar3 + 1);
  if (pUVar5 < pUVar1) {
    sVar4 = ((ulonglong)((longlong)pUVar1 + (-1 - (longlong)pUVar5)) & 0xfffffffffffffffc) + 4;
    if (pUVar1 < (undefined1 *)((longlong)b->x + 1U)) {
      sVar4 = 4;
    }
    pvVar2 = memset(pUVar5,0xff,sVar4);
    pUVar5 = (ULong *)((longlong)pvVar2 + sVar4);
  }
  pUVar5[-1] = pUVar5[-1] >> (0x20U - (char)(n & 0x1fU) & 0x1f);
  return b;
}



int __strtodg(char *s00,char **se,FPI *fpi,long *expo,ULong *bits)

{
  char cVar1;
  int n;
  uint uVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  __Bigint *v;
  int iVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  int iVar10;
  uint uVar11;
  uint uVar12;
  uint uVar13;
  lconv *plVar14;
  size_t sVar15;
  __Bigint *v_00;
  __Bigint *p_Var16;
  __Bigint *b;
  __Bigint *b_00;
  int *piVar17;
  ULong *pUVar18;
  double *pdVar19;
  char *pcVar20;
  uint uVar21;
  int iVar22;
  longlong lVar23;
  char *s_00;
  int iVar24;
  char *pcVar25;
  longlong lVar26;
  int iVar27;
  int iVar28;
  int iVar29;
  int iVar30;
  double dVar31;
  double dVar32;
  int local_11c;
  int local_110;
  uint local_f8;
  int local_f4;
  int local_ec;
  __Bigint *local_e0;
  uint local_d8;
  __Bigint *local_d0;
  int abe;
  int abits;
  int irv;
  int rvbits;
  int rve;
  char *s;
  __Bigint *rvb;
  
                    // Unresolved local var: int asub@[???]
                    // Unresolved local var: int bb0@[???]
                    // Unresolved local var: int bb2@[???]
                    // Unresolved local var: int bb5@[???]
                    // Unresolved local var: int bbe@[???]
                    // Unresolved local var: int bd2@[???]
                    // Unresolved local var: int bd5@[???]
                    // Unresolved local var: int bbbits@[???]
                    // Unresolved local var: int bs2@[???]
                    // Unresolved local var: int c@[???]
                    // Unresolved local var: int decpt@[???]
                    // Unresolved local var: int denorm@[???]
                    // Unresolved local var: int dsign@[???]
                    // Unresolved local var: int e@[???]
                    // Unresolved local var: int e1@[???]
                    // Unresolved local var: int e2@[???]
                    // Unresolved local var: int emin@[???]
                    // Unresolved local var: int esign@[???]
                    // Unresolved local var: int finished@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int inex@[???]
                    // Unresolved local var: int j@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int nbits@[???]
                    // Unresolved local var: int nd@[???]
                    // Unresolved local var: int nd0@[???]
                    // Unresolved local var: int nf@[???]
                    // Unresolved local var: int nz@[???]
                    // Unresolved local var: int nz0@[???]
                    // Unresolved local var: int rd@[???]
                    // Unresolved local var: int rve1@[???]
                    // Unresolved local var: int sign@[???]
                    // Unresolved local var: int sudden_underflow@[???]
                    // Unresolved local var: char * s0@[???]
                    // Unresolved local var: char * s1@[???]
                    // Unresolved local var: double adj0@[???]
                    // Unresolved local var: double tol@[???]
                    // Unresolved local var: long L@[???]
                    // Unresolved local var: _dbl_union adj@[???]
                    // Unresolved local var: _dbl_union rv@[???]
                    // Unresolved local var: ULong * b@[???]
                    // Unresolved local var: ULong * be@[???]
                    // Unresolved local var: ULong y@[???]
                    // Unresolved local var: ULong z@[???]
                    // Unresolved local var: __Bigint * ab@[???]
                    // Unresolved local var: __Bigint * bb@[???]
                    // Unresolved local var: __Bigint * bb1@[???]
                    // Unresolved local var: __Bigint * bd@[???]
                    // Unresolved local var: __Bigint * bd0@[???]
                    // Unresolved local var: __Bigint * bs@[???]
                    // Unresolved local var: __Bigint * delta@[???]
                    // Unresolved local var: __Bigint * rvb0@[???]
                    // Unresolved local var: char * decimalpoint@[???]
                    // Unresolved local var: int dplen@[???]
  plVar14 = localeconv();
  pcVar25 = plVar14->decimal_point;
  sVar15 = strlen(pcVar25);
  irv = 0;
  rvb = (__Bigint *)0x0;
  n = fpi->nbits;
  pcVar20 = s00;
LAB_140016042:
  cVar1 = *pcVar20;
  switch(cVar1) {
  case '\0':
switchD_140016065_caseD_0:
    if (se != (char **)0x0) {
      *se = s00;
    }
    return 6;
  default:
    local_f4 = 0;
    s = pcVar20;
    goto LAB_140016077;
  case '\t':
  case '\n':
  case '\v':
  case '\f':
  case '\r':
  case ' ':
    goto switchD_140016065_caseD_9;
  case '+':
    local_f4 = 0;
    break;
  case '-':
    local_f4 = 1;
  }
  s = pcVar20 + 1;
  cVar1 = pcVar20[1];
  if (cVar1 != '\0') {
LAB_140016077:
    bVar3 = false;
    if (cVar1 != '0') goto LAB_140016084;
    if ((s[1] & 0xdfU) != 0x58) goto LAB_140016380;
    irv = __gethex_D2A(&s,fpi,expo,&rvb,local_f4);
    if (irv != 6) goto LAB_1400163ac;
    s = s00;
    if (se != (char **)0x0) {
      *se = s00;
    }
    goto LAB_1400163cf;
  }
  goto switchD_140016065_caseD_0;
switchD_140016065_caseD_9:
  pcVar20 = pcVar20 + 1;
  goto LAB_140016042;
LAB_140016380:
  do {
    s = s + 1;
    cVar1 = *s;
  } while (cVar1 == '0');
  bVar3 = true;
  if (cVar1 == '\0') goto LAB_1400163ac;
LAB_140016084:
  s_00 = s;
  local_110 = fpi->sudden_underflow;
  uVar13 = 0;
  iVar6 = 0;
  uVar21 = 0;
  pcVar20 = s;
  while (uVar8 = (uint)cVar1, uVar8 - 0x30 < 10) {
    if (iVar6 < 9) {
      uVar13 = (uVar8 - 0x30) + uVar13 * 10;
    }
    else if (iVar6 < 0x10) {
      uVar21 = (uVar8 - 0x30) + uVar21 * 10;
    }
    pcVar20 = pcVar20 + 1;
    iVar6 = iVar6 + 1;
    cVar1 = *pcVar20;
  }
  iVar27 = iVar6;
  if (*pcVar25 == cVar1) {
    lVar26 = 1;
    cVar1 = pcVar25[1];
    while (cVar1 != '\0') {
      if (pcVar20[lVar26] != cVar1) goto LAB_140016169;
      lVar26 = lVar26 + 1;
      cVar1 = pcVar25[lVar26];
    }
    pcVar20 = pcVar20 + lVar26;
    uVar8 = (uint)*pcVar20;
    if (iVar6 == 0) {
      s = pcVar20;
      if (uVar8 == 0x30) {
        do {
          pcVar25 = s;
          s = pcVar25 + 1;
          uVar8 = (uint)*s;
        } while (uVar8 == 0x30);
        iVar7 = ((int)pcVar25 - (int)pcVar20) + 1;
      }
      else {
        iVar7 = 0;
      }
      pcVar20 = s;
      if (uVar8 - 0x31 < 9) {
        uVar12 = uVar8 - 0x30;
        iVar28 = 1;
        local_e0._0_4_ = iVar7 + 1;
        goto LAB_140016d79;
      }
      local_e0._0_4_ = 0;
      iVar27 = 0;
    }
    else {
      local_e0._0_4_ = 0;
      iVar7 = 0;
      while (uVar12 = uVar8 - 0x30, s_00 = s, uVar12 < 10) {
        iVar7 = iVar7 + 1;
        iVar28 = iVar27;
        if (uVar12 != 0) {
          if (iVar7 < 2) {
            iVar28 = iVar27 + 1;
          }
          else {
            iVar28 = iVar27 + iVar7;
            iVar9 = iVar27;
            do {
              iVar27 = iVar9 + 1;
              if (iVar9 < 9) {
                uVar13 = uVar13 * 10;
              }
              else if (iVar27 < 0x11) {
                uVar21 = uVar21 * 10;
              }
              iVar9 = iVar27;
            } while (iVar28 + -1 != iVar27);
          }
          local_e0._0_4_ = (int)local_e0 + iVar7;
          if (iVar27 < 9) {
LAB_140016d79:
            iVar7 = 0;
            uVar13 = uVar12 + uVar13 * 10;
          }
          else {
            iVar7 = 0;
            if (iVar28 < 0x11) {
              uVar21 = uVar12 + uVar21 * 10;
            }
          }
        }
        uVar8 = (uint)pcVar20[1];
        pcVar20 = pcVar20 + 1;
        iVar27 = iVar28;
      }
    }
    s = pcVar20;
    bVar4 = true;
  }
  else {
LAB_140016169:
    local_e0._0_4_ = 0;
    iVar7 = 0;
    bVar4 = false;
    s = pcVar20;
  }
  pcVar25 = s;
  if ((uVar8 & 0xffffffdf) == 0x45) {
    if ((iVar27 != 0 || iVar7 != 0) || bVar3) {
      cVar1 = s[1];
      if (cVar1 == '+') {
        bVar5 = false;
LAB_140016281:
        cVar1 = s[2];
        s = s + 2;
      }
      else {
        if (cVar1 == '-') {
          bVar5 = true;
          goto LAB_140016281;
        }
        bVar5 = false;
        s = s + 1;
      }
      uVar8 = (uint)cVar1;
      uVar12 = uVar8 - 0x30;
      s00 = pcVar25;
      if (9 < uVar12) {
        s = pcVar25;
        uVar12 = 0;
        goto LAB_140016192;
      }
      if (uVar8 == 0x30) {
        do {
          s = s + 1;
          uVar8 = (uint)*s;
        } while (uVar8 == 0x30);
        uVar12 = 0;
        if (8 < uVar8 - 0x31) goto LAB_140016192;
        uVar12 = uVar8 - 0x30;
      }
      uVar8 = (uint)s[1];
      pcVar25 = s + 1;
      if (uVar8 - 0x30 < 10) {
        pcVar20 = s + 2;
        do {
          pcVar25 = pcVar20;
          uVar12 = (uVar8 - 0x30) + uVar12 * 10;
          uVar8 = (uint)*pcVar25;
          pcVar20 = pcVar25 + 1;
        } while (uVar8 - 0x30 < 10);
        local_d0._0_4_ = 19999;
        lVar26 = (longlong)pcVar25 - (longlong)s;
        s = pcVar25;
        if (lVar26 < 9) goto LAB_14001752e;
      }
      else {
LAB_14001752e:
        s = pcVar25;
        local_d0._0_4_ = 19999;
        if ((int)uVar12 < 20000) {
          local_d0._0_4_ = uVar12;
        }
      }
      uVar12 = -(uint)local_d0;
      if (!bVar5) {
        uVar12 = (uint)local_d0;
      }
      goto LAB_140016192;
    }
    goto LAB_140016550;
  }
  s = pcVar25;
  uVar12 = 0;
LAB_140016192:
  if (iVar27 == 0) {
    if (bVar3 || iVar7 != 0) goto LAB_1400163ac;
    if (bVar4) goto LAB_140016550;
    if (uVar8 == 0x69) {
LAB_140017470:
      iVar6 = __match_D2A(&s,"nf");
      if (iVar6 != 0) {
        s = s + -1;
        iVar6 = __match_D2A(&s,"inity");
        if (iVar6 == 0) {
          s = s + 1;
        }
        irv = 3;
LAB_140016228:
        *expo = fpi->emax + 1;
        goto LAB_1400163ac;
      }
    }
    else if ((int)uVar8 < 0x6a) {
      if (uVar8 == 0x49) goto LAB_140017470;
      if (uVar8 == 0x4e) goto LAB_1400161d0;
    }
    else if (uVar8 == 0x6e) {
LAB_1400161d0:
      iVar6 = __match_D2A(&s,"an");
      if (iVar6 != 0) {
        irv = 4;
        *expo = fpi->emax + 1;
        if (*s != '(') goto LAB_1400163ac;
        irv = __hexnan_D2A(&s,fpi,bits);
        goto LAB_140016228;
      }
    }
LAB_140016550:
    irv = 6;
    s = s00;
    goto LAB_1400163ac;
  }
  irv = 1;
  iVar7 = uVar12 - (int)local_e0;
  uVar8 = fpi->rounding & 3;
  local_f8 = uVar8 - local_f4;
  pdVar19 = (double *)(ulonglong)local_f8;
  if (uVar8 != 2) {
    local_f8 = local_f4 + 1;
    pdVar19 = (double *)(ulonglong)local_f8;
    if (uVar8 != 3) {
      local_f8 = (uint)(uVar8 == 0);
    }
  }
  dVar31 = (double)uVar13;
  if (iVar6 == 0) {
    iVar6 = iVar27;
  }
  iVar28 = 0x10;
  if (iVar27 < 0x11) {
    iVar28 = iVar27;
  }
  if (9 < iVar27) {
    pdVar19 = __tens_D2A;
    dVar31 = dVar31 * __tens_D2A[iVar28 + -9] + (double)uVar21;
  }
  iVar9 = iVar7;
  if ((n < 0x36) && (iVar27 < 0x10)) {
    if (iVar7 == 0) {
      iVar9 = rvOK((dbl_union *)pdVar19,fpi,expo,bits,1,local_f8,&irv);
      if (iVar9 != 0) goto LAB_1400163ac;
      iVar9 = 0;
    }
    else if (iVar7 < 1) {
      if (-0x17 < iVar7) {
        dVar31 = dVar31 / __tens_D2A[(int)((int)local_e0 - uVar12)];
LAB_140016dec:
        uVar21 = 0;
        goto LAB_14001651e;
      }
    }
    else if (iVar7 < 0x17) {
      uVar21 = SUB84(dVar31,0);
                    // Unresolved local var: ULong L@[???]
      if (uVar21 == 0) {
        iVar9 = 0;
                    // Unresolved local var: int ret@[???]
        for (uVar21 = (uint)((ulonglong)dVar31 >> 0x20) | 0x100000; (uVar21 & 1) == 0;
            uVar21 = uVar21 >> 1 | 0x80000000) {
          iVar9 = iVar9 + 1;
        }
        uVar21 = 0x15 - iVar9;
      }
      else {
                    // Unresolved local var: int ret@[???]
        iVar9 = 0;
        for (; (uVar21 & 1) == 0; uVar21 = uVar21 >> 1 | 0x80000000) {
          iVar9 = iVar9 + 1;
        }
        uVar21 = 0x35 - iVar9;
      }
      pdVar19 = (double *)(ulonglong)uVar21;
      dVar31 = dVar31 * __tens_D2A[iVar7];
      uVar21 = (uint)((int)(fivesbits[iVar7] + uVar21) < 0x36);
LAB_14001651e:
      iVar9 = rvOK((dbl_union *)pdVar19,fpi,expo,bits,uVar21,local_f8,&irv);
      if (iVar9 != 0) goto LAB_1400163ac;
      iVar9 = 0;
    }
    else if (iVar7 <= 0x25 - iVar27) {
      uVar21 = iVar7 - (0xf - iVar27);
      pdVar19 = (double *)(ulonglong)uVar21;
      dVar31 = dVar31 * __tens_D2A[0xf - iVar27] * __tens_D2A[(int)uVar21];
      goto LAB_140016dec;
    }
  }
  uVar21 = (iVar27 - iVar28) + iVar9;
  if ((int)uVar21 < 1) {
    if (uVar21 != 0) {
      uVar21 = -uVar21;
      if ((uVar21 & 0xf) != 0) {
        dVar31 = dVar31 / __tens_D2A[(int)(uVar21 & 0xf)];
      }
      if ((uVar21 & 0xfffffff0) != 0) {
        uVar8 = (int)uVar21 >> 4;
        if ((int)(uVar21 & 0xfffffff0) < 0x100) {
          iVar28 = 0;
        }
        else {
          iVar28 = 0;
          uVar21 = uVar8;
          do {
            uVar21 = uVar21 - 0x10;
            uVar11 = (uint)((ulonglong)dVar31 >> 0x20);
            iVar28 = iVar28 + -0x3ff + (uVar11 >> 0x14 & 0x7ff);
            dVar31 = (double)((ulonglong)dVar31 & 0xffffffff |
                             (ulonglong)(uVar11 & 0x800fffff | 0x3ff00000) << 0x20) * 1e-256;
          } while (0xf < (int)uVar21);
          uVar8 = uVar8 & 0xf;
        }
        uVar21 = (uint)((ulonglong)dVar31 >> 0x20);
        iVar28 = iVar28 + -0x3ff + (uVar21 >> 0x14 & 0x7ff);
        dVar32 = (double)((ulonglong)(uVar21 & 0x800fffff | 0x3ff00000) << 0x20 |
                         (ulonglong)dVar31 & 0xffffffff);
        dVar31 = dVar32;
        if (uVar8 != 0) {
          pdVar19 = __tinytens_D2A;
          bVar3 = false;
          do {
            if ((uVar8 & 1) != 0) {
              dVar31 = dVar31 * *pdVar19;
              bVar3 = true;
            }
            pdVar19 = pdVar19 + 1;
            uVar8 = (int)uVar8 >> 1;
          } while (uVar8 != 0);
          if (!bVar3) goto LAB_140016d1e;
        }
        goto LAB_14001663d;
      }
    }
LAB_140016638:
    iVar28 = 0;
  }
  else {
    if ((uVar21 & 0xf) != 0) {
      dVar31 = dVar31 * __tens_D2A[(int)(uVar21 & 0xf)];
    }
    if ((uVar21 & 0xfffffff0) == 0) goto LAB_140016638;
    uVar8 = (int)uVar21 >> 4;
    if ((int)(uVar21 & 0xfffffff0) < 0x100) {
      iVar28 = 0;
    }
    else {
      iVar28 = 0;
      uVar21 = uVar8;
      do {
        uVar21 = uVar21 - 0x10;
        uVar11 = (uint)((ulonglong)dVar31 >> 0x20);
        iVar28 = iVar28 + -0x3ff + (uVar11 >> 0x14 & 0x7ff);
        dVar31 = (double)((ulonglong)dVar31 & 0xffffffff |
                         (ulonglong)(uVar11 & 0x800fffff | 0x3ff00000) << 0x20) * 1e+256;
      } while (0xf < (int)uVar21);
      uVar8 = uVar8 & 0xf;
    }
    uVar21 = (uint)((ulonglong)dVar31 >> 0x20);
    iVar28 = iVar28 + -0x3ff + (uVar21 >> 0x14 & 0x7ff);
    dVar31 = (double)((ulonglong)dVar31 & 0xffffffff |
                     (ulonglong)(uVar21 & 0x800fffff | 0x3ff00000) << 0x20);
    if (uVar8 != 0) {
      pdVar19 = __bigtens_D2A;
      bVar3 = false;
      dVar32 = dVar31;
      do {
        if ((uVar8 & 1) != 0) {
          dVar32 = dVar32 * *pdVar19;
          bVar3 = true;
        }
        pdVar19 = pdVar19 + 1;
        uVar8 = (int)uVar8 >> 1;
      } while (uVar8 != 0);
      if (bVar3) {
LAB_140016d1e:
        dVar31 = dVar32;
      }
    }
  }
LAB_14001663d:
  rvb = __d2b_D2A(dVar31,&rve,&rvbits);
  rve = iVar28 + rve;
  iVar28 = rvbits - n;
  if (0 < iVar28) {
    __rshift_D2A(rvb,iVar28);
    rve = rve + iVar28;
    rvbits = n;
  }
  local_11c = (rve + rvbits) - n;
  if (fpi->emax + 1 < local_11c) {
    local_d8 = 0;
    goto LAB_14001733a;
  }
  iVar28 = fpi->emin;
  if (iVar28 <= local_11c) {
    local_d8 = 0;
    goto LAB_140016731;
  }
  iVar9 = rve - iVar28;
  if (0 < iVar9) {
    rvb = __lshift_D2A(rvb,iVar9);
    rvbits = rvbits + iVar9;
LAB_140016700:
    if (local_110 == 0) {
      local_d8 = 1;
      local_11c = iVar28;
      rve = iVar28;
LAB_140016731:
      v_00 = __s2b_D2A(s_00,iVar6,iVar27,uVar13,(int)sVar15);
      iVar6 = 0;
      if (iVar7 < 0) {
        iVar6 = (int)local_e0 - uVar12;
      }
      iVar27 = 0;
      if (iVar7 >= 0) {
        iVar27 = iVar7;
      }
      iVar9 = 0;
      do {
        local_e0 = __Balloc_D2A(v_00->k);
        memcpy(&local_e0->sign,&v_00->sign,(longlong)v_00->wds * 4 + 8);
        p_Var16 = __Balloc_D2A(rvb->k);
        memcpy(&p_Var16->sign,&rvb->sign,(longlong)rvb->wds * 4 + 8);
        iVar10 = rve;
        iVar22 = rvbits;
        local_d0 = __i2b_D2A(1);
        iVar29 = iVar10 + iVar9;
        iVar24 = iVar22 - iVar9;
        if (iVar29 < 0) {
          iVar30 = iVar27 - iVar29;
          iVar29 = iVar6;
        }
        else {
          iVar30 = iVar27;
          iVar29 = iVar29 + iVar6;
        }
        iVar10 = (iVar22 + iVar10) - n;
        iVar22 = (n + 1) - iVar24;
        if (iVar10 < iVar28) {
          iVar22 = (iVar10 - iVar28) + iVar22;
        }
        iVar10 = iVar29 + iVar22;
        iVar30 = iVar30 + iVar22;
        iVar22 = iVar30;
        if (iVar10 <= iVar30) {
          iVar22 = iVar10;
        }
        if (iVar29 < iVar22) {
          iVar22 = iVar29;
        }
        if (0 < iVar22) {
          iVar10 = iVar10 - iVar22;
          iVar30 = iVar30 - iVar22;
          iVar29 = iVar29 - iVar22;
        }
        b = p_Var16;
        if (0 < iVar6) {
          local_d0 = __pow5mult_D2A(local_d0,iVar6);
          b = __mult_D2A(local_d0,p_Var16);
          __Bfree_D2A(p_Var16);
        }
        iVar22 = iVar10 - iVar9;
        if (iVar22 < 1) {
          if (iVar22 != 0) {
            __rshift_D2A(b,iVar9 - iVar10);
          }
        }
        else {
          b = __lshift_D2A(b,iVar22);
        }
        if (0 < iVar7) {
          local_e0 = __pow5mult_D2A(local_e0,iVar27);
        }
        if (0 < iVar30) {
          local_e0 = __lshift_D2A(local_e0,iVar30);
        }
        if (0 < iVar29) {
          local_d0 = __lshift_D2A(local_d0,iVar29);
        }
        p_Var16 = __diff_D2A(b,local_e0);
        iVar9 = local_110;
        if ((p_Var16->wds < 2) && (p_Var16->x[0] == 0)) goto LAB_140017040;
        uVar13 = p_Var16->sign;
        p_Var16->sign = 0;
        iVar29 = __cmp_D2A(p_Var16,local_d0);
        if ((local_f8 == 0) || (0 < iVar29)) {
          if (iVar29 < 0) {
            if (uVar13 == 0) {
              irv = 0x21;
              if (((1 < iVar24) || (local_11c == iVar28)) || (local_d8 != 0)) goto LAB_140017040;
              p_Var16 = __lshift_D2A(p_Var16,1);
              iVar6 = __cmp_D2A(p_Var16,local_d0);
              if (iVar6 < 1) goto LAB_140017268;
              irv = 0x11;
              local_d8 = 0;
LAB_1400175bb:
              rve = rve - n;
LAB_14001731f:
              rvbits = n;
              rvb = __set_ones_D2A(rvb,n);
              goto LAB_140017040;
            }
          }
          else {
            if (iVar29 != 0) {
              dVar31 = __ratio_D2A(p_Var16,local_d0);
              if (2.0 < dVar31) {
                dVar31 = dVar31 * 0.5;
                uVar21 = (-(uint)(uVar13 == 0) & 0x10) + 0x10;
                uVar13 = (uint)(uVar13 == 0);
                if (2147483647.0 <= dVar31) {
                  local_ec = 0;
                  uVar8 = 0;
                  dVar32 = dVar31;
                }
                else {
                  local_ec = (int)dVar31;
                  dVar32 = (double)local_ec;
                  dVar31 = dVar31 - dVar32;
                  if (local_f8 == 1) {
                    if (uVar13 == 0) {
                      uVar8 = 0;
                      goto LAB_1400169c9;
                    }
LAB_140016fd5:
                    if (0.0 < dVar31) goto LAB_140016fdf;
                  }
                  else if (local_f8 == 2) {
                    if (uVar13 == 0) goto LAB_140016fd5;
                  }
                  else if (0.5 <= dVar31) {
LAB_140016fdf:
                    local_ec = local_ec + 1;
                    uVar21 = 0x30 - uVar21;
                    uVar8 = 0;
                    dVar32 = (double)local_ec;
                    goto LAB_1400169c9;
                  }
                  uVar8 = 0;
                }
              }
              else {
                if (uVar13 == 0) {
                  uVar8 = 0;
                  goto LAB_14001699d;
                }
                local_ec = 0;
                uVar8 = 0;
                uVar13 = 0;
                uVar21 = 0x20;
                dVar31 = 1.0;
                dVar32 = 1.0;
              }
              goto LAB_1400169c9;
            }
            if (uVar13 != 0) {
              if (local_d8 != 0) {
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xe@[???]
                pUVar18 = rvb->x;
                goto LAB_14001764a;
              }
              irv = 0x11;
              if ((iVar24 < n) || ((rvb->x[0] & 1) == 0)) goto LAB_140017268;
              goto LAB_1400177cf;
            }
            if (iVar24 == 1) {
              irv = 1;
              if (local_11c != iVar28) goto LAB_1400175bb;
              irv = 0x21;
              if ((rvb->wds == 1) && (iVar9 = 1, rvb->x[0] != 1)) {
                iVar9 = local_110;
              }
              goto LAB_140017040;
            }
            irv = 0x21;
            if (((iVar24 < n) && (local_d8 == 0)) || ((rvb->x[0] & 1) == 0)) goto LAB_140017040;
            __decrement_D2A(rvb);
          }
          irv = 0x11;
          goto LAB_140017040;
        }
        uVar21 = local_f8 & 1;
        uVar8 = uVar21 ^ uVar13;
        if (uVar21 == uVar13) {
          irv = (-(uint)(uVar21 == 0) & 0x10) + 0x11;
          goto LAB_140017040;
        }
        if (uVar13 != 0) {
          irv = 0x21;
          uVar21 = 0x20;
          uVar13 = 0;
          local_ec = 0;
          dVar31 = 1.0;
          dVar32 = 1.0;
          goto LAB_1400169c9;
        }
        irv = 0x11;
        if (local_11c != iVar28) {
          iVar29 = n;
          if (n < 0x20) {
            iVar22 = 0;
          }
          else {
            lVar26 = 1;
            do {
              lVar23 = lVar26;
              if (rvb->x[lVar23 + -1] != 0) goto LAB_14001699d;
              iVar29 = iVar29 + -0x20;
              lVar26 = lVar23 + 1;
            } while (0x1f < iVar29);
            iVar22 = (int)lVar23;
          }
          if (1 < iVar29) {
                    // Unresolved local var: int ret@[???]
            iVar10 = 0;
            uVar13 = rvb->x[iVar22];
            for (uVar21 = uVar13; (uVar21 & 1) == 0; uVar21 = uVar21 >> 1 | 0x80000000) {
              iVar10 = iVar10 + 1;
            }
            rvb->x[iVar22] = uVar13 >> ((byte)iVar10 & 0x1f);
            if (iVar10 < iVar29 + -1) goto LAB_14001699d;
          }
          rve = local_11c + -1;
          goto LAB_14001731f;
        }
LAB_14001699d:
        if ((iVar24 < 2) && (local_d8 != 0)) {
          irv = 0x50;
          rvb->wds = 0;
          rve = iVar28;
          goto LAB_14001704b;
        }
        local_ec = 0;
        uVar21 = 0x10;
        uVar13 = 1;
        dVar31 = 1.0;
        dVar32 = 1.0;
LAB_1400169c9:
        iVar29 = rve + rvbits;
        if ((rvbits < n) && (local_d8 == 0)) {
          iVar22 = n - rvbits;
          rvb = __lshift_D2A(rvb,iVar22);
          rve = rve - iVar22;
          rvbits = n;
        }
        b_00 = __d2b_D2A(dVar32,&abe,&abits);
        if (abe < 0) {
          __rshift_D2A(b_00,-abe);
        }
        else if (abe != 0) {
          b_00 = __lshift_D2A(b_00,abe);
        }
        v = rvb;
        if (uVar13 == 0) {
          rvb = __sum_D2A(rvb,b_00);
          iVar22 = rvb->wds + -1;
          if (iVar22 < v->wds) {
            uVar13 = 0x1f;
            if (rvb->x[iVar22] != 0) {
              for (; rvb->x[iVar22] >> uVar13 == 0; uVar13 = uVar13 - 1) {
              }
            }
            uVar12 = 0x1f;
            if (v->x[iVar22] != 0) {
              for (; v->x[iVar22] >> uVar12 == 0; uVar12 = uVar12 - 1) {
              }
            }
            uVar11 = local_d8;
            if ((int)(uVar12 ^ 0x1f) <= (int)(uVar13 ^ 0x1f)) goto LAB_140016a6f;
          }
          if (local_d8 != 0) {
            rvbits = rvbits + 1;
            uVar11 = (uint)(rvbits != n);
            goto LAB_140016a6f;
          }
          __rshift_D2A(rvb,1);
          rve = rve + 1;
          local_11c = local_11c + 1;
          __Bfree_D2A(b_00);
          __Bfree_D2A(v);
          if (uVar8 != 0) goto LAB_140017268;
LAB_140016f39:
          iVar9 = __trailz_D2A(rvb);
          local_d8 = 0;
        }
        else {
          rvb = __diff_D2A(rvb,b_00);
          uVar11 = uVar13;
          if (local_d8 == 0) {
            iVar22 = v->wds + -1;
            if (iVar22 < rvb->wds) {
              uVar12 = 0x1f;
              if (rvb->x[iVar22] != 0) {
                for (; rvb->x[iVar22] >> uVar12 == 0; uVar12 = uVar12 - 1) {
                }
              }
              uVar2 = 0x1f;
              if (v->x[iVar22] != 0) {
                for (; v->x[iVar22] >> uVar2 == 0; uVar2 = uVar2 - 1) {
                }
              }
              uVar11 = local_d8;
              if ((int)(uVar12 ^ 0x1f) <= (int)(uVar2 ^ 0x1f)) goto LAB_140016a6f;
            }
            if (local_11c != iVar28) {
              rvb = __lshift_D2A(rvb,1);
              rve = rve + -1;
              local_11c = local_11c + -1;
              __Bfree_D2A(b_00);
              __Bfree_D2A(v);
              goto LAB_140016f39;
            }
            rvbits = rvbits + -1;
            uVar11 = uVar13;
          }
LAB_140016a6f:
          local_d8 = uVar11;
          __Bfree_D2A(b_00);
          __Bfree_D2A(v);
          if (uVar8 != 0) goto LAB_140017040;
          if ((rvbits + rve == iVar29) && (local_ec != 0)) {
            dVar32 = dVar32 * 5e-16;
            if (-dVar32 <= dVar31 - 0.5) {
              if ((dVar32 < dVar31 - 0.5) && (dVar31 < 1.0 - dVar32)) goto LAB_140017030;
            }
            else if (dVar32 < dVar31) goto LAB_140017030;
          }
          iVar9 = 0;
          if (local_d8 == 0) goto LAB_140016f39;
        }
        __Bfree_D2A(b);
        __Bfree_D2A(local_e0);
        __Bfree_D2A(local_d0);
        __Bfree_D2A(p_Var16);
      } while( true );
    }
    local_d8 = 1;
    iVar9 = local_11c + 1;
    local_11c = iVar28;
    rve = iVar28;
    if (iVar28 <= iVar9) goto LAB_140016731;
    rvb->wds = 0;
    rvb->x[0] = 0;
    *expo = iVar28;
    goto LAB_1400171f0;
  }
  if (iVar9 == 0) goto LAB_140016700;
  rvbits = iVar9 + rvbits;
  if (0 < rvbits) {
    __rshift_D2A(rvb,iVar28 - rve);
    goto LAB_140016700;
  }
  if (-2 < rvbits) {
    rvbits = 1;
    rvb->wds = 1;
    rvb->x[0] = 1;
    goto LAB_140016700;
  }
  rvb->wds = 0;
  rvb->x[0] = 0;
  *expo = iVar28;
  if (local_110 != 0) goto LAB_1400171f0;
  uVar13 = (uint)(0 < rvb->wds) * 2 | 0x50;
  goto LAB_1400172c0;
LAB_140017030:
  irv = irv | uVar21;
LAB_140017040:
  local_110 = iVar9;
  if (local_d8 == 0) {
LAB_140017268:
    local_d8 = rvbits;
LAB_14001726e:
    iVar6 = n - local_d8;
    if (iVar6 == 0) {
      local_d8 = 0;
    }
    else {
      if (iVar6 < 1) {
        __rshift_D2A(rvb,local_d8 - n);
      }
      else {
        rvb = __lshift_D2A(rvb,iVar6);
      }
      rve = rve - iVar6;
      local_d8 = 0;
    }
  }
  else {
LAB_14001704b:
    local_d8 = 1;
  }
  goto LAB_140017053;
  while (uVar13 = *pUVar18, pUVar18 = pUVar18 + 1, uVar13 == 0xffffffff) {
LAB_14001764a:
    if (rvb->x + (rvbits >> 5) <= pUVar18) {
      if (((rvbits & 0x1fU) == 0) || ((-1 << (sbyte)(rvbits & 0x1fU) | *pUVar18) == 0xffffffff)) {
        rvbits = 1;
        rvb->wds = 1;
        rvb->x[0] = 1;
        irv = 0x21;
        rve = n + -1 + iVar28;
        goto LAB_14001726e;
      }
      break;
    }
  }
  irv = 0x11;
  if ((rvb->x[0] & 1) != 0) {
LAB_1400177cf:
    irv = 0x11;
    rvb = __increment_D2A(rvb);
    uVar13 = 0x1f;
    if (rvb->x[rvb->wds + -1] != 0) {
      for (; rvb->x[rvb->wds + -1] >> uVar13 == 0; uVar13 = uVar13 - 1) {
      }
    }
    if ((-rvbits & 0x1fU) != (uVar13 ^ 0x1f)) {
      rvbits = rvbits + 1;
    }
    irv = 0x21;
    goto LAB_140017040;
  }
LAB_140017053:
  *expo = rve;
  __Bfree_D2A(b);
  __Bfree_D2A(local_e0);
  __Bfree_D2A(local_d0);
  __Bfree_D2A(v_00);
  __Bfree_D2A(p_Var16);
  if (fpi->emax < rve) {
    uVar13 = fpi->rounding & 3;
    if (uVar13 == 2) {
      if (local_f4 == 0) goto LAB_14001733a;
    }
    else if (uVar13 == 3) {
      if (local_f4 != 0) goto LAB_14001733a;
    }
    else if (uVar13 == 1) {
LAB_14001733a:
      irv = 0xa3;
      rvb->wds = 0;
      piVar17 = _errno();
      *piVar17 = 0x22;
      *expo = fpi->emax + 1;
      goto LAB_140017128;
    }
    __Bfree_D2A(rvb);
    uVar13 = fpi->nbits;
    rvb = (__Bigint *)0x0;
    irv = 0x11;
    *expo = fpi->emax;
    lVar26 = (longlong)((int)(uVar13 + 0x1f) >> 5);
    pUVar18 = bits + lVar26;
    if (bits < pUVar18) {
      memset(bits,0xff,lVar26 * 4);
    }
    uVar13 = uVar13 & 0x1f;
    if (uVar13 != 0) {
      pUVar18[-1] = pUVar18[-1] >> (0x20U - (char)uVar13 & 0x1f);
    }
  }
LAB_140017128:
  if (local_d8 != 0) {
    if (local_110 == 0) {
      uVar13 = (uint)(0 < rvb->wds) * 2 | irv & 0xfffffff8U;
      uVar21 = irv & 0x30;
      irv = uVar13;
      if (uVar21 != 0) {
LAB_1400172c0:
        irv = uVar13 | 0x40;
        piVar17 = _errno();
        *piVar17 = 0x22;
      }
    }
    else {
LAB_1400171f0:
      rvb->wds = 0;
      irv = 0x50;
      piVar17 = _errno();
      *piVar17 = 0x22;
    }
  }
LAB_1400163ac:
  if (se != (char **)0x0) {
    *se = s;
  }
  if (local_f4 != 0) {
    irv = irv | 8;
  }
LAB_1400163cf:
  if (rvb != (__Bigint *)0x0) {
    __copybits_D2A(bits,n,rvb);
    __Bfree_D2A(rvb);
  }
  return irv;
}



__Bigint * __sum_D2A(__Bigint *a,__Bigint *b)

{
  ULong *pUVar1;
  ULong *pUVar2;
  int iVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  __Bigint *v;
  undefined2 *puVar7;
  __Bigint *p_Var8;
  ULong *pUVar9;
  ULong *pUVar10;
  uint uVar11;
  longlong lVar12;
  uint *puVar13;
  
                    // Unresolved local var: __Bigint * c@[???]
                    // Unresolved local var: ULong carry@[???]
                    // Unresolved local var: ULong * xc@[???]
                    // Unresolved local var: ULong * xa@[???]
                    // Unresolved local var: ULong * xb@[???]
                    // Unresolved local var: ULong * xe@[???]
                    // Unresolved local var: ULong y@[???]
                    // Unresolved local var: ULong z@[???]
  p_Var8 = b;
  if (b->wds <= a->wds) {
    p_Var8 = a;
    a = b;
  }
  v = __Balloc_D2A(p_Var8->k);
  iVar3 = p_Var8->wds;
  lVar12 = 0x18;
  uVar11 = 0;
  pUVar1 = v->x;
  v->wds = iVar3;
  iVar4 = a->wds;
  pUVar2 = pUVar1 + iVar4;
  pUVar9 = pUVar1;
  do {
    uVar5 = *(uint *)((longlong)p_Var8->x + lVar12 + -0x18);
    uVar6 = *(uint *)((longlong)a->x + lVar12 + -0x18);
    pUVar10 = pUVar9 + 1;
    lVar12 = lVar12 + 4;
    uVar11 = (uVar5 & 0xffff) + (uVar6 & 0xffff) + uVar11;
    *(short *)pUVar9 = (short)uVar11;
    uVar11 = (uVar5 >> 0x10) + (uVar6 >> 0x10) + (uVar11 >> 0x10);
    *(short *)((longlong)pUVar9 + 2) = (short)uVar11;
    uVar11 = uVar11 >> 0x10;
    pUVar9 = pUVar10;
  } while (pUVar10 < pUVar2);
  lVar12 = ((ulonglong)((longlong)pUVar2 + (-0x19 - (longlong)v)) & 0xfffffffffffffffc) + 4;
  if (pUVar2 < (undefined1 *)((longlong)v->x + 1U)) {
    lVar12 = 4;
  }
  puVar13 = (uint *)((longlong)p_Var8->x + lVar12);
  for (puVar7 = (undefined2 *)(lVar12 + (longlong)pUVar1); puVar7 < pUVar2 + (iVar3 - iVar4);
      puVar7 = puVar7 + 2) {
    uVar5 = *puVar13;
    puVar13 = puVar13 + 1;
    uVar11 = (uVar5 & 0xffff) + uVar11;
    *puVar7 = (short)uVar11;
    uVar11 = (uVar11 >> 0x10) + (uVar5 >> 0x10);
    puVar7[1] = (short)uVar11;
    uVar11 = uVar11 >> 0x10;
  }
  p_Var8 = v;
  if (uVar11 != 0) {
    if (iVar3 == v->maxwds) {
      p_Var8 = __Balloc_D2A(v->k + 1);
      memcpy(&p_Var8->sign,&v->sign,(longlong)v->wds * 4 + 8);
      __Bfree_D2A(v);
      iVar3 = p_Var8->wds;
    }
    p_Var8->wds = iVar3 + 1;
    p_Var8->x[iVar3] = 1;
  }
  return p_Var8;
}



char * __pformat_cvt(int mode,long_double *val,int nd,int *dp,int *sign)

{
  char *pcVar1;
  uint uVar2;
  int be;
  ushort uVar3;
  int k;
  char *ep;
  __pformat_fpreg_t x;
  
                    // Unresolved local var: uint e@[???]
  x.__pformat_fpreg_double_t = (double)*(undefined8 *)val;
  x._8_4_ = *(uint *)((longlong)val + 8);
                    // Unresolved local var: __pformat_fpreg_t x@[???]
                    // Unresolved local var: __mingw_ldbl_type_t hlp@[???]
                    // Unresolved local var: uint e@[???]
  uVar3 = (ushort)x._8_4_ & 0x7fff;
  if ((x._8_4_ & 0x7fff) == 0) {
                    // Unresolved local var: uint h@[???]
    if ((int)x.field_2.__pformat_fpreg_mantissa == 0 &&
        (int)(x.field_2.__pformat_fpreg_mantissa >> 0x20) == 0) {
      k = 0;
      be = 0;
    }
    else {
      if ((longlong)x.field_2.__pformat_fpreg_mantissa < 0) goto LAB_140017a5d;
      k = 2;
      be = -0x403d;
    }
  }
  else if (uVar3 == 0x7fff) {
    if ((x.field_2.__pformat_fpreg_mantissa & 0x7fffffff00000000) != 0 ||
        (int)x.field_2.__pformat_fpreg_mantissa != 0) {
      k = 4;
      be = 0;
      uVar2 = 0;
      goto LAB_140017a75;
    }
    k = 3;
    be = 0;
  }
  else {
LAB_140017a5d:
    k = 1;
    be = (int)(short)(uVar3 + 0xbfc2);
  }
  uVar2 = x._8_4_ & 0x8000;
LAB_140017a75:
  *sign = uVar2;
  pcVar1 = __gdtoa(&__pformat_cvt::fpi,be,&x.__pformat_fpreg_bits,&k,mode,nd,dp,&ep);
  return pcVar1;
}



void __pformat_putc(int c,__pformat_t *stream)

{
  int iVar1;
  
  if (((stream->flags & 0x4000U) != 0) || (iVar1 = stream->count, iVar1 < stream->quota)) {
    if ((stream->flags & 0x2000U) != 0) {
      fputc(c,stream->dest);
      stream->count = stream->count + 1;
      return;
    }
    *(char *)((longlong)&stream->dest->_ptr + (longlong)stream->count) = (char)c;
    iVar1 = stream->count;
  }
  stream->count = iVar1 + 1;
  return;
}



void __pformat_wputchars(wchar_t *s,int count,__pformat_t *stream)

{
  int iVar1;
  size_t sVar2;
  int iVar3;
  longlong lVar4;
  char *pcVar5;
  char *pcVar6;
  mbstate_t state;
  char buf [16];
  
                    // Unresolved local var: int len@[???]
  wcrtomb(buf,L'\0',(mbstate_t *)&state);
  iVar1 = stream->precision;
  iVar3 = iVar1;
  if (count <= iVar1) {
    iVar3 = count;
  }
  if (-1 < iVar1) {
    count = iVar3;
  }
  if (count < stream->width) {
    iVar1 = stream->width - count;
    stream->width = iVar1;
    if ((stream->flags & 0x400) == 0) {
      stream->width = iVar1 + -1;
      do {
        __pformat_putc(0x20,stream);
        iVar1 = stream->width;
        stream->width = iVar1 + -1;
      } while (iVar1 != 0);
      if (count < 1) goto LAB_140017c8d;
    }
    else if (count < 1) {
      stream->width = stream->width + -1;
      goto LAB_140017c80;
    }
  }
  else {
    stream->width = -1;
    if (count < 1) {
      stream->width = -2;
      return;
    }
  }
                    // Unresolved local var: char * p@[???]
  lVar4 = 0;
  do {
    sVar2 = wcrtomb(buf,s[lVar4],(mbstate_t *)&state);
    if ((int)sVar2 < 1) goto LAB_140017c8d;
    pcVar5 = buf;
    do {
      while( true ) {
        pcVar6 = pcVar5 + 1;
        if (((stream->flags & 0x4000U) != 0) || (iVar1 = stream->count, iVar1 < stream->quota))
        break;
LAB_140017c1a:
        stream->count = iVar1 + 1;
        pcVar5 = pcVar6;
        if (pcVar6 == buf + (ulonglong)((int)sVar2 - 1) + 1) goto LAB_140017c5c;
      }
      if ((stream->flags & 0x2000U) == 0) {
        *(char *)((longlong)&stream->dest->_ptr + (longlong)stream->count) = *pcVar5;
        iVar1 = stream->count;
        goto LAB_140017c1a;
      }
      fputc((int)*pcVar5,stream->dest);
      stream->count = stream->count + 1;
      pcVar5 = pcVar6;
    } while (pcVar6 != buf + (ulonglong)((int)sVar2 - 1) + 1);
LAB_140017c5c:
    lVar4 = lVar4 + 1;
  } while (0 < count - (int)lVar4);
  iVar1 = stream->width;
  stream->width = iVar1 + -1;
  if (iVar1 < 1) {
    return;
  }
LAB_140017c80:
  do {
    __pformat_putc(0x20,stream);
LAB_140017c8d:
    iVar1 = stream->width;
    stream->width = iVar1 + -1;
  } while (0 < iVar1);
  return;
}



void __pformat_putchars(char *s,int count,__pformat_t *stream)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  char *pcVar4;
  
  uVar1 = stream->precision;
  uVar3 = uVar1;
  if (count <= (int)uVar1) {
    uVar3 = count;
  }
  if (-1 < (int)uVar1) {
    count = uVar3;
  }
  if (count < stream->width) {
    iVar2 = stream->width - count;
    stream->width = iVar2;
    uVar1 = stream->flags;
    if ((uVar1 & 0x400) == 0) {
      stream->width = iVar2 + -1;
      do {
        __pformat_putc(0x20,stream);
        iVar2 = stream->width;
        stream->width = iVar2 + -1;
      } while (iVar2 != 0);
      if (count == 0) goto LAB_140017db1;
      goto LAB_140017d54;
    }
    if (count == 0) {
      stream->width = stream->width + -1;
      goto LAB_140017dc1;
    }
  }
  else {
    stream->width = -1;
    if (count == 0) {
      stream->width = -2;
      return;
    }
LAB_140017d54:
    uVar1 = stream->flags;
  }
  pcVar4 = s;
  while( true ) {
    if (((uVar1 & 0x4000) != 0) || (iVar2 = stream->count, iVar2 < stream->quota)) {
      if ((uVar1 & 0x2000) == 0) {
        *(char *)((longlong)&stream->dest->_ptr + (longlong)stream->count) = *pcVar4;
        iVar2 = stream->count;
      }
      else {
        fputc((int)*pcVar4,stream->dest);
        iVar2 = stream->count;
      }
    }
    stream->count = iVar2 + 1;
    if (pcVar4 + 1 == s + (uint)count) break;
    uVar1 = stream->flags;
    pcVar4 = pcVar4 + 1;
  }
LAB_140017db1:
  while (iVar2 = stream->width, stream->width = iVar2 + -1, 0 < iVar2) {
    uVar1 = stream->flags;
LAB_140017dc1:
    if (((uVar1 & 0x4000) != 0) || (iVar2 = stream->count, iVar2 < stream->quota)) {
      if ((uVar1 & 0x2000) == 0) {
        *(undefined1 *)((longlong)&stream->dest->_ptr + (longlong)stream->count) = 0x20;
        iVar2 = stream->count;
      }
      else {
        fputc(0x20,stream->dest);
        iVar2 = stream->count;
      }
    }
    stream->count = iVar2 + 1;
  }
  return;
}



void __pformat_puts(char *s,__pformat_t *stream)

{
  int count;
  size_t sVar2;
  size_t sVar1;
  
  if (s == (char *)0x0) {
    s = "(null)";
  }
  if (stream->precision < 0) {
    sVar2 = strlen(s);
    count = (int)sVar2;
  }
  else {
    sVar1 = strnlen(s,(longlong)stream->precision);
    count = (int)sVar1;
  }
  __pformat_putchars(s,count,stream);
  return;
}



void __pformat_emit_inf_or_nan(int sign,char *value,__pformat_t *stream)

{
  uint uVar1;
  char cVar2;
  longlong lVar3;
  char *pcVar4;
  char buf [4];
  
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: char * p@[???]
  uVar1 = stream->flags;
  stream->precision = -1;
  if (sign == 0) {
    cVar2 = '+';
    if ((uVar1 & 0x100) == 0) {
      if ((uVar1 & 0x40) == 0) {
        pcVar4 = buf;
      }
      else {
        pcVar4 = buf + 1;
        buf[0] = ' ';
      }
      goto LAB_140017eec;
    }
  }
  else {
    cVar2 = '-';
  }
  pcVar4 = buf + 1;
  buf[0] = cVar2;
LAB_140017eec:
  lVar3 = 0;
  do {
    pcVar4[lVar3] = value[lVar3] & 0xdfU | (byte)uVar1 & 0x20;
    lVar3 = lVar3 + 1;
  } while (lVar3 != 3);
  __pformat_putchars(buf,((int)pcVar4 + 3) - (int)buf,stream);
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe

void __pformat_xint(int fmt,__pformat_intarg_t *value,__pformat_t *stream)

{
  FILE *pFVar1;
  longlong lVar2;
  int iVar3;
  int iVar4;
  byte bVar5;
  uint uVar6;
  int iVar8;
  sbyte sVar9;
  undefined1 *puVar10;
  undefined1 *puVar11;
  byte *pbVar12;
  byte *pbVar13;
  byte *pbVar14;
  uint uVar15;
  byte bVar16;
  byte bVar17;
  byte *pbVar18;
  byte bVar19;
  int iVar20;
  uint uVar21;
  bool bVar22;
  undefined1 auStack_78 [32];
  byte abStack_58 [8];
  byte *local_50;
  int iVar7;
  
                    // Unresolved local var: int width@[???]
                    // Unresolved local var: int shift@[???]
                    // Unresolved local var: int bufflen@[???]
                    // Unresolved local var: char * buf@[???]
                    // Unresolved local var: char * p@[???]
                    // Unresolved local var: int mask@[???]
  bVar19 = (byte)fmt;
  if (fmt == 0x6f) {
    iVar20 = stream->precision;
    uVar15 = stream->flags;
    iVar7 = 0;
    if (-1 < iVar20) {
      iVar7 = iVar20;
    }
    uVar6 = iVar7 + 0x18;
    if ((uVar15 & 0x1000) != 0) {
      sVar9 = 3;
      goto LAB_140017f99;
    }
    uVar21 = stream->width;
    if ((int)uVar6 <= (int)uVar21) {
      uVar6 = uVar21;
    }
    sVar9 = 3;
    bVar16 = 7;
    lVar2 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
    puVar11 = auStack_78 + lVar2;
    pbVar12 = abStack_58 + lVar2;
LAB_1400180a5:
    puVar10 = puVar11;
    if (value == (__pformat_intarg_t *)0x0) goto LAB_140017ff8;
LAB_1400180ae:
                    // Unresolved local var: char * q@[???]
    local_50 = pbVar12;
    do {
      pbVar13 = pbVar12;
      pbVar14 = pbVar13 + 1;
      bVar5 = bVar16 & (byte)value;
      bVar17 = bVar5 + 0x30;
      bVar5 = bVar5 + 0x37 | bVar19 & 0x20;
      if (bVar17 < 0x3a) {
        bVar5 = bVar17;
      }
      value = (__pformat_intarg_t *)((ulonglong)value >> sVar9);
      *pbVar13 = bVar5;
      pbVar18 = local_50;
      pbVar12 = pbVar14;
    } while (value != (__pformat_intarg_t *)0x0);
    puVar10 = puVar11;
    pbVar12 = local_50;
    if (pbVar14 == local_50) goto LAB_140017ff8;
    iVar7 = (int)pbVar14;
    iVar3 = (int)local_50;
    if (0 < iVar20) {
      iVar8 = iVar7 - iVar3;
      iVar4 = iVar20 - iVar8;
      if (iVar20 - iVar8 < 1) {
        if (fmt != 0x6f) {
          if ((int)uVar21 <= iVar8) goto LAB_1400183b0;
          iVar8 = uVar21 - iVar8;
          stream->width = iVar8;
          goto LAB_14001812f;
        }
        goto LAB_140018348;
      }
      goto LAB_140018011;
    }
    if (fmt == 0x6f) {
LAB_140018348:
      if ((uVar15 & 0x800) != 0) {
        *pbVar14 = 0x30;
        pbVar12 = pbVar13 + 2;
        goto LAB_14001802a;
      }
      iVar8 = iVar7 - iVar3;
      if ((int)uVar21 <= iVar8) {
        stream->width = -1;
        pbVar12 = pbVar14;
        goto LAB_140018055;
      }
      goto LAB_1400182fa;
    }
    if ((int)uVar21 <= iVar7 - iVar3) {
LAB_1400183b0:
      stream->width = -1;
      goto LAB_1400183b7;
    }
    iVar8 = uVar21 - (iVar7 - iVar3);
    stream->width = iVar8;
LAB_14001812f:
    if ((uVar15 & 0x800) == 0) {
      pbVar12 = pbVar14;
      if ((-1 < iVar20) || ((uVar15 & 0x600) != 0x200)) {
LAB_140018144:
        iVar20 = iVar8 + -1;
        if ((uVar15 & 0x400) == 0) {
          do {
            *(undefined8 *)(puVar11 + -8) = 0x14001816d;
            __pformat_putc(0x20,stream);
            bVar22 = iVar20 != 0;
            iVar20 = iVar20 + -1;
          } while (bVar22);
          iVar20 = -2;
          iVar8 = -1;
          if (pbVar18 < pbVar12) goto LAB_14001819d;
          return;
        }
        if (pbVar12 <= pbVar18) goto LAB_1400181fa;
        goto LAB_1400181a0;
      }
LAB_14001840b:
      *(undefined8 *)(puVar11 + -8) = 0x14001841e;
      memset(pbVar14,0x30,(longlong)iVar8);
      pbVar14 = pbVar14 + iVar8;
      if ((uVar15 & 0x800) == 0) goto LAB_14001833d;
      *pbVar14 = bVar19;
      iVar8 = -1;
      pbVar12 = pbVar14 + 2;
      pbVar14[1] = 0x30;
    }
    else {
      iVar8 = iVar8 + -2;
      if (0 < iVar8) {
        if ((iVar20 < 0) && ((uVar15 & 0x600) == 0x200)) goto LAB_14001840b;
        *pbVar14 = bVar19;
        pbVar12 = pbVar14 + 2;
        pbVar14[1] = 0x30;
        goto LAB_140018144;
      }
      *pbVar14 = bVar19;
      pbVar12 = pbVar14 + 2;
      pbVar14[1] = 0x30;
    }
  }
  else {
    iVar20 = stream->precision;
    uVar15 = stream->flags;
    iVar7 = 0;
    if (-1 < iVar20) {
      iVar7 = iVar20;
    }
    uVar6 = iVar7 + 0x12;
    if ((uVar15 & 0x1000) == 0) {
      uVar21 = stream->width;
      if ((int)uVar6 <= (int)uVar21) {
        uVar6 = uVar21;
      }
      sVar9 = 4;
      bVar16 = 0xf;
      lVar2 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
      puVar11 = auStack_78 + lVar2;
      pbVar12 = abStack_58 + lVar2;
      goto LAB_1400180a5;
    }
    sVar9 = 4;
LAB_140017f99:
    if (stream->thousands_chr != L'\0') {
      uVar6 = (uint)((ulonglong)uVar6 * 0x2aaaaaaab >> 0x21);
    }
    uVar21 = stream->width;
    if ((int)uVar6 <= (int)uVar21) {
      uVar6 = uVar21;
    }
    lVar2 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
    puVar11 = auStack_78 + lVar2;
    puVar10 = auStack_78 + lVar2;
    pbVar12 = abStack_58 + lVar2;
    bVar16 = (fmt != 0x6f) * '\b' + 7;
    if (value != (__pformat_intarg_t *)0x0) goto LAB_1400180ae;
LAB_140017ff8:
    stream->flags = uVar15 & 0xfffff7ff;
    pbVar14 = pbVar12;
    pbVar18 = pbVar12;
    iVar4 = iVar20;
    if (iVar20 < 1) {
LAB_1400182d3:
      pbVar14 = pbVar12;
      if (iVar20 == 0) goto LAB_140018033;
      pbVar14 = pbVar12 + 1;
      *pbVar12 = 0x30;
      iVar8 = (int)pbVar14 - (int)pbVar18;
      if ((int)uVar21 <= iVar8) goto LAB_140018044;
LAB_1400182f7:
      uVar15 = stream->flags;
      puVar11 = puVar10;
LAB_1400182fa:
      iVar8 = uVar21 - iVar8;
      stream->width = iVar8;
      if (fmt != 0x6f) goto LAB_14001812f;
      pbVar12 = pbVar14;
      if ((-1 < iVar20) || ((uVar15 & 0x600) != 0x200)) goto LAB_140018144;
      *(undefined8 *)(puVar11 + -8) = 0x140018339;
      memset(pbVar14,0x30,(longlong)iVar8);
      pbVar14 = pbVar14 + iVar8;
LAB_14001833d:
      iVar8 = -1;
      pbVar12 = pbVar14;
    }
    else {
LAB_140018011:
      pbVar12 = pbVar14 + iVar4;
      *(undefined8 *)(puVar10 + -8) = 0x14001802a;
      memset(pbVar14,0x30,(longlong)iVar4);
LAB_14001802a:
      pbVar14 = pbVar12;
      if (pbVar12 == pbVar18) goto LAB_1400182d3;
LAB_140018033:
      iVar8 = (int)pbVar14 - (int)pbVar18;
      if (iVar8 < (int)uVar21) goto LAB_1400182f7;
LAB_140018044:
      stream->width = -1;
      puVar11 = puVar10;
      pbVar12 = pbVar14;
      if (fmt == 0x6f) {
LAB_140018055:
        if (pbVar12 <= pbVar18) {
          return;
        }
        uVar15 = stream->flags;
        iVar20 = -2;
        iVar8 = -1;
        goto LAB_1400181a0;
      }
      uVar15 = stream->flags;
LAB_1400183b7:
      iVar8 = -1;
      pbVar12 = pbVar14;
      if ((uVar15 & 0x800) != 0) {
        *pbVar14 = bVar19;
        iVar8 = -1;
        pbVar14[1] = 0x30;
        pbVar12 = pbVar14 + 2;
      }
    }
  }
  if (pbVar12 <= pbVar18) {
    return;
  }
  uVar15 = stream->flags;
  iVar20 = iVar8 + -1;
LAB_1400181a0:
  do {
    pbVar12 = pbVar12 + -1;
    if (((uVar15 & 0x4000) == 0) && (iVar7 = stream->count, stream->quota <= iVar7)) {
LAB_140018192:
      stream->count = iVar7 + 1;
    }
    else {
      bVar19 = *pbVar12;
      pFVar1 = stream->dest;
      if ((uVar15 & 0x2000) == 0) {
        *(byte *)((longlong)&pFVar1->_ptr + (longlong)stream->count) = bVar19;
        iVar7 = stream->count;
        goto LAB_140018192;
      }
      *(undefined8 *)(puVar11 + -8) = 0x1400181c7;
      fputc((int)(char)bVar19,pFVar1);
      stream->count = stream->count + 1;
    }
    if (pbVar12 <= pbVar18) break;
LAB_14001819d:
    uVar15 = stream->flags;
  } while( true );
  if (iVar8 < 1) {
    return;
  }
  do {
    while( true ) {
      uVar15 = stream->flags;
LAB_1400181fa:
      if (((uVar15 & 0x4000) != 0) || (iVar7 = stream->count, iVar7 < stream->quota)) break;
LAB_1400181eb:
      stream->count = iVar7 + 1;
      bVar22 = iVar20 == 0;
      iVar20 = iVar20 + -1;
      if (bVar22) {
        return;
      }
    }
    pFVar1 = stream->dest;
    if ((uVar15 & 0x2000) == 0) {
      *(undefined1 *)((longlong)&pFVar1->_ptr + (longlong)stream->count) = 0x20;
      iVar7 = stream->count;
      goto LAB_1400181eb;
    }
    *(undefined8 *)(puVar11 + -8) = 0x14001821f;
    fputc(0x20,pFVar1);
    stream->count = stream->count + 1;
    bVar22 = iVar20 == 0;
    iVar20 = iVar20 + -1;
    if (bVar22) {
      return;
    }
  } while( true );
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe

void __pformat_int(__pformat_intarg_t *value,__pformat_t *stream)

{
  char *pcVar1;
  char cVar2;
  uint uVar3;
  FILE *pFVar4;
  longlong lVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  char *pcVar10;
  char *_Dst;
  bool bVar11;
  undefined8 auStack_70 [5];
  char local_48 [8];
  
                    // Unresolved local var: int32_t bufflen@[???]
                    // Unresolved local var: char * buf@[???]
                    // Unresolved local var: char * p@[???]
                    // Unresolved local var: int precision@[???]
  iVar7 = stream->precision;
  uVar8 = stream->flags;
  iVar9 = 0;
  if (-1 < iVar7) {
    iVar9 = iVar7;
  }
  uVar6 = iVar9 + 0x17;
  if (((uVar8 & 0x1000) != 0) && (stream->thousands_chr != L'\0')) {
    uVar6 = (uint)((ulonglong)uVar6 * 0x2aaaaaaab >> 0x21);
  }
  uVar3 = stream->width;
  if ((int)uVar6 <= (int)uVar3) {
    uVar6 = uVar3;
  }
  auStack_70[0] = 0x1400184c5;
  lVar5 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
  pcVar1 = local_48 + lVar5;
  if ((uVar8 & 0x80) == 0) {
LAB_1400184e3:
    if (value != (__pformat_intarg_t *)0x0) goto LAB_1400184ec;
    bVar11 = true;
    pcVar10 = pcVar1;
    _Dst = pcVar1;
    iVar9 = iVar7;
    if (0 < iVar7) goto LAB_14001858a;
LAB_1400185a6:
    if ((iVar7 == 0) || (pcVar10 = _Dst, !bVar11)) goto LAB_1400185b3;
  }
  else {
    if (-1 < (longlong)value) {
      uVar8 = uVar8 & 0xffffff7f;
      stream->flags = uVar8;
      goto LAB_1400184e3;
    }
    value = (__pformat_intarg_t *)-(longlong)value;
LAB_1400184ec:
    pcVar10 = pcVar1;
    do {
      if ((((pcVar1 != pcVar10) && ((uVar8 & 0x1000) != 0)) && (stream->thousands_chr != L'\0')) &&
         (((longlong)pcVar10 - (longlong)pcVar1 & 0x8000000000000003U) == 3)) {
        *pcVar10 = ',';
        pcVar10 = pcVar10 + 1;
      }
      _Dst = pcVar10 + 1;
      *pcVar10 = (char)value + (char)(__pformat_intarg_t *)((ulonglong)value / 10) * -10 + '0';
      bVar11 = (__pformat_intarg_t *)0x9 < value;
      value = (__pformat_intarg_t *)((ulonglong)value / 10);
      pcVar10 = _Dst;
    } while (bVar11);
    if (iVar7 < 1) {
LAB_1400185a0:
      bVar11 = pcVar1 == _Dst;
      goto LAB_1400185a6;
    }
    iVar9 = iVar7 - ((int)_Dst - (int)pcVar1);
    if (0 < iVar9) {
LAB_14001858a:
      _Dst = pcVar10 + iVar9;
      *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x1400185a0;
      memset(pcVar10,0x30,(longlong)iVar9);
      goto LAB_1400185a0;
    }
    pcVar10 = pcVar1;
    if (pcVar1 != _Dst) goto LAB_1400185b3;
  }
  *pcVar10 = '0';
  _Dst = pcVar10 + 1;
LAB_1400185b3:
  if (0 < (int)uVar3) {
    iVar9 = uVar3 - ((int)_Dst - (int)pcVar1);
    stream->width = iVar9;
    if (0 < iVar9) {
      if ((uVar8 & 0x1c0) != 0) {
        stream->width = iVar9 + -1;
      }
      if ((iVar7 < 0) && ((uVar8 & 0x600) == 0x200)) {
        iVar7 = stream->width;
        stream->width = iVar7 + -1;
        if (0 < iVar7) {
          *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x1400187a8;
          memset(_Dst,0x30,(longlong)iVar7);
          stream->width = -1;
          _Dst = _Dst + iVar7;
        }
      }
      else if (((uVar8 & 0x400) == 0) &&
              (iVar7 = stream->width, stream->width = iVar7 + -1, 0 < iVar7)) {
        do {
          *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x1400187dd;
          __pformat_putc(0x20,stream);
          iVar7 = stream->width;
          stream->width = iVar7 + -1;
        } while (0 < iVar7);
        uVar8 = stream->flags;
      }
    }
  }
  if ((uVar8 & 0x80) == 0) {
    if ((uVar8 & 0x100) == 0) {
      if ((uVar8 & 0x40) != 0) {
        *_Dst = ' ';
        _Dst = _Dst + 1;
      }
    }
    else {
      *_Dst = '+';
      _Dst = _Dst + 1;
    }
  }
  else {
    *_Dst = '-';
    _Dst = _Dst + 1;
  }
  if (_Dst <= pcVar1) {
LAB_14001865d:
    iVar7 = stream->width;
    while( true ) {
      stream->width = iVar7 + -1;
      if (iVar7 < 1) break;
      if (((stream->flags & 0x4000U) != 0) ||
         (iVar9 = stream->count, iVar7 = iVar7 + -1, iVar9 < stream->quota)) {
        pFVar4 = stream->dest;
        if ((stream->flags & 0x2000U) == 0) {
          *(undefined1 *)((longlong)&pFVar4->_ptr + (longlong)stream->count) = 0x20;
          iVar9 = stream->count;
          iVar7 = stream->width;
        }
        else {
          *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x1400186aa;
          fputc(0x20,pFVar4);
          iVar9 = stream->count;
          iVar7 = stream->width;
        }
      }
      stream->count = iVar9 + 1;
    }
    return;
  }
  do {
    _Dst = _Dst + -1;
    if (((uVar8 & 0x4000) == 0) && (iVar7 = stream->count, stream->quota <= iVar7)) {
LAB_14001861a:
      stream->count = iVar7 + 1;
    }
    else {
      cVar2 = *_Dst;
      pFVar4 = stream->dest;
      if ((uVar8 & 0x2000) == 0) {
        *(char *)((longlong)&pFVar4->_ptr + (longlong)stream->count) = cVar2;
        iVar7 = stream->count;
        goto LAB_14001861a;
      }
      *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x14001864f;
      fputc((int)cVar2,pFVar4);
      stream->count = stream->count + 1;
    }
    if (pcVar1 == _Dst) goto LAB_14001865d;
    uVar8 = stream->flags;
  } while( true );
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe

void __pformat_emit_radix_point(__pformat_t *stream)

{
  char cVar1;
  FILE *_File;
  longlong lVar2;
  int iVar3;
  size_t sVar4;
  lconv *plVar5;
  wchar_t wc;
  char *pcVar6;
  char *pcVar7;
  undefined8 auStack_60 [5];
  char acStack_38 [6];
  wchar_t rpchr;
  mbstate_t state;
  
                    // Unresolved local var: ulonglong anon_var_0@[???]
  if (stream->rplen == -3) {
    state._Wchar = 0;
    state._Byte = L'\0';
    state._State = L'\0';
                    // Unresolved local var: int len@[???]
    auStack_60[0] = 0x140018921;
    plVar5 = localeconv();
    auStack_60[0] = 0x140018936;
    sVar4 = mbrtowc(&rpchr,plVar5->decimal_point,0x10,(mbstate_t *)&state);
    if ((int)sVar4 < 1) {
      wc = stream->rpchr;
    }
    else {
      stream->rpchr = rpchr;
      wc = rpchr;
    }
    stream->rplen = (int)sVar4;
  }
  else {
    wc = stream->rpchr;
  }
  if (wc == L'\0') {
    auStack_60[0] = 0x1400188fd;
    __pformat_putc(0x2e,stream);
    return;
  }
                    // Unresolved local var: int len@[???]
                    // Unresolved local var: char[8742] buf@[???]
  auStack_60[0] = 0x14001885d;
  lVar2 = -((longlong)stream->rplen + 0xfU & 0xfffffffffffffff0);
  state._Wchar = 0;
  state._Byte = L'\0';
  state._State = L'\0';
  *(undefined8 *)((longlong)auStack_60 + lVar2) = 0x140018879;
  sVar4 = wcrtomb(acStack_38 + lVar2,wc,(mbstate_t *)&state);
  if ((int)sVar4 < 1) {
    *(undefined8 *)((longlong)auStack_60 + lVar2) = 0x14001895d;
    __pformat_putc(0x2e,stream);
  }
  else {
                    // Unresolved local var: char * p@[???]
    pcVar6 = acStack_38 + lVar2;
    do {
      while( true ) {
        pcVar7 = pcVar6 + 1;
        if (((stream->flags & 0x4000U) != 0) || (iVar3 = stream->count, iVar3 < stream->quota))
        break;
LAB_14001889a:
        stream->count = iVar3 + 1;
        pcVar6 = pcVar7;
        if (acStack_38 + (ulonglong)((int)sVar4 - 1) + lVar2 + 1 == pcVar7) {
          return;
        }
      }
      cVar1 = *pcVar6;
      _File = stream->dest;
      if ((stream->flags & 0x2000U) == 0) {
        *(char *)((longlong)&_File->_ptr + (longlong)stream->count) = cVar1;
        iVar3 = stream->count;
        goto LAB_14001889a;
      }
      *(undefined8 *)((longlong)auStack_60 + lVar2) = 0x1400188cd;
      fputc((int)cVar1,_File);
      stream->count = stream->count + 1;
      pcVar6 = pcVar7;
    } while (acStack_38 + (ulonglong)((int)sVar4 - 1) + lVar2 + 1 != pcVar7);
  }
  return;
}



void __pformat_emit_float(int sign,char *value,int len,__pformat_t *stream)

{
  char cVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  
  iVar2 = stream->width;
  if (len < 1) {
    if (iVar2 < 1) {
      if ((iVar2 != 0) || (-1 < stream->precision)) goto LAB_140018af7;
      iVar2 = -stream->precision;
      stream->width = iVar2;
      if ((stream->flags & 0x800) != 0) goto LAB_1400189b9;
LAB_1400189d4:
      if (sign == 0) {
        uVar4 = stream->flags;
        if ((uVar4 & 0x1c0) != 0) {
          stream->width = iVar2 + -1;
          if ((iVar2 + -1 != 0) && ((uVar4 & 0x600) == 0)) goto LAB_140018bd3;
          goto LAB_140018a1f;
        }
        if ((uVar4 & 0x600) == 0) {
          iVar2 = iVar2 + -1;
          goto LAB_140018bd6;
        }
        goto LAB_140018a40;
      }
      stream->width = iVar2 + -1;
      if ((iVar2 + -1 != 0) && ((stream->flags & 0x600U) == 0)) {
LAB_140018bd3:
        iVar2 = iVar2 + -2;
LAB_140018bd6:
        stream->width = iVar2;
        do {
          __pformat_putc(0x20,stream);
          iVar2 = stream->width;
          stream->width = iVar2 + -1;
        } while (0 < iVar2);
        goto LAB_140018a13;
      }
    }
    else {
      iVar3 = stream->precision;
      iVar2 = iVar2 + -1;
      if (iVar3 < iVar2) goto LAB_1400189ac;
LAB_140018af7:
      stream->width = -1;
      if (sign == 0) goto LAB_140018a1c;
    }
LAB_140018b10:
    __pformat_putc(0x2d,stream);
  }
  else {
    if (iVar2 < len) {
      stream->width = -1;
      if (((stream->flags & 0x1000) != 0) && (stream->thousands_chr != L'\0')) {
        iVar2 = -1;
LAB_140018c51:
                    // Unresolved local var: int cths@[???]
        iVar3 = ((len + 2U) / 3 - 1) - iVar2;
        if ((len + 2U) / 3 != 1) {
          do {
            if (iVar2 < 1) goto LAB_140018a13;
            iVar2 = iVar2 + -1;
            stream->width = iVar2;
          } while (iVar3 + iVar2 != 0);
        }
        goto LAB_1400189d0;
      }
    }
    else {
      iVar3 = stream->precision;
      iVar2 = iVar2 - len;
      if (iVar3 < iVar2) {
LAB_1400189ac:
        iVar2 = iVar2 - iVar3;
        stream->width = iVar2;
        if ((iVar3 < 1) && ((stream->flags & 0x800U) == 0)) {
          if ((len < 1) || ((stream->flags & 0x1000U) == 0)) goto LAB_1400189d4;
        }
        else {
LAB_1400189b9:
          iVar2 = iVar2 + -1;
          stream->width = iVar2;
          if ((len < 1) || ((stream->flags & 0x1000) == 0)) goto LAB_1400189d0;
        }
LAB_140018cc7:
        if (stream->thousands_chr != L'\0') goto LAB_140018c51;
      }
      else {
        stream->width = -1;
        iVar2 = -1;
        if ((stream->flags & 0x1000) != 0) goto LAB_140018cc7;
      }
LAB_1400189d0:
      if (0 < iVar2) goto LAB_1400189d4;
    }
LAB_140018a13:
    if (sign != 0) goto LAB_140018b10;
LAB_140018a1c:
    uVar4 = stream->flags;
LAB_140018a1f:
    if ((uVar4 & 0x100) == 0) {
      if ((uVar4 & 0x40) != 0) {
        __pformat_putc(0x20,stream);
      }
    }
    else {
      __pformat_putc(0x2b,stream);
    }
  }
LAB_140018a40:
  if ((0 < stream->width) && ((stream->flags & 0x600U) == 0x200)) {
    stream->width = stream->width + -1;
    do {
      __pformat_putc(0x30,stream);
      iVar2 = stream->width;
      stream->width = iVar2 + -1;
    } while (0 < iVar2);
  }
  if (len < 1) {
    __pformat_putc(0x30,stream);
    iVar2 = stream->precision;
    if ((0 < iVar2) || ((stream->flags & 0x800) != 0)) goto LAB_140018b88;
    if (len == 0) goto LAB_140018ac9;
  }
  else {
    while( true ) {
      cVar1 = *value;
      iVar2 = 0x30;
      if (cVar1 != '\0') {
        value = value + 1;
        iVar2 = (int)cVar1;
      }
      __pformat_putc(iVar2,stream);
      len = len + -1;
      if (len == 0) break;
      if ((((stream->flags & 0x1000) != 0) && (stream->thousands_chr != L'\0')) &&
         ((uint)(len * -0x55555555) < 0x55555556)) {
        __pformat_wputchars(&stream->thousands_chr,1,stream);
      }
    }
    iVar2 = stream->precision;
    if (0 < iVar2) {
      __pformat_emit_radix_point(stream);
      goto LAB_140018b53;
    }
    len = 0;
    if ((stream->flags & 0x800) == 0) {
LAB_140018ac9:
      stream->precision = iVar2 + -1;
      return;
    }
LAB_140018b88:
    __pformat_emit_radix_point(stream);
    if (len == 0) goto LAB_140018b53;
    iVar2 = stream->precision;
  }
  stream->precision = iVar2 + len;
  do {
    __pformat_putc(0x30,stream);
    len = len + 1;
  } while (len != 0);
LAB_140018b53:
  while (iVar2 = stream->precision, stream->precision = iVar2 + -1, 0 < iVar2) {
    cVar1 = *value;
    iVar2 = 0x30;
    if (cVar1 != '\0') {
      value = value + 1;
      iVar2 = (int)cVar1;
    }
    __pformat_putc(iVar2,stream);
  }
  return;
}



void __pformat_emit_efloat(int sign,char *value,int e,__pformat_t *stream)

{
  uint uVar1;
  __pformat_intarg_t *value_00;
  int iVar2;
  int iVar3;
  
                    // Unresolved local var: int exp_width@[???]
                    // Unresolved local var: __pformat_intarg_t exponent@[???]
  iVar3 = 1;
  iVar2 = e + -1;
  value_00 = (__pformat_intarg_t *)(longlong)iVar2;
  while (iVar2 = iVar2 / 10, iVar2 != 0) {
    iVar3 = iVar3 + 1;
  }
  iVar2 = stream->expmin;
  if (iVar2 == -1) {
    stream->expmin = 2;
    iVar2 = 2;
  }
  if (iVar2 <= iVar3) {
    iVar2 = iVar3;
  }
  iVar3 = stream->width - (iVar2 + 2);
  if (stream->width <= iVar2 + 2) {
    iVar3 = -1;
  }
  stream->width = iVar3;
  __pformat_emit_float(sign,value,1,stream);
  uVar1 = stream->flags;
  stream->precision = stream->expmin;
  stream->flags = uVar1 | 0x1c0;
  __pformat_putc(uVar1 & 0x20 | 0x45,stream);
  stream->width = stream->width + iVar2 + 1;
  __pformat_int(value_00,stream);
  return;
}



void __pformat_efloat(long_double *x,__pformat_t *stream)

{
  char *value;
  int nd;
  long_double local_38;
  int sign;
  int intlen;
  
                    // Unresolved local var: char * value@[???]
  local_38._0_10_ = *(unkbyte10 *)x;
  if (stream->precision < 0) {
    stream->precision = 6;
    nd = 7;
  }
  else {
    nd = stream->precision + 1;
  }
  value = __pformat_cvt(2,&local_38,nd,&intlen,&sign);
  if (intlen != -0x8000) {
    __pformat_emit_efloat(sign,value,intlen,stream);
    __freedtoa(value);
    return;
  }
  __pformat_emit_inf_or_nan(sign,value,stream);
  __freedtoa(value);
  return;
}



void __pformat_float(long_double *x,__pformat_t *stream)

{
  char *value;
  int iVar1;
  int iVar2;
  long_double local_38;
  int sign;
  int intlen;
  
                    // Unresolved local var: char * value@[???]
  iVar2 = stream->precision;
  local_38._0_10_ = *(unkbyte10 *)x;
  if (iVar2 < 0) {
    stream->precision = 6;
    iVar2 = 6;
  }
  value = __pformat_cvt(3,&local_38,iVar2,&intlen,&sign);
  if (intlen == -0x8000) {
    __pformat_emit_inf_or_nan(sign,value,stream);
  }
  else {
    __pformat_emit_float(sign,value,intlen,stream);
    iVar2 = stream->width;
    while( true ) {
      stream->width = iVar2 + -1;
      if (iVar2 < 1) break;
      if (((stream->flags & 0x4000U) != 0) ||
         (iVar1 = stream->count, iVar2 = iVar2 + -1, iVar1 < stream->quota)) {
        if ((stream->flags & 0x2000U) == 0) {
          *(undefined1 *)((longlong)&stream->dest->_ptr + (longlong)stream->count) = 0x20;
          iVar1 = stream->count;
          iVar2 = stream->width;
        }
        else {
          fputc(0x20,stream->dest);
          iVar1 = stream->count;
          iVar2 = stream->width;
        }
      }
      stream->count = iVar1 + 1;
    }
  }
  __freedtoa(value);
  return;
}



void __pformat_gfloat(long_double *x,__pformat_t *stream)

{
  uint uVar1;
  int iVar2;
  char *value;
  size_t sVar3;
  long_double local_48;
  int sign;
  int intlen;
  
                    // Unresolved local var: char * value@[???]
  iVar2 = stream->precision;
  local_48._0_10_ = *(unkbyte10 *)x;
  if (iVar2 < 0) {
    stream->precision = 6;
    iVar2 = 6;
  }
  else if (iVar2 == 0) {
    stream->precision = 1;
    iVar2 = 1;
  }
  value = __pformat_cvt(2,&local_48,iVar2,&intlen,&sign);
  if (intlen == -0x8000) {
    __pformat_emit_inf_or_nan(sign,value,stream);
  }
  else {
    uVar1 = stream->flags & 0x800;
    if ((intlen < -3) || (stream->precision < intlen)) {
      if (uVar1 == 0) {
        sVar3 = strlen(value);
        iVar2 = (int)sVar3;
      }
      else {
        iVar2 = stream->precision;
      }
      stream->precision = iVar2 + -1;
      __pformat_emit_efloat(sign,value,intlen,stream);
    }
    else {
      if (uVar1 == 0) {
        sVar3 = strlen(value);
        iVar2 = (int)sVar3 - intlen;
        stream->precision = iVar2;
        if ((iVar2 < 0) && (0 < stream->width)) {
          stream->width = iVar2 + stream->width;
        }
      }
      else {
        stream->precision = stream->precision - intlen;
      }
      __pformat_emit_float(sign,value,intlen,stream);
      while (iVar2 = stream->width, stream->width = iVar2 + -1, 0 < iVar2) {
        __pformat_putc(0x20,stream);
      }
    }
  }
  __freedtoa(value);
  return;
}



void __pformat_emit_xfloat(__pformat_fpreg_t *value,__pformat_t *stream)

{
  char cVar1;
  byte bVar2;
  uint uVar3;
  char *pcVar4;
  int iVar5;
  short sVar6;
  int iVar7;
  ulonglong uVar8;
  byte *pbVar9;
  short sVar10;
  int iVar11;
  __pformat_t *in_R8;
  uint uVar12;
  int iVar13;
  __pformat_intarg_t *value_00;
  int iVar14;
  wchar_t wcs;
  char buf [24];
  
                    // Unresolved local var: char * p@[???]
                    // Unresolved local var: __pformat_intarg_t exponent@[???]
                    // Unresolved local var: short exp_width@[???]
  uVar12 = in_R8->precision;
  sVar6 = (short)stream;
  cVar1 = (char)uVar12;
  if ((sVar6 == 0) && (value == (__pformat_fpreg_t *)0x0)) {
    if (uVar12 < 0xf) {
      value_00 = (__pformat_intarg_t *)0x0;
      sVar10 = 0;
      uVar8 = 4L << (('\x0e' - cVar1) * '\x04' & 0x3fU);
LAB_14001924b:
      value = (__pformat_fpreg_t *)(uVar8 * 2 >> (('\x0f' - cVar1) * '\x04' & 0x3fU));
      if ((value == (__pformat_fpreg_t *)0x0) && (uVar12 == 0)) goto LAB_140019269;
LAB_14001921c:
      iVar7 = uVar12 + 1;
    }
    else {
      if ((int)uVar12 < 1) {
        uVar12 = in_R8->flags;
        value_00 = (__pformat_intarg_t *)0x0;
        sVar10 = 0;
        goto LAB_140019271;
      }
      value_00 = (__pformat_intarg_t *)0x0;
      sVar10 = 0;
      value = (__pformat_fpreg_t *)0x0;
      iVar7 = 0x10;
    }
LAB_14001915d:
    uVar12 = in_R8->flags;
                    // Unresolved local var: uint c@[???]
    pbVar9 = (byte *)buf;
    do {
      uVar3 = (uint)value & 0xf;
      cVar1 = (char)uVar3;
      if (iVar7 == 1) {
        if (((buf < pbVar9) || ((uVar12 & 0x800) != 0)) || (0 < in_R8->precision)) {
          *pbVar9 = 0x2e;
          pbVar9 = pbVar9 + 1;
          goto LAB_1400191c5;
        }
        if (((ulonglong)value & 0xf) == 0) {
          if (in_R8->precision == 0) {
            *pbVar9 = 0x30;
            pbVar9 = pbVar9 + 1;
          }
          break;
        }
LAB_1400191c9:
        if (uVar3 < 10) {
LAB_140019190:
          bVar2 = cVar1 + 0x30;
        }
        else {
          bVar2 = cVar1 + 0x37U | (byte)uVar12 & 0x20;
        }
        *pbVar9 = bVar2;
        pbVar9 = pbVar9 + 1;
      }
      else {
        if (0 < in_R8->precision) {
          in_R8->precision = in_R8->precision + -1;
        }
LAB_1400191c5:
        if (((ulonglong)value & 0xf) != 0) goto LAB_1400191c9;
        if ((buf < pbVar9) || (-1 < in_R8->precision)) goto LAB_140019190;
      }
      value = (__pformat_fpreg_t *)((ulonglong)value >> 4);
      iVar7 = iVar7 + -1;
    } while (iVar7 != 0);
    if (pbVar9 == (byte *)buf) {
      if (in_R8->precision < 1) goto LAB_140019271;
      goto LAB_14001927d;
    }
    iVar7 = in_R8->width;
  }
  else {
    sVar10 = sVar6 + -3;
    if (uVar12 < 0xf) {
      uVar8 = (4L << (('\x0e' - cVar1) * '\x04' & 0x3fU)) + ((ulonglong)value >> 1);
      if (-1 < (longlong)uVar8) {
        value_00 = (__pformat_intarg_t *)(longlong)sVar10;
        goto LAB_14001924b;
      }
      sVar10 = sVar6 + 1;
      value_00 = (__pformat_intarg_t *)(longlong)sVar10;
      value = (__pformat_fpreg_t *)((uVar8 >> 3) >> (('\x0f' - cVar1) * '\x04' & 0x3fU));
      goto LAB_14001921c;
    }
    value_00 = (__pformat_intarg_t *)(longlong)sVar10;
                    // Unresolved local var: int i@[???]
    iVar7 = 0x10;
    if ((value != (__pformat_fpreg_t *)0x0) || (0 < (int)uVar12)) goto LAB_14001915d;
LAB_140019269:
    uVar12 = in_R8->flags;
LAB_140019271:
    pcVar4 = buf;
    if ((uVar12 & 0x800) != 0) {
LAB_14001927d:
      buf[0] = '.';
      pcVar4 = buf + 1;
    }
    iVar7 = in_R8->width;
    *pcVar4 = '0';
    pbVar9 = (byte *)(pcVar4 + 1);
                    // Unresolved local var: int min_width@[???]
                    // Unresolved local var: int exponent2@[???]
  }
  iVar14 = 2;
  if (0 < iVar7) {
    iVar14 = 2;
    iVar11 = (int)pbVar9 - (int)buf;
    if (0 < in_R8->precision) {
      iVar11 = in_R8->precision + iVar11;
    }
    iVar5 = (iVar11 + 6) - (uint)((uVar12 & 0x1c0) == 0);
    iVar11 = (int)sVar10 / 10 - ((int)sVar10 >> 0x1f);
    iVar13 = iVar5;
    if (iVar11 != 0) {
      do {
        iVar13 = iVar13 + 1;
        iVar11 = iVar11 / 10;
      } while (iVar11 != 0);
      iVar14 = (int)(short)(((short)iVar13 - (short)iVar5) + 2);
    }
    if (iVar13 < iVar7) {
      iVar7 = iVar7 - iVar13;
      if ((uVar12 & 0x600) == 0) {
        in_R8->width = iVar7 + -1;
        do {
          __pformat_putc(0x20,in_R8);
          iVar7 = in_R8->width;
          in_R8->width = iVar7 + -1;
        } while (0 < iVar7);
        uVar12 = in_R8->flags;
        goto joined_r0x0001400192a3;
      }
    }
    else {
      iVar7 = -1;
    }
    in_R8->width = iVar7;
  }
joined_r0x0001400192a3:
  if ((uVar12 & 0x80) == 0) {
    if ((uVar12 & 0x100) == 0) {
      if ((uVar12 & 0x40) != 0) {
        __pformat_putc(0x20,in_R8);
      }
    }
    else {
      __pformat_putc(0x2b,in_R8);
    }
  }
  else {
    __pformat_putc(0x2d,in_R8);
  }
  __pformat_putc(0x30,in_R8);
  __pformat_putc(in_R8->flags & 0x20U | 0x58,in_R8);
  if ((0 < in_R8->width) && ((in_R8->flags & 0x200) != 0)) {
    in_R8->width = in_R8->width + -1;
    do {
      __pformat_putc(0x30,in_R8);
      iVar7 = in_R8->width;
      in_R8->width = iVar7 + -1;
    } while (0 < iVar7);
  }
  if (buf < pbVar9) {
    do {
      iVar7 = (int)(char)pbVar9[-1];
      pbVar9 = pbVar9 + -1;
      if (iVar7 == 0x2e) {
        __pformat_emit_radix_point(in_R8);
      }
      else if (iVar7 == 0x2c) {
        wcs = in_R8->thousands_chr;
        if (wcs != L'\0') {
          __pformat_wputchars(&wcs,1,in_R8);
        }
      }
      else {
        __pformat_putc(iVar7,in_R8);
      }
    } while (pbVar9 != (byte *)buf);
  }
  while (iVar7 = in_R8->precision, in_R8->precision = iVar7 + -1, 0 < iVar7) {
    __pformat_putc(0x30,in_R8);
  }
  __pformat_putc(in_R8->flags & 0x20U | 0x50,in_R8);
  in_R8->width = in_R8->width + iVar14;
  in_R8->flags = in_R8->flags | 0x1c0;
  __pformat_int(value_00,in_R8);
  return;
}



// WARNING: Type propagation algorithm not settling

int __mingw_pformat(int flags,void *dest,int max,char *fmt,va_list argv)

{
  int iVar1;
  int *piVar2;
  char *s;
  lconv *plVar3;
  __pformat_fpreg_t *value;
  size_t sVar4;
  size_t sVar5;
  uint uVar6;
  int iVar7;
  int iVar8;
  __pformat_intarg_t *value_00;
  byte bVar9;
  uint uVar10;
  longlong *plVar11;
  __pformat_t *stream_00;
  float10 *pfVar12;
  byte *pbVar13;
  uint uVar14;
  ushort uVar15;
  uint *puVar16;
  wchar_t *_Str;
  byte *pbVar17;
  ulonglong local_c8;
  ushort uStack_c0;
  undefined6 uStack_be;
  long_double local_a8;
  wchar_t rpchr;
  __pformat_intarg_t argval;
  __pformat_t stream;
  
                    // Unresolved local var: int c@[???]
                    // Unresolved local var: int saved_errno@[???]
  piVar2 = _errno();
  uVar14 = flags & 0x6000;
  stream.quota = max;
  stream.rpchr = L'\0';
  iVar1 = *piVar2;
  stream.precision = -1;
  stream.rplen = -3;
  stream.thousands_chr = L'\0';
  uVar6 = (uint)*fmt;
  stream.width = -1;
  stream.thousands_chr_len = 0;
  stream.count = 0;
  stream.expmin = -1;
  if (*fmt == '\0') {
    return 0;
  }
                    // Unresolved local var: __pformat_state_t state@[???]
                    // Unresolved local var: __pformat_length_t length@[???]
                    // Unresolved local var: char * backtrack@[???]
                    // Unresolved local var: int * width_spec@[???]
  uVar10 = uVar6;
  stream.dest = dest;
  stream.flags = uVar14;
LAB_1400196a9:
  iVar8 = stream.count;
  pbVar17 = (byte *)(fmt + 1);
  if (uVar6 == 0x25) {
    bVar9 = *pbVar17;
    stream.width = -1;
    stream.precision = -1;
    if (bVar9 == 0) {
      return stream.count;
    }
    iVar8 = 0;
    uVar6 = 0;
    pbVar13 = pbVar17;
    piVar2 = &stream.width;
    stream.flags = uVar14;
    do {
      fmt = (char *)(pbVar13 + 1);
      iVar7 = (int)(char)bVar9;
      puVar16 = (uint *)argv;
      switch(bVar9) {
      case 0x20:
        if (uVar6 != 0) goto LAB_140019740;
        bVar9 = pbVar13[1];
        stream.flags = stream.flags | 0x40;
        break;
      default:
        if ((9 < (byte)(bVar9 - 0x30)) || (3 < uVar6)) {
LAB_14001990a:
          __pformat_putc(0x25,&stream);
          fmt = (char *)pbVar17;
          goto LAB_140019696;
        }
        if (uVar6 == 0) {
          uVar6 = 1;
        }
        else {
LAB_140019def:
          if (uVar6 == 2) {
            uVar6 = 3;
          }
        }
        if (piVar2 != (int *)0x0) {
          if (*piVar2 < 0) {
            bVar9 = pbVar13[1];
            *piVar2 = iVar7 - 0x30;
            break;
          }
          *piVar2 = iVar7 + -0x30 + *piVar2 * 10;
        }
LAB_140019740:
        bVar9 = pbVar13[1];
        break;
      case 0x23:
        if (uVar6 != 0) goto LAB_140019740;
        bVar9 = pbVar13[1];
        stream.flags = stream.flags | 0x800;
        break;
      case 0x25:
        goto switchD_1400196ea_caseD_25;
      case 0x27:
        if (uVar6 != 0) goto LAB_140019740;
                    // Unresolved local var: int len@[???]
        stream.flags = stream.flags | 0x1000;
        argval.__pformat_ullong_t = argval.__pformat_ullong_t & 0xffffffff00000000;
        plVar3 = localeconv();
        sVar4 = mbrtowc(&rpchr,plVar3->thousands_sep,0x10,&argval.__pformat_long_t);
        if (0 < (int)sVar4) {
          stream.thousands_chr = rpchr;
        }
        bVar9 = pbVar13[1];
        stream.thousands_chr_len = (int)sVar4;
        break;
      case 0x2a:
        if (piVar2 == (int *)0x0) {
LAB_140019ae8:
          bVar9 = pbVar13[1];
          uVar6 = 4;
        }
        else if ((uVar6 & 0xfffffffd) == 0) {
          uVar10 = *(uint *)argv;
          argv = (va_list)((longlong)argv + 8);
          *piVar2 = uVar10;
          if ((int)uVar10 < 0) {
            if (uVar6 != 0) {
              bVar9 = pbVar13[1];
              piVar2 = (int *)0x0;
              stream.precision = -1;
              uVar6 = 2;
              break;
            }
            stream.flags = stream.flags | 0x400;
            stream.width = -stream.width;
          }
          bVar9 = pbVar13[1];
          piVar2 = (int *)0x0;
        }
        else {
          bVar9 = pbVar13[1];
          piVar2 = (int *)0x0;
          uVar6 = 4;
        }
        break;
      case 0x2b:
        if (uVar6 != 0) goto LAB_140019740;
        bVar9 = pbVar13[1];
        stream.flags = stream.flags | 0x100;
        break;
      case 0x2d:
        if (uVar6 != 0) goto LAB_140019740;
        bVar9 = pbVar13[1];
        stream.flags = stream.flags | 0x400;
        break;
      case 0x2e:
        if (1 < uVar6) goto LAB_140019ae8;
        bVar9 = pbVar13[1];
        stream.precision = 0;
        piVar2 = &stream.precision;
        uVar6 = 2;
        break;
      case 0x30:
        if (uVar6 != 0) {
          if (uVar6 < 4) {
            iVar7 = 0x30;
            goto LAB_140019def;
          }
          goto LAB_14001990a;
        }
        bVar9 = pbVar13[1];
        stream.flags = stream.flags | 0x200;
        break;
      case 0x41:
        plVar11 = *(longlong **)argv;
        if ((stream.flags & 4U) != 0) goto LAB_140019949;
LAB_140019b22:
                    // Unresolved local var: uint sign_bit@[???]
                    // Unresolved local var: __pformat_fpreg_t z@[???]
                    // Unresolved local var: __mingw_dbl_type_t hlp@[???]
                    // Unresolved local var: uint l@[???]
                    // Unresolved local var: uint h@[???]
        uVar6 = (uint)plVar11;
        uVar10 = (uint)((ulonglong)plVar11 >> 0x20);
        if (-1 < (int)(0x7ff00000 - ((-uVar6 | uVar6) >> 0x1f | uVar10 & 0x7fffffff))) {
          local_c8 = SUB108((float10)(double)plVar11,0);
          uStack_c0 = (ushort)((unkuint10)(float10)(double)plVar11 >> 0x40);
          if ((short)uStack_c0 < 0) {
            stream.flags = stream.flags | 0x80;
          }
                    // Unresolved local var: __mingw_dbl_type_t hlp@[???]
                    // Unresolved local var: uint l@[???]
                    // Unresolved local var: uint h@[???]
          if (((uVar10 & 0x7ff00000) == 0x7ff00000 &&
               (((ulonglong)plVar11 & 0xfffff00000000) == 0 && uVar6 == 0)) &&
             ((((ulonglong)plVar11 & 0xfffff00000000) != 0 || uVar6 != 0) ||
              ((ulonglong)plVar11 & 0x7ff0000000000000) != 0)) {
            __pformat_emit_inf_or_nan((uint)CONCAT62(uStack_be,uStack_c0) & 0x8000,"Inf",&stream);
            goto LAB_140019a50;
          }
          stream_00 = (__pformat_t *)(CONCAT62(uStack_be,uStack_c0) & 0xffff7fff);
          iVar8 = (int)stream_00;
          if ((uStack_c0 & 0x7fff) == 0) {
LAB_140019f54:
            if (local_c8 != 0) {
              stream_00 = (__pformat_t *)0xfffffc05;
            }
          }
          else {
            if ((uStack_c0 & 0x7fff) < 0x3c01) {
                    // Unresolved local var: int shifted@[???]
              iVar7 = 0x3c01 - (short)stream_00;
              local_c8 = local_c8 >> ((byte)iVar7 & 0x3f);
              iVar8 = iVar7 + iVar8;
            }
            else if ((short)stream_00 == 0) goto LAB_140019f54;
            stream_00 = (__pformat_t *)(ulonglong)(iVar8 - 0x3ffc);
          }
          value = (__pformat_fpreg_t *)(local_c8 >> 3);
          goto LAB_140019d8f;
        }
LAB_140019dff:
        __pformat_emit_inf_or_nan(0,"NaN",&stream);
        goto LAB_140019a50;
      case 0x43:
        goto LAB_140019bc3;
      case 0x45:
        pfVar12 = *(float10 **)argv;
        if ((stream.flags & 4U) != 0) goto LAB_140019a98;
LAB_140019bf5:
        local_a8._0_10_ = (float10)(double)pfVar12;
        __pformat_efloat(&local_a8,&stream);
        goto LAB_140019a50;
      case 0x46:
        pfVar12 = *(float10 **)argv;
        if ((stream.flags & 4U) != 0) goto LAB_140019a70;
LAB_140019c1f:
        local_a8._0_10_ = (float10)(double)pfVar12;
        __pformat_float(&local_a8,&stream);
        goto LAB_140019a50;
      case 0x47:
        pfVar12 = *(float10 **)argv;
        if ((stream.flags & 4U) != 0) goto LAB_140019a35;
LAB_140019c49:
        local_a8._0_10_ = (float10)(double)pfVar12;
        __pformat_gfloat(&local_a8,&stream);
        goto LAB_140019a50;
      case 0x49:
        bVar9 = pbVar13[1];
        if (bVar9 == 0x36) {
          if (pbVar13[2] != 0x34) goto LAB_14001990a;
          bVar9 = pbVar13[3];
          iVar8 = 3;
          fmt = (char *)(pbVar13 + 3);
          uVar6 = 4;
        }
        else if (bVar9 == 0x33) {
          if (pbVar13[2] != 0x32) goto LAB_14001990a;
          bVar9 = pbVar13[3];
          iVar8 = 2;
          fmt = (char *)(pbVar13 + 3);
          uVar6 = 4;
        }
        else {
          iVar8 = 3;
          uVar6 = 4;
        }
        break;
      case 0x4c:
        bVar9 = pbVar13[1];
        stream.flags = stream.flags | 4;
        uVar6 = 4;
        break;
      case 0x53:
        goto LAB_140019da1;
      case 0x58:
      case 0x6f:
      case 0x75:
      case 0x78:
        stream.flags = stream.flags & 0xfffffeff;
        if (iVar8 == 3) {
          argval.__pformat_llong_t = *(undefined8 *)argv;
        }
        else if (iVar8 == 2) {
          argval.__pformat_llong_t = (longlong)*(uint *)argv;
        }
        else {
          uVar6 = *(uint *)argv;
          argval.__pformat_llong_t = (longlong)(__pformat_intarg_t *)(ulonglong)(uVar6 & 0xffff);
          if (iVar8 != 1) {
            argval.__pformat_llong_t = (longlong)(__pformat_intarg_t *)(ulonglong)uVar6;
            if (iVar8 == 5) {
              argval.__pformat_llong_t = (longlong)(__pformat_intarg_t *)(ulonglong)(uVar6 & 0xff);
            }
          }
        }
        if (iVar7 == 0x75) {
          __pformat_int(argval.__pformat_ptr_t,&stream);
        }
        else {
          __pformat_xint(iVar7,argval.__pformat_ptr_t,&stream);
        }
        goto LAB_140019a50;
      case 0x61:
        plVar11 = *(longlong **)argv;
        uVar10 = stream.flags | 0x20;
        uVar6 = stream.flags & 4;
        stream.flags = uVar10;
        if (uVar6 == 0) goto LAB_140019b22;
LAB_140019949:
        value = (__pformat_fpreg_t *)*plVar11;
        uVar6 = *(uint *)(plVar11 + 1);
        uVar15 = (ushort)uVar6;
                    // Unresolved local var: uint sign_bit@[???]
                    // Unresolved local var: __pformat_fpreg_t z@[???]
                    // Unresolved local var: __mingw_ldbl_type_t ld@[???]
                    // Unresolved local var: uint xx@[???]
                    // Unresolved local var: uint signexp@[???]
        uVar10 = (uint)((ulonglong)value >> 0x20) & 0x7fffffff | (uint)value;
        if (0xfffe - ((-uVar10 | uVar10) >> 0x1f | (short)uVar15 * 2 & 0xffffU) >> 0x10 != 0)
        goto LAB_140019dff;
        if ((short)uVar15 < 0) {
          stream.flags = stream.flags | 0x80;
        }
                    // Unresolved local var: __mingw_ldbl_type_t hlp@[???]
                    // Unresolved local var: uint e@[???]
        stream_00 = (__pformat_t *)((ulonglong)uVar6 & 0xffffffffffff7fff);
        if ((uVar6 & 0x7fff) == 0) {
          if (value != (__pformat_fpreg_t *)0x0) {
            stream_00 = (__pformat_t *)0xffffc002;
          }
        }
        else {
          if (((uVar15 & 0x7fff) == 0x7fff) && (uVar10 == 0)) {
            __pformat_emit_inf_or_nan((int)(short)uVar15 & 0x8000,"Inf",&stream);
            goto LAB_140019a50;
          }
          stream_00 = (__pformat_t *)
                      CONCAT62((int6)((ulonglong)stream_00 >> 0x10),(short)stream_00 + -0x3fff);
        }
LAB_140019d8f:
        __pformat_emit_xfloat(value,stream_00);
        goto LAB_140019a50;
      case 99:
        stream.precision = -1;
        if (iVar8 - 2U < 2) {
LAB_140019bc3:
          stream.precision = -1;
          argval.__pformat_ushort_t = (short)*(uint *)argv;
          __pformat_wputchars(&argval.__pformat_ushort_t,1,&stream);
          puVar16 = (uint *)((longlong)argv + 8);
        }
        else {
          argval.__pformat_uchar_t = (char)*(uint *)argv;
          __pformat_putchars(&argval.__pformat_char_t,1,&stream);
          puVar16 = (uint *)((longlong)argv + 8);
        }
        goto LAB_140019696;
      case 100:
      case 0x69:
        stream.flags = stream.flags | 0x80;
        if (iVar8 == 3) {
          value_00 = *(__pformat_intarg_t **)argv;
        }
        else {
          uVar6 = *(uint *)argv;
          value_00 = (__pformat_intarg_t *)(longlong)(int)uVar6;
          if (iVar8 != 2) {
            if (iVar8 == 1) {
              value_00 = (__pformat_intarg_t *)(longlong)(short)uVar6;
            }
            else if (iVar8 == 5) {
              value_00 = (__pformat_intarg_t *)(longlong)(char)uVar6;
            }
          }
        }
        __pformat_int(value_00,&stream);
        puVar16 = (uint *)((longlong)argv + 8);
        goto LAB_140019696;
      case 0x65:
        pfVar12 = *(float10 **)argv;
        uVar10 = stream.flags | 0x20;
        uVar6 = stream.flags & 4;
        stream.flags = uVar10;
        if (uVar6 == 0) goto LAB_140019bf5;
LAB_140019a98:
        local_a8._0_10_ = *pfVar12;
        __pformat_efloat(&local_a8,&stream);
        goto LAB_140019a50;
      case 0x66:
        pfVar12 = *(float10 **)argv;
        uVar10 = stream.flags | 0x20;
        uVar6 = stream.flags & 4;
        stream.flags = uVar10;
        if (uVar6 == 0) goto LAB_140019c1f;
LAB_140019a70:
        local_a8._0_10_ = *pfVar12;
        __pformat_float(&local_a8,&stream);
        goto LAB_140019a50;
      case 0x67:
        pfVar12 = *(float10 **)argv;
        uVar10 = stream.flags | 0x20;
        uVar6 = stream.flags & 4;
        stream.flags = uVar10;
        if (uVar6 == 0) goto LAB_140019c49;
LAB_140019a35:
        local_a8._0_10_ = *pfVar12;
        __pformat_gfloat(&local_a8,&stream);
        goto LAB_140019a50;
      case 0x68:
        bVar9 = pbVar13[1];
        if (bVar9 == 0x68) {
          bVar9 = pbVar13[2];
          iVar8 = 5;
          fmt = (char *)(pbVar13 + 2);
          uVar6 = 4;
        }
        else {
          iVar8 = 1;
          uVar6 = 4;
        }
        break;
      case 0x6a:
      case 0x74:
      case 0x7a:
        bVar9 = pbVar13[1];
        iVar8 = 3;
        uVar6 = 4;
        break;
      case 0x6c:
        bVar9 = pbVar13[1];
        if (bVar9 == 0x6c) {
          bVar9 = pbVar13[2];
          iVar8 = 3;
          fmt = (char *)(pbVar13 + 2);
          uVar6 = 4;
        }
        else {
          iVar8 = 2;
          uVar6 = 4;
        }
        break;
      case 0x6d:
        s = strerror(iVar1);
        __pformat_puts(s,&stream);
        goto LAB_140019696;
      case 0x6e:
        plVar11 = *(longlong **)argv;
        if (iVar8 == 5) {
          *(char *)plVar11 = (char)stream.count;
        }
        else if (iVar8 == 1) {
          *(short *)plVar11 = (short)stream.count;
        }
        else if ((iVar8 == 2) || (iVar8 != 3)) {
          *(int *)plVar11 = stream.count;
        }
        else {
          *plVar11 = (longlong)stream.count;
        }
LAB_140019a50:
        puVar16 = (uint *)((longlong)argv + 8);
        goto LAB_140019696;
      case 0x70:
        if ((uVar6 == 0) && (stream.flags == uVar14)) {
          stream.precision = 0x10;
          stream.flags = uVar14 | 0x200;
        }
        __pformat_xint(0x78,*(__pformat_intarg_t **)argv,&stream);
        puVar16 = (uint *)((longlong)argv + 8);
        goto LAB_140019696;
      case 0x73:
        if (iVar8 - 2U < 2) {
LAB_140019da1:
          puVar16 = (uint *)((longlong)argv + 8);
          _Str = *(wchar_t **)argv;
          if (_Str == (wchar_t *)0x0) {
            _Str = L"(null)";
          }
          if (stream.precision < 0) {
            sVar5 = wcslen(_Str);
            __pformat_wputchars(_Str,(int)sVar5,&stream);
          }
          else {
            sVar4 = wcsnlen(_Str,(longlong)stream.precision);
            __pformat_wputchars(_Str,(int)sVar4,&stream);
          }
        }
        else {
          __pformat_puts(*(char **)argv,&stream);
          puVar16 = (uint *)((longlong)argv + 8);
        }
        goto LAB_140019696;
      }
      pbVar13 = (byte *)fmt;
      if (bVar9 == 0) {
        return stream.count;
      }
    } while( true );
  }
  if (((stream.flags & 0x4000U) != 0) || (stream.count < stream.quota)) {
    if ((stream.flags & 0x2000U) == 0) {
      *(char *)((longlong)stream.dest + (longlong)stream.count) = (char)uVar10;
    }
    else {
      fputc(uVar6,stream.dest);
    }
  }
  stream.count = iVar8 + 1;
  puVar16 = (uint *)argv;
  fmt = (char *)pbVar17;
  goto LAB_140019696;
switchD_1400196ea_caseD_25:
  __pformat_putc(0x25,&stream);
LAB_140019696:
  bVar9 = *fmt;
  uVar10 = (uint)bVar9;
  uVar6 = (uint)(char)bVar9;
  argv = (va_list)puVar16;
  if (bVar9 == 0) {
    return stream.count;
  }
  goto LAB_1400196a9;
}



void __pformat_putc(int c,__pformat_t *stream)

{
  int iVar1;
  
  if (((stream->flags & 0x4000U) != 0) || (iVar1 = stream->count, iVar1 < stream->quota)) {
    if ((stream->flags & 0x2000U) != 0) {
      fputwc((wchar_t)c,stream->dest);
      stream->count = stream->count + 1;
      return;
    }
    iVar1 = stream->count;
    *(wchar_t *)((longlong)&stream->dest->_ptr + (longlong)iVar1 * 2) = (wchar_t)c;
  }
  stream->count = iVar1 + 1;
  return;
}



void __pformat_putchars(char *s,int count,__pformat_t *stream)

{
  uint uVar1;
  uint uVar2;
  FILE *_File;
  int iVar3;
  size_t n;
  size_t sVar4;
  uint uVar5;
  uint uVar6;
  ulonglong uVar7;
  mbstate_t ps;
  wchar_t w [12];
  
                    // Unresolved local var: int len@[???]
  uVar6 = stream->precision;
  uVar5 = uVar6;
  if (count <= (int)uVar6) {
    uVar5 = count;
  }
  uVar1 = stream->flags;
  uVar2 = stream->width;
  if (-1 < (int)uVar6) {
    count = uVar5;
  }
  uVar7 = (ulonglong)(uint)count;
  if ((~(byte)(uVar1 >> 8) & 0x60) == 0) {
    _File = stream->dest;
    if (count < (int)uVar2) {
      if ((uVar1 & 0x400) == 0) {
        iVar3 = __ms_fwprintf(_File,L"%*.*S",(ulonglong)uVar2,uVar7,s);
      }
      else {
        iVar3 = __ms_fwprintf(_File,L"%-*.*S",(ulonglong)uVar2,uVar7,s);
      }
    }
    else {
      iVar3 = __ms_fwprintf(_File,L"%.*S",uVar7,s);
    }
    if (0 < iVar3) {
      stream->count = stream->count + iVar3;
    }
    stream->width = -1;
    return;
  }
  if (count < (int)uVar2) {
    if ((uVar1 & 0x400) == 0) {
      stream->width = (uVar2 - count) + -1;
      do {
        __pformat_putc(0x20,stream);
        iVar3 = stream->width;
        stream->width = iVar3 + -1;
      } while (iVar3 != 0);
    }
    else {
      stream->width = uVar2 - count;
    }
  }
  else {
    stream->width = -1;
  }
                    // Unresolved local var: size_t l@[???]
                    // Unresolved local var: wchar_t * p@[???]
  if (0 < count) {
    do {
      ps._Wchar = 0;
      ps._Byte = L'\0';
      ps._State = L'\0';
      uVar6 = (int)uVar7 - 1;
      uVar7 = (ulonglong)uVar6;
      n = strlen(s);
      sVar4 = mbrtowc(w,s,n,(mbstate_t *)&ps);
      if (sVar4 == 0) break;
      if ((longlong)sVar4 < 0) {
        w[0] = (wchar_t)*s;
        sVar4 = 1;
      }
      s = s + sVar4;
      __pformat_putc((uint)(ushort)w[0],stream);
    } while (uVar6 != 0);
  }
  while (iVar3 = stream->width, stream->width = iVar3 + -1, 0 < iVar3) {
    __pformat_putc(0x20,stream);
  }
  return;
}



void __pformat_emit_inf_or_nan(int sign,char *value,__pformat_t *stream)

{
  uint uVar1;
  char cVar2;
  longlong lVar3;
  char *pcVar4;
  char buf [4];
  
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: char * p@[???]
  uVar1 = stream->flags;
  stream->precision = -1;
  if (sign == 0) {
    cVar2 = '+';
    if ((uVar1 & 0x100) == 0) {
      if ((uVar1 & 0x40) == 0) {
        pcVar4 = buf;
      }
      else {
        pcVar4 = buf + 1;
        buf[0] = ' ';
      }
      goto LAB_14001a1fc;
    }
  }
  else {
    cVar2 = '-';
  }
  pcVar4 = buf + 1;
  buf[0] = cVar2;
LAB_14001a1fc:
  lVar3 = 0;
  do {
    pcVar4[lVar3] = value[lVar3] & 0xdfU | (byte)uVar1 & 0x20;
    lVar3 = lVar3 + 1;
  } while (lVar3 != 3);
  __pformat_putchars(buf,((int)pcVar4 + 3) - (int)buf,stream);
  return;
}



void __pformat_emit_radix_point(__pformat_t *stream)

{
  lconv *plVar1;
  size_t sVar2;
  uint c;
  wchar_t rpchr;
  mbstate_t state;
  
  if (stream->rplen == -3) {
    state._Wchar = 0;
    state._Byte = L'\0';
    state._State = L'\0';
                    // Unresolved local var: int len@[???]
    plVar1 = localeconv();
    sVar2 = mbrtowc(&rpchr,plVar1->decimal_point,0x10,(mbstate_t *)&state);
    if ((int)sVar2 < 1) {
      rpchr = stream->rpchr;
    }
    else {
      stream->rpchr = rpchr;
    }
    stream->rplen = (int)sVar2;
  }
  else {
    rpchr = stream->rpchr;
  }
  c = (uint)(ushort)rpchr;
  if (rpchr == L'\0') {
    c = 0x2e;
  }
  __pformat_putc(c,stream);
  return;
}



void __pformat_puts(char *s,__pformat_t *stream)

{
  int count;
  size_t sVar2;
  size_t sVar1;
  
  if (s == (char *)0x0) {
    s = "(null)";
  }
  if (stream->precision < 0) {
    sVar2 = strlen(s);
    count = (int)sVar2;
  }
  else {
    sVar1 = strnlen(s,(longlong)stream->precision);
    count = (int)sVar1;
  }
  __pformat_putchars(s,count,stream);
  return;
}



char * __pformat_cvt(int mode,long_double *val,int nd,int *dp,int *sign)

{
  char *pcVar1;
  uint uVar2;
  int be;
  ushort uVar3;
  int k;
  char *ep;
  __pformat_fpreg_t x;
  
                    // Unresolved local var: uint e@[???]
  x.__pformat_fpreg_double_t = (double)*(undefined8 *)val;
  x._8_4_ = *(uint *)((longlong)val + 8);
                    // Unresolved local var: __pformat_fpreg_t x@[???]
                    // Unresolved local var: __mingw_ldbl_type_t hlp@[???]
                    // Unresolved local var: uint e@[???]
  uVar3 = (ushort)x._8_4_ & 0x7fff;
  if ((x._8_4_ & 0x7fff) == 0) {
                    // Unresolved local var: uint h@[???]
    if ((int)x.field_2.__pformat_fpreg_mantissa == 0 &&
        (int)(x.field_2.__pformat_fpreg_mantissa >> 0x20) == 0) {
      k = 0;
      be = 0;
    }
    else {
      if ((longlong)x.field_2.__pformat_fpreg_mantissa < 0) goto LAB_14001a36d;
      k = 2;
      be = -0x403d;
    }
  }
  else if (uVar3 == 0x7fff) {
    if ((x.field_2.__pformat_fpreg_mantissa & 0x7fffffff00000000) != 0 ||
        (int)x.field_2.__pformat_fpreg_mantissa != 0) {
      k = 4;
      be = 0;
      uVar2 = 0;
      goto LAB_14001a385;
    }
    k = 3;
    be = 0;
  }
  else {
LAB_14001a36d:
    k = 1;
    be = (int)(short)(uVar3 + 0xbfc2);
  }
  uVar2 = x._8_4_ & 0x8000;
LAB_14001a385:
  *sign = uVar2;
  pcVar1 = __gdtoa(&__pformat_cvt::fpi,be,&x.__pformat_fpreg_bits,&k,mode,nd,dp,&ep);
  return pcVar1;
}



void __pformat_wputchars(wchar_t *s,int count,__pformat_t *stream)

{
  wchar_t _Ch;
  uint uVar1;
  uint uVar2;
  uint uVar3;
  FILE *_File;
  int iVar4;
  uint uVar5;
  ulonglong uVar6;
  longlong lVar7;
  
                    // Unresolved local var: int len@[???]
  uVar1 = stream->precision;
  uVar5 = uVar1;
  if (count <= (int)uVar1) {
    uVar5 = count;
  }
  uVar2 = stream->flags;
  uVar3 = stream->width;
  if (-1 < (int)uVar1) {
    count = uVar5;
  }
  uVar6 = (ulonglong)(uint)count;
  if ((~(byte)(uVar2 >> 8) & 0x60) == 0) {
    _File = stream->dest;
    if (count < (int)uVar3) {
      if ((uVar2 & 0x400) == 0) {
        iVar4 = __ms_fwprintf(_File,L"%*.*s",(ulonglong)uVar3,uVar6,s);
      }
      else {
        iVar4 = __ms_fwprintf(_File,L"%-*.*s",(ulonglong)uVar3,uVar6,s);
      }
    }
    else {
      iVar4 = __ms_fwprintf(_File,L"%.*s",uVar6,s);
    }
    if (0 < iVar4) {
      stream->count = stream->count + iVar4;
    }
    stream->width = -1;
    return;
  }
  if (count < (int)uVar3) {
    stream->width = uVar3 - count;
    if ((uVar2 & 0x400) == 0) {
      stream->width = (uVar3 - count) + -1;
      do {
        __pformat_putc(0x20,stream);
        iVar4 = stream->width;
        stream->width = iVar4 + -1;
      } while (iVar4 != 0);
      if (count < 1) goto LAB_14001a538;
    }
    else if (count < 1) {
      stream->width = stream->width + -1;
      goto LAB_14001a545;
    }
  }
  else {
    stream->width = -1;
    if (count < 1) {
      stream->width = -2;
      return;
    }
  }
  lVar7 = 0;
  do {
    _Ch = s[lVar7];
    if (_Ch == L'\0') break;
    if (((stream->flags & 0x4000U) != 0) || (iVar4 = stream->count, iVar4 < stream->quota)) {
      if ((stream->flags & 0x2000U) == 0) {
        iVar4 = stream->count;
        *(wchar_t *)((longlong)&stream->dest->_ptr + (longlong)iVar4 * 2) = _Ch;
      }
      else {
        fputwc(_Ch,stream->dest);
        iVar4 = stream->count;
      }
    }
    lVar7 = lVar7 + 1;
    stream->count = iVar4 + 1;
  } while (0 < count - (int)lVar7);
LAB_14001a538:
  while (iVar4 = stream->width, stream->width = iVar4 + -1, 0 < iVar4) {
LAB_14001a545:
    if (((stream->flags & 0x4000U) != 0) || (iVar4 = stream->count, iVar4 < stream->quota)) {
      if ((stream->flags & 0x2000U) == 0) {
        iVar4 = stream->count;
        *(undefined2 *)((longlong)&stream->dest->_ptr + (longlong)iVar4 * 2) = 0x20;
      }
      else {
        fputwc(L' ',stream->dest);
        iVar4 = stream->count;
      }
    }
    stream->count = iVar4 + 1;
  }
  return;
}



void __pformat_emit_float(int sign,char *value,int len,__pformat_t *stream)

{
  char cVar1;
  int iVar2;
  int iVar3;
  uint uVar4;
  
  iVar2 = stream->width;
  if (len < 1) {
    if (iVar2 < 1) {
      if ((iVar2 != 0) || (-1 < stream->precision)) goto LAB_14001a777;
      iVar2 = -stream->precision;
      stream->width = iVar2;
      if ((stream->flags & 0x800) != 0) goto LAB_14001a639;
LAB_14001a654:
      if (sign == 0) {
        uVar4 = stream->flags;
        if ((uVar4 & 0x1c0) != 0) {
          stream->width = iVar2 + -1;
          if ((iVar2 + -1 != 0) && ((uVar4 & 0x600) == 0)) goto LAB_14001a853;
          goto LAB_14001a69f;
        }
        if ((uVar4 & 0x600) == 0) {
          iVar2 = iVar2 + -1;
          goto LAB_14001a856;
        }
        goto LAB_14001a6c0;
      }
      stream->width = iVar2 + -1;
      if ((iVar2 + -1 != 0) && ((stream->flags & 0x600U) == 0)) {
LAB_14001a853:
        iVar2 = iVar2 + -2;
LAB_14001a856:
        stream->width = iVar2;
        do {
          __pformat_putc(0x20,stream);
          iVar2 = stream->width;
          stream->width = iVar2 + -1;
        } while (0 < iVar2);
        goto LAB_14001a693;
      }
    }
    else {
      iVar3 = stream->precision;
      iVar2 = iVar2 + -1;
      if (iVar3 < iVar2) goto LAB_14001a62c;
LAB_14001a777:
      stream->width = -1;
      if (sign == 0) goto LAB_14001a69c;
    }
LAB_14001a790:
    __pformat_putc(0x2d,stream);
  }
  else {
    if (iVar2 < len) {
      stream->width = -1;
      if (((stream->flags & 0x1000) != 0) && (stream->thousands_chr != L'\0')) {
        iVar2 = -1;
LAB_14001a8d1:
                    // Unresolved local var: int cths@[???]
        iVar3 = ((len + 2U) / 3 - 1) - iVar2;
        if ((len + 2U) / 3 != 1) {
          do {
            if (iVar2 < 1) goto LAB_14001a693;
            iVar2 = iVar2 + -1;
            stream->width = iVar2;
          } while (iVar3 + iVar2 != 0);
        }
        goto LAB_14001a650;
      }
    }
    else {
      iVar3 = stream->precision;
      iVar2 = iVar2 - len;
      if (iVar3 < iVar2) {
LAB_14001a62c:
        iVar2 = iVar2 - iVar3;
        stream->width = iVar2;
        if ((iVar3 < 1) && ((stream->flags & 0x800U) == 0)) {
          if ((len < 1) || ((stream->flags & 0x1000U) == 0)) goto LAB_14001a654;
        }
        else {
LAB_14001a639:
          iVar2 = iVar2 + -1;
          stream->width = iVar2;
          if ((len < 1) || ((stream->flags & 0x1000) == 0)) goto LAB_14001a650;
        }
LAB_14001a947:
        if (stream->thousands_chr != L'\0') goto LAB_14001a8d1;
      }
      else {
        stream->width = -1;
        iVar2 = -1;
        if ((stream->flags & 0x1000) != 0) goto LAB_14001a947;
      }
LAB_14001a650:
      if (0 < iVar2) goto LAB_14001a654;
    }
LAB_14001a693:
    if (sign != 0) goto LAB_14001a790;
LAB_14001a69c:
    uVar4 = stream->flags;
LAB_14001a69f:
    if ((uVar4 & 0x100) == 0) {
      if ((uVar4 & 0x40) != 0) {
        __pformat_putc(0x20,stream);
      }
    }
    else {
      __pformat_putc(0x2b,stream);
    }
  }
LAB_14001a6c0:
  if ((0 < stream->width) && ((stream->flags & 0x600U) == 0x200)) {
    stream->width = stream->width + -1;
    do {
      __pformat_putc(0x30,stream);
      iVar2 = stream->width;
      stream->width = iVar2 + -1;
    } while (0 < iVar2);
  }
  if (len < 1) {
    __pformat_putc(0x30,stream);
    iVar2 = stream->precision;
    if ((0 < iVar2) || ((stream->flags & 0x800) != 0)) goto LAB_14001a808;
    if (len == 0) goto LAB_14001a749;
  }
  else {
    while( true ) {
      cVar1 = *value;
      iVar2 = 0x30;
      if (cVar1 != '\0') {
        value = value + 1;
        iVar2 = (int)cVar1;
      }
      __pformat_putc(iVar2,stream);
      len = len + -1;
      if (len == 0) break;
      if ((((stream->flags & 0x1000) != 0) && (stream->thousands_chr != L'\0')) &&
         ((uint)(len * -0x55555555) < 0x55555556)) {
        __pformat_wputchars(&stream->thousands_chr,1,stream);
      }
    }
    iVar2 = stream->precision;
    if (0 < iVar2) {
      __pformat_emit_radix_point(stream);
      goto LAB_14001a7d3;
    }
    len = 0;
    if ((stream->flags & 0x800) == 0) {
LAB_14001a749:
      stream->precision = iVar2 + -1;
      return;
    }
LAB_14001a808:
    __pformat_emit_radix_point(stream);
    if (len == 0) goto LAB_14001a7d3;
    iVar2 = stream->precision;
  }
  stream->precision = iVar2 + len;
  do {
    __pformat_putc(0x30,stream);
    len = len + 1;
  } while (len != 0);
LAB_14001a7d3:
  while (iVar2 = stream->precision, stream->precision = iVar2 + -1, 0 < iVar2) {
    cVar1 = *value;
    iVar2 = 0x30;
    if (cVar1 != '\0') {
      value = value + 1;
      iVar2 = (int)cVar1;
    }
    __pformat_putc(iVar2,stream);
  }
  return;
}



void __pformat_float(long_double *x,__pformat_t *stream)

{
  char *value;
  int iVar1;
  int iVar2;
  long_double local_38;
  int sign;
  int intlen;
  
                    // Unresolved local var: char * value@[???]
  iVar2 = stream->precision;
  local_38._0_10_ = *(unkbyte10 *)x;
  if (iVar2 < 0) {
    stream->precision = 6;
    iVar2 = 6;
  }
  value = __pformat_cvt(3,&local_38,iVar2,&intlen,&sign);
  if (intlen == -0x8000) {
    __pformat_emit_inf_or_nan(sign,value,stream);
  }
  else {
    __pformat_emit_float(sign,value,intlen,stream);
    iVar2 = stream->width;
    while( true ) {
      iVar1 = iVar2 + -1;
      stream->width = iVar1;
      if (iVar2 < 1) break;
      iVar2 = iVar1;
      if (((stream->flags & 0x4000U) != 0) || (iVar1 = stream->count, iVar1 < stream->quota)) {
        if ((stream->flags & 0x2000U) == 0) {
          iVar1 = stream->count;
          *(undefined2 *)((longlong)&stream->dest->_ptr + (longlong)iVar1 * 2) = 0x20;
        }
        else {
          fputwc(L' ',stream->dest);
          iVar1 = stream->count;
          iVar2 = stream->width;
        }
      }
      stream->count = iVar1 + 1;
    }
  }
  __freedtoa(value);
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe

void __pformat_xint(int fmt,__pformat_intarg_t *value,__pformat_t *stream)

{
  FILE *pFVar1;
  longlong lVar2;
  int iVar3;
  int iVar4;
  byte bVar5;
  uint uVar6;
  int iVar8;
  sbyte sVar9;
  undefined1 *puVar10;
  undefined1 *puVar11;
  byte *pbVar12;
  byte *pbVar13;
  byte *pbVar14;
  uint uVar15;
  byte bVar16;
  byte bVar17;
  byte *pbVar18;
  byte bVar19;
  int iVar20;
  uint uVar21;
  bool bVar22;
  undefined1 auStack_78 [32];
  byte abStack_58 [8];
  byte *local_50;
  int iVar7;
  
                    // Unresolved local var: int width@[???]
                    // Unresolved local var: int shift@[???]
                    // Unresolved local var: int bufflen@[???]
                    // Unresolved local var: char * buf@[???]
                    // Unresolved local var: char * p@[???]
                    // Unresolved local var: int mask@[???]
  bVar19 = (byte)fmt;
  if (fmt == 0x6f) {
    iVar20 = stream->precision;
    uVar15 = stream->flags;
    iVar7 = 0;
    if (-1 < iVar20) {
      iVar7 = iVar20;
    }
    uVar6 = iVar7 + 0x18;
    if ((uVar15 & 0x1000) != 0) {
      sVar9 = 3;
      goto LAB_14001ab09;
    }
    uVar21 = stream->width;
    if ((int)uVar6 < (int)uVar21) {
      uVar6 = uVar21;
    }
    sVar9 = 3;
    bVar16 = 7;
    lVar2 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
    puVar11 = auStack_78 + lVar2;
    pbVar12 = abStack_58 + lVar2;
LAB_14001ac15:
    puVar10 = puVar11;
    if (value == (__pformat_intarg_t *)0x0) goto LAB_14001ab68;
LAB_14001ac1e:
                    // Unresolved local var: char * q@[???]
    local_50 = pbVar12;
    do {
      pbVar13 = pbVar12;
      pbVar14 = pbVar13 + 1;
      bVar5 = bVar16 & (byte)value;
      bVar17 = bVar5 + 0x30;
      bVar5 = bVar5 + 0x37 | bVar19 & 0x20;
      if (bVar17 < 0x3a) {
        bVar5 = bVar17;
      }
      value = (__pformat_intarg_t *)((ulonglong)value >> sVar9);
      *pbVar13 = bVar5;
      pbVar18 = local_50;
      pbVar12 = pbVar14;
    } while (value != (__pformat_intarg_t *)0x0);
    puVar10 = puVar11;
    pbVar12 = local_50;
    if (pbVar14 == local_50) goto LAB_14001ab68;
    iVar7 = (int)pbVar14;
    iVar3 = (int)local_50;
    if (0 < iVar20) {
      iVar8 = iVar7 - iVar3;
      iVar4 = iVar20 - iVar8;
      if (iVar20 - iVar8 < 1) {
        if (fmt != 0x6f) {
          if ((int)uVar21 <= iVar8) goto LAB_14001af30;
          iVar8 = uVar21 - iVar8;
          stream->width = iVar8;
          goto LAB_14001ac9f;
        }
        goto LAB_14001aec8;
      }
      goto LAB_14001ab81;
    }
    if (fmt == 0x6f) {
LAB_14001aec8:
      if ((uVar15 & 0x800) != 0) {
        *pbVar14 = 0x30;
        pbVar12 = pbVar13 + 2;
        goto LAB_14001ab9a;
      }
      iVar8 = iVar7 - iVar3;
      if ((int)uVar21 <= iVar8) {
        stream->width = -1;
        pbVar12 = pbVar14;
        goto LAB_14001abc5;
      }
      goto LAB_14001ae7a;
    }
    if ((int)uVar21 <= iVar7 - iVar3) {
LAB_14001af30:
      stream->width = -1;
      goto LAB_14001af37;
    }
    iVar8 = uVar21 - (iVar7 - iVar3);
    stream->width = iVar8;
LAB_14001ac9f:
    if ((uVar15 & 0x800) == 0) {
      pbVar12 = pbVar14;
      if ((-1 < iVar20) || ((uVar15 & 0x600) != 0x200)) {
LAB_14001acb4:
        iVar20 = iVar8 + -1;
        if ((uVar15 & 0x400) == 0) {
          do {
            *(undefined8 *)(puVar11 + -8) = 0x14001acdd;
            __pformat_putc(0x20,stream);
            bVar22 = iVar20 != 0;
            iVar20 = iVar20 + -1;
          } while (bVar22);
          iVar20 = -2;
          iVar8 = -1;
          if (pbVar18 < pbVar12) goto LAB_14001ad0f;
          return;
        }
        if (pbVar12 <= pbVar18) goto LAB_14001ad79;
        goto LAB_14001ad12;
      }
LAB_14001af8b:
      *(undefined8 *)(puVar11 + -8) = 0x14001af9e;
      memset(pbVar14,0x30,(longlong)iVar8);
      pbVar14 = pbVar14 + iVar8;
      if ((uVar15 & 0x800) == 0) goto LAB_14001aebd;
      *pbVar14 = bVar19;
      iVar8 = -1;
      pbVar12 = pbVar14 + 2;
      pbVar14[1] = 0x30;
    }
    else {
      iVar8 = iVar8 + -2;
      if (0 < iVar8) {
        if ((iVar20 < 0) && ((uVar15 & 0x600) == 0x200)) goto LAB_14001af8b;
        *pbVar14 = bVar19;
        pbVar12 = pbVar14 + 2;
        pbVar14[1] = 0x30;
        goto LAB_14001acb4;
      }
      *pbVar14 = bVar19;
      pbVar12 = pbVar14 + 2;
      pbVar14[1] = 0x30;
    }
  }
  else {
    iVar20 = stream->precision;
    uVar15 = stream->flags;
    iVar7 = 0;
    if (-1 < iVar20) {
      iVar7 = iVar20;
    }
    uVar6 = iVar7 + 0x12;
    if ((uVar15 & 0x1000) == 0) {
      uVar21 = stream->width;
      if ((int)uVar6 <= (int)uVar21) {
        uVar6 = uVar21;
      }
      sVar9 = 4;
      bVar16 = 0xf;
      lVar2 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
      puVar11 = auStack_78 + lVar2;
      pbVar12 = abStack_58 + lVar2;
      goto LAB_14001ac15;
    }
    sVar9 = 4;
LAB_14001ab09:
    if (stream->thousands_chr != L'\0') {
      uVar6 = (uint)((ulonglong)uVar6 * 0x2aaaaaaab >> 0x21);
    }
    uVar21 = stream->width;
    if ((int)uVar6 <= (int)uVar21) {
      uVar6 = uVar21;
    }
    lVar2 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
    puVar11 = auStack_78 + lVar2;
    puVar10 = auStack_78 + lVar2;
    pbVar12 = abStack_58 + lVar2;
    bVar16 = (fmt != 0x6f) * '\b' + 7;
    if (value != (__pformat_intarg_t *)0x0) goto LAB_14001ac1e;
LAB_14001ab68:
    stream->flags = uVar15 & 0xfffff7ff;
    pbVar14 = pbVar12;
    pbVar18 = pbVar12;
    iVar4 = iVar20;
    if (iVar20 < 1) {
LAB_14001ae53:
      pbVar14 = pbVar12;
      if (iVar20 == 0) goto LAB_14001aba3;
      pbVar14 = pbVar12 + 1;
      *pbVar12 = 0x30;
      iVar8 = (int)pbVar14 - (int)pbVar18;
      if ((int)uVar21 <= iVar8) goto LAB_14001abb4;
LAB_14001ae77:
      uVar15 = stream->flags;
      puVar11 = puVar10;
LAB_14001ae7a:
      iVar8 = uVar21 - iVar8;
      stream->width = iVar8;
      if (fmt != 0x6f) goto LAB_14001ac9f;
      pbVar12 = pbVar14;
      if ((-1 < iVar20) || ((uVar15 & 0x600) != 0x200)) goto LAB_14001acb4;
      *(undefined8 *)(puVar11 + -8) = 0x14001aeb9;
      memset(pbVar14,0x30,(longlong)iVar8);
      pbVar14 = pbVar14 + iVar8;
LAB_14001aebd:
      iVar8 = -1;
      pbVar12 = pbVar14;
    }
    else {
LAB_14001ab81:
      pbVar12 = pbVar14 + iVar4;
      *(undefined8 *)(puVar10 + -8) = 0x14001ab9a;
      memset(pbVar14,0x30,(longlong)iVar4);
LAB_14001ab9a:
      pbVar14 = pbVar12;
      if (pbVar12 == pbVar18) goto LAB_14001ae53;
LAB_14001aba3:
      iVar8 = (int)pbVar14 - (int)pbVar18;
      if (iVar8 < (int)uVar21) goto LAB_14001ae77;
LAB_14001abb4:
      stream->width = -1;
      puVar11 = puVar10;
      pbVar12 = pbVar14;
      if (fmt == 0x6f) {
LAB_14001abc5:
        if (pbVar12 <= pbVar18) {
          return;
        }
        uVar15 = stream->flags;
        iVar20 = -2;
        iVar8 = -1;
        goto LAB_14001ad12;
      }
      uVar15 = stream->flags;
LAB_14001af37:
      iVar8 = -1;
      pbVar12 = pbVar14;
      if ((uVar15 & 0x800) != 0) {
        *pbVar14 = bVar19;
        iVar8 = -1;
        pbVar14[1] = 0x30;
        pbVar12 = pbVar14 + 2;
      }
    }
  }
  if (pbVar12 <= pbVar18) {
    return;
  }
  uVar15 = stream->flags;
  iVar20 = iVar8 + -1;
LAB_14001ad12:
  do {
    pbVar12 = pbVar12 + -1;
    if (((uVar15 & 0x4000) == 0) && (iVar7 = stream->count, stream->quota <= iVar7)) {
LAB_14001ad04:
      stream->count = iVar7 + 1;
    }
    else {
      bVar19 = *pbVar12;
      pFVar1 = stream->dest;
      if ((uVar15 & 0x2000) == 0) {
        iVar7 = stream->count;
        *(short *)((longlong)&pFVar1->_ptr + (longlong)iVar7 * 2) = (short)(char)bVar19;
        goto LAB_14001ad04;
      }
      *(undefined8 *)(puVar11 + -8) = 0x14001ad3c;
      fputwc((short)(char)bVar19,pFVar1);
      stream->count = stream->count + 1;
    }
    if (pbVar12 <= pbVar18) break;
LAB_14001ad0f:
    uVar15 = stream->flags;
  } while( true );
  if (iVar8 < 1) {
    return;
  }
  do {
    while( true ) {
      uVar15 = stream->flags;
LAB_14001ad79:
      if (((uVar15 & 0x4000) != 0) || (iVar7 = stream->count, iVar7 < stream->quota)) break;
LAB_14001ad6a:
      stream->count = iVar7 + 1;
      bVar22 = iVar20 == 0;
      iVar20 = iVar20 + -1;
      if (bVar22) {
        return;
      }
    }
    pFVar1 = stream->dest;
    if ((uVar15 & 0x2000) == 0) {
      iVar7 = stream->count;
      *(undefined2 *)((longlong)&pFVar1->_ptr + (longlong)iVar7 * 2) = 0x20;
      goto LAB_14001ad6a;
    }
    *(undefined8 *)(puVar11 + -8) = 0x14001ad9e;
    fputwc(L' ',pFVar1);
    stream->count = stream->count + 1;
    bVar22 = iVar20 == 0;
    iVar20 = iVar20 + -1;
    if (bVar22) {
      return;
    }
  } while( true );
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe

void __pformat_int(__pformat_intarg_t *value,__pformat_t *stream)

{
  char *pcVar1;
  char cVar2;
  uint uVar3;
  FILE *pFVar4;
  longlong lVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  char *pcVar10;
  char *_Dst;
  bool bVar11;
  undefined8 auStack_70 [5];
  char local_48 [8];
  
                    // Unresolved local var: int32_t bufflen@[???]
                    // Unresolved local var: char * buf@[???]
                    // Unresolved local var: char * p@[???]
                    // Unresolved local var: int precision@[???]
  iVar7 = stream->precision;
  uVar8 = stream->flags;
  iVar9 = 0;
  if (-1 < iVar7) {
    iVar9 = iVar7;
  }
  uVar6 = iVar9 + 0x17;
  if (((uVar8 & 0x1000) != 0) && (stream->thousands_chr != L'\0')) {
    uVar6 = (uint)((ulonglong)uVar6 * 0x2aaaaaaab >> 0x21);
  }
  uVar3 = stream->width;
  if ((int)uVar6 <= (int)uVar3) {
    uVar6 = uVar3;
  }
  auStack_70[0] = 0x14001b045;
  lVar5 = -((longlong)(int)uVar6 + 0xfU & 0xfffffffffffffff0);
  pcVar1 = local_48 + lVar5;
  if ((uVar8 & 0x80) == 0) {
LAB_14001b063:
    if (value != (__pformat_intarg_t *)0x0) goto LAB_14001b06c;
    bVar11 = true;
    pcVar10 = pcVar1;
    _Dst = pcVar1;
    iVar9 = iVar7;
    if (0 < iVar7) goto LAB_14001b10a;
LAB_14001b126:
    if ((iVar7 == 0) || (pcVar10 = _Dst, !bVar11)) goto LAB_14001b133;
  }
  else {
    if (-1 < (longlong)value) {
      uVar8 = uVar8 & 0xffffff7f;
      stream->flags = uVar8;
      goto LAB_14001b063;
    }
    value = (__pformat_intarg_t *)-(longlong)value;
LAB_14001b06c:
    pcVar10 = pcVar1;
    do {
      if ((((pcVar1 != pcVar10) && ((uVar8 & 0x1000) != 0)) && (stream->thousands_chr != L'\0')) &&
         (((longlong)pcVar10 - (longlong)pcVar1 & 0x8000000000000003U) == 3)) {
        *pcVar10 = ',';
        pcVar10 = pcVar10 + 1;
      }
      _Dst = pcVar10 + 1;
      *pcVar10 = (char)value + (char)(__pformat_intarg_t *)((ulonglong)value / 10) * -10 + '0';
      bVar11 = (__pformat_intarg_t *)0x9 < value;
      value = (__pformat_intarg_t *)((ulonglong)value / 10);
      pcVar10 = _Dst;
    } while (bVar11);
    if (iVar7 < 1) {
LAB_14001b120:
      bVar11 = pcVar1 == _Dst;
      goto LAB_14001b126;
    }
    iVar9 = iVar7 - ((int)_Dst - (int)pcVar1);
    if (0 < iVar9) {
LAB_14001b10a:
      _Dst = pcVar10 + iVar9;
      *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x14001b120;
      memset(pcVar10,0x30,(longlong)iVar9);
      goto LAB_14001b120;
    }
    pcVar10 = pcVar1;
    if (pcVar1 != _Dst) goto LAB_14001b133;
  }
  *pcVar10 = '0';
  _Dst = pcVar10 + 1;
LAB_14001b133:
  if (0 < (int)uVar3) {
    iVar9 = uVar3 - ((int)_Dst - (int)pcVar1);
    stream->width = iVar9;
    if (0 < iVar9) {
      if ((uVar8 & 0x1c0) != 0) {
        stream->width = iVar9 + -1;
      }
      if ((iVar7 < 0) && ((uVar8 & 0x600) == 0x200)) {
        iVar7 = stream->width;
        stream->width = iVar7 + -1;
        if (0 < iVar7) {
          *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x14001b338;
          memset(_Dst,0x30,(longlong)iVar7);
          stream->width = -1;
          _Dst = _Dst + iVar7;
        }
      }
      else if (((uVar8 & 0x400) == 0) &&
              (iVar7 = stream->width, stream->width = iVar7 + -1, 0 < iVar7)) {
        do {
          *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x14001b36d;
          __pformat_putc(0x20,stream);
          iVar7 = stream->width;
          stream->width = iVar7 + -1;
        } while (0 < iVar7);
        uVar8 = stream->flags;
      }
    }
  }
  if ((uVar8 & 0x80) == 0) {
    if ((uVar8 & 0x100) == 0) {
      if ((uVar8 & 0x40) != 0) {
        *_Dst = ' ';
        _Dst = _Dst + 1;
      }
    }
    else {
      *_Dst = '+';
      _Dst = _Dst + 1;
    }
  }
  else {
    *_Dst = '-';
    _Dst = _Dst + 1;
  }
  if (_Dst <= pcVar1) {
LAB_14001b1e2:
    iVar7 = stream->width;
    while( true ) {
      iVar9 = iVar7 + -1;
      stream->width = iVar9;
      if (iVar7 < 1) break;
      iVar7 = iVar9;
      if (((stream->flags & 0x4000U) != 0) || (iVar9 = stream->count, iVar9 < stream->quota)) {
        pFVar4 = stream->dest;
        if ((stream->flags & 0x2000U) == 0) {
          iVar9 = stream->count;
          *(undefined2 *)((longlong)&pFVar4->_ptr + (longlong)iVar9 * 2) = 0x20;
        }
        else {
          *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x14001b239;
          fputwc(L' ',pFVar4);
          iVar9 = stream->count;
          iVar7 = stream->width;
        }
      }
      stream->count = iVar9 + 1;
    }
    return;
  }
  do {
    _Dst = _Dst + -1;
    if (((uVar8 & 0x4000) == 0) && (iVar7 = stream->count, stream->quota <= iVar7)) {
LAB_14001b19c:
      stream->count = iVar7 + 1;
    }
    else {
      cVar2 = *_Dst;
      pFVar4 = stream->dest;
      if ((uVar8 & 0x2000) == 0) {
        iVar7 = stream->count;
        *(short *)((longlong)&pFVar4->_ptr + (longlong)iVar7 * 2) = (short)cVar2;
        goto LAB_14001b19c;
      }
      *(undefined8 *)((longlong)auStack_70 + lVar5) = 0x14001b1d4;
      fputwc((short)cVar2,pFVar4);
      stream->count = stream->count + 1;
    }
    if (pcVar1 == _Dst) goto LAB_14001b1e2;
    uVar8 = stream->flags;
  } while( true );
}



void __pformat_emit_xfloat(__pformat_fpreg_t *value,__pformat_t *stream)

{
  char cVar1;
  byte bVar2;
  uint uVar3;
  char *pcVar4;
  int iVar5;
  short sVar6;
  int iVar7;
  ulonglong uVar8;
  byte *pbVar9;
  short sVar10;
  int iVar11;
  __pformat_t *in_R8;
  uint uVar12;
  int iVar13;
  __pformat_intarg_t *value_00;
  int iVar14;
  wchar_t wcs;
  char buf [24];
  
                    // Unresolved local var: char * p@[???]
                    // Unresolved local var: __pformat_intarg_t exponent@[???]
                    // Unresolved local var: short exp_width@[???]
  uVar12 = in_R8->precision;
  sVar6 = (short)stream;
  cVar1 = (char)uVar12;
  if ((sVar6 == 0) && (value == (__pformat_fpreg_t *)0x0)) {
    if (uVar12 < 0xf) {
      value_00 = (__pformat_intarg_t *)0x0;
      sVar10 = 0;
      uVar8 = 4L << (('\x0e' - cVar1) * '\x04' & 0x3fU);
LAB_14001b4eb:
      value = (__pformat_fpreg_t *)(uVar8 * 2 >> (('\x0f' - cVar1) * '\x04' & 0x3fU));
      if ((value == (__pformat_fpreg_t *)0x0) && (uVar12 == 0)) goto LAB_14001b509;
LAB_14001b4bc:
      iVar7 = uVar12 + 1;
    }
    else {
      if ((int)uVar12 < 1) {
        uVar12 = in_R8->flags;
        value_00 = (__pformat_intarg_t *)0x0;
        sVar10 = 0;
        goto LAB_14001b511;
      }
      value_00 = (__pformat_intarg_t *)0x0;
      sVar10 = 0;
      value = (__pformat_fpreg_t *)0x0;
      iVar7 = 0x10;
    }
LAB_14001b3fd:
    uVar12 = in_R8->flags;
                    // Unresolved local var: uint c@[???]
    pbVar9 = (byte *)buf;
    do {
      uVar3 = (uint)value & 0xf;
      cVar1 = (char)uVar3;
      if (iVar7 == 1) {
        if (((buf < pbVar9) || ((uVar12 & 0x800) != 0)) || (0 < in_R8->precision)) {
          *pbVar9 = 0x2e;
          pbVar9 = pbVar9 + 1;
          goto LAB_14001b465;
        }
        if (((ulonglong)value & 0xf) == 0) {
          if (in_R8->precision == 0) {
            *pbVar9 = 0x30;
            pbVar9 = pbVar9 + 1;
          }
          break;
        }
LAB_14001b469:
        if (uVar3 < 10) {
LAB_14001b430:
          bVar2 = cVar1 + 0x30;
        }
        else {
          bVar2 = cVar1 + 0x37U | (byte)uVar12 & 0x20;
        }
        *pbVar9 = bVar2;
        pbVar9 = pbVar9 + 1;
      }
      else {
        if (0 < in_R8->precision) {
          in_R8->precision = in_R8->precision + -1;
        }
LAB_14001b465:
        if (((ulonglong)value & 0xf) != 0) goto LAB_14001b469;
        if ((buf < pbVar9) || (-1 < in_R8->precision)) goto LAB_14001b430;
      }
      value = (__pformat_fpreg_t *)((ulonglong)value >> 4);
      iVar7 = iVar7 + -1;
    } while (iVar7 != 0);
    if (pbVar9 == (byte *)buf) {
      if (in_R8->precision < 1) goto LAB_14001b511;
      goto LAB_14001b51d;
    }
    iVar7 = in_R8->width;
  }
  else {
    sVar10 = sVar6 + -3;
    if (uVar12 < 0xf) {
      uVar8 = (4L << (('\x0e' - cVar1) * '\x04' & 0x3fU)) + ((ulonglong)value >> 1);
      if (-1 < (longlong)uVar8) {
        value_00 = (__pformat_intarg_t *)(longlong)sVar10;
        goto LAB_14001b4eb;
      }
      sVar10 = sVar6 + 1;
      value_00 = (__pformat_intarg_t *)(longlong)sVar10;
      value = (__pformat_fpreg_t *)((uVar8 >> 3) >> (('\x0f' - cVar1) * '\x04' & 0x3fU));
      goto LAB_14001b4bc;
    }
    value_00 = (__pformat_intarg_t *)(longlong)sVar10;
                    // Unresolved local var: int i@[???]
    iVar7 = 0x10;
    if ((value != (__pformat_fpreg_t *)0x0) || (0 < (int)uVar12)) goto LAB_14001b3fd;
LAB_14001b509:
    uVar12 = in_R8->flags;
LAB_14001b511:
    pcVar4 = buf;
    if ((uVar12 & 0x800) != 0) {
LAB_14001b51d:
      buf[0] = '.';
      pcVar4 = buf + 1;
    }
    iVar7 = in_R8->width;
    *pcVar4 = '0';
    pbVar9 = (byte *)(pcVar4 + 1);
                    // Unresolved local var: int min_width@[???]
                    // Unresolved local var: int exponent2@[???]
  }
  iVar14 = 2;
  if (0 < iVar7) {
    iVar14 = 2;
    iVar11 = (int)pbVar9 - (int)buf;
    if (0 < in_R8->precision) {
      iVar11 = in_R8->precision + iVar11;
    }
    iVar5 = (iVar11 + 6) - (uint)((uVar12 & 0x1c0) == 0);
    iVar11 = (int)sVar10 / 10 - ((int)sVar10 >> 0x1f);
    iVar13 = iVar5;
    if (iVar11 != 0) {
      do {
        iVar13 = iVar13 + 1;
        iVar11 = iVar11 / 10;
      } while (iVar11 != 0);
      iVar14 = (int)(short)(((short)iVar13 - (short)iVar5) + 2);
    }
    if (iVar13 < iVar7) {
      iVar7 = iVar7 - iVar13;
      if ((uVar12 & 0x600) == 0) {
        in_R8->width = iVar7 + -1;
        do {
          __pformat_putc(0x20,in_R8);
          iVar7 = in_R8->width;
          in_R8->width = iVar7 + -1;
        } while (0 < iVar7);
        uVar12 = in_R8->flags;
        goto joined_r0x00014001b543;
      }
    }
    else {
      iVar7 = -1;
    }
    in_R8->width = iVar7;
  }
joined_r0x00014001b543:
  if ((uVar12 & 0x80) == 0) {
    if ((uVar12 & 0x100) == 0) {
      if ((uVar12 & 0x40) != 0) {
        __pformat_putc(0x20,in_R8);
      }
    }
    else {
      __pformat_putc(0x2b,in_R8);
    }
  }
  else {
    __pformat_putc(0x2d,in_R8);
  }
  __pformat_putc(0x30,in_R8);
  __pformat_putc(in_R8->flags & 0x20U | 0x58,in_R8);
  if ((0 < in_R8->width) && ((in_R8->flags & 0x200) != 0)) {
    in_R8->width = in_R8->width + -1;
    do {
      __pformat_putc(0x30,in_R8);
      iVar7 = in_R8->width;
      in_R8->width = iVar7 + -1;
    } while (0 < iVar7);
  }
  if (buf < pbVar9) {
    do {
      iVar7 = (int)(char)pbVar9[-1];
      pbVar9 = pbVar9 + -1;
      if (iVar7 == 0x2e) {
        __pformat_emit_radix_point(in_R8);
      }
      else if (iVar7 == 0x2c) {
        wcs = in_R8->thousands_chr;
        if (wcs != L'\0') {
          __pformat_wputchars(&wcs,1,in_R8);
        }
      }
      else {
        __pformat_putc(iVar7,in_R8);
      }
    } while (pbVar9 != (byte *)buf);
  }
  while (iVar7 = in_R8->precision, in_R8->precision = iVar7 + -1, 0 < iVar7) {
    __pformat_putc(0x30,in_R8);
  }
  __pformat_putc(in_R8->flags & 0x20U | 0x50,in_R8);
  in_R8->width = in_R8->width + iVar14;
  in_R8->flags = in_R8->flags | 0x1c0;
  __pformat_int(value_00,in_R8);
  return;
}



void __pformat_emit_efloat(int sign,char *value,int e,__pformat_t *stream)

{
  uint uVar1;
  __pformat_intarg_t *value_00;
  int iVar2;
  int iVar3;
  
                    // Unresolved local var: int exp_width@[???]
                    // Unresolved local var: __pformat_intarg_t exponent@[???]
  iVar3 = 1;
  iVar2 = e + -1;
  value_00 = (__pformat_intarg_t *)(longlong)iVar2;
  while (iVar2 = iVar2 / 10, iVar2 != 0) {
    iVar3 = iVar3 + 1;
  }
  iVar2 = stream->expmin;
  if (iVar2 == -1) {
    stream->expmin = 2;
    iVar2 = 2;
  }
  if (iVar2 <= iVar3) {
    iVar2 = iVar3;
  }
  iVar3 = stream->width - (iVar2 + 2);
  if (stream->width <= iVar2 + 2) {
    iVar3 = -1;
  }
  stream->width = iVar3;
  __pformat_emit_float(sign,value,1,stream);
  uVar1 = stream->flags;
  stream->precision = stream->expmin;
  stream->flags = uVar1 | 0x1c0;
  __pformat_putc(uVar1 & 0x20 | 0x45,stream);
  stream->width = stream->width + iVar2 + 1;
  __pformat_int(value_00,stream);
  return;
}



void __pformat_efloat(long_double *x,__pformat_t *stream)

{
  char *value;
  int nd;
  long_double local_38;
  int sign;
  int intlen;
  
                    // Unresolved local var: char * value@[???]
  local_38._0_10_ = *(unkbyte10 *)x;
  if (stream->precision < 0) {
    stream->precision = 6;
    nd = 7;
  }
  else {
    nd = stream->precision + 1;
  }
  value = __pformat_cvt(2,&local_38,nd,&intlen,&sign);
  if (intlen != -0x8000) {
    __pformat_emit_efloat(sign,value,intlen,stream);
    __freedtoa(value);
    return;
  }
  __pformat_emit_inf_or_nan(sign,value,stream);
  __freedtoa(value);
  return;
}



void __pformat_gfloat(long_double *x,__pformat_t *stream)

{
  uint uVar1;
  int iVar2;
  char *value;
  size_t sVar3;
  long_double local_48;
  int sign;
  int intlen;
  
                    // Unresolved local var: char * value@[???]
  iVar2 = stream->precision;
  local_48._0_10_ = *(unkbyte10 *)x;
  if (iVar2 < 0) {
    stream->precision = 6;
    iVar2 = 6;
  }
  else if (iVar2 == 0) {
    stream->precision = 1;
    iVar2 = 1;
  }
  value = __pformat_cvt(2,&local_48,iVar2,&intlen,&sign);
  if (intlen == -0x8000) {
    __pformat_emit_inf_or_nan(sign,value,stream);
  }
  else {
    uVar1 = stream->flags & 0x800;
    if ((intlen < -3) || (stream->precision < intlen)) {
      if (uVar1 == 0) {
        sVar3 = strlen(value);
        iVar2 = (int)sVar3;
      }
      else {
        iVar2 = stream->precision;
      }
      stream->precision = iVar2 + -1;
      __pformat_emit_efloat(sign,value,intlen,stream);
    }
    else {
      if (uVar1 == 0) {
        sVar3 = strlen(value);
        iVar2 = (int)sVar3 - intlen;
        stream->precision = iVar2;
        if ((iVar2 < 0) && (0 < stream->width)) {
          stream->width = iVar2 + stream->width;
        }
      }
      else {
        stream->precision = stream->precision - intlen;
      }
      __pformat_emit_float(sign,value,intlen,stream);
      while (iVar2 = stream->width, stream->width = iVar2 + -1, 0 < iVar2) {
        __pformat_putc(0x20,stream);
      }
    }
  }
  __freedtoa(value);
  return;
}



int __mingw_wpformat(int flags,void *dest,int max,wchar_t *fmt,va_list argv)

{
  int iVar1;
  longlong *plVar2;
  int *piVar3;
  lconv *plVar4;
  char *s;
  __pformat_fpreg_t *value;
  size_t sVar5;
  size_t sVar6;
  uint uVar7;
  int iVar8;
  int iVar9;
  wchar_t *pwVar10;
  wchar_t wVar11;
  uint uVar12;
  __pformat_t *stream_00;
  ushort uVar13;
  wchar_t *pwVar14;
  uint uVar15;
  wchar_t *pwVar16;
  ulonglong local_c8;
  ushort uStack_c0;
  undefined6 uStack_be;
  long_double local_a8;
  wchar_t rpchr;
  __pformat_intarg_t argval;
  __pformat_t stream;
  
                    // Unresolved local var: int c@[???]
                    // Unresolved local var: int saved_errno@[???]
                    // Unresolved local var: wchar_t * literal_string_start@[???]
  piVar3 = _errno();
  uVar15 = flags & 0x6000;
  iVar1 = *piVar3;
  stream.quota = max;
  pwVar16 = fmt + 1;
  stream.rplen = -3;
  stream.rpchr = L'\0';
  wVar11 = *fmt;
  stream.thousands_chr_len = 0;
  stream.thousands_chr = L'\0';
  stream.count = 0;
  stream.expmin = -1;
  if (wVar11 == L'\0') {
    return 0;
  }
                    // Unresolved local var: __pformat_state_t state@[???]
                    // Unresolved local var: __pformat_length_t length@[???]
                    // Unresolved local var: wchar_t * backtrack@[???]
                    // Unresolved local var: int * width_spec@[???]
  pwVar10 = (wchar_t *)0x0;
  stream.dest = dest;
  stream.flags = uVar15;
LAB_14001bbfb:
  pwVar14 = pwVar16;
  if (wVar11 == L'%') {
    if (pwVar10 != (wchar_t *)0x0) {
      stream.width = -1;
      stream.precision = -1;
      __pformat_wputchars(pwVar10,(int)((longlong)pwVar16 - (longlong)pwVar10 >> 1) + -1,&stream);
    }
    wVar11 = *pwVar16;
    stream.width = -1;
    stream.precision = -1;
    if (wVar11 == L'\0') {
      return stream.count;
    }
    iVar9 = 0;
    uVar12 = 0;
    pwVar10 = pwVar16;
    piVar3 = &stream.width;
    stream.flags = uVar15;
    do {
      pwVar14 = pwVar10 + 1;
      uVar7 = (uint)(ushort)wVar11;
      switch(wVar11) {
      case L' ':
        if (uVar12 != 0) goto LAB_14001bcf0;
        wVar11 = pwVar10[1];
        stream.flags = stream.flags | 0x40;
        break;
      default:
        if ((9 < (ushort)(wVar11 + L'￐')) || (3 < uVar12)) {
LAB_14001c197:
          stream.width = -1;
          stream.precision = -1;
          __pformat_wputchars(L"%",1,&stream);
          pwVar14 = pwVar16;
          goto LAB_14001be20;
        }
        if (uVar12 == 0) {
          uVar12 = 1;
        }
        else {
LAB_14001bf4d:
          if (uVar12 == 2) {
            uVar12 = 3;
          }
        }
        if (piVar3 != (int *)0x0) {
          if (*piVar3 < 0) {
            wVar11 = pwVar10[1];
            *piVar3 = uVar7 - 0x30;
            break;
          }
          *piVar3 = (uVar7 - 0x30) + *piVar3 * 10;
        }
LAB_14001bcf0:
        wVar11 = pwVar10[1];
        break;
      case L'#':
        if (uVar12 != 0) goto LAB_14001bcf0;
        wVar11 = pwVar10[1];
        stream.flags = stream.flags | 0x800;
        break;
      case L'%':
        goto switchD_14001bc6c_caseD_5;
      case L'\'':
        if (uVar12 != 0) goto LAB_14001bcf0;
                    // Unresolved local var: int len@[???]
        stream.flags = stream.flags | 0x1000;
        argval.__pformat_ullong_t = argval.__pformat_ullong_t & 0xffffffff00000000;
        plVar4 = localeconv();
        sVar5 = mbrtowc(&rpchr,plVar4->thousands_sep,0x10,&argval.__pformat_long_t);
        if (0 < (int)sVar5) {
          stream.thousands_chr = rpchr;
        }
        wVar11 = pwVar10[1];
        stream.thousands_chr_len = (int)sVar5;
        break;
      case L'*':
        if (piVar3 == (int *)0x0) {
LAB_14001bf22:
          wVar11 = pwVar10[1];
          uVar12 = 4;
        }
        else if ((uVar12 & 0xfffffffd) == 0) {
          iVar8 = *(int *)argv;
          *piVar3 = iVar8;
          if (iVar8 < 0) {
            if (uVar12 != 0) {
              wVar11 = pwVar10[1];
              stream.precision = -1;
              piVar3 = (int *)0x0;
              uVar12 = 2;
              argv = argv + 8;
              break;
            }
            stream.flags = stream.flags | 0x400;
            stream.width = -stream.width;
          }
          wVar11 = pwVar10[1];
          piVar3 = (int *)0x0;
          argv = argv + 8;
        }
        else {
          wVar11 = pwVar10[1];
          piVar3 = (int *)0x0;
          uVar12 = 4;
        }
        break;
      case L'+':
        if (uVar12 != 0) goto LAB_14001bcf0;
        wVar11 = pwVar10[1];
        stream.flags = stream.flags | 0x100;
        break;
      case L'-':
        if (uVar12 != 0) goto LAB_14001bcf0;
        wVar11 = pwVar10[1];
        stream.flags = stream.flags | 0x400;
        break;
      case L'.':
        if (1 < uVar12) goto LAB_14001bf22;
        wVar11 = pwVar10[1];
        stream.precision = 0;
        piVar3 = &stream.precision;
        uVar12 = 2;
        break;
      case L'0':
        if (uVar12 != 0) {
          if (uVar12 < 4) {
            uVar7 = 0x30;
            goto LAB_14001bf4d;
          }
          goto LAB_14001c197;
        }
        wVar11 = pwVar10[1];
        stream.flags = stream.flags | 0x200;
        break;
      case L'A':
        goto LAB_14001bf62;
      case L'C':
        goto LAB_14001bffe;
      case L'E':
        goto LAB_14001c083;
      case L'F':
        goto LAB_14001c026;
      case L'G':
        goto LAB_14001c05d;
      case L'I':
        wVar11 = pwVar10[1];
        if (wVar11 == L'6') {
          if (pwVar10[2] != L'4') goto LAB_14001c197;
          wVar11 = pwVar10[3];
          iVar9 = 3;
          pwVar14 = pwVar10 + 3;
          uVar12 = 4;
        }
        else if (wVar11 == L'3') {
          if (pwVar10[2] != L'2') goto LAB_14001c197;
          wVar11 = pwVar10[3];
          iVar9 = 2;
          pwVar14 = pwVar10 + 3;
          uVar12 = 4;
        }
        else {
          iVar9 = 3;
          uVar12 = 4;
        }
        break;
      case L'L':
        wVar11 = pwVar10[1];
        stream.flags = stream.flags | 4;
        uVar12 = 4;
        break;
      case L'S':
LAB_14001c380:
        pwVar16 = *(wchar_t **)argv;
        if (pwVar16 == (wchar_t *)0x0) {
          pwVar16 = L"(null)";
        }
        if (stream.precision < 0) {
          sVar6 = wcslen(pwVar16);
          __pformat_wputchars(pwVar16,(int)sVar6,&stream);
        }
        else {
          sVar5 = wcsnlen(pwVar16,(longlong)stream.precision);
          __pformat_wputchars(pwVar16,(int)sVar5,&stream);
        }
        goto LAB_14001c242;
      case L'X':
      case L'o':
      case L'u':
      case L'x':
        stream.flags = stream.flags & 0xfffffeff;
        if (iVar9 == 3) {
          argval.__pformat_llong_t = *(undefined8 *)argv;
        }
        else if (iVar9 == 2) {
          argval.__pformat_llong_t = (longlong)*(uint *)argv;
        }
        else {
          uVar12 = *(uint *)argv;
          argval.__pformat_llong_t = (longlong)(__pformat_intarg_t *)(ulonglong)(uVar12 & 0xffff);
          if (iVar9 != 1) {
            argval.__pformat_llong_t = (longlong)(__pformat_intarg_t *)(ulonglong)uVar12;
            if (iVar9 == 5) {
              argval.__pformat_llong_t = (longlong)(__pformat_intarg_t *)(ulonglong)(uVar12 & 0xff);
            }
          }
        }
        if (uVar7 == 0x75) {
          __pformat_int(argval.__pformat_ptr_t,&stream);
        }
        else {
          __pformat_xint(uVar7,argval.__pformat_ptr_t,&stream);
        }
        goto LAB_14001c050;
      case L'a':
        stream.flags = stream.flags | 0x20;
LAB_14001bf62:
        plVar2 = *(longlong **)argv;
        if ((stream.flags & 4U) == 0) {
                    // Unresolved local var: __mingw_dbl_type_t hlp@[???]
                    // Unresolved local var: uint l@[???]
                    // Unresolved local var: uint h@[???]
          uVar12 = (uint)plVar2;
          uVar7 = (uint)((ulonglong)plVar2 >> 0x20);
          if ((int)(0x7ff00000 - ((-uVar12 | uVar12) >> 0x1f | uVar7 & 0x7fffffff)) < 0)
          goto LAB_14001c48f;
          local_c8 = SUB108((float10)(double)plVar2,0);
          uStack_c0 = (ushort)((unkuint10)(float10)(double)plVar2 >> 0x40);
          if ((short)uStack_c0 < 0) {
            stream.flags = stream.flags | 0x80;
          }
                    // Unresolved local var: __mingw_dbl_type_t hlp@[???]
                    // Unresolved local var: uint l@[???]
                    // Unresolved local var: uint h@[???]
          if (((uVar7 & 0x7ff00000) == 0x7ff00000 &&
               (((ulonglong)plVar2 & 0xfffff00000000) == 0 && uVar12 == 0)) &&
             ((((ulonglong)plVar2 & 0xfffff00000000) != 0 || uVar12 != 0) ||
              ((ulonglong)plVar2 & 0x7ff0000000000000) != 0)) {
            __pformat_emit_inf_or_nan((uint)CONCAT62(uStack_be,uStack_c0) & 0x8000,"Inf",&stream);
            goto LAB_14001c050;
          }
          stream_00 = (__pformat_t *)(CONCAT62(uStack_be,uStack_c0) & 0xffff7fff);
          iVar9 = (int)stream_00;
          if ((uStack_c0 & 0x7fff) == 0) {
LAB_14001c4f2:
            if (local_c8 != 0) {
              stream_00 = (__pformat_t *)0xfffffc05;
            }
          }
          else {
            if ((uStack_c0 & 0x7fff) < 0x3c01) {
                    // Unresolved local var: int shifted@[???]
              iVar8 = 0x3c01 - (short)stream_00;
              local_c8 = local_c8 >> ((byte)iVar8 & 0x3f);
              iVar9 = iVar8 + iVar9;
            }
            else if ((short)stream_00 == 0) goto LAB_14001c4f2;
            stream_00 = (__pformat_t *)(ulonglong)(iVar9 - 0x3ffc);
          }
          value = (__pformat_fpreg_t *)(local_c8 >> 3);
        }
        else {
          value = (__pformat_fpreg_t *)*plVar2;
          uVar12 = *(uint *)(plVar2 + 1);
          uVar13 = (ushort)uVar12;
                    // Unresolved local var: uint sign_bit@[???]
                    // Unresolved local var: __pformat_fpreg_t z@[???]
                    // Unresolved local var: __mingw_ldbl_type_t ld@[???]
                    // Unresolved local var: uint xx@[???]
                    // Unresolved local var: uint signexp@[???]
          uVar7 = (uint)((ulonglong)value >> 0x20) & 0x7fffffff | (uint)value;
          if (0xfffe - ((-uVar7 | uVar7) >> 0x1f | (short)uVar13 * 2 & 0xffffU) >> 0x10 != 0) {
LAB_14001c48f:
            __pformat_emit_inf_or_nan(0,"NaN",&stream);
            goto LAB_14001c050;
          }
          if ((short)uVar13 < 0) {
            stream.flags = stream.flags | 0x80;
          }
                    // Unresolved local var: __mingw_ldbl_type_t hlp@[???]
                    // Unresolved local var: uint e@[???]
          stream_00 = (__pformat_t *)((ulonglong)uVar12 & 0xffffffffffff7fff);
          if ((uVar12 & 0x7fff) == 0) {
            if (value != (__pformat_fpreg_t *)0x0) {
              stream_00 = (__pformat_t *)0xffffc002;
            }
          }
          else {
            if (((uVar13 & 0x7fff) == 0x7fff) && (uVar7 == 0)) {
              __pformat_emit_inf_or_nan((int)(short)uVar13 & 0x8000,"Inf",&stream);
              goto LAB_14001c050;
            }
            stream_00 = (__pformat_t *)
                        CONCAT62((int6)((ulonglong)stream_00 >> 0x10),(short)stream_00 + -0x3fff);
          }
        }
                    // Unresolved local var: uint sign_bit@[???]
                    // Unresolved local var: __pformat_fpreg_t z@[???]
        __pformat_emit_xfloat(value,stream_00);
        goto LAB_14001c050;
      case L'c':
        stream.precision = -1;
        if (iVar9 - 2U < 2) {
LAB_14001bffe:
          stream.precision = -1;
          argval.__pformat_ushort_t = (short)*(undefined4 *)argv;
          __pformat_wputchars(&argval.__pformat_ushort_t,1,&stream);
          argv = argv + 8;
        }
        else {
          argval.__pformat_uchar_t = (char)*(undefined4 *)argv;
          __pformat_putchars(&argval.__pformat_char_t,1,&stream);
          argv = argv + 8;
        }
        goto LAB_14001be20;
      case L'd':
      case L'i':
        stream.flags = stream.flags | 0x80;
        if (iVar9 == 3) {
          argval.__pformat_llong_t = *(undefined8 *)argv;
        }
        else {
          iVar8 = *(int *)argv;
          argval.__pformat_llong_t = (longlong)iVar8;
          if (iVar9 != 2) {
            if (iVar9 == 1) {
              argval.__pformat_llong_t = (longlong)(short)iVar8;
            }
            else if (iVar9 == 5) {
              argval.__pformat_llong_t = (longlong)(char)iVar8;
            }
          }
        }
        argval._8_8_ = argval.__pformat_llong_t >> 0x3f;
        __pformat_int(argval.__pformat_ptr_t,&stream);
        argv = argv + 8;
        goto LAB_14001be20;
      case L'e':
        stream.flags = stream.flags | 0x20;
LAB_14001c083:
        if ((stream.flags & 4U) == 0) {
          local_a8._0_10_ = (float10)(double)*(float10 **)argv;
          __pformat_efloat(&local_a8,&stream);
        }
        else {
          local_a8._0_10_ = **(float10 **)argv;
          __pformat_efloat(&local_a8,&stream);
        }
        goto LAB_14001c050;
      case L'f':
        stream.flags = stream.flags | 0x20;
LAB_14001c026:
        if ((stream.flags & 4U) == 0) {
          local_a8._0_10_ = (float10)(double)*(float10 **)argv;
          __pformat_float(&local_a8,&stream);
        }
        else {
          local_a8._0_10_ = **(float10 **)argv;
          __pformat_float(&local_a8,&stream);
        }
        goto LAB_14001c050;
      case L'g':
        stream.flags = stream.flags | 0x20;
LAB_14001c05d:
        if ((stream.flags & 4U) == 0) {
          local_a8._0_10_ = (float10)(double)*(float10 **)argv;
          __pformat_gfloat(&local_a8,&stream);
        }
        else {
          local_a8._0_10_ = **(float10 **)argv;
          __pformat_gfloat(&local_a8,&stream);
        }
        goto LAB_14001c050;
      case L'h':
        wVar11 = pwVar10[1];
        if (wVar11 == L'h') {
          wVar11 = pwVar10[2];
          iVar9 = 5;
          pwVar14 = pwVar10 + 2;
          uVar12 = 4;
        }
        else {
          iVar9 = 1;
          uVar12 = 4;
        }
        break;
      case L'j':
      case L't':
      case L'z':
        wVar11 = pwVar10[1];
        iVar9 = 3;
        uVar12 = 4;
        break;
      case L'l':
        wVar11 = pwVar10[1];
        if (wVar11 == L'l') {
          wVar11 = pwVar10[2];
          iVar9 = 3;
          pwVar14 = pwVar10 + 2;
          uVar12 = 4;
        }
        else {
          iVar9 = 2;
          uVar12 = 4;
        }
        break;
      case L'm':
        s = strerror(iVar1);
        __pformat_puts(s,&stream);
        goto LAB_14001be20;
      case L'n':
        plVar2 = *(longlong **)argv;
        if (iVar9 == 5) {
          *(char *)plVar2 = (char)stream.count;
        }
        else if (iVar9 == 1) {
          *(short *)plVar2 = (short)stream.count;
        }
        else if ((iVar9 == 2) || (iVar9 != 3)) {
          *(int *)plVar2 = stream.count;
        }
        else {
          *plVar2 = (longlong)stream.count;
        }
LAB_14001c050:
        argv = argv + 8;
        goto LAB_14001be20;
      case L'p':
        if ((uVar12 == 0) && (stream.flags == uVar15)) {
          stream.precision = 0x10;
          stream.flags = uVar15 | 0x200;
        }
        argval._8_8_ = 0;
        argval.__pformat_llong_t = *(undefined8 *)argv;
        __pformat_xint(0x78,argval.__pformat_ptr_t,&stream);
        argv = argv + 8;
        goto LAB_14001be20;
      case L's':
        if (iVar9 - 2U < 2) goto LAB_14001c380;
        __pformat_puts(*(char **)argv,&stream);
LAB_14001c242:
        argv = argv + 8;
        goto LAB_14001be20;
      }
      pwVar10 = pwVar14;
      if (wVar11 == L'\0') {
        return stream.count;
      }
    } while( true );
  }
  wVar11 = *pwVar16;
  if (pwVar10 == (wchar_t *)0x0) {
    pwVar10 = fmt;
  }
  goto LAB_14001bbf3;
switchD_14001bc6c_caseD_5:
  stream.width = -1;
  stream.precision = -1;
  __pformat_wputchars(L"%",1,&stream);
LAB_14001be20:
  wVar11 = *pwVar14;
  pwVar10 = (wchar_t *)0x0;
LAB_14001bbf3:
  pwVar16 = pwVar14 + 1;
  fmt = pwVar14;
  if (wVar11 == L'\0') {
    if (pwVar10 != (wchar_t *)0x0) {
      stream.width = -1;
      stream.precision = -1;
      __pformat_wputchars(pwVar10,(int)((longlong)pwVar16 - (longlong)pwVar10 >> 1) + -1,&stream);
      return stream.count;
    }
    return stream.count;
  }
  goto LAB_14001bbfb;
}



char * __rv_alloc_D2A(int i)

{
  int iVar1;
  __Bigint *p_Var2;
  int k;
  
                    // Unresolved local var: int j@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int * r@[???]
  k = 0;
  if (0x1b < i) {
    iVar1 = 4;
    do {
      iVar1 = iVar1 * 2;
      k = k + 1;
    } while (iVar1 + 0x17 < i);
  }
  p_Var2 = __Balloc_D2A(k);
  *(int *)&p_Var2->next = k;
  return (char *)((longlong)&p_Var2->next + 4);
}



char * __nrv_alloc_D2A(char *s,char **rve,int n)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  __Bigint *p_Var4;
  char *pcVar5;
  int k;
  
                    // Unresolved local var: char * rv@[???]
                    // Unresolved local var: char * t@[???]
                    // Unresolved local var: int j@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int * r@[???]
  if (n < 0x1c) {
    k = 0;
  }
  else {
    iVar3 = 4;
    k = 0;
    do {
      iVar3 = iVar3 * 2;
      k = k + 1;
    } while (iVar3 + 0x17 < n);
  }
  p_Var4 = __Balloc_D2A(k);
  *(int *)&p_Var4->next = k;
  cVar2 = *s;
  pcVar1 = (char *)((longlong)&p_Var4->next + 4);
  *(char *)((longlong)&p_Var4->next + 4) = cVar2;
  pcVar5 = pcVar1;
  while (cVar2 != '\0') {
    s = s + 1;
    cVar2 = *s;
    pcVar5 = pcVar5 + 1;
    *pcVar5 = cVar2;
  }
  if (rve != (char **)0x0) {
    *rve = pcVar5;
  }
  return pcVar1;
}



void __freedtoa(char *s)

{
                    // Unresolved local var: __Bigint * b@[DW_OP_breg2(RCX): -4; DW_OP_stack_value]
  *(ulonglong *)(s + 4) =
       CONCAT44(1 << ((byte)*(undefined4 *)(s + -4) & 0x1f),*(undefined4 *)(s + -4));
  __Bfree_D2A((__Bigint *)(s + -4));
  return;
}



int __quorem_D2A(__Bigint *b,__Bigint *S)

{
  ULong *pUVar1;
  ULong *pUVar2;
  uint uVar3;
  int iVar4;
  int iVar5;
  ulonglong uVar6;
  longlong lVar7;
  ULong *pUVar8;
  ulonglong uVar9;
  ULong *pUVar10;
  ulonglong uVar11;
  int iVar12;
  ULong *pUVar13;
  ULong *pUVar14;
  ulonglong uVar15;
  
                    // Unresolved local var: int n@[???]
                    // Unresolved local var: ULong * bx@[???]
                    // Unresolved local var: ULong * bxe@[???]
                    // Unresolved local var: ULong q@[???]
                    // Unresolved local var: ULong * sx@[???]
                    // Unresolved local var: ULong * sxe@[???]
                    // Unresolved local var: ulonglong borrow@[???]
                    // Unresolved local var: ulonglong carry@[???]
                    // Unresolved local var: ulonglong y@[???]
                    // Unresolved local var: ulonglong ys@[???]
  if (b->wds < S->wds) {
    return 0;
  }
  iVar12 = S->wds + -1;
  pUVar8 = S->x;
  pUVar1 = b->x;
  pUVar2 = pUVar8 + iVar12;
  pUVar10 = pUVar1 + iVar12;
  uVar11 = (ulonglong)*pUVar10 / (ulonglong)(*pUVar2 + 1);
  iVar5 = (int)uVar11;
  if (*pUVar2 + 1 <= *pUVar10) {
    uVar15 = 0;
    uVar9 = 0;
    pUVar13 = pUVar1;
    pUVar14 = pUVar8;
    do {
      uVar3 = *pUVar14;
      pUVar14 = pUVar14 + 1;
      uVar6 = uVar3 * uVar11 + uVar15;
      uVar15 = uVar6 >> 0x20;
      lVar7 = ((ulonglong)*pUVar13 - (uVar6 & 0xffffffff)) - uVar9;
      *pUVar13 = (uint)lVar7;
      uVar9 = (ulonglong)((uint)((ulonglong)lVar7 >> 0x20) & 1);
      pUVar13 = pUVar13 + 1;
    } while (pUVar14 <= pUVar2);
    if (*pUVar10 == 0) {
      while ((pUVar10 = pUVar10 + -1, pUVar1 < pUVar10 && (*pUVar10 == 0))) {
        iVar12 = iVar12 + -1;
      }
      b->wds = iVar12;
      iVar4 = __cmp_D2A(b,S);
      goto joined_r0x00014001c793;
    }
  }
  iVar4 = __cmp_D2A(b,S);
joined_r0x00014001c793:
  if (-1 < iVar4) {
    uVar11 = 0;
    pUVar10 = pUVar1;
    do {
      uVar3 = *pUVar8;
      pUVar8 = pUVar8 + 1;
      lVar7 = ((ulonglong)*pUVar10 - (ulonglong)uVar3) - uVar11;
      *pUVar10 = (uint)lVar7;
      uVar11 = (ulonglong)((uint)((ulonglong)lVar7 >> 0x20) & 1);
      pUVar10 = pUVar10 + 1;
    } while (pUVar8 <= pUVar2);
    pUVar8 = pUVar1 + iVar12;
    if (*pUVar8 == 0) {
      while ((pUVar8 = pUVar8 + -1, pUVar1 < pUVar8 && (*pUVar8 == 0))) {
        iVar12 = iVar12 + -1;
      }
      b->wds = iVar12;
      iVar5 = iVar5 + 1;
    }
    else {
      iVar5 = iVar5 + 1;
    }
  }
  return iVar5;
}



char * __gdtoa(FPI *fpi,int be,ULong *bits,int *kindp,int mode,int ndigits,int *decpt,char **rve)

{
  uint uVar1;
  bool bVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  uint uVar6;
  int iVar7;
  ULong UVar8;
  uint uVar9;
  __Bigint *b;
  ULong *pUVar10;
  longlong lVar11;
  __Bigint *p_Var12;
  __Bigint *p_Var13;
  __Bigint *b_00;
  __Bigint *p_Var14;
  char cVar15;
  int iVar16;
  int iVar17;
  int iVar18;
  uint uVar19;
  int iVar20;
  int iVar21;
  int iVar22;
  ULong *pUVar23;
  char *pcVar24;
  char *pcVar25;
  char *pcVar26;
  int iVar27;
  uint uVar28;
  longlong lVar29;
  uint uVar30;
  uint uVar31;
  ulonglong uVar32;
  double dVar33;
  double dVar34;
  double dVar35;
  double dVar36;
  uint local_d8;
  int local_bc;
  char *local_a8;
  uint local_80;
  uint local_7c;
  int i;
  
                    // Unresolved local var: int bbits@[???]
                    // Unresolved local var: int b2@[???]
                    // Unresolved local var: int b5@[???]
                    // Unresolved local var: int be0@[???]
                    // Unresolved local var: int dig@[???]
                    // Unresolved local var: int ieps@[???]
                    // Unresolved local var: int ilim@[???]
                    // Unresolved local var: int ilim0@[???]
                    // Unresolved local var: int ilim1@[???]
                    // Unresolved local var: int inex@[???]
                    // Unresolved local var: int j@[???]
                    // Unresolved local var: int j2@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int k0@[???]
                    // Unresolved local var: int k_check@[???]
                    // Unresolved local var: int kind@[???]
                    // Unresolved local var: int leftright@[???]
                    // Unresolved local var: int m2@[???]
                    // Unresolved local var: int m5@[???]
                    // Unresolved local var: int nbits@[???]
                    // Unresolved local var: int rdir@[???]
                    // Unresolved local var: int s2@[???]
                    // Unresolved local var: int s5@[???]
                    // Unresolved local var: int spec_case@[???]
                    // Unresolved local var: int try_quick@[???]
                    // Unresolved local var: long L@[???]
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: __Bigint * b1@[???]
                    // Unresolved local var: __Bigint * delta@[???]
                    // Unresolved local var: __Bigint * mlo@[???]
                    // Unresolved local var: __Bigint * mhi@[???]
                    // Unresolved local var: __Bigint * mhi1@[???]
                    // Unresolved local var: __Bigint * S@[???]
                    // Unresolved local var: double d2@[???]
                    // Unresolved local var: double ds@[???]
                    // Unresolved local var: char * s@[???]
                    // Unresolved local var: char * s0@[???]
                    // Unresolved local var: _dbl_union d@[???]
                    // Unresolved local var: _dbl_union eps@[???]
  uVar31 = *kindp;
  local_7c = ndigits;
  *kindp = uVar31 & 0xffffffcf;
  uVar6 = uVar31 & 7;
  if (uVar6 == 3) {
    iVar7 = 8;
    pcVar24 = "Infinity";
    *decpt = -0x8000;
  }
  else {
    uVar9 = uVar31 & 4;
    if ((uVar31 & 4) == 0) {
      if (uVar6 != 0) {
        iVar7 = fpi->nbits;
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: ULong * be@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * x0@[???]
        iVar20 = 0x20;
        iVar16 = 0;
        if (0x20 < iVar7) {
          do {
            iVar20 = iVar20 * 2;
            iVar16 = iVar16 + 1;
          } while (iVar20 < iVar7);
        }
        b = __Balloc_D2A(iVar16);
        lVar29 = (longlong)(iVar7 + -1 >> 5);
        pUVar10 = bits;
        pUVar23 = b->x;
        do {
          UVar8 = *pUVar10;
          pUVar10 = pUVar10 + 1;
          *pUVar23 = UVar8;
          pUVar23 = pUVar23 + 1;
        } while (pUVar10 <= bits + lVar29);
        lVar11 = lVar29 * 4 + 4;
        if ((longlong)(bits + lVar29) + 1U < (longlong)bits + 1U) {
          lVar11 = 4;
        }
        lVar29 = (longlong)b->x + lVar11 + -0x18;
        uVar32 = lVar11 >> 2;
LAB_14001c95d:
        iVar20 = (int)uVar32;
        uVar6 = iVar20 - 1;
        uVar32 = (ulonglong)uVar6;
        if (*(int *)(lVar29 + 0x14) == 0) goto LAB_14001c950;
        b->wds = iVar20;
        uVar30 = 0x1f;
        if (b->x[(int)uVar6] != 0) {
          for (; b->x[(int)uVar6] >> uVar30 == 0; uVar30 = uVar30 - 1) {
          }
        }
        iVar20 = iVar20 * 0x20 - (uVar30 ^ 0x1f);
        goto LAB_14001c984;
      }
      goto LAB_14001cb38;
    }
    if (uVar6 != 4) {
      return (char *)0x0;
    }
    iVar7 = 3;
    pcVar24 = "NaN";
    *decpt = -0x8000;
  }
  pcVar24 = __nrv_alloc_D2A(pcVar24,rve,iVar7);
  return pcVar24;
LAB_14001c950:
  lVar29 = lVar29 + -4;
  if (uVar6 == 0) goto LAB_14001cba0;
  goto LAB_14001c95d;
LAB_14001da58:
  while( true ) {
    pcVar24 = pcVar25 + 1;
    iVar7 = __cmp_D2A(b_00,p_Var12);
    if (iVar7 < 1) break;
    *pcVar25 = (char)uVar31;
    p_Var14 = __multadd_D2A(p_Var12,10,0);
    if (p_Var13 == p_Var12) {
      p_Var13 = p_Var14;
    }
    b = __multadd_D2A(b,10,0);
    iVar7 = __quorem_D2A(b,b_00);
    uVar31 = iVar7 + 0x30;
    p_Var12 = p_Var14;
    pcVar25 = pcVar24;
  }
  if (uVar31 == 0x39) {
LAB_14001ddfb:
    *pcVar25 = '9';
    pcVar25 = pcVar24;
    goto LAB_14001d869;
  }
  uVar31 = uVar31 + 1;
  local_80 = 0x20;
LAB_14001da95:
  *pcVar25 = (char)uVar31;
  uVar9 = local_80;
LAB_14001d4a0:
  __Bfree_D2A(b_00);
  pcVar26 = local_a8;
  if (p_Var12 == (__Bigint *)0x0) goto LAB_14001d026;
  if ((p_Var13 != (__Bigint *)0x0) && (p_Var13 != p_Var12)) {
    __Bfree_D2A(p_Var13);
  }
  goto LAB_14001d01e;
code_r0x00014001ce51:
  cVar15 = (char)uVar19 + '\x01';
LAB_14001ce58:
  *pcVar24 = cVar15;
  local_7c = uVar28 + 1;
  uVar9 = 0x20;
  pcVar26 = local_a8;
  pcVar24 = pcVar25;
  goto LAB_14001d026;
LAB_14001cba0:
  b->wds = 0;
  iVar20 = 0;
LAB_14001c984:
  i = __trailz_D2A(b);
  iVar16 = be;
  if (i != 0) {
    __rshift_D2A(b,i);
    iVar16 = be + i;
    iVar20 = iVar20 - i;
  }
  if (b->wds == 0) {
    __Bfree_D2A(b);
LAB_14001cb38:
    *decpt = 1;
    pcVar24 = __nrv_alloc_D2A("0",rve,1);
    return pcVar24;
  }
  dVar33 = __b2d_D2A(b,&i);
  iVar27 = iVar16 + iVar20;
  iVar17 = iVar27 + -1;
  uVar6 = (uint)((ulonglong)dVar33 >> 0x20) & 0xfffff | 0x3ff00000;
  iVar18 = 1 - iVar27;
  if (-1 < iVar17) {
    iVar18 = iVar17;
  }
  dVar34 = ((double)((ulonglong)dVar33 & 0xffffffff | (ulonglong)uVar6 << 0x20) - 1.5) *
           0.289529654602168 + 0.1760912590558 + (double)iVar17 * 0.301029995663981;
  if (0 < iVar18 + -0x435) {
    dVar34 = dVar34 + (double)(iVar18 + -0x435) * 7e-17;
  }
  uVar30 = (uint)dVar34;
  if ((dVar34 < 0.0) && ((double)(int)uVar30 != dVar34)) {
    uVar30 = uVar30 - 1;
  }
  dVar33 = (double)((ulonglong)dVar33 & 0xffffffff | (ulonglong)(uVar6 + iVar17 * 0x100000) << 0x20)
  ;
  iVar17 = iVar20 - iVar17;
  iVar18 = iVar17 + -1;
  if (uVar30 < 0x17) {
    if (dVar33 < __tens_D2A[(int)uVar30]) {
      bVar4 = false;
      uVar30 = uVar30 - 1;
      goto LAB_14001cbd7;
    }
    bVar4 = false;
    iVar21 = 0;
    if (iVar17 < 1) {
      iVar18 = 0;
      iVar21 = 1 - iVar17;
    }
LAB_14001cad8:
    iVar18 = iVar18 + uVar30;
    local_bc = 0;
    uVar6 = uVar30;
  }
  else {
    bVar4 = true;
LAB_14001cbd7:
    iVar21 = 0;
    if (iVar18 < 0) {
      iVar18 = 0;
      iVar21 = 1 - iVar17;
    }
    if (-1 < (int)uVar30) goto LAB_14001cad8;
    iVar21 = iVar21 - uVar30;
    local_bc = -uVar30;
    uVar6 = 0;
  }
  iVar22 = local_bc;
  iVar17 = iVar21;
  if ((uint)mode < 10) {
    if (mode < 6) {
      bVar2 = iVar27 + 0x3fdU < 0x7f8;
      if (mode == 4) {
LAB_14001d294:
        bVar5 = true;
      }
      else {
        if (mode == 5) {
LAB_14001d6af:
          bVar5 = true;
          goto LAB_14001cc70;
        }
        bVar5 = false;
        if (mode != 2) {
          if (mode == 3) goto LAB_14001cc70;
          goto LAB_14001ce90;
        }
      }
LAB_14001d29b:
      local_d8 = 1;
      i = local_d8;
      local_7c = local_d8;
      uVar1 = local_d8;
      if (0 < ndigits) {
        i = ndigits;
        local_d8 = ndigits;
        local_7c = ndigits;
        uVar1 = ndigits;
      }
    }
    else {
      bVar2 = false;
      mode = mode + -4;
      if (mode == 4) goto LAB_14001d294;
      if (mode == 5) goto LAB_14001d6af;
      bVar5 = false;
      if (mode == 2) goto LAB_14001d29b;
      mode = 3;
LAB_14001cc70:
      local_d8 = uVar30 + ndigits;
      uVar1 = local_d8 + 1;
      i = 1;
      if (0 < (int)uVar1) {
        i = uVar1;
      }
    }
    local_a8 = __rv_alloc_D2A(i);
    local_80 = fpi->rounding - 1;
    if (local_80 != 0) {
LAB_14001ccbf:
      uVar28 = 2;
      if (-1 < (int)local_80) {
        uVar28 = local_80;
      }
      local_80 = uVar28;
      if ((uVar31 & 8) != 0) {
        local_80 = 3 - uVar28;
        goto LAB_14001cce4;
      }
LAB_14001d0b0:
      if (iVar16 < 0) {
LAB_14001d0bb:
        if (bVar5) goto LAB_14001d0c6;
        p_Var12 = (__Bigint *)0x0;
        bVar2 = false;
        goto LAB_14001d14e;
      }
LAB_14001cfa0:
      if (fpi->int_max < (int)uVar30) goto LAB_14001d0bb;
      dVar34 = __tens_D2A[(int)uVar30];
      if ((-1 < (int)local_7c) || (0 < (int)uVar1)) {
LAB_14001d77c:
        i = 1;
        uVar31 = (uint)(dVar33 / dVar34);
        *local_a8 = (char)uVar31 + '0';
        local_7c = uVar30 + 1;
        pcVar25 = local_a8;
        for (dVar33 = dVar33 - (double)(int)uVar31 * dVar34; pcVar25 = pcVar25 + 1,
            pcVar26 = local_a8, pcVar24 = pcVar25, dVar33 != 0.0;
            dVar33 = dVar33 * 10.0 - (double)(int)uVar31 * dVar34) {
          if (i == uVar1) {
            uVar28 = uVar30;
            if (local_80 == 0) {
              uVar19 = (uint)(byte)pcVar25[-1];
              if ((dVar34 < dVar33 + dVar33) || ((dVar33 + dVar33 == dVar34 && ((uVar31 & 1) != 0)))
                 ) goto LAB_14001ce48;
              uVar9 = 0x10;
              goto LAB_14001dc80;
            }
            if (local_80 == 1) {
              uVar19 = (uint)(byte)pcVar25[-1];
              goto LAB_14001ce48;
            }
            uVar9 = 0x10;
            break;
          }
          i = i + 1;
          uVar31 = (uint)((dVar33 * 10.0) / dVar34);
          *pcVar25 = (char)uVar31 + '0';
        }
        goto LAB_14001d026;
      }
      if ((uVar1 == 0) && (dVar34 * 5.0 < dVar33)) {
        local_7c = uVar30 + 2;
        b_00 = (__Bigint *)0x0;
        p_Var12 = (__Bigint *)0x0;
        goto LAB_14001d002;
      }
LAB_14001d2bb:
      b_00 = (__Bigint *)0x0;
      p_Var12 = (__Bigint *)0x0;
      goto LAB_14001d2c0;
    }
LAB_14001cce4:
    bVar2 = (bool)(bVar2 & uVar1 < 0xf);
    if ((!bVar2) || (uVar30 != 0 || local_80 != 0)) goto LAB_14001d0b0;
    i = 0;
    if ((bVar4) && (dVar33 < 1.0)) {
      if (uVar1 == 0) {
        dVar34 = dVar33 + dVar33 + 7.0;
        dVar34 = (double)((ulonglong)dVar34 & 0xffffffff |
                         (ulonglong)((int)((ulonglong)dVar34 >> 0x20) + 0xfcc00000) << 0x20);
        goto LAB_14001d07f;
      }
      if (0 < (int)local_d8) {
        dVar35 = dVar33 * 10.0;
        uVar28 = 0xffffffff;
        dVar34 = dVar35 * 3.0 + 7.0;
        dVar34 = (double)((ulonglong)dVar34 & 0xffffffff |
                         (ulonglong)((int)((ulonglong)dVar34 >> 0x20) + 0xfcc00000) << 0x20);
        uVar31 = local_d8;
        goto LAB_14001cd6e;
      }
LAB_14001d0a8:
      local_80 = 0;
      goto LAB_14001d0b0;
    }
    dVar34 = dVar33 + dVar33 + 7.0;
    dVar34 = (double)((ulonglong)dVar34 & 0xffffffff |
                     (ulonglong)((int)((ulonglong)dVar34 >> 0x20) + 0xfcc00000) << 0x20);
    if (uVar1 != 0) {
      uVar28 = 0;
      uVar31 = uVar1;
      dVar35 = dVar33;
LAB_14001cd6e:
      if (bVar5) {
        pcVar24 = local_a8 + 1;
        dVar34 = 0.5 / __tens_D2A[(int)(uVar31 - 1)] - dVar34;
        *local_a8 = (char)(int)dVar35 + '0';
        dVar35 = dVar35 - (double)(int)dVar35;
        pcVar25 = pcVar24;
        if (dVar34 <= dVar35) {
          do {
            if (1.0 - dVar35 < dVar34) {
              uVar19 = (uint)(byte)pcVar25[-1];
              goto LAB_14001ce48;
            }
            i = i + 1;
            if ((int)uVar31 <= i) goto LAB_14001d0a8;
            pcVar24 = pcVar25 + 1;
            dVar34 = dVar34 * 10.0;
            iVar27 = (int)(dVar35 * 10.0);
            *pcVar25 = (char)iVar27 + '0';
            dVar35 = dVar35 * 10.0 - (double)iVar27;
            pcVar25 = pcVar24;
          } while (dVar34 <= dVar35);
        }
        uVar9 = (uint)NAN(dVar35);
        if (dVar35 != 0.0) {
          uVar9 = 1;
        }
        uVar9 = uVar9 << 4;
        local_7c = uVar28 + 1;
        pcVar26 = local_a8;
        goto LAB_14001d026;
      }
      dVar34 = dVar34 * __tens_D2A[(int)(uVar31 - 1)];
      i = 1;
      pcVar24 = local_a8;
      dVar36 = dVar35;
      bVar5 = false;
      while( true ) {
        iVar7 = (int)dVar36;
        if (iVar7 != 0) {
          dVar36 = dVar36 - (double)iVar7;
          bVar5 = bVar2;
        }
        pcVar25 = pcVar24 + 1;
        uVar19 = iVar7 + 0x30;
        *pcVar24 = (char)uVar19;
        if (i == uVar31) break;
        dVar36 = dVar36 * 10.0;
        i = i + 1;
        pcVar24 = pcVar25;
        bVar5 = bVar2;
      }
      if (!bVar5) {
        dVar36 = dVar35;
      }
      if (dVar34 + 0.5 < dVar36) {
LAB_14001ce48:
        do {
          pcVar24 = pcVar25 + -1;
          if ((char)uVar19 != '9') goto code_r0x00014001ce51;
          if (pcVar24 == local_a8) {
            uVar28 = uVar28 + 1;
            cVar15 = '1';
            goto LAB_14001ce58;
          }
          uVar19 = (uint)(byte)pcVar25[-2];
          pcVar25 = pcVar24;
        } while( true );
      }
      if (dVar36 < 0.5 - dVar34) {
        uVar9 = (uint)NAN(dVar36);
        if (dVar36 != 0.0) {
          uVar9 = 1;
        }
        uVar9 = uVar9 << 4;
LAB_14001dc80:
        do {
          pcVar24 = pcVar25;
          pcVar25 = pcVar24 + -1;
        } while (pcVar24[-1] == '0');
        local_7c = uVar28 + 1;
        pcVar26 = local_a8;
        goto LAB_14001d026;
      }
      if ((-1 < iVar16) && (-1 < fpi->int_max)) {
        local_80 = 0;
        dVar34 = 1.0;
        goto LAB_14001d77c;
      }
      local_80 = 0;
      p_Var12 = (__Bigint *)0x0;
      bVar2 = false;
      goto LAB_14001d14e;
    }
LAB_14001d07f:
    if (dVar33 - 5.0 <= dVar34) {
      if (-dVar34 <= dVar33 - 5.0) goto LAB_14001d0a8;
      goto LAB_14001d2bb;
    }
    local_7c = 2;
    b_00 = (__Bigint *)0x0;
    p_Var12 = (__Bigint *)0x0;
LAB_14001d002:
    *local_a8 = '1';
    uVar9 = 0x20;
    pcVar26 = local_a8;
    local_a8 = local_a8 + 1;
  }
  else {
    mode = 0;
    bVar2 = iVar27 + 0x3fdU < 0x7f8;
LAB_14001ce90:
    i = (int)((double)iVar7 * 0.30103) + 3;
    local_a8 = __rv_alloc_D2A(i);
    local_80 = fpi->rounding - 1;
    if (local_80 != 0) {
      local_7c = 0;
      bVar5 = true;
      local_d8 = 0xffffffff;
      uVar1 = 0xffffffff;
      goto LAB_14001ccbf;
    }
    local_7c = 0;
    if (-1 < iVar16) {
      bVar5 = true;
      local_d8 = 0xffffffff;
      uVar1 = 0xffffffff;
      goto LAB_14001cfa0;
    }
    local_d8 = 0xffffffff;
    uVar1 = 0xffffffff;
LAB_14001d0c6:
    i = (iVar7 - iVar20) + 1;
    if (iVar16 - (iVar7 - iVar20) < fpi->emin) {
      if ((mode - 3U & 0xfffffffd) == 0) {
LAB_14001d67a:
        if ((int)(uVar1 - 1) <= local_bc) {
          iVar22 = local_bc - (uVar1 - 1);
          if ((int)uVar1 < 0) {
            i = 0;
            iVar21 = iVar21 - uVar1;
          }
          else {
            iVar18 = iVar18 + uVar1;
            iVar17 = uVar1 + iVar21;
            i = uVar1;
          }
          goto LAB_14001d12a;
        }
      }
      else {
        i = (iVar16 - fpi->emin) + 1;
        if ((mode < 2 || (int)uVar1 < 1) || (i <= (int)uVar1)) goto LAB_14001d118;
        if ((int)(uVar1 - 1) <= local_bc) {
          iVar22 = local_bc - (uVar1 - 1);
          iVar18 = iVar18 + uVar1;
          i = uVar1;
          iVar17 = iVar21 + uVar1;
          goto LAB_14001d12a;
        }
      }
      iVar22 = 0;
      iVar18 = iVar18 + uVar1;
      uVar6 = uVar6 + ((uVar1 - 1) - local_bc);
      local_bc = uVar1 - 1;
      i = uVar1;
      iVar17 = uVar1 + iVar21;
    }
    else {
      if (1 < mode) goto LAB_14001d67a;
LAB_14001d118:
      iVar18 = iVar18 + i;
      iVar17 = i + iVar21;
    }
LAB_14001d12a:
    p_Var12 = __i2b_D2A(1);
    bVar2 = true;
LAB_14001d14e:
    if ((0 < iVar21) && (0 < iVar18)) {
      i = iVar18;
      if (iVar21 <= iVar18) {
        i = iVar21;
      }
      iVar17 = iVar17 - i;
      iVar18 = iVar18 - i;
      iVar21 = iVar21 - i;
    }
    p_Var13 = b;
    if (local_bc != 0) {
      if ((bVar2) && (iVar22 != 0)) {
        p_Var12 = __pow5mult_D2A(p_Var12,iVar22);
        p_Var13 = __mult_D2A(p_Var12,b);
        __Bfree_D2A(b);
        local_bc = local_bc - iVar22;
        if (local_bc == 0) goto LAB_14001d1a2;
      }
      p_Var13 = __pow5mult_D2A(p_Var13,local_bc);
    }
LAB_14001d1a2:
    b_00 = __i2b_D2A(1);
    if (uVar6 == 0) {
      bVar5 = false;
      if (((mode < 2) && (iVar20 == 1)) && (fpi->emin + 1 < be)) {
        iVar17 = iVar17 + 1;
        bVar5 = true;
        iVar18 = iVar18 + 1;
      }
      uVar31 = 0x1f;
    }
    else {
      b_00 = __pow5mult_D2A(b_00,uVar6);
      if (((mode < 2) && (iVar20 == 1)) && (fpi->emin + 1 < be)) {
        iVar17 = iVar17 + 1;
        bVar5 = true;
        iVar18 = iVar18 + 1;
      }
      else {
        bVar5 = false;
      }
      uVar31 = 0x1f;
      if (b_00->x[b_00->wds + -1] != 0) {
        for (; b_00->x[b_00->wds + -1] >> uVar31 == 0; uVar31 = uVar31 - 1) {
        }
      }
      uVar31 = uVar31 ^ 0x1f;
    }
    uVar31 = (uVar31 - iVar18) - 4 & 0x1f;
    b = p_Var13;
    i = uVar31;
    if (0 < (int)(iVar17 + uVar31)) {
      b = __lshift_D2A(p_Var13,iVar17 + uVar31);
    }
    if (0 < iVar18 + i) {
      b_00 = __lshift_D2A(b_00,iVar18 + i);
    }
    bVar3 = mode < 3;
    if ((bVar4) && (iVar7 = __cmp_D2A(b,b_00), iVar7 < 0)) {
      uVar6 = uVar30 - 1;
      b = __multadd_D2A(b,10,0);
      if (bVar2) {
        p_Var12 = __multadd_D2A(p_Var12,10,0);
        uVar1 = uVar30;
        if (bVar3 || 0 < (int)local_d8) {
LAB_14001d304:
          local_7c = uVar1;
          p_Var13 = p_Var12;
          if (0 < (int)(uVar31 + iVar21)) {
            p_Var13 = __lshift_D2A(p_Var12,uVar31 + iVar21);
          }
          p_Var12 = p_Var13;
          if (bVar5) {
            p_Var12 = __Balloc_D2A(p_Var13->k);
            memcpy(&p_Var12->sign,&p_Var13->sign,(longlong)p_Var13->wds * 4 + 8);
            p_Var12 = __lshift_D2A(p_Var12,1);
          }
          i = 1;
          pcVar25 = local_a8;
          while( true ) {
            iVar7 = __quorem_D2A(b,b_00);
            uVar31 = iVar7 + 0x30;
            iVar20 = __cmp_D2A(b,p_Var13);
            p_Var14 = __diff_D2A(b_00,p_Var12);
            cVar15 = (char)uVar31;
            if (p_Var14->sign == 0) {
              iVar16 = __cmp_D2A(b,p_Var14);
              __Bfree_D2A(p_Var14);
              if ((iVar16 == 0 && mode == 0) && (iVar16 = 0, (*bits & 1) == 0 && local_80 == 0)) {
                if (uVar31 == 0x39) {
                  pcVar24 = pcVar25 + 1;
                  goto LAB_14001ddfb;
                }
                if (iVar20 < 1) {
                  uVar9 = 0x10;
                  if (b->wds < 2) {
                    uVar9 = (uint)(b->x[0] != 0) << 4;
                  }
                }
                else {
                  uVar9 = 0x20;
                  cVar15 = (char)iVar7 + '1';
                }
                *pcVar25 = cVar15;
                pcVar24 = pcVar25 + 1;
                goto LAB_14001d4a0;
              }
            }
            else {
              __Bfree_D2A(p_Var14);
              iVar16 = 1;
            }
            if ((iVar20 < 0) || ((iVar20 == 0 && mode == 0 && ((*bits & 1) == 0)))) break;
            pcVar24 = pcVar25 + 1;
            if ((0 < iVar16) && (local_80 != 2)) {
              if (uVar31 == 0x39) goto LAB_14001ddfb;
              *pcVar25 = cVar15 + '\x01';
              uVar9 = 0x20;
              goto LAB_14001d4a0;
            }
            *pcVar25 = cVar15;
            if (i == local_d8) goto LAB_14001d5b6;
            b = __multadd_D2A(b,10,0);
            if (p_Var13 == p_Var12) {
              p_Var13 = __multadd_D2A(p_Var13,10,0);
              p_Var12 = p_Var13;
            }
            else {
              p_Var13 = __multadd_D2A(p_Var13,10,0);
              p_Var12 = __multadd_D2A(p_Var12,10,0);
            }
            i = i + 1;
            pcVar25 = pcVar24;
          }
          if (local_80 == 0) {
            if (0 < iVar16) goto LAB_14001dbad;
          }
          else {
            if ((1 < b->wds) || (b->x[0] != 0)) {
              if (local_80 != 2) goto LAB_14001da58;
              goto LAB_14001dc08;
            }
            if (iVar16 < 1) {
              pcVar24 = pcVar25 + 1;
              local_80 = uVar9;
              goto LAB_14001da95;
            }
LAB_14001dbad:
            b = __lshift_D2A(b,1);
            iVar20 = __cmp_D2A(b,b_00);
            if ((iVar20 < 1) && ((iVar20 != 0 || ((uVar31 & 1) == 0)))) {
              local_80 = 0x20;
              goto LAB_14001dbfe;
            }
            if (uVar31 == 0x39) {
              pcVar24 = pcVar25 + 1;
              goto LAB_14001ddfb;
            }
            local_80 = 0x20;
            uVar31 = iVar7 + 0x31;
          }
LAB_14001dbfe:
          if (b->wds < 2) {
            if (b->x[0] == 0) {
              pcVar24 = pcVar25 + 1;
            }
            else {
              local_80 = 0x10;
              pcVar24 = pcVar25 + 1;
            }
            goto LAB_14001da95;
          }
LAB_14001dc08:
          pcVar24 = pcVar25 + 1;
          local_80 = 0x10;
          goto LAB_14001da95;
        }
      }
      else if (bVar3 || 0 < (int)local_d8) goto LAB_14001d560;
    }
    else {
      local_d8 = uVar1;
      if ((0 < (int)uVar1) || (uVar6 = uVar30, bVar3)) {
        uVar1 = uVar30 + 1;
        uVar30 = uVar30 + 1;
        if (bVar2) goto LAB_14001d304;
LAB_14001d560:
        local_7c = uVar30;
        i = 1;
        pcVar25 = local_a8;
        while( true ) {
          pcVar24 = pcVar25 + 1;
          iVar7 = __quorem_D2A(b,b_00);
          uVar31 = iVar7 + 0x30;
          *pcVar25 = (char)uVar31;
          if ((int)local_d8 <= i) break;
          b = __multadd_D2A(b,10,0);
          i = i + 1;
          pcVar25 = pcVar24;
        }
        p_Var13 = (__Bigint *)0x0;
LAB_14001d5b6:
        if (local_80 == 0) {
          b = __lshift_D2A(b,1);
          iVar7 = __cmp_D2A(b,b_00);
          pcVar25 = pcVar24;
          if ((0 < iVar7) || ((iVar7 == 0 && ((uVar31 & 1) != 0)))) {
LAB_14001d869:
            do {
              pcVar24 = pcVar25;
              pcVar25 = pcVar24 + -1;
              if (pcVar24[-1] != '9') {
                *pcVar25 = pcVar24[-1] + '\x01';
                uVar9 = 0x20;
                goto LAB_14001d4a0;
              }
            } while (pcVar25 != local_a8);
            local_7c = local_7c + 1;
            *local_a8 = '1';
            uVar9 = 0x20;
            goto LAB_14001d4a0;
          }
LAB_14001d9aa:
          uVar9 = 0x10;
          pcVar25 = pcVar24;
          if (b->wds < 2) {
            UVar8 = b->x[0];
            goto LAB_14001d5e1;
          }
        }
        else {
          if (local_80 == 2) goto LAB_14001d9aa;
          pcVar25 = pcVar24;
          if ((1 < b->wds) || (UVar8 = 0, b->x[0] != 0)) goto LAB_14001d869;
LAB_14001d5e1:
          uVar9 = (uint)(UVar8 != 0) << 4;
          pcVar25 = pcVar24;
        }
        do {
          pcVar24 = pcVar25;
          pcVar25 = pcVar24 + -1;
        } while (pcVar24[-1] == '0');
        goto LAB_14001d4a0;
      }
    }
    if (local_d8 == 0) {
      b_00 = __multadd_D2A(b_00,5,0);
      iVar7 = __cmp_D2A(b,b_00);
      if (0 < iVar7) {
        local_7c = uVar6 + 2;
        goto LAB_14001d002;
      }
    }
LAB_14001d2c0:
    uVar9 = 0x10;
    local_7c = -local_7c;
    pcVar26 = local_a8;
  }
  __Bfree_D2A(b_00);
  pcVar24 = local_a8;
  if (p_Var12 == (__Bigint *)0x0) goto LAB_14001d026;
LAB_14001d01e:
  local_a8 = pcVar24;
  __Bfree_D2A(p_Var12);
  pcVar24 = local_a8;
LAB_14001d026:
  local_a8 = pcVar24;
  __Bfree_D2A(b);
  *local_a8 = '\0';
  *decpt = local_7c;
  if (rve != (char **)0x0) {
    *rve = local_a8;
  }
  *kindp = *kindp | uVar9;
  return pcVar26;
}



// WARNING: Type propagation algorithm not settling

int __gethex_D2A(char **sp,FPI *fpi,long *expo,__Bigint **bp,int sign)

{
  byte bVar1;
  byte bVar2;
  byte *pbVar3;
  char *pcVar4;
  bool bVar5;
  bool bVar6;
  int iVar7;
  lconv *plVar8;
  __Bigint *p_Var9;
  int *piVar10;
  longlong lVar11;
  size_t sVar12;
  byte *pbVar13;
  byte *pbVar14;
  int iVar15;
  ulonglong uVar16;
  byte bVar17;
  ULong *pUVar18;
  uint uVar19;
  uint uVar20;
  uint uVar21;
  byte *pbVar22;
  int iVar23;
  byte *pbVar24;
  ULong UVar25;
  uint uVar26;
  ULong *pUVar27;
  bool bVar28;
  int local_4c;
  
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: uchar * decpt@[???]
                    // Unresolved local var: uchar * s0@[???]
                    // Unresolved local var: uchar * s@[???]
                    // Unresolved local var: uchar * s1@[???]
                    // Unresolved local var: int big@[???]
                    // Unresolved local var: int esign@[???]
                    // Unresolved local var: int havedig@[???]
                    // Unresolved local var: int irv@[???]
                    // Unresolved local var: int j@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int n@[???]
                    // Unresolved local var: int n0@[???]
                    // Unresolved local var: int nbits@[???]
                    // Unresolved local var: int up@[???]
                    // Unresolved local var: int zret@[???]
                    // Unresolved local var: ULong L@[???]
                    // Unresolved local var: ULong lostbits@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: long e@[???]
                    // Unresolved local var: long e1@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: uchar * decimalpoint@[???]
  plVar8 = localeconv();
  pbVar3 = (byte *)plVar8->decimal_point;
  if (__hexdig_D2A[0x30] == '\0') {
    __mingw_hexdig_init_D2A();
  }
  *bp = (__Bigint *)0x0;
  pcVar4 = *sp;
  bVar17 = pcVar4[2];
  if (bVar17 == 0x30) {
    pbVar24 = (byte *)(pcVar4 + 3);
    do {
      pbVar22 = pbVar24;
      bVar17 = *pbVar22;
      pbVar24 = pbVar22 + 1;
    } while (bVar17 == 0x30);
    iVar7 = ((int)pbVar22 - (int)(pcVar4 + 3)) + 1;
  }
  else {
    pbVar22 = (byte *)(pcVar4 + 2);
    iVar7 = 0;
  }
  bVar1 = *pbVar3;
  pbVar24 = pbVar22;
  if (__hexdig_D2A[bVar17] == '\0') {
    lVar11 = 0;
    pbVar14 = pbVar22;
    bVar2 = bVar1;
    if (bVar1 != 0) {
      do {
        if (pbVar22[lVar11] != bVar2) goto LAB_14001df13;
        lVar11 = lVar11 + 1;
        bVar2 = pbVar3[lVar11];
      } while (bVar2 != 0);
      pbVar14 = pbVar22 + lVar11;
      bVar17 = *pbVar14;
      if (__hexdig_D2A[bVar17] != '\0') {
        pbVar22 = pbVar14;
        if (bVar17 != 0x30) {
LAB_14001e2c2:
          iVar7 = 1;
          pbVar24 = pbVar22;
          goto LAB_14001dff8;
        }
        do {
          bVar17 = pbVar22[1];
          pbVar22 = pbVar22 + 1;
        } while (bVar17 == 0x30);
        if (__hexdig_D2A[bVar17] != '\0') goto LAB_14001e2c2;
        pbVar24 = pbVar22;
        if (bVar17 == bVar1) {
          iVar7 = 1;
          bVar5 = true;
          goto LAB_14001e0fc;
        }
        iVar7 = 1;
        bVar5 = true;
        goto LAB_14001e01e;
      }
    }
LAB_14001df13:
    if ((bVar17 & 0xdf) == 0x50) {
      local_4c = 0;
      bVar5 = true;
      goto LAB_14001e120;
    }
    local_4c = 0;
    bVar5 = true;
    bVar28 = false;
    bVar6 = false;
    pbVar13 = pbVar14;
LAB_14001df35:
    pbVar22 = pbVar14;
    if (iVar7 == 0) {
      pbVar13 = pbVar24 + -1;
    }
    *sp = (char *)pbVar13;
    if (bVar5) {
      return 0;
    }
    if (bVar6) {
      iVar7 = fpi->rounding;
      if (bVar28) {
        if (iVar7 == 2) {
          if (sign != 0) goto LAB_14001e3e0;
        }
        else if ((iVar7 != 3) || (sign == 0)) goto LAB_14001e3e0;
        p_Var9 = __Balloc_D2A(0);
        p_Var9->wds = 1;
        p_Var9->x[0] = 1;
        iVar7 = fpi->emin;
        goto LAB_14001dfa0;
      }
      if (iVar7 == 2) {
        if (sign != 0) goto LAB_14001e2fb;
      }
      else if (iVar7 == 3) {
        if (sign == 0) {
LAB_14001e2fb:
          uVar20 = fpi->nbits & 0x1f;
          uVar26 = fpi->nbits >> 5;
          iVar23 = (uVar26 + 1) - (uint)(uVar20 == 0);
          iVar15 = 0;
          iVar7 = iVar23;
          while (iVar7 = iVar7 >> 1, iVar7 != 0) {
            iVar15 = iVar15 + 1;
          }
          p_Var9 = __Balloc_D2A(iVar15);
          *bp = p_Var9;
          p_Var9->wds = iVar23;
          uVar21 = 0;
          if (0 < (int)uVar26) {
            memset(p_Var9->x,0xff,(ulonglong)uVar26 * 4);
            uVar21 = uVar26;
          }
          if ((int)uVar26 < iVar23) {
            p_Var9->x[(int)uVar21] = 0x20 >> (-(char)uVar20 & 0x1fU);
          }
          *expo = fpi->emin;
          return 0x11;
        }
      }
      else if (iVar7 != 1) goto LAB_14001e2fb;
      goto LAB_14001e464;
    }
  }
  else {
    iVar7 = iVar7 + 1;
    pbVar14 = (byte *)0x0;
LAB_14001dff8:
    do {
      bVar17 = pbVar22[1];
      pbVar22 = pbVar22 + 1;
    } while (__hexdig_D2A[bVar17] != '\0');
    if (bVar17 == bVar1) {
      bVar5 = false;
      if (pbVar14 == (byte *)0x0) {
        lVar11 = 1;
        bVar17 = pbVar3[1];
        while (bVar17 != 0) {
          if (pbVar22[lVar11] != bVar17) {
            if ((*pbVar22 & 0xdf) != 0x50) {
              *sp = (char *)pbVar22;
              local_4c = 0;
              goto LAB_14001e043;
            }
            local_4c = 0;
            bVar5 = false;
            pbVar14 = pbVar22;
            goto LAB_14001e120;
          }
          lVar11 = lVar11 + 1;
          bVar17 = pbVar3[lVar11];
        }
        pbVar14 = pbVar22 + lVar11;
        bVar17 = *pbVar14;
        pbVar22 = pbVar14;
        if (__hexdig_D2A[bVar17] != '\0') {
          do {
            bVar17 = pbVar22[1];
            pbVar22 = pbVar22 + 1;
          } while (__hexdig_D2A[bVar17] != '\0');
          bVar5 = false;
          goto LAB_14001e01e;
        }
        local_4c = 0;
        bVar5 = false;
      }
      else {
LAB_14001e0fc:
        bVar17 = *pbVar22;
        local_4c = ((int)pbVar14 - (int)pbVar22) * 4;
      }
    }
    else {
      bVar5 = false;
      if (pbVar14 == (byte *)0x0) {
        local_4c = 0;
      }
      else {
LAB_14001e01e:
        local_4c = ((int)pbVar14 - (int)pbVar22) * 4;
      }
    }
    pbVar14 = pbVar22;
    if ((bVar17 & 0xdf) == 0x50) {
LAB_14001e120:
      bVar17 = pbVar14[1];
      if (bVar17 == 0x2b) {
        bVar28 = false;
LAB_14001e13a:
        bVar17 = pbVar14[2];
        pbVar22 = pbVar14 + 2;
      }
      else {
        if (bVar17 == 0x2d) {
          bVar28 = true;
          goto LAB_14001e13a;
        }
        pbVar22 = pbVar14 + 1;
        bVar28 = false;
      }
      bVar6 = false;
      pbVar13 = pbVar14;
      if ((byte)(__hexdig_D2A[bVar17] - 1) < 0x19) {
        uVar20 = __hexdig_D2A[bVar17] - 0x10;
        bVar17 = pbVar22[1];
        while( true ) {
          uVar16 = (ulonglong)bVar17;
          pbVar13 = pbVar22 + 1;
          if (0x18 < (byte)(__hexdig_D2A[uVar16] - 1)) break;
          if (0x7ffffff < uVar20) {
            bVar6 = true;
          }
          bVar17 = pbVar22[2];
          uVar20 = (__hexdig_D2A[uVar16] - 0x10) + uVar20 * 10;
          pbVar22 = pbVar13;
        }
        if (bVar28) {
          uVar20 = -uVar20;
        }
        local_4c = local_4c + uVar20;
      }
      goto LAB_14001df35;
    }
    *sp = (char *)pbVar22;
    if (bVar5) {
      return 0;
    }
  }
LAB_14001e043:
  iVar15 = 0;
  for (iVar7 = ((int)pbVar22 - (int)pbVar24) + -1; 7 < iVar7; iVar7 = iVar7 >> 1) {
    iVar15 = iVar15 + 1;
  }
  p_Var9 = __Balloc_D2A(iVar15);
  pUVar27 = p_Var9->x;
  if (pbVar3[1] == 0) {
    lVar11 = 0;
  }
  else {
    sVar12 = strlen((char *)(pbVar3 + 2));
    lVar11 = sVar12 + 1;
  }
  pUVar18 = pUVar27;
  if (pbVar24 < pbVar22) {
    UVar25 = 0;
    iVar7 = 0;
    do {
      while( true ) {
        bVar17 = pbVar22[-1];
        pbVar14 = pbVar22 + -1;
        if (bVar17 == pbVar3[lVar11]) break;
        if (iVar7 == 0x20) {
          *pUVar18 = UVar25;
          iVar15 = 4;
          bVar17 = pbVar22[-1];
          UVar25 = 0;
          pUVar18 = pUVar18 + 1;
          iVar7 = 0;
        }
        else {
          iVar15 = iVar7 + 4;
        }
        UVar25 = UVar25 | (__hexdig_D2A[bVar17] & 0xf) << ((byte)iVar7 & 0x1f);
        pbVar22 = pbVar14;
        iVar7 = iVar15;
        if (pbVar14 <= pbVar24) goto LAB_14001e1c7;
      }
      pbVar22 = pbVar14 + -lVar11;
    } while (pbVar24 < pbVar22);
LAB_14001e1c7:
    uVar20 = 0x1f;
    if (UVar25 != 0) {
      for (; UVar25 >> uVar20 == 0; uVar20 = uVar20 - 1) {
      }
    }
    uVar20 = uVar20 ^ 0x1f;
  }
  else {
    uVar20 = 0x20;
    UVar25 = 0;
  }
  *pUVar18 = UVar25;
  uVar26 = fpi->nbits;
  iVar7 = (int)((longlong)pUVar18 + (4 - (longlong)pUVar27) >> 2);
  p_Var9->wds = iVar7;
  iVar7 = iVar7 * 0x20 - uVar20;
  if ((int)uVar26 < iVar7) {
    iVar7 = iVar7 - uVar26;
    UVar25 = __any_on_D2A(p_Var9,iVar7);
    uVar20 = 0;
    if (UVar25 != 0) {
      iVar15 = iVar7 + -1;
      uVar20 = 1;
      if ((1 << ((byte)iVar15 & 0x1f) & pUVar27[iVar15 >> 5]) != 0) {
        if ((iVar15 == 0) || (UVar25 = __any_on_D2A(p_Var9,iVar15), UVar25 == 0)) {
          uVar20 = 2;
        }
        else {
          uVar20 = 3;
        }
      }
    }
    __rshift_D2A(p_Var9,iVar7);
    local_4c = local_4c + iVar7;
  }
  else {
    uVar20 = 0;
    if (iVar7 < (int)uVar26) {
      p_Var9 = __lshift_D2A(p_Var9,uVar26 - iVar7);
      local_4c = local_4c - (uVar26 - iVar7);
      pUVar27 = p_Var9->x;
    }
  }
  if (fpi->emax < local_4c) {
LAB_14001e45c:
    __Bfree_D2A(p_Var9);
LAB_14001e464:
    piVar10 = _errno();
    *piVar10 = 0x22;
    return 0xa3;
  }
  iVar7 = fpi->emin;
  if (local_4c < iVar7) {
    uVar21 = iVar7 - local_4c;
    if ((int)uVar26 <= (int)uVar21) {
      iVar15 = fpi->rounding;
      if (iVar15 == 2) {
        if (sign == 0) goto LAB_14001e655;
      }
      else if (iVar15 == 3) {
        if (sign != 0) goto LAB_14001e655;
      }
      else if ((iVar15 == 1) && (uVar26 == uVar21)) {
        if (uVar26 != 1) {
          UVar25 = __any_on_D2A(p_Var9,uVar26 - 1);
          if (UVar25 == 0) goto LAB_14001e3d8;
          iVar7 = fpi->emin;
        }
LAB_14001e655:
        p_Var9->wds = 1;
        *pUVar27 = 1;
LAB_14001dfa0:
        *bp = p_Var9;
        *expo = iVar7;
        piVar10 = _errno();
        *piVar10 = 0x22;
        return 0x62;
      }
LAB_14001e3d8:
      __Bfree_D2A(p_Var9);
LAB_14001e3e0:
      piVar10 = _errno();
      *piVar10 = 0x22;
      return 0x50;
    }
    iVar7 = uVar21 - 1;
    if (uVar20 == 0) {
      if (iVar7 != 0) {
        uVar20 = __any_on_D2A(p_Var9,iVar7);
      }
    }
    else {
      uVar20 = 1;
    }
    if ((1 << ((byte)iVar7 & 0x1f) & pUVar27[iVar7 >> 5]) != 0) {
      uVar20 = uVar20 | 2;
    }
    uVar26 = uVar26 - uVar21;
    uVar19 = 2;
    __rshift_D2A(p_Var9,uVar21);
    local_4c = fpi->emin;
  }
  else {
    uVar19 = 1;
  }
  if (uVar20 == 0) goto LAB_14001e246;
  iVar7 = fpi->rounding;
  if (iVar7 == 2) {
    sign = 1 - sign;
joined_r0x00014001e595:
    if (sign != 0) {
      iVar7 = p_Var9->wds;
      p_Var9 = __increment_D2A(p_Var9);
      if (uVar19 == 2) {
        uVar19 = 0x22;
        if (fpi->nbits - 1U == uVar26) {
          uVar19 = ((1 << ((byte)uVar26 & 0x1f) & p_Var9->x[(int)uVar26 >> 5]) == 0) + 0x21;
        }
        goto LAB_14001e246;
      }
      if (iVar7 < p_Var9->wds) {
LAB_14001e5d5:
        __rshift_D2A(p_Var9,1);
        local_4c = local_4c + 1;
        if (fpi->emax < local_4c) goto LAB_14001e45c;
      }
      else if ((uVar26 & 0x1f) != 0) {
        uVar20 = 0x1f;
        if (p_Var9->x[(longlong)iVar7 + -1] != 0) {
          for (; p_Var9->x[(longlong)iVar7 + -1] >> uVar20 == 0; uVar20 = uVar20 - 1) {
          }
        }
        if ((int)(uVar20 ^ 0x1f) < (int)(0x20 - (uVar26 & 0x1f))) goto LAB_14001e5d5;
      }
      uVar19 = 0x21;
      goto LAB_14001e246;
    }
  }
  else {
    if (iVar7 == 3) goto joined_r0x00014001e595;
    if ((iVar7 == 1) && ((uVar20 & 2) != 0)) {
      sign = (uVar20 | *pUVar27) & 1;
      goto joined_r0x00014001e595;
    }
  }
  uVar19 = uVar19 | 0x10;
LAB_14001e246:
  *bp = p_Var9;
  *expo = local_4c;
  return uVar19;
}



void __rshift_D2A(__Bigint *b,int k)

{
  ULong *pUVar1;
  ULong *pUVar2;
  uint uVar3;
  sbyte sVar4;
  int iVar5;
  ULong *pUVar6;
  longlong lVar7;
  ULong *pUVar8;
  ULong *pUVar9;
  uint *puVar10;
  uint *puVar11;
  uint uVar12;
  longlong lVar13;
  
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * x1@[???]
                    // Unresolved local var: ULong * xe@[???]
                    // Unresolved local var: ULong y@[???]
                    // Unresolved local var: int n@[???]
  lVar7 = (longlong)b->wds;
  if (k >> 5 < b->wds) {
    pUVar1 = b->x;
    lVar13 = (longlong)(k >> 5);
    pUVar6 = pUVar1 + lVar7;
    pUVar8 = pUVar1 + lVar13;
    if ((k & 0x1fU) == 0) {
      pUVar9 = pUVar1;
      if (pUVar6 <= pUVar8) goto LAB_14001e79f;
      do {
        pUVar2 = pUVar8 + 1;
        *pUVar9 = *pUVar8;
        pUVar8 = pUVar2;
        pUVar9 = pUVar9 + 1;
      } while (pUVar2 < pUVar6);
      pUVar6 = pUVar1 + (lVar7 - lVar13);
    }
    else {
      uVar3 = *pUVar8;
      puVar10 = pUVar8 + 1;
      sVar4 = (sbyte)(k & 0x1fU);
      uVar12 = uVar3 >> sVar4;
      pUVar8 = pUVar1;
      if (puVar10 < pUVar6) {
        do {
          puVar11 = puVar10 + 1;
          *pUVar8 = *puVar10 << (0x20U - sVar4 & 0x1f) | uVar12;
          uVar3 = *puVar10;
          uVar12 = uVar3 >> sVar4;
          pUVar8 = pUVar8 + 1;
          puVar10 = puVar11;
        } while (puVar11 < pUVar6);
        pUVar6 = (ULong *)((longlong)b + (lVar7 - lVar13) * 4 + 0x14);
        *pUVar6 = uVar12;
        if (uVar3 >> sVar4 == 0) goto LAB_14001e856;
      }
      else {
        b->x[0] = uVar12;
        pUVar6 = pUVar1;
        if (uVar3 >> sVar4 == 0) goto LAB_14001e79f;
      }
      pUVar6 = pUVar6 + 1;
    }
LAB_14001e856:
    iVar5 = (int)((longlong)pUVar6 - (longlong)pUVar1 >> 2);
    b->wds = iVar5;
    if (iVar5 != 0) {
      return;
    }
  }
  else {
LAB_14001e79f:
    b->wds = 0;
  }
  b->x[0] = 0;
  return;
}



int __trailz_D2A(__Bigint *b)

{
  ULong *pUVar1;
  uint uVar2;
  int iVar3;
  ULong *pUVar4;
  int iVar5;
  
                    // Unresolved local var: ULong L@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xe@[???]
                    // Unresolved local var: int n@[???]
  pUVar4 = b->x;
  pUVar1 = pUVar4 + b->wds;
  iVar5 = 0;
  while( true ) {
    if (pUVar1 <= pUVar4) {
      return iVar5;
    }
    if (*pUVar4 != 0) break;
    pUVar4 = pUVar4 + 1;
    iVar5 = iVar5 + 0x20;
  }
  if (pUVar1 <= pUVar4) {
    return iVar5;
  }
                    // Unresolved local var: int ret@[???]
  iVar3 = 0;
  for (uVar2 = *pUVar4; (uVar2 & 1) == 0; uVar2 = uVar2 >> 1 | 0x80000000) {
    iVar3 = iVar3 + 1;
  }
  return iVar5 + iVar3;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void __mingw_hexdig_init_D2A(void)

{
  char cVar1;
  ulonglong uVar2;
  byte *pbVar3;
  
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int j@[???]
  pbVar3 = &_rdata;
  uVar2 = 0x30;
  do {
    cVar1 = (char)pbVar3;
    pbVar3 = pbVar3 + 1;
    __hexdig_D2A[uVar2] = cVar1 + '0';
    uVar2 = (ulonglong)*pbVar3;
  } while (*pbVar3 != 0);
  pbVar3 = &DAT_1400c9deb;
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int j@[???]
  uVar2 = 0x61;
  do {
    cVar1 = (char)pbVar3;
    pbVar3 = pbVar3 + 1;
    __hexdig_D2A[uVar2] = cVar1 + '/';
    uVar2 = (ulonglong)*pbVar3;
  } while (*pbVar3 != 0);
  pbVar3 = &DAT_1400c9df2;
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int j@[???]
  uVar2 = 0x41;
  do {
    cVar1 = (char)pbVar3;
    pbVar3 = pbVar3 + 1;
    __hexdig_D2A[uVar2] = cVar1 + '(';
    uVar2 = (ulonglong)*pbVar3;
  } while (*pbVar3 != 0);
  return;
}



int __hexnan_D2A(char **sp,FPI *fpi,ULong *x0)

{
  byte *pbVar1;
  byte bVar2;
  char cVar3;
  uint uVar4;
  uint uVar5;
  char *pcVar6;
  int iVar7;
  longlong lVar8;
  void *_Dst;
  uint uVar9;
  uint *puVar10;
  uint *puVar11;
  uint *puVar12;
  int iVar13;
  uint *puVar14;
  size_t _Size;
  char *pcVar15;
  int iVar16;
  uint *puVar17;
  uint *puVar18;
  
                    // Unresolved local var: ULong c@[???]
                    // Unresolved local var: ULong h@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * x1@[???]
                    // Unresolved local var: ULong * xe@[???]
                    // Unresolved local var: char * s@[???]
                    // Unresolved local var: int havedig@[???]
                    // Unresolved local var: int hd0@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int nbits@[???]
  if (__hexdig_D2A[0x30] == '\0') {
    __mingw_hexdig_init_D2A();
  }
  uVar4 = fpi->nbits & 0x1f;
  puVar10 = x0 + (fpi->nbits >> 5);
  if (uVar4 == 0) {
    puVar17 = puVar10 + -1;
    puVar18 = puVar10;
  }
  else {
    puVar18 = puVar10 + 1;
    puVar17 = puVar10;
  }
  puVar18[-1] = 0;
  pcVar15 = *sp;
  bVar2 = pcVar15[1];
  if (bVar2 != 0) {
    do {
      if (0x20 < bVar2) {
        if (((bVar2 == 0x30) && ((pcVar15[2] & 0xdfU) == 0x58)) &&
           (bVar2 = pcVar15[3], 0x20 < bVar2)) {
          pcVar6 = pcVar15 + 3;
          pcVar15 = pcVar15 + 2;
          goto LAB_14001ea29;
        }
        break;
      }
      bVar2 = pcVar15[2];
      pcVar15 = pcVar15 + 1;
    } while (bVar2 != 0);
    bVar2 = pcVar15[1];
    pcVar6 = pcVar15 + 1;
    if (bVar2 != 0) {
LAB_14001ea29:
      uVar9 = (uint)bVar2;
      iVar16 = 0;
                    // Unresolved local var: int j@[???]
      iVar13 = 0;
      iVar7 = 0;
      puVar10 = puVar17;
      puVar12 = puVar17;
LAB_14001ea40:
      do {
        bVar2 = __hexdig_D2A[uVar9];
        if (bVar2 == 0) {
          if (0x20 < uVar9) {
            if ((uVar9 != 0x29) || (iVar13 == 0)) {
              do {
                pcVar6 = pcVar6 + 1;
                if (uVar9 == 0x29) {
                  *sp = pcVar6;
                  return 4;
                }
                uVar9 = (uint)*pcVar6;
              } while (*pcVar6 != '\0');
              return 4;
            }
            *sp = pcVar15 + 2;
            if (puVar12 <= puVar10) goto joined_r0x00014001eb1a;
            goto LAB_14001eb0d;
          }
          puVar11 = puVar10;
          if (iVar13 <= iVar7) {
LAB_14001ec23:
            bVar2 = pcVar6[1];
            while (bVar2 < 0x21) {
              pbVar1 = (byte *)(pcVar6 + 2);
              pcVar6 = pcVar6 + 1;
              bVar2 = *pbVar1;
            }
            pcVar15 = pcVar6;
            puVar10 = puVar11;
            if (((bVar2 != 0x30) || ((pcVar6[2] & 0xdfU) != 0x58)) ||
               (uVar9 = (uint)(byte)pcVar6[3], (byte)pcVar6[3] < 0x21)) goto LAB_14001ebdc;
            pcVar15 = pcVar6 + 2;
            pcVar6 = pcVar6 + 3;
            goto LAB_14001ea40;
          }
          if ((puVar10 < puVar12) && (iVar16 < 8)) {
            uVar9 = *puVar10;
            cVar3 = '\b' - (char)iVar16;
            do {
              puVar14 = puVar11 + 1;
              *puVar11 = uVar9 | puVar11[1] << (cVar3 * -4 + 0x20U & 0x1f);
              uVar9 = puVar11[1] >> (cVar3 * '\x04' & 0x1fU);
              *puVar14 = uVar9;
              puVar11 = puVar14;
            } while (puVar14 < puVar12);
          }
          if (x0 < puVar10) {
            puVar11 = puVar10 + -1;
            puVar10[-1] = 0;
            iVar16 = 0;
            puVar12 = puVar11;
            iVar7 = iVar13;
            goto LAB_14001ec23;
          }
          bVar2 = pcVar6[1];
          iVar16 = 8;
          pcVar15 = pcVar6;
        }
        else {
          iVar16 = iVar16 + 1;
          iVar13 = iVar13 + 1;
          if (iVar16 < 9) {
            uVar9 = *puVar10 << 4;
          }
          else {
            pcVar15 = pcVar6;
            if (puVar10 <= x0) goto LAB_14001ebdc;
            puVar10[-1] = 0;
            uVar9 = 0;
            puVar10 = puVar10 + -1;
            iVar16 = 1;
          }
          *puVar10 = bVar2 & 0xf | uVar9;
          pcVar15 = pcVar6;
LAB_14001ebdc:
          bVar2 = pcVar15[1];
        }
        uVar9 = (uint)bVar2;
        pcVar6 = pcVar15 + 1;
      } while (uVar9 != 0);
      if (iVar13 != 0) {
        if (puVar10 < puVar12) {
LAB_14001eb0d:
          if (iVar16 < 8) {
                    // Unresolved local var: int j@[???]
            cVar3 = '\b' - (char)iVar16;
            uVar9 = *puVar10;
            puVar11 = puVar10;
            do {
              puVar14 = puVar11 + 1;
              uVar5 = puVar11[1] << (cVar3 * -4 + 0x20U & 0x1f) | uVar9;
              uVar9 = puVar11[1] >> (cVar3 * '\x04' & 0x1fU);
              *puVar11 = uVar5;
              *puVar14 = uVar9;
              puVar11 = puVar14;
            } while (puVar14 < puVar12);
          }
        }
joined_r0x00014001eb1a:
        puVar12 = puVar10;
        puVar11 = x0;
        if (x0 < puVar10) {
          do {
            puVar14 = puVar12 + 1;
            *puVar11 = *puVar12;
            puVar12 = puVar14;
            puVar11 = puVar11 + 1;
          } while (puVar14 <= puVar17);
          lVar8 = ((longlong)puVar17 - (longlong)puVar10 & 0xfffffffffffffffcU) + 4;
          if ((longlong)puVar17 + 1U < (longlong)puVar10 + 1U) {
            lVar8 = 4;
          }
          _Dst = (void *)(lVar8 + (longlong)x0);
          _Size = ((longlong)puVar17 - (longlong)_Dst & 0xfffffffffffffffcU) + 4;
          if ((longlong)puVar17 + 1U < (longlong)_Dst + 1U) {
            _Size = 4;
          }
          memset(_Dst,0,_Size);
          uVar9 = puVar18[-1];
        }
        else {
          uVar9 = puVar18[-1];
          if (uVar4 != 0) {
            uVar9 = uVar9 & 0xffffffffU >> (0x20U - (char)uVar4 & 0x1f);
            puVar18[-1] = uVar9;
          }
        }
        while( true ) {
          if (uVar9 != 0) {
            return 5;
          }
          if (x0 == puVar17) break;
          uVar9 = puVar17[-1];
          puVar17 = puVar17 + -1;
        }
        *puVar17 = 1;
        return 5;
      }
    }
  }
  return 4;
}



// WARNING: Removing unreachable block (ram,0x00014001ee53)
// WARNING: Removing unreachable block (ram,0x00014001ee38)
// WARNING: Removing unreachable block (ram,0x00014001ee44)

void dtoa_lock(int n)

{
  if (dtoa_CS_init != 2) {
    if (dtoa_CS_init != 0) {
      if (dtoa_CS_init == 1) {
        do {
          Sleep(1);
        } while (dtoa_CS_init == 1);
        if (dtoa_CS_init == 2) goto LAB_14001ee16;
      }
      return;
    }
                    // Unresolved local var: long last_CS_init@[???]
    LOCK();
    dtoa_CS_init = 1;
    UNLOCK();
                    // Unresolved local var: int i@[???]
    InitializeCriticalSection((LPCRITICAL_SECTION)dtoa_CritSec);
    InitializeCriticalSection((LPCRITICAL_SECTION)(dtoa_CritSec + 1));
    atexit(dtoa_lock_cleanup);
    dtoa_CS_init = 2;
  }
LAB_14001ee16:
                    // WARNING: Could not recover jumptable at 0x00014001ee2a. Too many branches
                    // WARNING: Treating indirect jump as call
  EnterCriticalSection
            ((LPCRITICAL_SECTION)((longlong)&dtoa_CritSec[0].DebugInfo + (ulonglong)(-n & 0x28)));
  return;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void dtoa_lock_cleanup(void)

{
  long lVar1;
  
                    // Unresolved local var: long last_CS_init@[???]
  lVar1 = dtoa_CS_init;
  LOCK();
  dtoa_CS_init = 3;
  UNLOCK();
  if (lVar1 != 2) {
    return;
  }
                    // Unresolved local var: long last_CS_init@[???]
                    // Unresolved local var: int i@[???]
  DeleteCriticalSection((LPCRITICAL_SECTION)dtoa_CritSec);
                    // WARNING: Could not recover jumptable at 0x00014001eeb8. Too many branches
                    // WARNING: Treating indirect jump as call
  DeleteCriticalSection((LPCRITICAL_SECTION)(dtoa_CritSec + 1));
  return;
}



__Bigint * __Balloc_D2A(int k)

{
  int iVar1;
  __Bigint *p_Var2;
  ulonglong uVar3;
  int iVar4;
  
                    // Unresolved local var: int x@[???]
                    // Unresolved local var: __Bigint * rv@[???]
                    // Unresolved local var: uint len@[???]
  dtoa_lock(0);
  iVar1 = dtoa_CS_init;
  if (k < 10) {
    p_Var2 = freelist[k];
    if (p_Var2 != (__Bigint *)0x0) {
      freelist[k] = p_Var2->next;
      goto joined_r0x00014001ef4f;
    }
    iVar4 = 1 << ((byte)k & 0x1f);
    uVar3 = (longlong)(iVar4 + -1) * 4 + 0x27U >> 3;
    if (0x120 < ((longlong)(pmem_next + -0x2801f870) >> 3) + uVar3) goto LAB_14001ef34;
    p_Var2 = (__Bigint *)pmem_next;
    pmem_next = pmem_next + uVar3;
  }
  else {
    iVar4 = 1 << ((byte)k & 0x1f);
    uVar3 = (longlong)(iVar4 + -1) * 4 + 0x27U >> 3 & 0xffffffff;
LAB_14001ef34:
    p_Var2 = malloc(uVar3 << 3);
    if (p_Var2 == (__Bigint *)0x0) {
      return (__Bigint *)0x0;
    }
  }
  iVar1 = dtoa_CS_init;
  p_Var2->k = k;
  p_Var2->maxwds = iVar4;
joined_r0x00014001ef4f:
  if (iVar1 == 2) {
    LeaveCriticalSection((LPCRITICAL_SECTION)dtoa_CritSec);
  }
  p_Var2->sign = 0;
  p_Var2->wds = 0;
  return p_Var2;
}



void __Bfree_D2A(__Bigint *v)

{
  __Bigint *p_Var1;
  bool bVar2;
  
  if (v != (__Bigint *)0x0) {
    if (9 < v->k) {
      free(v);
      return;
    }
    dtoa_lock(0);
    bVar2 = dtoa_CS_init == 2;
    p_Var1 = freelist[v->k];
    freelist[v->k] = v;
    v->next = p_Var1;
    if (bVar2) {
                    // WARNING: Could not recover jumptable at 0x00014001f025. Too many branches
                    // WARNING: Treating indirect jump as call
      LeaveCriticalSection((LPCRITICAL_SECTION)dtoa_CritSec);
      return;
    }
  }
  return;
}



__Bigint * __multadd_D2A(__Bigint *b,int m,int a)

{
  int iVar1;
  ulonglong uVar2;
  __Bigint *p_Var3;
  longlong lVar4;
  ULong UVar5;
  ulonglong uVar6;
  
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int wds@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ulonglong carry@[???]
                    // Unresolved local var: ulonglong y@[???]
                    // Unresolved local var: __Bigint * b1@[???]
  iVar1 = b->wds;
  uVar6 = (ulonglong)a;
  lVar4 = 0;
  do {
    uVar2 = (ulonglong)b->x[lVar4] * (longlong)m + uVar6;
    b->x[lVar4] = (ULong)uVar2;
    lVar4 = lVar4 + 1;
    uVar6 = uVar2 >> 0x20;
  } while ((int)lVar4 < iVar1);
  p_Var3 = b;
  if (uVar6 != 0) {
    UVar5 = (ULong)(uVar2 >> 0x20);
    if (iVar1 < b->maxwds) {
      b->x[iVar1] = UVar5;
      b->wds = iVar1 + 1;
    }
    else {
      p_Var3 = __Balloc_D2A(b->k + 1);
      if (p_Var3 != (__Bigint *)0x0) {
        memcpy(&p_Var3->sign,&b->sign,(longlong)b->wds * 4 + 8);
        __Bfree_D2A(b);
        p_Var3->x[iVar1] = UVar5;
        p_Var3->wds = iVar1 + 1;
      }
    }
  }
  return p_Var3;
}



__Bigint * __i2b_D2A(int i)

{
  int iVar1;
  __Bigint *p_Var2;
  
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: int x@[???]
                    // Unresolved local var: __Bigint * rv@[???]
                    // Unresolved local var: uint len@[???]
  dtoa_lock(0);
  if (freelist[1] == (__Bigint *)0x0) {
    if (((longlong)(pmem_next + -0x2801f870) >> 3) + 5U < 0x121) {
      p_Var2 = (__Bigint *)pmem_next;
      pmem_next = pmem_next + 5;
    }
    else {
      p_Var2 = malloc(0x28);
      if (p_Var2 == (__Bigint *)0x0) {
        return (__Bigint *)0x0;
      }
    }
    iVar1 = dtoa_CS_init;
    p_Var2->k = 1;
    p_Var2->maxwds = 2;
  }
  else {
    p_Var2 = freelist[1];
    freelist[1] = freelist[1]->next;
    iVar1 = dtoa_CS_init;
  }
  if (iVar1 == 2) {
    LeaveCriticalSection((LPCRITICAL_SECTION)dtoa_CritSec);
  }
  p_Var2->x[0] = i;
  p_Var2->sign = 0;
  p_Var2->wds = 1;
  return p_Var2;
}



__Bigint * __mult_D2A(__Bigint *a,__Bigint *b)

{
  int *piVar1;
  ULong *pUVar2;
  ULong *pUVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  uint uVar7;
  __Bigint *p_Var8;
  longlong lVar9;
  ulonglong uVar10;
  int iVar11;
  ULong *pUVar12;
  ULong *pUVar13;
  int iVar14;
  ULong *pUVar15;
  ulonglong uVar16;
  __Bigint *p_Var17;
  ULong *pUVar18;
  ULong *_Dst;
  
                    // Unresolved local var: __Bigint * c@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: int wa@[???]
                    // Unresolved local var: int wb@[???]
                    // Unresolved local var: int wc@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xa@[???]
                    // Unresolved local var: ULong * xae@[???]
                    // Unresolved local var: ULong * xb@[???]
                    // Unresolved local var: ULong * xbe@[???]
                    // Unresolved local var: ULong * xc@[???]
                    // Unresolved local var: ULong * xc0@[???]
                    // Unresolved local var: ULong y@[???]
                    // Unresolved local var: ulonglong carry@[???]
                    // Unresolved local var: ulonglong z@[???]
  iVar4 = a->wds;
  iVar11 = b->wds;
  p_Var17 = a;
  iVar5 = iVar11;
  if (iVar11 <= iVar4) {
    p_Var17 = b;
    b = a;
    iVar5 = iVar4;
    iVar4 = iVar11;
  }
  iVar11 = b->k;
  iVar14 = iVar5 + iVar4;
  if (b->maxwds < iVar14) {
    iVar11 = iVar11 + 1;
  }
  p_Var8 = __Balloc_D2A(iVar11);
  if (p_Var8 != (__Bigint *)0x0) {
    _Dst = p_Var8->x;
    pUVar15 = _Dst + iVar14;
    if (_Dst < pUVar15) {
      memset(_Dst,0,((ulonglong)((longlong)pUVar15 + (-0x19 - (longlong)p_Var8)) &
                    0xfffffffffffffffc) + 4);
    }
    pUVar18 = p_Var17->x;
    pUVar2 = pUVar18 + iVar4;
    pUVar3 = b->x + iVar5;
    if (pUVar18 < pUVar2) {
      lVar9 = 4;
      if ((uint *)((longlong)b->x + 1U) <= pUVar3) {
        lVar9 = ((longlong)pUVar3 + (-0x19 - (longlong)b) & 0xfffffffffffffffcU) + 4;
      }
      do {
        while( true ) {
          uVar6 = *pUVar18;
          pUVar18 = pUVar18 + 1;
          if (uVar6 == 0) break;
          uVar16 = 0;
          pUVar12 = _Dst;
          pUVar13 = b->x;
          do {
            uVar7 = *pUVar13;
            pUVar13 = pUVar13 + 1;
            uVar10 = (ulonglong)uVar7 * (ulonglong)uVar6 + (ulonglong)*pUVar12 + uVar16;
            *pUVar12 = (uint)uVar10;
            uVar16 = uVar10 >> 0x20;
            pUVar12 = pUVar12 + 1;
          } while (pUVar13 < pUVar3);
          *(int *)((longlong)_Dst + lVar9) = (int)(uVar10 >> 0x20);
          _Dst = _Dst + 1;
          if (pUVar2 <= pUVar18) goto LAB_14001f2e8;
        }
        _Dst = _Dst + 1;
      } while (pUVar18 < pUVar2);
    }
LAB_14001f2e8:
    if (0 < iVar14) {
      do {
        piVar1 = (int *)(pUVar15 + -1);
        pUVar15 = pUVar15 + -1;
        if (*piVar1 != 0) break;
        iVar14 = iVar14 + -1;
      } while (iVar14 != 0);
    }
    p_Var8->wds = iVar14;
  }
  return p_Var8;
}



__Bigint * __pow5mult_D2A(__Bigint *b,int k)

{
  uint uVar1;
  __Bigint *p_Var2;
  uint uVar3;
  __Bigint *b_00;
  
                    // Unresolved local var: __Bigint * b1@[???]
                    // Unresolved local var: __Bigint * p5@[???]
                    // Unresolved local var: __Bigint * p51@[???]
                    // Unresolved local var: int i@[???]
  if (((k & 3U) == 0) ||
     (b = __multadd_D2A(b,__pow5mult_D2A::p05[(int)((k & 3U) - 1)],0), b != (__Bigint *)0x0)) {
    uVar3 = k >> 2;
    if (uVar3 == 0) {
      return b;
    }
    p_Var2 = p5s;
    if (p5s == (__Bigint *)0x0) {
      dtoa_lock(1);
      p_Var2 = p5s;
      if (p5s == (__Bigint *)0x0) {
                    // Unresolved local var: __Bigint * b@[???]
        p_Var2 = __Balloc_D2A(1);
        if (p_Var2 == (__Bigint *)0x0) {
          p5s = (__Bigint *)0x0;
          goto LAB_14001f428;
        }
        p5s = p_Var2;
        p_Var2->wds = 1;
        p_Var2->x[0] = 0x271;
        p_Var2->next = (__Bigint *)0x0;
      }
      if (dtoa_CS_init == 2) {
        LeaveCriticalSection((LPCRITICAL_SECTION)(dtoa_CritSec + 1));
      }
    }
    while( true ) {
      b_00 = p_Var2;
      uVar1 = uVar3 & 1;
      uVar3 = (int)uVar3 >> 1;
      if (uVar1 != 0) {
        p_Var2 = __mult_D2A(b,b_00);
        if (p_Var2 == (__Bigint *)0x0) goto LAB_14001f428;
        __Bfree_D2A(b);
        b = p_Var2;
      }
      if (uVar3 == 0) break;
      p_Var2 = b_00->next;
      if (b_00->next == (__Bigint *)0x0) {
        dtoa_lock(1);
        p_Var2 = b_00->next;
        if (p_Var2 == (__Bigint *)0x0) {
          p_Var2 = __mult_D2A(b_00,b_00);
          b_00->next = p_Var2;
          if (p_Var2 == (__Bigint *)0x0) goto LAB_14001f428;
          p_Var2->next = (__Bigint *)0x0;
        }
        if (dtoa_CS_init == 2) {
          LeaveCriticalSection((LPCRITICAL_SECTION)(dtoa_CritSec + 1));
        }
      }
    }
  }
  else {
LAB_14001f428:
    b = (__Bigint *)0x0;
  }
  return b;
}



__Bigint * __lshift_D2A(__Bigint *b,int k)

{
  ULong *pUVar1;
  uint *puVar2;
  uint *puVar3;
  int iVar4;
  uint uVar5;
  byte bVar6;
  sbyte sVar7;
  __Bigint *p_Var8;
  longlong lVar9;
  int k_00;
  int iVar10;
  uint uVar11;
  ULong *pUVar12;
  ULong *pUVar13;
  ULong *pUVar14;
  ULong *pUVar15;
  int iVar16;
  
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int k1@[???]
                    // Unresolved local var: int n@[???]
                    // Unresolved local var: int n1@[???]
                    // Unresolved local var: __Bigint * b1@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * x1@[???]
                    // Unresolved local var: ULong * xe@[???]
                    // Unresolved local var: ULong z@[???]
  k_00 = b->k;
  uVar11 = k >> 5;
  iVar10 = b->wds + uVar11;
  iVar16 = iVar10 + 1;
  for (iVar4 = b->maxwds; iVar4 < iVar16; iVar4 = iVar4 * 2) {
    k_00 = k_00 + 1;
  }
  p_Var8 = __Balloc_D2A(k_00);
  if (p_Var8 == (__Bigint *)0x0) {
    return (__Bigint *)0x0;
  }
  pUVar13 = p_Var8->x;
  pUVar14 = pUVar13;
  if (0 < (int)uVar11) {
    pUVar14 = pUVar13 + uVar11;
    memset(pUVar13,0,(ulonglong)uVar11 * 4);
  }
  pUVar13 = b->x;
  pUVar1 = pUVar13 + b->wds;
  if ((k & 0x1fU) == 0) {
    do {
      puVar3 = pUVar14 + 1;
      puVar2 = pUVar13 + 1;
      *pUVar14 = *pUVar13;
      if (pUVar1 <= puVar2) break;
      pUVar14 = pUVar14 + 2;
      pUVar13 = pUVar13 + 2;
      *puVar3 = *puVar2;
    } while (pUVar13 < pUVar1);
  }
  else {
    uVar11 = 0;
    sVar7 = (sbyte)(k & 0x1fU);
    pUVar15 = pUVar14;
    do {
      pUVar12 = pUVar13 + 1;
      *pUVar15 = *pUVar13 << sVar7 | uVar11;
      uVar5 = *pUVar13;
      bVar6 = 0x20U - sVar7 & 0x1f;
      uVar11 = uVar5 >> bVar6;
      pUVar13 = pUVar12;
      pUVar15 = pUVar15 + 1;
    } while (pUVar12 < pUVar1);
    lVar9 = ((longlong)pUVar1 + (-0x19 - (longlong)b) & 0xfffffffffffffffcU) + 4;
    if (pUVar1 < (uint *)((longlong)b->x + 1U)) {
      lVar9 = 4;
    }
    *(uint *)((longlong)pUVar14 + lVar9) = uVar11;
    if (uVar5 >> bVar6 != 0) goto LAB_14001f5a2;
  }
  iVar16 = iVar10;
LAB_14001f5a2:
  p_Var8->wds = iVar16;
  __Bfree_D2A(b);
  return p_Var8;
}



int __cmp_D2A(__Bigint *a,__Bigint *b)

{
  int iVar1;
  ULong *pUVar2;
  ULong *pUVar3;
  int iVar4;
  
                    // Unresolved local var: ULong * xa@[???]
                    // Unresolved local var: ULong * xa0@[???]
                    // Unresolved local var: ULong * xb@[???]
                    // Unresolved local var: ULong * xb0@[???]
                    // Unresolved local var: int i@[DW_OP_breg2(RCX): +20]
                    // Unresolved local var: int j@[???]
  iVar1 = b->wds;
  iVar4 = a->wds - iVar1;
  if (iVar4 == 0) {
    pUVar2 = a->x + iVar1;
    pUVar3 = b->x + iVar1;
    do {
      pUVar2 = pUVar2 + -1;
      pUVar3 = pUVar3 + -1;
      if (*pUVar2 != *pUVar3) {
        return -(uint)(*pUVar2 < *pUVar3) | 1;
      }
    } while (a->x < pUVar2);
  }
  return iVar4;
}



__Bigint * __diff_D2A(__Bigint *a,__Bigint *b)

{
  int *piVar1;
  uint uVar2;
  longlong lVar3;
  int iVar4;
  ULong *pUVar5;
  __Bigint *p_Var6;
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  uint *puVar10;
  ULong *pUVar11;
  ulonglong uVar12;
  __Bigint *p_Var13;
  int *piVar14;
  int iVar15;
  uint uVar16;
  uint *puVar17;
  ulonglong uVar18;
  bool bVar19;
  
                    // Unresolved local var: __Bigint * c@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int wa@[???]
                    // Unresolved local var: int wb@[???]
                    // Unresolved local var: ULong * xa@[???]
                    // Unresolved local var: ULong * xae@[???]
                    // Unresolved local var: ULong * xb@[???]
                    // Unresolved local var: ULong * xbe@[???]
                    // Unresolved local var: ULong * xc@[???]
                    // Unresolved local var: ulonglong borrow@[???]
                    // Unresolved local var: ulonglong y@[???]
                    // Unresolved local var: ULong * xa@[???]
                    // Unresolved local var: ULong * xa0@[???]
                    // Unresolved local var: ULong * xb@[???]
                    // Unresolved local var: ULong * xb0@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int j@[???]
  iVar4 = b->wds;
  p_Var13 = a;
  if (a->wds == iVar4) {
    pUVar5 = a->x + iVar4;
    pUVar11 = b->x + iVar4;
    do {
      pUVar5 = pUVar5 + -1;
      pUVar11 = pUVar11 + -1;
      if (*pUVar5 != *pUVar11) {
        iVar15 = 1;
        if (*pUVar11 <= *pUVar5) goto LAB_14001f68e;
        goto LAB_14001f699;
      }
    } while (a->x < pUVar5);
    p_Var6 = __Balloc_D2A(0);
    if (p_Var6 != (__Bigint *)0x0) {
      p_Var6->wds = 1;
      p_Var6->x[0] = 0;
    }
  }
  else {
    iVar15 = 1;
    if (-1 < a->wds - iVar4) {
LAB_14001f68e:
      iVar15 = 0;
      p_Var13 = b;
      b = a;
    }
LAB_14001f699:
    p_Var6 = __Balloc_D2A(b->k);
    if (p_Var6 != (__Bigint *)0x0) {
      p_Var6->sign = iVar15;
      uVar16 = b->wds;
      uVar7 = (ulonglong)(int)uVar16;
      uVar12 = 0;
      pUVar11 = b->x + uVar7;
      pUVar5 = p_Var13->x + p_Var13->wds;
      lVar9 = 0x18;
      do {
        lVar8 = ((ulonglong)*(uint *)((longlong)b->x + lVar9 + -0x18) -
                (ulonglong)*(uint *)((longlong)p_Var13->x + lVar9 + -0x18)) - uVar12;
        iVar4 = (int)lVar8;
        *(int *)((longlong)p_Var6->x + lVar9 + -0x18) = iVar4;
        lVar3 = lVar9 + -0x14;
        uVar12 = (ulonglong)((uint)((ulonglong)lVar8 >> 0x20) & 1);
        lVar9 = lVar9 + 4;
      } while ((undefined1 *)((longlong)p_Var13->x + lVar3) < pUVar5);
      bVar19 = pUVar5 < (undefined1 *)((longlong)p_Var13->x + 1U);
      uVar18 = (ulonglong)((longlong)pUVar5 + (-0x19 - (longlong)p_Var13)) >> 2;
      lVar9 = uVar18 * 4 + 4;
      if (bVar19) {
        lVar9 = 4;
      }
      puVar17 = (uint *)((longlong)b->x + lVar9);
      piVar1 = (int *)((longlong)p_Var6->x + lVar9);
      puVar10 = puVar17;
      piVar14 = piVar1;
      if (puVar17 < pUVar11) {
        do {
          uVar2 = *puVar10;
          puVar10 = puVar10 + 1;
          iVar4 = (int)(uVar2 - uVar12);
          *piVar14 = iVar4;
          uVar12 = (ulonglong)((uint)(uVar2 - uVar12 >> 0x20) & 1);
          piVar14 = piVar14 + 1;
        } while (puVar10 < pUVar11);
        lVar9 = (longlong)piVar1 +
                ((longlong)pUVar11 + (-1 - (longlong)puVar17) & 0xfffffffffffffffcU);
      }
      else {
        lVar9 = uVar18 << 2;
        if (bVar19) {
          lVar9 = 0;
        }
        lVar9 = (longlong)p_Var6->x + lVar9;
      }
      while (iVar4 == 0) {
        piVar1 = (int *)(lVar9 + -4);
        lVar9 = lVar9 + -4;
        uVar16 = (int)uVar7 - 1;
        uVar7 = (ulonglong)uVar16;
        iVar4 = *piVar1;
      }
      p_Var6->wds = uVar16;
    }
  }
  return p_Var6;
}



double __b2d_D2A(__Bigint *a,int *e)

{
  ULong *pUVar1;
  int iVar2;
  uint uVar3;
  byte bVar4;
  uint uVar5;
  ulonglong uVar6;
  uint uVar7;
  
                    // Unresolved local var: ULong * xa@[???]
                    // Unresolved local var: ULong * xa0@[???]
                    // Unresolved local var: ULong w@[???]
                    // Unresolved local var: ULong y@[???]
                    // Unresolved local var: ULong z@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: _dbl_union d@[???]
  iVar2 = a->wds;
  pUVar1 = a->x;
  uVar3 = pUVar1[(longlong)iVar2 + -1];
  uVar7 = 0x1f;
  if (uVar3 != 0) {
    for (; uVar3 >> uVar7 == 0; uVar7 = uVar7 - 1) {
    }
  }
  uVar7 = uVar7 ^ 0x1f;
  *e = 0x20 - uVar7;
  if (10 < (int)uVar7) {
    bVar4 = (byte)(uVar7 - 0xb);
    if (pUVar1 < pUVar1 + (longlong)iVar2 + -1) {
      uVar5 = pUVar1[(longlong)iVar2 + -2];
      uVar6 = (ulonglong)uVar5;
      if (uVar7 - 0xb != 0) {
        uVar3 = uVar3 << (bVar4 & 0x1f) | uVar5 >> (0x20 - bVar4 & 0x1f);
        uVar5 = uVar5 << (bVar4 & 0x1f);
        uVar6 = (ulonglong)uVar5;
        if (pUVar1 < pUVar1 + (longlong)iVar2 + -2) {
          return (double)(CONCAT44(uVar3,uVar5 | pUVar1[(longlong)iVar2 + -3] >>
                                                 (0x20 - bVar4 & 0x1f)) | 0x3ff0000000000000);
        }
      }
    }
    else {
      uVar6 = 0;
      if (uVar7 != 0xb) {
        return (double)((ulonglong)(uVar3 << (bVar4 & 0x1f) | 0x3ff00000) << 0x20);
      }
    }
    return (double)((ulonglong)(uVar3 | 0x3ff00000) << 0x20 | uVar6);
  }
  uVar5 = 0;
  bVar4 = 0xb - (char)uVar7;
  if (pUVar1 < pUVar1 + (longlong)iVar2 + -1) {
    uVar5 = pUVar1[(longlong)iVar2 + -2] >> (bVar4 & 0x1f);
  }
  return (double)(CONCAT44(uVar3 >> (bVar4 & 0x1f),uVar3 << ((char)uVar7 + 0x15U & 0x1f) | uVar5) |
                 0x3ff0000000000000);
}



__Bigint * __d2b_D2A(double dd,int *e,int *bits)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  int iVar5;
  __Bigint *p_Var6;
  byte bVar7;
  uint uVar8;
  uint uVar9;
  
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: _dbl_union d@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int de@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong y@[???]
                    // Unresolved local var: ULong z@[???]
  p_Var6 = __Balloc_D2A(1);
  if (p_Var6 != (__Bigint *)0x0) {
    uVar8 = (uint)((ulonglong)dd >> 0x20);
    uVar9 = uVar8 & 0xfffff;
    uVar8 = uVar8 >> 0x14 & 0x7ff;
    if (uVar8 != 0) {
      uVar9 = uVar9 | 0x100000;
    }
    uVar4 = SUB84(dd,0);
    if (uVar4 == 0) {
                    // Unresolved local var: int ret@[???]
      iVar5 = 1;
      iVar2 = 0;
      for (uVar4 = uVar9; (uVar4 & 1) == 0; uVar4 = uVar4 >> 1 | 0x80000000) {
        iVar2 = iVar2 + 1;
      }
      p_Var6->wds = 1;
      iVar1 = iVar2 + 0x20;
      p_Var6->x[0] = uVar9 >> ((byte)iVar2 & 0x1f);
    }
    else {
                    // Unresolved local var: int ret@[???]
      iVar1 = 0;
      for (uVar3 = uVar4; (uVar3 & 1) == 0; uVar3 = uVar3 >> 1 | 0x80000000) {
        iVar1 = iVar1 + 1;
      }
      bVar7 = (byte)iVar1;
      uVar4 = uVar4 >> (bVar7 & 0x1f);
      if (iVar1 != 0) {
        uVar4 = uVar4 | uVar9 << (0x20 - bVar7 & 0x1f);
        uVar9 = uVar9 >> (bVar7 & 0x1f);
      }
      p_Var6->x[0] = uVar4;
      iVar5 = 2 - (uint)(uVar9 == 0);
      *(uint *)&p_Var6->field_0x1c = uVar9;
      p_Var6->wds = iVar5;
    }
    if (uVar8 != 0) {
      *e = (uVar8 - 0x433) + iVar1;
      *bits = 0x35 - iVar1;
      return p_Var6;
    }
    uVar9 = 0x1f;
    if (p_Var6->x[(longlong)iVar5 + -1] != 0) {
      for (; p_Var6->x[(longlong)iVar5 + -1] >> uVar9 == 0; uVar9 = uVar9 - 1) {
      }
    }
    *e = iVar1 + -0x432;
    *bits = iVar5 * 0x20 - (uVar9 ^ 0x1f);
  }
  return p_Var6;
}



char * __strcp_D2A(char *a,char *b)

{
  char cVar1;
  
  cVar1 = *b;
  *a = cVar1;
  while (cVar1 != '\0') {
    b = b + 1;
    cVar1 = *b;
    a = a + 1;
    *a = cVar1;
  }
  return a;
}



__Bigint * __s2b_D2A(char *s,int nd0,int nd,ULong y9,int dplen)

{
  char cVar1;
  int iVar2;
  __Bigint *b;
  int k;
  char *pcVar3;
  char *pcVar4;
  
                    // Unresolved local var: __Bigint * b@[???]
                    // Unresolved local var: int i@[???]
                    // Unresolved local var: int k@[???]
                    // Unresolved local var: long x@[???]
                    // Unresolved local var: long y@[???]
  if (nd < 10) {
    k = 0;
  }
  else {
    iVar2 = 1;
    k = 0;
    do {
      iVar2 = iVar2 * 2;
      k = k + 1;
    } while (iVar2 < (nd + 8) / 9);
  }
  b = __Balloc_D2A(k);
  b->x[0] = y9;
  b->wds = 1;
  if (nd0 < 10) {
    pcVar3 = s + 9;
    nd0 = 9;
  }
  else {
    pcVar3 = s + 9;
    do {
      cVar1 = *pcVar3;
      pcVar3 = pcVar3 + 1;
      b = __multadd_D2A(b,10,cVar1 + -0x30);
    } while (pcVar3 != s + (uint)nd0);
  }
  pcVar3 = pcVar3 + dplen;
  if (nd0 < nd) {
    pcVar4 = pcVar3 + (uint)(nd - nd0);
    do {
      cVar1 = *pcVar3;
      pcVar3 = pcVar3 + 1;
      b = __multadd_D2A(b,10,cVar1 + -0x30);
    } while (pcVar3 != pcVar4);
  }
  return b;
}



double __ratio_D2A(__Bigint *a,__Bigint *b)

{
  int iVar1;
  double dVar2;
  double dVar3;
  int ka;
  int kb;
  
                    // Unresolved local var: _dbl_union da@[???]
                    // Unresolved local var: _dbl_union db@[???]
                    // Unresolved local var: int k@[???]
  dVar2 = __b2d_D2A(a,&ka);
  dVar3 = __b2d_D2A(b,&kb);
  iVar1 = ((a->wds - b->wds) * 0x20 + ka) - kb;
  if (iVar1 < 1) {
    dVar3 = (double)((ulonglong)dVar3 & 0xffffffff |
                    (ulonglong)(uint)((int)((ulonglong)dVar3 >> 0x20) + iVar1 * -0x100000) << 0x20);
  }
  else {
    dVar2 = (double)((ulonglong)dVar2 & 0xffffffff |
                    (ulonglong)(uint)((int)((ulonglong)dVar2 >> 0x20) + iVar1 * 0x100000) << 0x20);
  }
  return dVar2 / dVar3;
}



int __match_D2A(char **sp,char *t)

{
  char cVar1;
  int iVar2;
  char *pcVar3;
  
                    // Unresolved local var: int c@[???]
                    // Unresolved local var: int d@[???]
                    // Unresolved local var: char * s@[???]
  pcVar3 = *sp;
  do {
    cVar1 = *t;
    t = t + 1;
    pcVar3 = pcVar3 + 1;
    if (cVar1 == 0) {
      *sp = pcVar3;
      return 1;
    }
    iVar2 = (int)*pcVar3;
    if (iVar2 - 0x41U < 0x1a) {
      iVar2 = iVar2 + 0x20;
    }
  } while (iVar2 == cVar1);
  return 0;
}



void __copybits_D2A(ULong *c,int n,__Bigint *b)

{
  ULong *pUVar1;
  ULong *pUVar2;
  ULong *pUVar3;
  ULong *pUVar4;
  ULong *pUVar5;
  
                    // Unresolved local var: ULong * ce@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * xe@[???]
  pUVar4 = b->x;
  pUVar1 = c + ((n + -1 >> 5) + 1);
  pUVar2 = pUVar4 + b->wds;
  pUVar5 = c;
  if (pUVar4 < pUVar2) {
    do {
      pUVar3 = pUVar4 + 1;
      *pUVar5 = *pUVar4;
      pUVar4 = pUVar3;
      pUVar5 = pUVar5 + 1;
    } while (pUVar3 < pUVar2);
    c = (ULong *)((longlong)c + ((longlong)pUVar2 + (-0x19 - (longlong)b) & 0xfffffffffffffffcU) + 4
                 );
  }
  if (pUVar1 <= c) {
    return;
  }
  memset(c,0,((longlong)pUVar1 + (-1 - (longlong)c) & 0xfffffffffffffffcU) + 4);
  return;
}



ULong __any_on_D2A(__Bigint *b,int k)

{
  ULong *pUVar1;
  int *piVar2;
  int iVar3;
  ULong *pUVar4;
  sbyte sVar5;
  int iVar6;
  
                    // Unresolved local var: int n@[???]
                    // Unresolved local var: int nwds@[???]
                    // Unresolved local var: ULong * x@[???]
                    // Unresolved local var: ULong * x0@[???]
                    // Unresolved local var: ULong x1@[???]
                    // Unresolved local var: ULong x2@[???]
  pUVar1 = b->x;
  iVar3 = b->wds;
  iVar6 = k >> 5;
  if (iVar3 < iVar6) {
    pUVar4 = pUVar1 + iVar3;
  }
  else {
    pUVar4 = pUVar1 + iVar6;
    if (((iVar6 < iVar3) && ((k & 0x1fU) != 0)) &&
       (sVar5 = (sbyte)(k & 0x1fU), *pUVar4 != (*pUVar4 >> sVar5) << sVar5)) {
      return 1;
    }
  }
  do {
    if (pUVar4 <= pUVar1) {
      return 0;
    }
    piVar2 = (int *)(pUVar4 + -1);
    pUVar4 = pUVar4 + -1;
  } while (*piVar2 == 0);
  return 1;
}



size_t strnlen(char *s,size_t maxlen)

{
  char *pcVar1;
  size_t sVar2;
  
                    // Unresolved local var: char * s2@[DW_OP_reg2(RCX)]
  sVar2 = 0;
  pcVar1 = s;
  if (maxlen != 0) {
    do {
      if (*pcVar1 == '\0') {
        return sVar2;
      }
      pcVar1 = pcVar1 + 1;
      sVar2 = (longlong)pcVar1 - (longlong)s;
    } while (sVar2 < maxlen);
  }
  return sVar2;
}



size_t wcsnlen(wchar_t *w,size_t ncnt)

{
  size_t sVar1;
  
                    // Unresolved local var: size_t n@[???]
  sVar1 = 0;
  if (ncnt != 0) {
    do {
      if (w[sVar1] == L'\0') {
        return sVar1;
      }
      sVar1 = sVar1 + 1;
    } while (ncnt != sVar1);
  }
  return ncnt;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int * __p__fmode(void)

{
  return (int *)_fmode_exref;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

int * __p__commode(void)

{
  return (int *)_commode_exref;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

char ** __p__acmdln(void)

{
  return (char **)_acmdln_exref;
}



errno_t mingw_rand_s(uint *pval)

{
  BOOLEAN BVar1;
  
  if ((pval != (uint *)0x0) && (pRtlGenRandom != (_func_BOOLEAN_void_ptr_ULONG *)0x0)) {
    BVar1 = (*pRtlGenRandom)(pval,4);
    if (BVar1 != '\0') {
      return 0;
    }
  }
  return 0x16;
}



errno_t init_rand_s(uint *val)

{
  errno_t eVar1;
  HMODULE pHVar2;
  code *pcVar3;
  
                    // Unresolved local var: _func_int_uint_ptr * func@[???]
  pHVar2 = GetModuleHandleW(L"msvcrt.dll");
  pcVar3 = GetProcAddress(pHVar2,"rand_s");
  if (pcVar3 == (_func_errno_t_uint_ptr *)0x0) {
    pHVar2 = LoadLibraryW(L"advapi32.dll");
    pRtlGenRandom = (_func_BOOLEAN_void_ptr_ULONG *)GetProcAddress(pHVar2,"SystemFunction036");
    pcVar3 = mingw_rand_s;
  }
  __imp_rand_s = pcVar3;
  eVar1 = (*pcVar3)(val);
  return eVar1;
}



errno_t rand_s(uint *val)

{
  errno_t eVar1;
  
                    // WARNING: Could not recover jumptable at 0x00014001fe90. Too many branches
                    // WARNING: Treating indirect jump as call
  eVar1 = (*__imp_rand_s)(val);
  return eVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

_invalid_parameter_handler mingw_get_invalid_parameter_handler(void)

{
  return handler;
}



_invalid_parameter_handler
mingw_set_invalid_parameter_handler(_invalid_parameter_handler new_handler)

{
  _invalid_parameter_handler p_Var1;
  
  p_Var1 = handler;
  LOCK();
  handler = new_handler;
  UNLOCK();
  return p_Var1;
}



FILE * __acrt_iob_func(uint index)

{
  FILE *pFVar1;
  
  pFVar1 = __iob_func();
  return (FILE *)(pFVar1 + index);
}



int __wcrtomb_cp(char *dst,wchar_t wc,uint cp,uint mb_max)

{
  int iVar1;
  int *piVar2;
  wchar_t local_res10 [12];
  int invalid_char;
  
  local_res10[0] = wc;
  if (cp == 0) {
    if (0xff < (ushort)wc) {
LAB_14001ff60:
      piVar2 = _errno();
      *piVar2 = 0x2a;
      return -1;
    }
    *dst = (char)wc;
    iVar1 = 1;
  }
  else {
                    // Unresolved local var: int size@[???]
    invalid_char = 0;
    iVar1 = WideCharToMultiByte(cp,0,local_res10,1,dst,mb_max,(LPCSTR)0x0,&invalid_char);
    if ((iVar1 == 0) || (invalid_char != 0)) goto LAB_14001ff60;
  }
  return iVar1;
}



size_t wcrtomb(char *dst,wchar_t wc,mbstate_t *ps)

{
  uint mb_max;
  UINT cp;
  int iVar1;
  char byte_bucket [5];
  
                    // Unresolved local var: char * tmp_dst@[???]
  if (dst == (char *)0x0) {
    dst = byte_bucket;
  }
  mb_max = ___mb_cur_max_func();
  cp = ___lc_codepage_func();
  iVar1 = __wcrtomb_cp(dst,wc,cp,mb_max);
  return (longlong)iVar1;
}



size_t wcsrtombs(char *dst,wchar_t **src,size_t len,mbstate_t *ps)

{
  UINT cp;
  uint mb_max;
  int iVar1;
  wchar_t *pwVar2;
  size_t sVar3;
  char byte_bucket [5];
  
                    // Unresolved local var: int ret@[???]
                    // Unresolved local var: size_t n@[???]
                    // Unresolved local var: uint cp@[???]
                    // Unresolved local var: uint mb_max@[???]
                    // Unresolved local var: wchar_t * pwc@[???]
  sVar3 = 0;
  cp = ___lc_codepage_func();
  mb_max = ___mb_cur_max_func();
  pwVar2 = *src;
  if (pwVar2 != (wchar_t *)0x0) {
    if (dst == (char *)0x0) {
      while (iVar1 = __wcrtomb_cp(byte_bucket,*pwVar2,cp,mb_max), 0 < iVar1) {
        sVar3 = sVar3 + (longlong)iVar1;
        if (byte_bucket[iVar1 + -1] == '\0') {
          return sVar3 - 1;
        }
        pwVar2 = pwVar2 + 1;
      }
LAB_140020053:
      sVar3 = 0xffffffffffffffff;
    }
    else {
      if (len != 0) {
        do {
          iVar1 = __wcrtomb_cp(dst,*pwVar2,cp,mb_max);
          if (iVar1 < 1) goto LAB_140020053;
          dst = dst + iVar1;
          sVar3 = sVar3 + (longlong)iVar1;
          if (dst[-1] == '\0') {
            *src = (wchar_t *)0x0;
            return sVar3 - 1;
          }
          pwVar2 = pwVar2 + 1;
        } while (sVar3 < len);
      }
      *src = pwVar2;
    }
  }
  return sVar3;
}



int __mbrtowc_cp(wchar_t *pwc,char *s,size_t n,mbstate_t *ps,uint cp,uint mb_max)

{
  BYTE TestChar;
  BOOL BVar1;
  int iVar2;
  int *piVar3;
  anon_union_4_2_626584ff shift_state;
  
  if (s == (char *)0x0) {
    return 0;
  }
  if (n == 0) {
    return -2;
  }
  shift_state.val = *ps;
  TestChar = *s;
  *ps = 0;
  if (TestChar == '\0') {
    *pwc = L'\0';
    return 0;
  }
  if (mb_max < 2) {
LAB_140020190:
    if (cp == 0) {
      *pwc = (ushort)(byte)*s;
      return 1;
    }
    iVar2 = MultiByteToWideChar(cp,8,s,1,pwc,1);
    if (iVar2 != 0) {
      return 1;
    }
  }
  else {
    if (shift_state.mbcs[0] == '\0') {
      BVar1 = IsDBCSLeadByteEx(cp,TestChar);
      if (BVar1 == 0) goto LAB_140020190;
      if (n == 1) {
        *(char *)ps = *s;
        return -2;
      }
    }
    else {
      shift_state.val._2_2_ = (undefined2)((uint)shift_state >> 0x10);
      shift_state.mbcs[1] = TestChar;
      s = (char *)&shift_state;
    }
    iVar2 = MultiByteToWideChar(cp,8,s,2,pwc,1);
    if (iVar2 != 0) {
      return 2;
    }
  }
  piVar3 = _errno();
  *piVar3 = 0x2a;
  return -1;
}



size_t mbrtowc(wchar_t *pwc,char *s,size_t n,mbstate_t *ps)

{
  uint mb_max;
  UINT cp;
  int iVar1;
  mbstate_t *ps_00;
  wchar_t byte_bucket;
  
                    // Unresolved local var: wchar_t * dst@[???]
  byte_bucket = L'\0';
  if (pwc == (wchar_t *)0x0) {
    pwc = &byte_bucket;
  }
  mb_max = ___mb_cur_max_func();
  cp = ___lc_codepage_func();
  ps_00 = &mbrtowc::internal_mbstate;
  if (ps != (mbstate_t *)0x0) {
    ps_00 = ps;
  }
  iVar1 = __mbrtowc_cp(pwc,s,n,ps_00,cp,mb_max);
  return (longlong)iVar1;
}



size_t mbsrtowcs(wchar_t *dst,char **src,size_t len,mbstate_t *ps)

{
  UINT cp;
  uint mb_max;
  int iVar1;
  char *s;
  ulonglong uVar2;
  wchar_t byte_bucket;
  
                    // Unresolved local var: int ret@[???]
                    // Unresolved local var: size_t n@[???]
                    // Unresolved local var: mbstate_t * internal_ps@[???]
                    // Unresolved local var: uint cp@[???]
                    // Unresolved local var: uint mb_max@[???]
  if (ps == (mbstate_t *)0x0) {
    ps = &mbsrtowcs::internal_mbstate;
  }
  cp = ___lc_codepage_func();
  mb_max = ___mb_cur_max_func();
  if ((src == (char **)0x0) || (s = *src, s == (char *)0x0)) {
    uVar2 = 0;
  }
  else if (dst == (wchar_t *)0x0) {
    uVar2 = 0;
    byte_bucket = L'\0';
    while (iVar1 = __mbrtowc_cp(&byte_bucket,s + uVar2,(ulonglong)mb_max,ps,cp,mb_max), 0 < iVar1) {
      s = *src;
      uVar2 = uVar2 + (longlong)iVar1;
    }
  }
  else {
    uVar2 = 0;
    if (len != 0) {
      do {
        iVar1 = __mbrtowc_cp(dst,s,len - uVar2,ps,cp,mb_max);
        if (iVar1 < 1) {
          if (len <= uVar2) {
            return uVar2;
          }
          if (iVar1 != 0) {
            return uVar2;
          }
          *src = (char *)0x0;
          return uVar2;
        }
        dst = dst + 1;
        uVar2 = uVar2 + (longlong)iVar1;
        s = *src + iVar1;
        *src = s;
      } while (uVar2 < len);
    }
  }
  return uVar2;
}



size_t mbrlen(char *s,size_t n,mbstate_t *ps)

{
  uint mb_max;
  UINT cp;
  int iVar1;
  wchar_t byte_bucket;
  
  byte_bucket = L'\0';
  mb_max = ___mb_cur_max_func();
  cp = ___lc_codepage_func();
  if (ps == (mbstate_t *)0x0) {
    ps = &mbrlen::s_mbstate;
  }
  iVar1 = __mbrtowc_cp(&byte_bucket,s,n,ps,cp,mb_max);
  return (longlong)iVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

EXCEPTION_DISPOSITION
__C_specific_handler
          (_EXCEPTION_RECORD *ExceptionRecord,void *EstablisherFrame,_CONTEXT *ContextRecord,
          _DISPATCHER_CONTEXT *DispatcherContext)

{
  EXCEPTION_DISPOSITION EVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020430. Too many branches
                    // WARNING: Treating indirect jump as call
  EVar1 = __C_specific_handler(ExceptionRecord,EstablisherFrame,ContextRecord,DispatcherContext);
  return EVar1;
}



UINT __cdecl ___lc_codepage_func(void)

{
  UINT UVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020438. Too many branches
                    // WARNING: Treating indirect jump as call
  UVar1 = ___lc_codepage_func();
  return UVar1;
}



int __cdecl ___mb_cur_max_func(void)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020440. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = ___mb_cur_max_func();
  return iVar1;
}



void __getmainargs(void)

{
                    // WARNING: Could not recover jumptable at 0x000140020448. Too many branches
                    // WARNING: Treating indirect jump as call
  __getmainargs();
  return;
}



FILE * __cdecl __iob_func(void)

{
  FILE *pFVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020450. Too many branches
                    // WARNING: Treating indirect jump as call
  pFVar1 = __iob_func();
  return pFVar1;
}



void __cdecl __set_app_type(int param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140020458. Too many branches
                    // WARNING: Treating indirect jump as call
  __set_app_type(param_1);
  return;
}



void __setusermatherr(void)

{
                    // WARNING: Could not recover jumptable at 0x000140020460. Too many branches
                    // WARNING: Treating indirect jump as call
  __setusermatherr();
  return;
}



void __cdecl _amsg_exit(int param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140020468. Too many branches
                    // WARNING: Treating indirect jump as call
  _amsg_exit(param_1);
  return;
}



void __cdecl _cexit(void)

{
                    // WARNING: Could not recover jumptable at 0x000140020470. Too many branches
                    // WARNING: Treating indirect jump as call
  _cexit();
  return;
}



int * __cdecl _errno(void)

{
  int *piVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020478. Too many branches
                    // WARNING: Treating indirect jump as call
  piVar1 = _errno();
  return piVar1;
}



int __cdecl __ms_fwprintf(FILE *_File,wchar_t *_Format,...)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020480. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = fwprintf(_File,_Format);
  return iVar1;
}



void _initterm(void)

{
                    // WARNING: Could not recover jumptable at 0x000140020488. Too many branches
                    // WARNING: Treating indirect jump as call
  _initterm();
  return;
}



int __cdecl _ismbblead(uint _C)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020490. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = _ismbblead(_C);
  return iVar1;
}



_onexit_t __cdecl _onexit(_onexit_t _Func)

{
  _onexit_t p_Var1;
  
                    // WARNING: Could not recover jumptable at 0x000140020498. Too many branches
                    // WARNING: Treating indirect jump as call
  p_Var1 = _onexit(_Func);
  return p_Var1;
}



void __cdecl abort(void)

{
                    // WARNING: Could not recover jumptable at 0x0001400204a0. Too many branches
                    // WARNING: Subroutine does not return
                    // WARNING: Treating indirect jump as call
  abort();
  return;
}



void * __cdecl calloc(size_t _Count,size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204a8. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = calloc(_Count,_Size);
  return pvVar1;
}



void __cdecl exit(int _Code)

{
                    // WARNING: Could not recover jumptable at 0x0001400204b0. Too many branches
                    // WARNING: Subroutine does not return
                    // WARNING: Treating indirect jump as call
  exit(_Code);
  return;
}



int __cdecl fprintf(FILE *_File,char *_Format,...)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204b8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = fprintf(_File,_Format);
  return iVar1;
}



int __cdecl fputc(int _Ch,FILE *_File)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204c0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = fputc(_Ch,_File);
  return iVar1;
}



int __cdecl fputs(char *_Str,FILE *_File)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204c8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = fputs(_Str,_File);
  return iVar1;
}



wint_t __cdecl fputwc(wchar_t _Ch,FILE *_File)

{
  wint_t wVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204d0. Too many branches
                    // WARNING: Treating indirect jump as call
  wVar1 = fputwc(_Ch,_File);
  return wVar1;
}



void __cdecl free(void *_Memory)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(_Memory);
  return;
}



size_t __cdecl fwrite(void *_Str,size_t _Size,size_t _Count,FILE *_File)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204e0. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = fwrite(_Str,_Size,_Count,_File);
  return sVar1;
}



char * __cdecl getenv(char *_VarName)

{
  char *pcVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204e8. Too many branches
                    // WARNING: Treating indirect jump as call
  pcVar1 = getenv(_VarName);
  return pcVar1;
}



int __cdecl iswalnum(wint_t _C)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204f0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = iswalnum(_C);
  return iVar1;
}



int __cdecl iswalpha(wint_t _C)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400204f8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = iswalpha(_C);
  return iVar1;
}



int __cdecl iswctype(wint_t _C,wctype_t _Type)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020500. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = iswctype(_C,_Type);
  return iVar1;
}



int __cdecl iswdigit(wint_t _C)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020508. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = iswdigit(_C);
  return iVar1;
}



int __cdecl iswxdigit(wint_t _C)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020510. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = iswxdigit(_C);
  return iVar1;
}



lconv * __cdecl localeconv(void)

{
  lconv *plVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020518. Too many branches
                    // WARNING: Treating indirect jump as call
  plVar1 = localeconv();
  return plVar1;
}



void * __cdecl malloc(size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020520. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = malloc(_Size);
  return pvVar1;
}



void * __cdecl memchr(void *_Buf,int _Val,size_t _MaxCount)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020528. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = memchr(_Buf,_Val,_MaxCount);
  return pvVar1;
}



int __cdecl memcmp(void *_Buf1,void *_Buf2,size_t _Size)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020530. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = memcmp(_Buf1,_Buf2,_Size);
  return iVar1;
}



void * __cdecl memcpy(void *_Dst,void *_Src,size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020538. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = memcpy(_Dst,_Src,_Size);
  return pvVar1;
}



void * __cdecl memmove(void *_Dst,void *_Src,size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020540. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = memmove(_Dst,_Src,_Size);
  return pvVar1;
}



void * __cdecl memset(void *_Dst,int _Val,size_t _Size)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020548. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = memset(_Dst,_Val,_Size);
  return pvVar1;
}



void * __cdecl realloc(void *_Memory,size_t _NewSize)

{
  void *pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020550. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = realloc(_Memory,_NewSize);
  return pvVar1;
}



char * __cdecl setlocale(int _Category,char *_Locale)

{
  char *pcVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020558. Too many branches
                    // WARNING: Treating indirect jump as call
  pcVar1 = setlocale(_Category,_Locale);
  return pcVar1;
}



// WARNING: Unknown calling convention -- yet parameter storage is locked

void signal(int param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140020560. Too many branches
                    // WARNING: Treating indirect jump as call
  signal(param_1);
  return;
}



char * __cdecl strchr(char *_Str,int _Val)

{
  char *pcVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020568. Too many branches
                    // WARNING: Treating indirect jump as call
  pcVar1 = strchr(_Str,_Val);
  return pcVar1;
}



int __cdecl strcmp(char *_Str1,char *_Str2)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020570. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = strcmp(_Str1,_Str2);
  return iVar1;
}



int __cdecl strcoll(char *_Str1,char *_Str2)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020578. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = strcoll(_Str1,_Str2);
  return iVar1;
}



char * __cdecl strerror(int param_1)

{
  char *pcVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020580. Too many branches
                    // WARNING: Treating indirect jump as call
  pcVar1 = strerror(param_1);
  return pcVar1;
}



size_t __cdecl strftime(char *_Buf,size_t _SizeInBytes,char *_Format,tm *_Tm)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020588. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = strftime(_Buf,_SizeInBytes,_Format,_Tm);
  return sVar1;
}



size_t __cdecl strlen(char *_Str)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020590. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = strlen(_Str);
  return sVar1;
}



int __cdecl strncmp(char *_Str1,char *_Str2,size_t _MaxCount)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020598. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = strncmp(_Str1,_Str2,_MaxCount);
  return iVar1;
}



ulong __cdecl strtoul(char *_Str,char **_EndPtr,int _Radix)

{
  ulong uVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205a0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = strtoul(_Str,_EndPtr,_Radix);
  return uVar1;
}



size_t __cdecl strxfrm(char *_Dst,char *_Src,size_t _MaxCount)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205a8. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = strxfrm(_Dst,_Src,_MaxCount);
  return sVar1;
}



wint_t __cdecl towlower(wint_t _C)

{
  wint_t wVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205b0. Too many branches
                    // WARNING: Treating indirect jump as call
  wVar1 = towlower(_C);
  return wVar1;
}



wint_t __cdecl towupper(wint_t _C)

{
  wint_t wVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205b8. Too many branches
                    // WARNING: Treating indirect jump as call
  wVar1 = towupper(_C);
  return wVar1;
}



int __cdecl vfprintf(FILE *_File,char *_Format,va_list _ArgList)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205c0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = vfprintf(_File,_Format,_ArgList);
  return iVar1;
}



int __cdecl wcscoll(wchar_t *_Str1,wchar_t *_Str2)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205c8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = wcscoll(_Str1,_Str2);
  return iVar1;
}



wchar_t * __cdecl wcscpy(wchar_t *_Dest,wchar_t *_Source)

{
  wchar_t *pwVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205d0. Too many branches
                    // WARNING: Treating indirect jump as call
  pwVar1 = wcscpy(_Dest,_Source);
  return pwVar1;
}



size_t __cdecl wcsftime(wchar_t *_Buf,size_t _SizeInWords,wchar_t *_Format,tm *_Tm)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205d8. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = wcsftime(_Buf,_SizeInWords,_Format,_Tm);
  return sVar1;
}



size_t __cdecl wcslen(wchar_t *_Str)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205e0. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = wcslen(_Str);
  return sVar1;
}



size_t __cdecl wcsxfrm(wchar_t *_Dst,wchar_t *_Src,size_t _MaxCount)

{
  size_t sVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205e8. Too many branches
                    // WARNING: Treating indirect jump as call
  sVar1 = wcsxfrm(_Dst,_Src,_MaxCount);
  return sVar1;
}



int __cdecl read(int _FileHandle,void *_DstBuf,uint _MaxCharCount)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400205f0. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = _read(_FileHandle,_DstBuf,_MaxCharCount);
  return iVar1;
}



BOOL __stdcall
WriteFile(HANDLE hFile,LPCVOID lpBuffer,DWORD nNumberOfBytesToWrite,LPDWORD lpNumberOfBytesWritten,
         LPOVERLAPPED lpOverlapped)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020600. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = WriteFile(hFile,lpBuffer,nNumberOfBytesToWrite,lpNumberOfBytesWritten,lpOverlapped);
  return BVar1;
}



int __stdcall
WideCharToMultiByte(UINT CodePage,DWORD dwFlags,LPCWSTR lpWideCharStr,int cchWideChar,
                   LPSTR lpMultiByteStr,int cbMultiByte,LPCSTR lpDefaultChar,
                   LPBOOL lpUsedDefaultChar)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020608. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = WideCharToMultiByte(CodePage,dwFlags,lpWideCharStr,cchWideChar,lpMultiByteStr,cbMultiByte,
                              lpDefaultChar,lpUsedDefaultChar);
  return iVar1;
}



void __stdcall WakeConditionVariable(PCONDITION_VARIABLE ConditionVariable)

{
                    // WARNING: Could not recover jumptable at 0x000140020610. Too many branches
                    // WARNING: Treating indirect jump as call
  WakeConditionVariable(ConditionVariable);
  return;
}



void __stdcall WakeAllConditionVariable(PCONDITION_VARIABLE ConditionVariable)

{
                    // WARNING: Could not recover jumptable at 0x000140020618. Too many branches
                    // WARNING: Treating indirect jump as call
  WakeAllConditionVariable(ConditionVariable);
  return;
}



DWORD __stdcall WaitForSingleObject(HANDLE hHandle,DWORD dwMilliseconds)

{
  DWORD DVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020620. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar1 = WaitForSingleObject(hHandle,dwMilliseconds);
  return DVar1;
}



SIZE_T __stdcall VirtualQuery(LPCVOID lpAddress,PMEMORY_BASIC_INFORMATION lpBuffer,SIZE_T dwLength)

{
  SIZE_T SVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020628. Too many branches
                    // WARNING: Treating indirect jump as call
  SVar1 = VirtualQuery(lpAddress,lpBuffer,dwLength);
  return SVar1;
}



BOOL __stdcall
VirtualProtect(LPVOID lpAddress,SIZE_T dwSize,DWORD flNewProtect,PDWORD lpflOldProtect)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020630. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = VirtualProtect(lpAddress,dwSize,flNewProtect,lpflOldProtect);
  return BVar1;
}



BOOL __stdcall TryEnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020638. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = TryEnterCriticalSection(lpCriticalSection);
  return BVar1;
}



BOOL __stdcall TlsSetValue(DWORD dwTlsIndex,LPVOID lpTlsValue)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020640. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = TlsSetValue(dwTlsIndex,lpTlsValue);
  return BVar1;
}



LPVOID __stdcall TlsGetValue(DWORD dwTlsIndex)

{
  LPVOID pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020648. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = TlsGetValue(dwTlsIndex);
  return pvVar1;
}



BOOL __stdcall TlsFree(DWORD dwTlsIndex)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020650. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = TlsFree(dwTlsIndex);
  return BVar1;
}



DWORD __stdcall TlsAlloc(void)

{
  DWORD DVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020658. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar1 = TlsAlloc();
  return DVar1;
}



BOOL __stdcall
SleepConditionVariableCS
          (PCONDITION_VARIABLE ConditionVariable,PCRITICAL_SECTION CriticalSection,
          DWORD dwMilliseconds)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020660. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = SleepConditionVariableCS(ConditionVariable,CriticalSection,dwMilliseconds);
  return BVar1;
}



void __stdcall Sleep(DWORD dwMilliseconds)

{
                    // WARNING: Could not recover jumptable at 0x000140020668. Too many branches
                    // WARNING: Treating indirect jump as call
  Sleep(dwMilliseconds);
  return;
}



LPTOP_LEVEL_EXCEPTION_FILTER __stdcall
SetUnhandledExceptionFilter(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter)

{
  LPTOP_LEVEL_EXCEPTION_FILTER pPVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020670. Too many branches
                    // WARNING: Treating indirect jump as call
  pPVar1 = SetUnhandledExceptionFilter(lpTopLevelExceptionFilter);
  return pPVar1;
}



void __stdcall SetLastError(DWORD dwErrCode)

{
                    // WARNING: Could not recover jumptable at 0x000140020678. Too many branches
                    // WARNING: Treating indirect jump as call
  SetLastError(dwErrCode);
  return;
}



BOOL __stdcall SetHandleInformation(HANDLE hObject,DWORD dwMask,DWORD dwFlags)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020680. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = SetHandleInformation(hObject,dwMask,dwFlags);
  return BVar1;
}



PEXCEPTION_ROUTINE __stdcall
RtlVirtualUnwind(DWORD HandlerType,DWORD64 ImageBase,DWORD64 ControlPc,
                PRUNTIME_FUNCTION FunctionEntry,PCONTEXT ContextRecord,PVOID *HandlerData,
                PDWORD64 EstablisherFrame,PKNONVOLATILE_CONTEXT_POINTERS ContextPointers)

{
  PEXCEPTION_ROUTINE puVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020688. Too many branches
                    // WARNING: Treating indirect jump as call
  puVar1 = RtlVirtualUnwind(HandlerType,ImageBase,ControlPc,FunctionEntry,ContextRecord,HandlerData,
                            EstablisherFrame,ContextPointers);
  return puVar1;
}



void __stdcall
RtlUnwindEx(PVOID TargetFrame,PVOID TargetIp,PEXCEPTION_RECORD ExceptionRecord,PVOID ReturnValue,
           PCONTEXT ContextRecord,PUNWIND_HISTORY_TABLE HistoryTable)

{
                    // WARNING: Could not recover jumptable at 0x000140020690. Too many branches
                    // WARNING: Treating indirect jump as call
  RtlUnwindEx(TargetFrame,TargetIp,ExceptionRecord,ReturnValue,ContextRecord,HistoryTable);
  return;
}



PRUNTIME_FUNCTION __stdcall
RtlLookupFunctionEntry(DWORD64 ControlPc,PDWORD64 ImageBase,PUNWIND_HISTORY_TABLE HistoryTable)

{
  PRUNTIME_FUNCTION p_Var1;
  
                    // WARNING: Could not recover jumptable at 0x000140020698. Too many branches
                    // WARNING: Treating indirect jump as call
  p_Var1 = RtlLookupFunctionEntry(ControlPc,ImageBase,HistoryTable);
  return p_Var1;
}



BOOL __stdcall
ReadFile(HANDLE hFile,LPVOID lpBuffer,DWORD nNumberOfBytesToRead,LPDWORD lpNumberOfBytesRead,
        LPOVERLAPPED lpOverlapped)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206a8. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = ReadFile(hFile,lpBuffer,nNumberOfBytesToRead,lpNumberOfBytesRead,lpOverlapped);
  return BVar1;
}



void __stdcall
RaiseException(DWORD dwExceptionCode,DWORD dwExceptionFlags,DWORD nNumberOfArguments,
              ULONG_PTR *lpArguments)

{
                    // WARNING: Could not recover jumptable at 0x0001400206b0. Too many branches
                    // WARNING: Treating indirect jump as call
  RaiseException(dwExceptionCode,dwExceptionFlags,nNumberOfArguments,lpArguments);
  return;
}



int __stdcall
MultiByteToWideChar(UINT CodePage,DWORD dwFlags,LPCSTR lpMultiByteStr,int cbMultiByte,
                   LPWSTR lpWideCharStr,int cchWideChar)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206b8. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = MultiByteToWideChar(CodePage,dwFlags,lpMultiByteStr,cbMultiByte,lpWideCharStr,cchWideChar)
  ;
  return iVar1;
}



HLOCAL __stdcall LocalFree(HLOCAL hMem)

{
  HLOCAL pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206c0. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = LocalFree(hMem);
  return pvVar1;
}



HMODULE __stdcall LoadLibraryW(LPCWSTR lpLibFileName)

{
  HMODULE pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206c8. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = LoadLibraryW(lpLibFileName);
  return pHVar1;
}



void __stdcall LeaveCriticalSection(LPCRITICAL_SECTION lpCriticalSection)

{
                    // WARNING: Could not recover jumptable at 0x0001400206d0. Too many branches
                    // WARNING: Treating indirect jump as call
  LeaveCriticalSection(lpCriticalSection);
  return;
}



BOOL __stdcall IsDBCSLeadByteEx(UINT CodePage,BYTE TestChar)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206d8. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = IsDBCSLeadByteEx(CodePage,TestChar);
  return BVar1;
}



void __stdcall InitializeCriticalSection(LPCRITICAL_SECTION lpCriticalSection)

{
                    // WARNING: Could not recover jumptable at 0x0001400206e0. Too many branches
                    // WARNING: Treating indirect jump as call
  InitializeCriticalSection(lpCriticalSection);
  return;
}



void __stdcall InitializeConditionVariable(PCONDITION_VARIABLE ConditionVariable)

{
                    // WARNING: Could not recover jumptable at 0x0001400206e8. Too many branches
                    // WARNING: Treating indirect jump as call
  InitializeConditionVariable(ConditionVariable);
  return;
}



DWORD __stdcall GetThreadId(HANDLE Thread)

{
  DWORD DVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206f0. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar1 = GetThreadId(Thread);
  return DVar1;
}



DWORD __stdcall GetTempPathW(DWORD nBufferLength,LPWSTR lpBuffer)

{
  DWORD DVar1;
  
                    // WARNING: Could not recover jumptable at 0x0001400206f8. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar1 = GetTempPathW(nBufferLength,lpBuffer);
  return DVar1;
}



void __stdcall GetSystemTimeAsFileTime(LPFILETIME lpSystemTimeAsFileTime)

{
                    // WARNING: Could not recover jumptable at 0x000140020700. Too many branches
                    // WARNING: Treating indirect jump as call
  GetSystemTimeAsFileTime(lpSystemTimeAsFileTime);
  return;
}



void __stdcall GetStartupInfoA(LPSTARTUPINFOA lpStartupInfo)

{
                    // WARNING: Could not recover jumptable at 0x000140020708. Too many branches
                    // WARNING: Treating indirect jump as call
  GetStartupInfoA(lpStartupInfo);
  return;
}



FARPROC __stdcall GetProcAddress(HMODULE hModule,LPCSTR lpProcName)

{
  FARPROC pFVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020710. Too many branches
                    // WARNING: Treating indirect jump as call
  pFVar1 = GetProcAddress(hModule,lpProcName);
  return pFVar1;
}



HMODULE __stdcall GetModuleHandleW(LPCWSTR lpModuleName)

{
  HMODULE pHVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020718. Too many branches
                    // WARNING: Treating indirect jump as call
  pHVar1 = GetModuleHandleW(lpModuleName);
  return pHVar1;
}



DWORD __stdcall GetLastError(void)

{
  DWORD DVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020720. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar1 = GetLastError();
  return DVar1;
}



BOOL __stdcall GetExitCodeProcess(HANDLE hProcess,LPDWORD lpExitCode)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020728. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = GetExitCodeProcess(hProcess,lpExitCode);
  return BVar1;
}



BOOL __stdcall FreeLibrary(HMODULE hLibModule)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020730. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = FreeLibrary(hLibModule);
  return BVar1;
}



DWORD __stdcall
FormatMessageA(DWORD dwFlags,LPCVOID lpSource,DWORD dwMessageId,DWORD dwLanguageId,LPSTR lpBuffer,
              DWORD nSize,va_list *Arguments)

{
  DWORD DVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020738. Too many branches
                    // WARNING: Treating indirect jump as call
  DVar1 = FormatMessageA(dwFlags,lpSource,dwMessageId,dwLanguageId,lpBuffer,nSize,Arguments);
  return DVar1;
}



void __stdcall EnterCriticalSection(LPCRITICAL_SECTION lpCriticalSection)

{
                    // WARNING: Could not recover jumptable at 0x000140020740. Too many branches
                    // WARNING: Treating indirect jump as call
  EnterCriticalSection(lpCriticalSection);
  return;
}



void __stdcall DeleteCriticalSection(LPCRITICAL_SECTION lpCriticalSection)

{
                    // WARNING: Could not recover jumptable at 0x000140020748. Too many branches
                    // WARNING: Treating indirect jump as call
  DeleteCriticalSection(lpCriticalSection);
  return;
}



BOOL __stdcall
CreateProcessW(LPCWSTR lpApplicationName,LPWSTR lpCommandLine,
              LPSECURITY_ATTRIBUTES lpProcessAttributes,LPSECURITY_ATTRIBUTES lpThreadAttributes,
              BOOL bInheritHandles,DWORD dwCreationFlags,LPVOID lpEnvironment,
              LPCWSTR lpCurrentDirectory,LPSTARTUPINFOW lpStartupInfo,
              LPPROCESS_INFORMATION lpProcessInformation)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020750. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = CreateProcessW(lpApplicationName,lpCommandLine,lpProcessAttributes,lpThreadAttributes,
                         bInheritHandles,dwCreationFlags,lpEnvironment,lpCurrentDirectory,
                         lpStartupInfo,lpProcessInformation);
  return BVar1;
}



BOOL __stdcall
CreatePipe(PHANDLE hReadPipe,PHANDLE hWritePipe,LPSECURITY_ATTRIBUTES lpPipeAttributes,DWORD nSize)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020758. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = CreatePipe(hReadPipe,hWritePipe,lpPipeAttributes,nSize);
  return BVar1;
}



HANDLE __stdcall
CreateFileW(LPCWSTR lpFileName,DWORD dwDesiredAccess,DWORD dwShareMode,
           LPSECURITY_ATTRIBUTES lpSecurityAttributes,DWORD dwCreationDisposition,
           DWORD dwFlagsAndAttributes,HANDLE hTemplateFile)

{
  HANDLE pvVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020760. Too many branches
                    // WARNING: Treating indirect jump as call
  pvVar1 = CreateFileW(lpFileName,dwDesiredAccess,dwShareMode,lpSecurityAttributes,
                       dwCreationDisposition,dwFlagsAndAttributes,hTemplateFile);
  return pvVar1;
}



BOOL __stdcall CreateDirectoryW(LPCWSTR lpPathName,LPSECURITY_ATTRIBUTES lpSecurityAttributes)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020768. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = CreateDirectoryW(lpPathName,lpSecurityAttributes);
  return BVar1;
}



BOOL __stdcall CloseHandle(HANDLE hObject)

{
  BOOL BVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140020770. Too many branches
                    // WARNING: Treating indirect jump as call
  BVar1 = CloseHandle(hObject);
  return BVar1;
}



int __mingwthr_remove_key_dtor(DWORD key)

{
  __mingwthr_key_t *p_Var1;
  __mingwthr_key_t *_Memory;
  __mingwthr_key_t *p_Var2;
  
  if (__mingwthr_cs_init == 0) {
    return 0;
  }
  EnterCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  if (key_dtor_list != (__mingwthr_key_t *)0x0) {
    p_Var1 = key_dtor_list;
    p_Var2 = (__mingwthr_key_t *)0x0;
    do {
      _Memory = p_Var1;
      p_Var1 = _Memory->next;
      if (_Memory->key == key) {
        if (p_Var2 != (__mingwthr_key_t *)0x0) {
          p_Var2->next = p_Var1;
          p_Var1 = key_dtor_list;
        }
        key_dtor_list = p_Var1;
        free(_Memory);
        break;
      }
      p_Var2 = _Memory;
    } while (p_Var1 != (__mingwthr_key_t *)0x0);
  }
  LeaveCriticalSection((LPCRITICAL_SECTION)&__mingwthr_cs);
  return 0;
}



int __mingwthr_key_dtor(DWORD key,_func_void_void_ptr *dtor)

{
  int iVar1;
  
  if (dtor == (_func_void_void_ptr *)0x0) {
    return 0;
  }
  iVar1 = ___w64_mingwthr_add_key_dtor(key,dtor);
  return iVar1;
}



// ~bad_exception() const

void __thiscall std::bad_exception::~bad_exception(void)

{
  return;
}



// ~exception() const

void __thiscall std::exception::~exception(void)

{
  return;
}



void _text__ZL16get_adjusted_ptrPKSt9type_infoS1_PPv
               (longlong *param_1,longlong *param_2,undefined8 *param_3)

{
  char cVar1;
  undefined8 *local_20;
  
  local_20 = (undefined8 *)*param_3;
  cVar1 = (**(code **)(*param_2 + 0x10))(param_2);
  if (cVar1 != '\0') {
    local_20 = (undefined8 *)*local_20;
  }
  cVar1 = (**(code **)(*param_1 + 0x20))(param_1,param_2,&local_20,1);
  if (cVar1 != '\0') {
    *param_3 = local_20;
  }
  return;
}



// WARNING: Type propagation algorithm not settling

byte * _text__ZL17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info
                 (longlong param_1,byte *param_2,longlong *param_3)

{
  byte bVar1;
  byte bVar2;
  longlong lVar3;
  ulonglong *puVar4;
  ulonglong *puVar5;
  byte bVar6;
  byte *pbVar7;
  byte *pbVar8;
  ulonglong uVar9;
  
  lVar3 = 0;
  if (param_1 != 0) {
    lVar3 = _Unwind_GetRegionStart(param_1);
  }
  *param_3 = lVar3;
  bVar6 = *param_2;
  puVar5 = (ulonglong *)(param_2 + 1);
  if (bVar6 == 0xff) {
    param_3[1] = lVar3;
  }
  else {
    puVar4 = (ulonglong *)_text__ZL21base_of_encoded_valuehP15_Unwind_Context(bVar6,param_1);
    puVar5 = _text__ZL28read_encoded_value_with_basehyPKhPy(bVar6,puVar4,puVar5,param_3 + 1);
  }
  uVar9 = *puVar5;
  pbVar8 = (byte *)((longlong)puVar5 + 1);
  pbVar7 = (byte *)0x0;
  *(char *)(param_3 + 5) = (char)uVar9;
  if ((char)uVar9 != -1) {
    bVar6 = 0;
    do {
      bVar1 = *pbVar8;
      pbVar8 = pbVar8 + 1;
      bVar2 = bVar6 & 0x3f;
      bVar6 = bVar6 + 7;
      pbVar7 = (byte *)((ulonglong)pbVar7 | (ulonglong)(bVar1 & 0x7f) << bVar2);
    } while ((char)bVar1 < '\0');
    pbVar7 = pbVar7 + (longlong)pbVar8;
  }
  param_3[3] = (longlong)pbVar7;
  pbVar7 = pbVar8 + 1;
  uVar9 = 0;
  bVar6 = 0;
  *(byte *)((longlong)param_3 + 0x29) = *pbVar8;
  do {
    bVar1 = *pbVar7;
    pbVar7 = pbVar7 + 1;
    bVar2 = bVar6 & 0x3f;
    bVar6 = bVar6 + 7;
    uVar9 = uVar9 | (ulonglong)(bVar1 & 0x7f) << bVar2;
  } while ((char)bVar1 < '\0');
  param_3[4] = (longlong)(pbVar7 + uVar9);
  return pbVar7;
}



undefined8
_text__ZL20check_exception_specP16lsda_header_infoPKSt9type_infoPvx
          (longlong param_1,longlong *param_2,undefined8 param_3,ulonglong param_4)

{
  byte bVar1;
  byte bVar2;
  undefined8 uVar3;
  byte bVar4;
  byte *pbVar5;
  longlong lVar6;
  ulonglong uVar7;
  undefined8 local_res18 [2];
  longlong *local_30;
  
  pbVar5 = (byte *)(~param_4 + *(longlong *)(param_1 + 0x18));
  local_res18[0] = param_3;
  do {
    uVar7 = 0;
    bVar4 = 0;
    do {
      bVar2 = *pbVar5;
      pbVar5 = pbVar5 + 1;
      bVar1 = bVar4 & 0x3f;
      bVar4 = bVar4 + 7;
      uVar7 = uVar7 | (ulonglong)(bVar2 & 0x7f) << bVar1;
    } while ((char)bVar2 < '\0');
    if (uVar7 == 0) {
      return 0;
    }
    bVar4 = *(byte *)(param_1 + 0x28);
    if (bVar4 == 0xff) {
      lVar6 = 0;
    }
    else {
      bVar2 = bVar4 & 7;
      if (bVar2 == 2) {
        lVar6 = uVar7 * -2;
      }
      else {
        if (bVar2 < 3) {
          if (bVar2 != 0) {
LAB_140020a0c:
                    // WARNING: Subroutine does not return
            abort();
          }
        }
        else {
          lVar6 = uVar7 * -4;
          if (bVar2 == 3) goto LAB_1400209a0;
          if (bVar2 != 4) goto LAB_140020a0c;
        }
        lVar6 = uVar7 * -8;
      }
    }
LAB_1400209a0:
    _text__ZL28read_encoded_value_with_basehyPKhPy
              (bVar4,*(ulonglong **)(param_1 + 0x10),
               (ulonglong *)(lVar6 + *(longlong *)(param_1 + 0x18)),&local_30);
    uVar3 = _text__ZL16get_adjusted_ptrPKSt9type_infoS1_PPv(local_30,param_2,local_res18);
    if ((char)uVar3 != '\0') {
      return uVar3;
    }
  } while( true );
}



longlong _text__ZL21base_of_encoded_valuehP15_Unwind_Context(byte param_1,longlong param_2)

{
  byte bVar1;
  longlong lVar2;
  
  if (param_1 != 0xff) {
    bVar1 = param_1 & 0x70;
    if (bVar1 == 0x30) {
      lVar2 = _Unwind_GetDataRelBase();
      return lVar2;
    }
    if (bVar1 < 0x31) {
      if (bVar1 == 0x20) {
        lVar2 = _Unwind_GetTextRelBase(param_2);
        return lVar2;
      }
      if (0x20 < bVar1) {
LAB_140020a84:
                    // WARNING: Subroutine does not return
        abort();
      }
    }
    else {
      if (bVar1 == 0x40) {
        lVar2 = _Unwind_GetRegionStart(param_2);
        return lVar2;
      }
      if (bVar1 != 0x50) goto LAB_140020a84;
    }
  }
  return 0;
}



void _text__ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception
               (uint param_1,longlong param_2)

{
  int *piVar1;
  
  if (1 < param_1) {
                    // WARNING: Subroutine does not return
    __cxxabiv1::__terminate(*(undefined **)(param_2 + -0x38));
  }
  LOCK();
  piVar1 = (int *)(param_2 + -0x60);
  *piVar1 = *piVar1 + -1;
  UNLOCK();
  if (*piVar1 == 0) {
    if (*(code **)(param_2 + -0x48) != (code *)0x0) {
      (**(code **)(param_2 + -0x48))(param_2 + 0x40);
    }
    __cxa_free_exception(param_2 + 0x40);
    return;
  }
  return;
}



ulonglong *
_text__ZL28read_encoded_value_with_basehyPKhPy
          (byte param_1,ulonglong *param_2,ulonglong *param_3,undefined8 *param_4)

{
  ulonglong uVar1;
  undefined8 *puVar2;
  ulonglong *puVar3;
  byte bVar4;
  byte bVar5;
  uint uVar6;
  ulonglong uVar7;
  
  if (param_1 == 0x50) {
    puVar2 = (undefined8 *)((longlong)param_3 + 7U & 0xfffffffffffffff8);
    *param_4 = *puVar2;
    return puVar2 + 1;
  }
  puVar3 = param_3;
  switch(param_1 & 0xf) {
  case 0:
  case 4:
  case 0xc:
    uVar7 = *param_3;
    puVar3 = param_3 + 1;
    break;
  case 1:
    uVar7 = 0;
    bVar4 = 0;
    do {
      uVar1 = *puVar3;
      puVar3 = (ulonglong *)((longlong)puVar3 + 1);
      bVar5 = bVar4 & 0x3f;
      bVar4 = bVar4 + 7;
      uVar7 = uVar7 | (ulonglong)((byte)uVar1 & 0x7f) << bVar5;
    } while ((char)(byte)uVar1 < '\0');
    break;
  case 2:
    uVar7 = (ulonglong)(ushort)*param_3;
    puVar3 = (ulonglong *)((longlong)param_3 + 2);
    break;
  case 3:
    uVar7 = (ulonglong)(uint)*param_3;
    puVar3 = (ulonglong *)((longlong)param_3 + 4);
    break;
  default:
                    // WARNING: Subroutine does not return
    abort();
  case 9:
    uVar7 = 0;
    uVar6 = 0;
    do {
      bVar4 = (byte)*puVar3;
      puVar3 = (ulonglong *)((longlong)puVar3 + 1);
      bVar5 = (byte)uVar6;
      uVar6 = uVar6 + 7;
      uVar7 = uVar7 | (ulonglong)(bVar4 & 0x7f) << (bVar5 & 0x3f);
    } while ((char)bVar4 < '\0');
    if ((0x3f < uVar6) || ((bVar4 & 0x40) == 0)) break;
    uVar7 = uVar7 | -1L << ((byte)uVar6 & 0x3f);
    goto LAB_140020b24;
  case 10:
    uVar7 = (ulonglong)(short)*param_3;
    puVar3 = (ulonglong *)((longlong)param_3 + 2);
    break;
  case 0xb:
    uVar7 = (ulonglong)(int)*param_3;
    puVar3 = (ulonglong *)((longlong)param_3 + 4);
  }
  puVar2 = (undefined8 *)0x0;
  if (uVar7 != 0) {
LAB_140020b24:
    if ((param_1 & 0x70) == 0x10) {
      param_2 = param_3;
    }
    puVar2 = (undefined8 *)(uVar7 + (longlong)param_2);
    if ((char)param_1 < '\0') {
      *param_4 = *puVar2;
      return puVar3;
    }
  }
  *param_4 = puVar2;
  return puVar3;
}



// __cxxabiv1::__terminate(void (*)())

void __cxxabiv1::__terminate(undefined *param_1)

{
  (*(code *)param_1)();
                    // WARNING: Subroutine does not return
  abort();
}



// __cxxabiv1::__unexpected(void (*)())

void __cxxabiv1::__unexpected(undefined *param_1)

{
  (*(code *)param_1)();
                    // WARNING: Subroutine does not return
  std::terminate();
}



// __cxxabiv1::__forced_unwind::~__forced_unwind()

void __thiscall __cxxabiv1::__forced_unwind::~__forced_unwind(__forced_unwind *this)

{
  operator_delete(this);
  return;
}



// __cxxabiv1::__forced_unwind::~__forced_unwind()

void __thiscall __cxxabiv1::__forced_unwind::~__forced_unwind(void)

{
  return;
}



// __cxxabiv1::__class_type_info::~__class_type_info()

void __thiscall __cxxabiv1::__class_type_info::~__class_type_info(__class_type_info *this)

{
  *(undefined ***)this = &PTR____class_type_info_1400db5c0;
  std::type_info::~type_info();
  operator_delete(this);
  return;
}



// __cxxabiv1::__class_type_info::~__class_type_info()

void __thiscall __cxxabiv1::__class_type_info::~__class_type_info(__class_type_info *this)

{
  *(undefined ***)this = &PTR____class_type_info_1400db5c0;
  std::type_info::~type_info();
  return;
}



// __cxxabiv1::__foreign_exception::~__foreign_exception()

void __thiscall __cxxabiv1::__foreign_exception::~__foreign_exception(__foreign_exception *this)

{
  operator_delete(this);
  return;
}



// __cxxabiv1::__foreign_exception::~__foreign_exception()

void __thiscall __cxxabiv1::__foreign_exception::~__foreign_exception(void)

{
  return;
}



// __cxxabiv1::__si_class_type_info::~__si_class_type_info()

void __thiscall __cxxabiv1::__si_class_type_info::~__si_class_type_info(__si_class_type_info *this)

{
  *(undefined ***)this = &PTR____si_class_type_info_1400db650;
  __class_type_info::~__class_type_info((__class_type_info *)this);
  operator_delete(this);
  return;
}



// __cxxabiv1::__si_class_type_info::~__si_class_type_info()

void __thiscall __cxxabiv1::__si_class_type_info::~__si_class_type_info(__si_class_type_info *this)

{
  *(undefined ***)this = &PTR____si_class_type_info_1400db650;
  __class_type_info::~__class_type_info((__class_type_info *)this);
  return;
}



// __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info()

void __thiscall
__cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info(__vmi_class_type_info *this)

{
  *(undefined ***)this = &PTR____vmi_class_type_info_1400db6b0;
  __class_type_info::~__class_type_info((__class_type_info *)this);
  operator_delete(this);
  return;
}



// __cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info()

void __thiscall
__cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info(__vmi_class_type_info *this)

{
  *(undefined ***)this = &PTR____vmi_class_type_info_1400db6b0;
  __class_type_info::~__class_type_info((__class_type_info *)this);
  return;
}



undefined8
_text__ZN10__cxxabiv1L21__gxx_personality_impEiiyP17_Unwind_ExceptionP15_Unwind_Context
          (int param_1,uint param_2,longlong param_3,byte *param_4,longlong param_5)

{
  bool bVar1;
  byte bVar2;
  bool bVar3;
  char cVar4;
  ulonglong uVar5;
  ulonglong *puVar6;
  ulonglong *puVar7;
  ulonglong uVar8;
  longlong lVar9;
  undefined8 uVar10;
  longlong *plVar11;
  byte bVar12;
  byte bVar13;
  uint uVar14;
  byte *pbVar15;
  byte unaff_BL;
  longlong lVar16;
  byte *pbVar17;
  longlong **unaff_RBP;
  longlong lVar18;
  ulonglong uVar19;
  ulonglong uVar20;
  ulonglong in_R10;
  uint uVar21;
  ulonglong *unaff_R12;
  ulonglong *puVar22;
  ulonglong *unaff_R13;
  byte *pbVar23;
  longlong unaff_R14;
  undefined **ppuVar24;
  longlong *local_e8;
  longlong *local_e0;
  byte *local_d0;
  byte local_c5;
  byte local_c4;
  ulonglong *local_c0;
  longlong *local_b8;
  int local_9c;
  byte *local_98;
  longlong local_90;
  longlong local_88;
  longlong *local_80;
  longlong local_78;
  longlong local_70;
  ulonglong *local_68;
  longlong local_60;
  ulonglong *local_58;
  byte local_50;
  byte local_4f;
  
  local_98 = (byte *)0x0;
  local_9c = 0;
  if (param_1 != 1) {
    return 3;
  }
  uVar5 = param_3 + 0xb8b1aabcbcd4d500;
  bVar1 = uVar5 < 2;
  bVar3 = param_2 == 6 && bVar1;
  if (param_2 != 6 || !bVar1) {
    local_d0 = (byte *)_Unwind_GetLanguageSpecificData(param_5);
    if (local_d0 == (byte *)0x0) {
      return 8;
    }
    local_b8 = &local_78;
    unaff_R13 = (ulonglong *)
                _text__ZL17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info
                          (param_5,local_d0,local_b8);
    local_c4 = local_50;
    local_c5 = local_50;
    local_c0 = (ulonglong *)_text__ZL21base_of_encoded_valuehP15_Unwind_Context(local_50,param_5);
    local_68 = local_c0;
    lVar16 = _Unwind_GetIPInfo(param_5,&local_9c);
    uVar19 = lVar16 - (ulonglong)(local_9c == 0);
    if (local_58 <= unaff_R13) goto LAB_140020fb9;
    local_e8 = &local_90;
    unaff_RBP = &local_80;
    local_e0 = &local_88;
    puVar22 = local_58;
    unaff_R14 = local_78;
    unaff_BL = local_4f;
    do {
      puVar6 = (ulonglong *)_text__ZL21base_of_encoded_valuehP15_Unwind_Context(unaff_BL,0);
      puVar6 = _text__ZL28read_encoded_value_with_basehyPKhPy(unaff_BL,puVar6,unaff_R13,local_e8);
      puVar7 = (ulonglong *)_text__ZL21base_of_encoded_valuehP15_Unwind_Context(unaff_BL,0);
      puVar6 = _text__ZL28read_encoded_value_with_basehyPKhPy(unaff_BL,puVar7,puVar6,local_e0);
      puVar7 = (ulonglong *)_text__ZL21base_of_encoded_valuehP15_Unwind_Context(unaff_BL,0);
      unaff_R13 = _text__ZL28read_encoded_value_with_basehyPKhPy(unaff_BL,puVar7,puVar6,unaff_RBP);
      in_R10 = 0;
      bVar12 = 0;
      do {
        uVar8 = *unaff_R13;
        unaff_R13 = (ulonglong *)((longlong)unaff_R13 + 1);
        bVar13 = bVar12 & 0x3f;
        bVar12 = bVar12 + 7;
        in_R10 = in_R10 | (ulonglong)((byte)uVar8 & 0x7f) << bVar13;
      } while ((char)(byte)uVar8 < '\0');
      uVar8 = local_90 + unaff_R14;
      local_58 = puVar22;
      if (uVar8 <= uVar19) goto LAB_140020fe0;
LAB_140020fb9:
      do {
        if ((param_2 & 1) != 0) {
          uVar19 = 0;
          lVar16 = 0;
          pbVar23 = (byte *)0x0;
          goto LAB_140021007;
        }
        if (((param_2 & 8) != 0) || (param_2 = 0, unaff_R12 = local_58, 1 < uVar5))
        goto LAB_140020fc4;
LAB_140020fd1:
        uVar8 = __cxa_call_terminate((longlong *)param_4);
        local_58 = unaff_R12;
LAB_140020fe0:
        if (uVar19 < uVar8 + local_88) {
          if (local_80 == (longlong *)0x0) {
            return 8;
          }
          lVar16 = (longlong)local_80 + local_70;
          if (in_R10 == 0) {
            if (lVar16 == 0) {
              return 8;
            }
            goto joined_r0x000140021159;
          }
          pbVar23 = (byte *)((longlong)local_58 + (in_R10 - 1));
          if (lVar16 == 0) {
            return 8;
          }
          ppuVar24 = &__cxxabiv1::__forced_unwind::typeinfo;
          uVar21 = param_2 & 8;
          if ((uVar21 == 0) && (ppuVar24 = &__cxxabiv1::__foreign_exception::typeinfo, uVar5 < 2)) {
            local_98 = param_4 + 0x40;
            if ((*param_4 & 1) != 0) {
              local_98 = *(byte **)(param_4 + -0x50);
            }
            ppuVar24 = *(undefined ***)(local_98 + -0x90);
          }
          local_e8._0_1_ = local_c5 & 7;
          goto LAB_1400210b0;
        }
        puVar22 = local_58;
      } while (local_58 <= unaff_R13);
    } while( true );
  }
  local_d0 = *(byte **)(param_4 + -0x18);
  lVar16 = *(longlong *)(param_4 + -0x10);
  uVar19 = (ulonglong)*(uint *)(param_4 + -0x24);
  unaff_BL = 0;
  if (lVar16 == 0) goto LAB_140020fd1;
LAB_140020def:
  lVar18 = (longlong)(int)uVar19;
  if ((int)uVar19 < 0) {
    _text__ZL17parse_lsda_headerP15_Unwind_ContextPKhP16lsda_header_info(param_5,local_d0,&local_78)
    ;
    _text__ZL21base_of_encoded_valuehP15_Unwind_Context(local_50,param_5);
    lVar9 = _text__ZL21base_of_encoded_valuehP15_Unwind_Context(local_50,param_5);
    *(longlong *)(param_4 + -0x10) = lVar9;
  }
LAB_140020dfa:
  _Unwind_SetGR(param_5,0,param_4);
  _Unwind_SetGR(param_5,1,lVar18);
  _Unwind_SetIP(param_5,lVar16);
  return 7;
LAB_1400210b0:
  uVar19 = 0;
  uVar14 = 0;
  pbVar17 = pbVar23;
  do {
    bVar12 = *pbVar17;
    pbVar17 = pbVar17 + 1;
    bVar13 = (byte)uVar14;
    uVar14 = uVar14 + 7;
    uVar19 = uVar19 | (ulonglong)(bVar12 & 0x7f) << (bVar13 & 0x3f);
  } while ((char)bVar12 < '\0');
  if ((uVar14 < 0x40) && ((bVar12 & 0x40) != 0)) {
    uVar19 = uVar19 | -(1L << ((byte)uVar14 & 0x3f));
  }
  uVar8 = 0;
  uVar14 = 0;
  pbVar15 = pbVar17;
  do {
    bVar12 = *pbVar15;
    pbVar15 = pbVar15 + 1;
    bVar13 = (byte)uVar14;
    uVar14 = uVar14 + 7;
    uVar8 = uVar8 | (ulonglong)(bVar12 & 0x7f) << (bVar13 & 0x3f);
  } while ((char)bVar12 < '\0');
  if ((0x3f < uVar14) || ((bVar12 & 0x40) == 0)) {
    if (uVar19 != 0) goto LAB_1400211d0;
    bVar3 = true;
    goto LAB_14002119b;
  }
  uVar8 = uVar8 | -(1L << ((byte)uVar14 & 0x3f));
  if (uVar19 == 0) {
    bVar3 = true;
  }
  else {
LAB_1400211d0:
    if ((longlong)uVar19 < 1) {
      if ((bVar1 && uVar21 == 0) && (ppuVar24 != (undefined **)0x0)) {
        uVar10 = _text__ZL20check_exception_specP16lsda_header_infoPKSt9type_infoPvx
                           ((longlong)local_b8,(longlong *)ppuVar24,local_98,uVar19);
        if ((char)uVar10 == '\0') {
LAB_140021225:
          if ((param_2 & 1) != 0) {
LAB_140021007:
            if (uVar5 < 2) {
              *(int *)(param_4 + -0x24) = (int)uVar19;
              *(byte **)(param_4 + -0x20) = pbVar23;
              *(byte **)(param_4 + -0x18) = local_d0;
              *(longlong *)(param_4 + -0x10) = lVar16;
              *(byte **)(param_4 + -8) = local_98;
            }
            return 6;
          }
          if ((uVar5 < 2) && (uVar21 == 0)) goto LAB_140020def;
          if ((int)uVar19 < 0) {
            plVar11 = (longlong *)std::unexpected();
            __cxa_begin_catch(plVar11);
LAB_140020fc4:
                    // WARNING: Subroutine does not return
            std::terminate();
          }
          lVar18 = (longlong)(int)uVar19;
          goto LAB_140020dfa;
        }
      }
      else {
        uVar20 = 0;
        bVar12 = 0;
        pbVar15 = (byte *)(~uVar19 + local_60);
        do {
          bVar13 = *pbVar15;
          pbVar15 = pbVar15 + 1;
          bVar2 = bVar12 & 0x3f;
          bVar12 = bVar12 + 7;
          uVar20 = uVar20 | (ulonglong)(bVar13 & 0x7f) << bVar2;
        } while ((char)bVar13 < '\0');
        if (uVar20 == 0) goto LAB_140021225;
      }
    }
    else {
      if (local_c5 == 0xff) {
        lVar18 = 0;
      }
      else if ((byte)local_e8 == 2) {
        lVar18 = uVar19 * -2;
      }
      else {
        if ((byte)local_e8 < 3) {
          if ((byte)local_e8 != 0) {
LAB_140021355:
                    // WARNING: Subroutine does not return
            abort();
          }
        }
        else {
          lVar18 = uVar19 * -4;
          if ((byte)local_e8 == 3) goto LAB_140021293;
          if ((byte)local_e8 != 4) goto LAB_140021355;
        }
        lVar18 = uVar19 * -8;
      }
LAB_140021293:
      _text__ZL28read_encoded_value_with_basehyPKhPy
                (local_c4,local_c0,(ulonglong *)(lVar18 + local_60),unaff_RBP);
      if ((local_80 == (longlong *)0x0) ||
         ((ppuVar24 != (undefined **)0x0 &&
          (cVar4 = _text__ZL16get_adjusted_ptrPKSt9type_infoS1_PPv
                             (local_80,(longlong *)ppuVar24,&local_98), cVar4 != '\0'))))
      goto LAB_140021225;
    }
LAB_14002119b:
    if (uVar8 == 0) goto code_r0x0001400211a0;
  }
  pbVar23 = pbVar17 + uVar8;
  goto LAB_1400210b0;
code_r0x0001400211a0:
  if (!bVar3) {
    return 8;
  }
joined_r0x000140021159:
  if ((param_2 & 1) != 0) {
    return 8;
  }
  lVar18 = 0;
  goto LAB_140020dfa;
}



undefined * _text__ZN12_GLOBAL__N_116get_locale_mutexEv(void)

{
  int iVar1;
  
  if (_data__ZGVZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex == '\0') {
    iVar1 = __cxa_guard_acquire(&_data__ZGVZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex);
    if (iVar1 != 0) {
      if (_CRT_MT != 0) {
        __gthr_win32_mutex_init_function
                  ((LPCRITICAL_SECTION)&_data__ZZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex)
        ;
      }
      atexit(_text___tcf_0);
      __cxa_guard_release(&_data__ZGVZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex);
      return &_data__ZZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex;
    }
  }
  return &_data__ZZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex;
}



void _text__ZN12_GLOBAL__N_117io_error_categoryD0Ev(undefined8 *param_1)

{
  *param_1 = &PTR__text__ZN12_GLOBAL__N_117io_error_categoryD2Ev_1400db710;
  std::_V2::error_category::~error_category();
  operator_delete(param_1);
  return;
}



void _text__ZN12_GLOBAL__N_117io_error_categoryD2Ev(undefined8 *param_1)

{
  *param_1 = &PTR__text__ZN12_GLOBAL__N_117io_error_categoryD2Ev_1400db710;
  std::_V2::error_category::~error_category();
  return;
}



void _text__ZN12_GLOBAL__N_121system_error_categoryD0Ev(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



void _text__ZN12_GLOBAL__N_121system_error_categoryD2Ev(void)

{
  return;
}



void _text__ZN12_GLOBAL__N_122generic_error_categoryD0Ev(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



void _text__ZN12_GLOBAL__N_122generic_error_categoryD2Ev(void)

{
  return;
}



ulonglong * _text__ZN12_GLOBAL__N_14pool4freeEPv_constprop_0(longlong param_1)

{
  ulonglong *in_RAX;
  ulonglong *puVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  ulonglong *extraout_RAX;
  undefined *puVar4;
  ulonglong *puVar5;
  ulonglong *puVar6;
  ulonglong *puVar7;
  int *piVar8;
  int iVar9;
  ulonglong uVar10;
  ulonglong *puVar11;
  
  piVar8 = &_CRT_MT;
  if (_CRT_MT != 0) goto LAB_1400215a0;
  piVar8 = *(int **)(param_1 + -0x10);
  iVar9 = 0;
  if (DAT_1400c09e8 == (ulonglong *)0x0) {
    *(undefined8 *)(param_1 + -8) = 0;
    DAT_1400c09e8 = (ulonglong *)(param_1 + -0x10);
    return in_RAX;
  }
  do {
    puVar7 = (ulonglong *)(param_1 + -0x10);
    puVar6 = (ulonglong *)((longlong)puVar7 + (longlong)piVar8);
    if (puVar6 < DAT_1400c09e8) goto LAB_1400215cb;
    in_RAX = (ulonglong *)DAT_1400c09e8[1];
    if (puVar6 == DAT_1400c09e8) {
      piVar8 = (int *)((longlong)piVar8 + *DAT_1400c09e8);
      *(ulonglong **)(param_1 + -8) = in_RAX;
      *(int **)(param_1 + -0x10) = piVar8;
      DAT_1400c09e8 = puVar7;
    }
    else {
      puVar11 = (ulonglong *)&DAT_1400c09e8;
      puVar5 = DAT_1400c09e8;
      if (in_RAX != (ulonglong *)0x0) {
        do {
          puVar1 = in_RAX;
          if (puVar6 <= puVar1) {
            if (puVar6 == puVar1) {
              piVar8 = (int *)((longlong)piVar8 + *puVar6);
              puVar5[1] = puVar6[1];
            }
            break;
          }
          puVar11 = puVar5 + 1;
          in_RAX = (ulonglong *)puVar1[1];
          puVar5 = puVar1;
        } while ((ulonglong *)puVar1[1] != (ulonglong *)0x0);
        puVar5 = (ulonglong *)*puVar11;
      }
      if (puVar7 == (ulonglong *)((longlong)puVar5 + *puVar5)) {
        in_RAX = (ulonglong *)(*puVar5 + (longlong)piVar8);
        *puVar5 = (ulonglong)in_RAX;
      }
      else {
        uVar2 = puVar5[1];
        *(int **)(param_1 + -0x10) = piVar8;
        *(ulonglong *)(param_1 + -8) = uVar2;
        in_RAX = (ulonglong *)*puVar11;
        in_RAX[1] = (ulonglong)puVar7;
      }
    }
    while( true ) {
      if ((iVar9 == 0) ||
         (in_RAX = (ulonglong *)
                   __gthr_win32_mutex_unlock
                             ((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE),
         (int)in_RAX == 0)) {
        return in_RAX;
      }
      __gnu_cxx::__throw_concurrence_unlock_error();
LAB_1400215a0:
      puVar4 = &_data__ZN12_GLOBAL__N_114emergency_poolE;
      in_RAX = (ulonglong *)
               __gthr_win32_mutex_lock
                         ((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE);
      if ((int)in_RAX != 0) {
        __gnu_cxx::__throw_concurrence_lock_error();
        if (_CRT_MT == 0) {
          puVar4 = puVar4 + 0x10;
          if (puVar4 < (undefined *)0x10) {
            puVar4 = (undefined *)0x10;
          }
          if (DAT_1400c09e8 == (ulonglong *)0x0) {
            return (ulonglong *)0x0;
          }
        }
        else {
          uVar3 = __gthr_win32_mutex_lock
                            ((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE);
          if ((int)uVar3 != 0) goto LAB_140021733;
          puVar4 = puVar4 + 0x10;
          if (puVar4 < (undefined *)0x10) {
            puVar4 = (undefined *)0x10;
          }
          if (DAT_1400c09e8 == (ulonglong *)0x0) goto LAB_14002172a;
        }
        iVar9 = _CRT_MT;
        uVar2 = (ulonglong)(puVar4 + 0xf) & 0xfffffffffffffff0;
        puVar6 = (ulonglong *)&DAT_1400c09e8;
        puVar7 = DAT_1400c09e8;
        goto LAB_140021691;
      }
      iVar9 = *piVar8;
      piVar8 = *(int **)(param_1 + -0x10);
      if (DAT_1400c09e8 != (ulonglong *)0x0) break;
LAB_1400215cb:
      *(ulonglong **)(param_1 + -8) = DAT_1400c09e8;
      DAT_1400c09e8 = (ulonglong *)(param_1 + -0x10);
    }
  } while( true );
  while( true ) {
    puVar6 = puVar7 + 1;
    puVar7 = (ulonglong *)puVar7[1];
    if (puVar7 == (ulonglong *)0x0) break;
LAB_140021691:
    if (uVar2 <= *puVar7) {
      uVar10 = *puVar7 - uVar2;
      if (uVar10 < 0x10) {
        *puVar7 = *puVar7;
        puVar11 = (ulonglong *)puVar7[1];
      }
      else {
        puVar11 = (ulonglong *)((longlong)puVar7 + uVar2);
        puVar11[1] = puVar7[1];
        puVar7 = (ulonglong *)*puVar6;
        *puVar11 = uVar10;
        *puVar7 = uVar2;
      }
      *puVar6 = (ulonglong)puVar11;
      puVar7 = puVar7 + 2;
      goto LAB_1400216b6;
    }
  }
LAB_14002172a:
  puVar7 = (ulonglong *)0x0;
  iVar9 = _CRT_MT;
LAB_1400216b6:
  if ((iVar9 == 0) ||
     (uVar3 = __gthr_win32_mutex_unlock
                        ((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE),
     (int)uVar3 == 0)) {
    return puVar7;
  }
  __gnu_cxx::__throw_concurrence_unlock_error();
LAB_140021733:
  __gnu_cxx::__throw_concurrence_lock_error();
  if (_CRT_MT != 0) {
    __gthr_win32_cond_init_function((PCONDITION_VARIABLE)&_data__ZN12_GLOBAL__N_19fake_condE);
    _data__ZN12_GLOBAL__N_1L11static_condE = &_data__ZN12_GLOBAL__N_19fake_condE;
    return extraout_RAX;
  }
  _data__ZN12_GLOBAL__N_1L11static_condE = &_data__ZN12_GLOBAL__N_19fake_condE;
  return (ulonglong *)0x0;
}



ulonglong * _text__ZN12_GLOBAL__N_14pool8allocateEy_constprop_0(longlong param_1)

{
  ulonglong uVar1;
  undefined8 uVar2;
  ulonglong *extraout_RAX;
  int iVar3;
  ulonglong *puVar4;
  ulonglong *puVar5;
  ulonglong *puVar6;
  ulonglong uVar7;
  
  if (_CRT_MT == 0) {
    uVar1 = param_1 + 0x10;
    if (uVar1 < 0x10) {
      uVar1 = 0x10;
    }
    if (DAT_1400c09e8 == (ulonglong *)0x0) {
      return (ulonglong *)0x0;
    }
LAB_14002166e:
    iVar3 = _CRT_MT;
    uVar1 = uVar1 + 0xf & 0xfffffffffffffff0;
    puVar4 = (ulonglong *)&DAT_1400c09e8;
    puVar5 = DAT_1400c09e8;
    do {
      if (uVar1 <= *puVar5) {
        uVar7 = *puVar5 - uVar1;
        if (uVar7 < 0x10) {
          *puVar5 = *puVar5;
          puVar6 = (ulonglong *)puVar5[1];
        }
        else {
          puVar6 = (ulonglong *)((longlong)puVar5 + uVar1);
          puVar6[1] = puVar5[1];
          puVar5 = (ulonglong *)*puVar4;
          *puVar6 = uVar7;
          *puVar5 = uVar1;
        }
        *puVar4 = (ulonglong)puVar6;
        puVar5 = puVar5 + 2;
        goto LAB_1400216b6;
      }
      puVar4 = puVar5 + 1;
      puVar5 = (ulonglong *)puVar5[1];
    } while (puVar5 != (ulonglong *)0x0);
  }
  else {
    uVar2 = __gthr_win32_mutex_lock((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE);
    if ((int)uVar2 != 0) goto LAB_140021733;
    uVar1 = param_1 + 0x10;
    if (uVar1 < 0x10) {
      uVar1 = 0x10;
    }
    if (DAT_1400c09e8 != (ulonglong *)0x0) goto LAB_14002166e;
  }
  puVar5 = (ulonglong *)0x0;
  iVar3 = _CRT_MT;
LAB_1400216b6:
  if ((iVar3 == 0) ||
     (uVar2 = __gthr_win32_mutex_unlock
                        ((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE),
     (int)uVar2 == 0)) {
    return puVar5;
  }
  __gnu_cxx::__throw_concurrence_unlock_error();
LAB_140021733:
  __gnu_cxx::__throw_concurrence_lock_error();
  if (_CRT_MT != 0) {
    __gthr_win32_cond_init_function((PCONDITION_VARIABLE)&_data__ZN12_GLOBAL__N_19fake_condE);
    _data__ZN12_GLOBAL__N_1L11static_condE = &_data__ZN12_GLOBAL__N_19fake_condE;
    return extraout_RAX;
  }
  _data__ZN12_GLOBAL__N_1L11static_condE = &_data__ZN12_GLOBAL__N_19fake_condE;
  return (ulonglong *)0x0;
}



void _text__ZN12_GLOBAL__N_1L16init_static_condEv(void)

{
  if (_CRT_MT == 0) {
    _data__ZN12_GLOBAL__N_1L11static_condE = &_data__ZN12_GLOBAL__N_19fake_condE;
    return;
  }
  __gthr_win32_cond_init_function((PCONDITION_VARIABLE)&_data__ZN12_GLOBAL__N_19fake_condE);
  _data__ZN12_GLOBAL__N_1L11static_condE = &_data__ZN12_GLOBAL__N_19fake_condE;
  return;
}



void _text__ZN12_GLOBAL__N_1L4initEv(void)

{
  if (_CRT_MT == 0) {
    _data__ZN12_GLOBAL__N_1L12static_mutexE = &_data__ZN12_GLOBAL__N_110fake_mutexE;
    return;
  }
  __gthr_win32_mutex_init_function((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_110fake_mutexE);
  _data__ZN12_GLOBAL__N_1L12static_mutexE = &_data__ZN12_GLOBAL__N_110fake_mutexE;
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::__cxx11::wstring __gnu_cxx::__to_xstring<std::__cxx11::wstring, wchar_t>(int (*)(wchar_t*,
// unsigned long long, wchar_t const*, char*), unsigned long long, wchar_t const*, ...)

__gnu_cxx * __thiscall
__gnu_cxx::__to_xstring<>
          (__gnu_cxx *this,undefined *param_1,longlong param_2,undefined8 param_3,...)

{
  undefined2 *puVar1;
  longlong lVar2;
  int iVar3;
  undefined8 auStack_50 [5];
  undefined2 auStack_28 [4];
  undefined1 *local_20;
  
  auStack_50[0] = 0x140021806;
  lVar2 = -(param_2 * 2 + 0xfU & 0xfffffffffffffff0);
  local_20 = &stack0x00000028;
  puVar1 = (undefined2 *)((longlong)auStack_28 + lVar2);
  *(undefined8 *)((longlong)auStack_50 + lVar2) = 0x14002181c;
  iVar3 = (*(code *)param_1)(puVar1,param_2,param_3);
  *(undefined8 *)(this + 8) = 0;
  *(__gnu_cxx **)this = this + 0x10;
  *(undefined8 *)((longlong)auStack_50 + lVar2) = 0x14002183c;
  std::__cxx11::wstring::_M_construct<wchar_t*>
            ((undefined8 *)this,puVar1,(longlong)(puVar1 + iVar3));
  return this;
}



// __gnu_cxx::__scoped_lock::~__scoped_lock()

void __thiscall __gnu_cxx::__scoped_lock::~__scoped_lock(__scoped_lock *this)

{
  undefined8 uVar1;
  ulonglong *puVar2;
  
  if (_CRT_MT != 0) {
    uVar1 = __gthr_win32_mutex_unlock(*(LPCRITICAL_SECTION *)this);
    if ((int)uVar1 != 0) {
      puVar2 = __cxa_allocate_exception(8);
      *puVar2 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
      __cxa_throw((longlong)puVar2,&__concurrence_unlock_error::typeinfo,
                  __concurrence_unlock_error::~__concurrence_unlock_error);
    }
  }
  return;
}



// __gnu_cxx::__concat_size_t(char*, unsigned long long, unsigned long long)

ulonglong __gnu_cxx::__concat_size_t(void *param_1,ulonglong param_2,ulonglong param_3)

{
  bool bVar1;
  ulonglong uVar2;
  char *pcVar3;
  char local_31 [9];
  
  pcVar3 = local_31 + 1;
  do {
    pcVar3 = pcVar3 + -1;
    *pcVar3 = "0123456789"[param_3 % 10];
    bVar1 = 9 < param_3;
    param_3 = param_3 / 10;
  } while (bVar1);
  uVar2 = (longlong)(local_31 + 1) - (longlong)pcVar3;
  if (param_2 < uVar2) {
    uVar2 = 0xffffffff;
  }
  else {
    memcpy(param_1,local_31 + (1 - uVar2),uVar2);
    uVar2 = uVar2 & 0xffffffff;
  }
  return uVar2;
}



// __gnu_cxx::__snprintf_lite(char*, unsigned long long, char const*, char*)

int __gnu_cxx::__snprintf_lite(char *param_1,longlong param_2,char *param_3,ulonglong *param_4)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  ulonglong uVar4;
  char *pcVar5;
  char *pcVar6;
  char *pcVar7;
  
  cVar2 = *param_3;
  pcVar1 = param_1 + param_2 + -1;
  pcVar6 = param_1;
  if (cVar2 == '\0') {
    iVar3 = 0;
  }
  else {
    do {
      if (pcVar1 <= pcVar6) {
LAB_140021a74:
                    // WARNING: Subroutine does not return
        __throw_insufficient_space(param_1,(longlong)pcVar6);
      }
      if (cVar2 != '%') goto LAB_140021990;
      cVar2 = param_3[1];
      if (cVar2 == 's') {
        pcVar5 = (char *)*param_4;
        param_4 = param_4 + 1;
        cVar2 = *pcVar5;
        if (cVar2 != '\0') {
          pcVar7 = pcVar6;
          if (pcVar1 <= pcVar6) {
LAB_140021a5f:
                    // WARNING: Subroutine does not return
            __throw_insufficient_space(param_1,(longlong)pcVar7);
          }
          while( true ) {
            pcVar5 = pcVar5 + 1;
            *pcVar6 = cVar2;
            pcVar6 = pcVar6 + 1;
            cVar2 = *pcVar5;
            if (cVar2 == '\0') break;
            pcVar7 = pcVar1;
            if (pcVar1 == pcVar6) goto LAB_140021a5f;
          }
        }
        cVar2 = param_3[2];
        param_3 = param_3 + 2;
      }
      else {
        if (cVar2 == 'z') {
          if (param_3[2] != 'u') goto LAB_140021990;
          uVar4 = *param_4;
          param_4 = param_4 + 1;
          uVar4 = __concat_size_t(pcVar6,(longlong)pcVar1 - (longlong)pcVar6,uVar4);
          if ((int)uVar4 < 1) goto LAB_140021a74;
          param_3 = param_3 + 3;
          pcVar6 = pcVar6 + (int)uVar4;
        }
        else {
          if (cVar2 == '%') {
            param_3 = param_3 + 1;
            cVar2 = '%';
          }
          else {
LAB_140021990:
            cVar2 = *param_3;
          }
          *pcVar6 = cVar2;
          param_3 = param_3 + 1;
          pcVar6 = pcVar6 + 1;
        }
        cVar2 = *param_3;
      }
    } while (cVar2 != '\0');
    iVar3 = (int)pcVar6 - (int)param_1;
    param_1 = pcVar6;
  }
  *param_1 = '\0';
  return iVar3;
}



// __gnu_cxx::recursive_init_error::recursive_init_error()

void __thiscall __gnu_cxx::recursive_init_error::recursive_init_error(recursive_init_error *this)

{
  *(undefined ***)this = &PTR__recursive_init_error_1400db800;
  return;
}



// __gnu_cxx::recursive_init_error::~recursive_init_error()

void __thiscall __gnu_cxx::recursive_init_error::~recursive_init_error(recursive_init_error *this)

{
  *(undefined ***)this = &PTR__recursive_init_error_1400db800;
  std::exception::~exception();
  operator_delete(this);
  return;
}



// __gnu_cxx::recursive_init_error::~recursive_init_error()

void __thiscall __gnu_cxx::recursive_init_error::~recursive_init_error(recursive_init_error *this)

{
  *(undefined ***)this = &PTR__recursive_init_error_1400db800;
  std::exception::~exception();
  return;
}



// __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error()

void __thiscall
__gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error(__concurrence_lock_error *this)

{
  *(undefined ***)this = &PTR____concurrence_lock_error_1400db830;
  std::exception::~exception();
  operator_delete(this);
  return;
}



// __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error()

void __thiscall
__gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error(__concurrence_lock_error *this)

{
  *(undefined ***)this = &PTR____concurrence_lock_error_1400db830;
  std::exception::~exception();
  return;
}



// __gnu_cxx::__concurrence_wait_error::~__concurrence_wait_error()

void __thiscall
__gnu_cxx::__concurrence_wait_error::~__concurrence_wait_error(__concurrence_wait_error *this)

{
  *(undefined ***)this = &PTR____concurrence_wait_error_1400db860;
  std::exception::~exception();
  operator_delete(this);
  return;
}



// __gnu_cxx::__concurrence_wait_error::~__concurrence_wait_error()

void __thiscall
__gnu_cxx::__concurrence_wait_error::~__concurrence_wait_error(__concurrence_wait_error *this)

{
  *(undefined ***)this = &PTR____concurrence_wait_error_1400db860;
  std::exception::~exception();
  return;
}



// __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error()

void __thiscall
__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error(__concurrence_unlock_error *this)

{
  *(undefined ***)this = &PTR____concurrence_unlock_error_1400db890;
  std::exception::~exception();
  operator_delete(this);
  return;
}



// __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error()

void __thiscall
__gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error(__concurrence_unlock_error *this)

{
  *(undefined ***)this = &PTR____concurrence_unlock_error_1400db890;
  std::exception::~exception();
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// __gnu_cxx::__throw_insufficient_space(char const*, char const*)

void __gnu_cxx::__throw_insufficient_space(void *param_1,longlong param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  size_t _Size;
  undefined8 auStack_d0 [5];
  char local_a8 [8];
  undefined8 local_a0 [10];
  undefined1 uStack_50;
  undefined7 uStack_4f;
  undefined1 uStack_48;
  undefined7 local_47;
  undefined1 auStack_40 [16];
  
  local_a0[6] = 0x657220677562206c;
  _Size = param_2 - (longlong)param_1;
  local_a0[5] = 0x6c75662074696d62;
  local_a0[8] = 0x2f2f3a7370747468;
  uStack_50 = 0x6f;
  local_a0[7] = 0x2074612074726f70;
  local_a0[9] = 0x2e756e672e636367;
  local_47 = 0x202020200a3a29;
  auStack_40[0] = 0;
  builtin_strncpy(local_a8,"not enou",8);
  local_a0[0] = 0x6563617073206867;
  local_a0[1] = 0x726f6620726f6620;
  local_a0[2] = 0x617078652074616d;
  local_a0[3] = 0x5028206e6f69736e;
  local_a0[4] = 0x757320657361656c;
  uStack_4f = 0x736775622f6772;
  uStack_48 = 0x2f;
  auStack_d0[0] = 0x140021c7f;
  lVar1 = -(_Size + 0x78 & 0xfffffffffffffff0);
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x28) = 0x6c75662074696d62;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x38) = 0x2074612074726f70;
  uVar2 = CONCAT71(local_47,uStack_48);
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x30) = 0x657220677562206c;
  *(undefined8 *)(&uStack_48 + lVar1) = uVar2;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x40) = 0x2f2f3a7370747468;
  builtin_strncpy(local_a8 + lVar1,"not enou",8);
  *(undefined8 *)((longlong)local_a0 + lVar1) = 0x6563617073206867;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 8) = 0x726f6620726f6620;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x10) = 0x617078652074616d;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x18) = 0x5028206e6f69736e;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x20) = 0x757320657361656c;
  *(undefined8 *)((longlong)local_a0 + lVar1 + 0x48) = 0x2e756e672e636367;
  *(undefined8 *)(&uStack_50 + lVar1) = 0x736775622f67726f;
  *(undefined8 *)((longlong)auStack_d0 + lVar1) = 0x140021d0d;
  memcpy(auStack_40 + lVar1,param_1,_Size);
  auStack_40[_Size + lVar1] = 0;
                    // WARNING: Subroutine does not return
  *(undefined **)((longlong)auStack_d0 + lVar1) = &UNK_140021d1d;
  std::__throw_logic_error(local_a8 + lVar1);
}



// __gnu_cxx::__verbose_terminate_handler()

void __gnu_cxx::__verbose_terminate_handler(void)

{
  _f__acrt_iob_func p_Var1;
  longlong lVar2;
  char *_Str;
  FILE *pFVar3;
  char *_Str_00;
  int local_1c;
  
  if (_data__ZZN9__gnu_cxx27__verbose_terminate_handlerEvE11terminating != '\0') {
    pFVar3 = (*__imp___acrt_iob_func)(2);
    fwrite("terminate called recursively\n",1,0x1d,(FILE *)pFVar3);
                    // WARNING: Subroutine does not return
    abort();
  }
  _data__ZZN9__gnu_cxx27__verbose_terminate_handlerEvE11terminating = '\x01';
  lVar2 = __cxa_current_exception_type();
  if (lVar2 != 0) {
    local_1c = -1;
    _Str_00 = *(char **)(lVar2 + 8) + (**(char **)(lVar2 + 8) == '*');
    _Str = __cxa_demangle(_Str_00,(char *)0x0,(ulonglong *)0x0,&local_1c);
    p_Var1 = __imp___acrt_iob_func;
    pFVar3 = (*__imp___acrt_iob_func)(2);
    fwrite("terminate called after throwing an instance of \'",1,0x30,(FILE *)pFVar3);
    if (local_1c == 0) {
      pFVar3 = (*p_Var1)(2);
      fputs(_Str,(FILE *)pFVar3);
    }
    else {
      pFVar3 = (*p_Var1)(2);
      fputs(_Str_00,(FILE *)pFVar3);
    }
    pFVar3 = (*p_Var1)(2);
    fwrite(&DAT_1400c4b51,1,2,(FILE *)pFVar3);
    if (local_1c == 0) {
      free(_Str);
    }
                    // WARNING: Subroutine does not return
    __cxa_rethrow();
  }
  pFVar3 = (*__imp___acrt_iob_func)(2);
  fwrite("terminate called without an active exception\n",1,0x2d,(FILE *)pFVar3);
                    // WARNING: Subroutine does not return
  abort();
}



// __gnu_cxx::__concurrence_broadcast_error::~__concurrence_broadcast_error()

void __thiscall
__gnu_cxx::__concurrence_broadcast_error::~__concurrence_broadcast_error
          (__concurrence_broadcast_error *this)

{
  *(undefined ***)this = &PTR____concurrence_broadcast_error_1400db8c0;
  std::exception::~exception();
  operator_delete(this);
  return;
}



// __gnu_cxx::__concurrence_broadcast_error::~__concurrence_broadcast_error()

void __thiscall
__gnu_cxx::__concurrence_broadcast_error::~__concurrence_broadcast_error
          (__concurrence_broadcast_error *this)

{
  *(undefined ***)this = &PTR____concurrence_broadcast_error_1400db8c0;
  std::exception::~exception();
  return;
}



// __gnu_cxx::__throw_concurrence_lock_error()

void __gnu_cxx::__throw_concurrence_lock_error(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR____concurrence_lock_error_1400db830;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&__concurrence_lock_error::typeinfo,
              __concurrence_lock_error::~__concurrence_lock_error);
}



// __gnu_cxx::__throw_concurrence_unlock_error()

void __gnu_cxx::__throw_concurrence_unlock_error(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&__concurrence_unlock_error::typeinfo,
              __concurrence_unlock_error::~__concurrence_unlock_error);
}



// __gnu_cxx::__throw_concurrence_broadcast_error()

void __gnu_cxx::__throw_concurrence_broadcast_error(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR____concurrence_broadcast_error_1400db8c0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&__concurrence_broadcast_error::typeinfo,
              __concurrence_broadcast_error::~__concurrence_broadcast_error);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<char const*,
// std::__cxx11::string > const&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >
// const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<char const*, std::string >
// const&, __gnu_cxx::__normal_iterator<char const*, std::string > const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<wchar_t const*,
// std::__cxx11::wstring > const&, __gnu_cxx::__normal_iterator<wchar_t const*,
// std::__cxx11::wstring > const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<wchar_t const*,
// std::wstring > const&, __gnu_cxx::__normal_iterator<wchar_t const*, std::wstring > const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string
// > const&, __gnu_cxx::__normal_iterator<char*, std::__cxx11::string > const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<char*, std::string >
// const&, __gnu_cxx::__normal_iterator<char*, std::string > const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<wchar_t*,
// std::__cxx11::wstring > const&, __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >
// const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// bool __gnu_cxx::TEMPNAMEPLACEHOLDERVALUE(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >
// const&, __gnu_cxx::__normal_iterator<wchar_t*, std::wstring > const&)

undefined8 __gnu_cxx::operator==(longlong *param_1,longlong *param_2)

{
  return CONCAT71((int7)((ulonglong)*param_2 >> 8),*param_1 == *param_2);
}



// __cxxabiv1::__class_type_info::__do_catch(std::type_info const*, void**, unsigned int) const

void __thiscall
__cxxabiv1::__class_type_info::__do_catch
          (__class_type_info *this,type_info *param_1,undefined8 param_2,uint param_3)

{
  undefined8 uVar1;
  
  uVar1 = std::type_info::operator==((type_info *)this,param_1);
  if (((char)uVar1 == '\0') && (param_3 < 4)) {
                    // WARNING: Could not recover jumptable at 0x00014002206a. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)(*(longlong *)param_1 + 0x28))(param_1,this,param_2);
    return;
  }
  return;
}



// __cxxabiv1::__class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info::__upcast_result&) const

void __thiscall
__cxxabiv1::__class_type_info::__do_upcast
          (__class_type_info *this,type_info *param_1,undefined8 param_2,undefined8 *param_3)

{
  undefined8 uVar1;
  
  uVar1 = std::type_info::operator==((type_info *)this,param_1);
  if ((char)uVar1 != '\0') {
    *param_3 = param_2;
    param_3[2] = 0x10;
    *(undefined4 *)(param_3 + 1) = 6;
  }
  return;
}



// __cxxabiv1::__class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const

bool __thiscall
__cxxabiv1::__class_type_info::__do_upcast
          (__class_type_info *this,undefined8 param_1,undefined8 *param_2)

{
  bool bVar1;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  
  local_20 = 0x1000000000;
  local_28 = 0;
  local_18 = 0;
  (**(code **)(*(longlong *)this + 0x30))(this,param_1,*param_2,&local_28);
  bVar1 = (~(uint)local_20 & 6) == 0;
  if (bVar1) {
    *param_2 = local_28;
  }
  return bVar1;
}



// __cxxabiv1::__class_type_info::__do_dyncast(long long, __cxxabiv1::__class_type_info::__sub_kind,
// __cxxabiv1::__class_type_info const*, void const*, __cxxabiv1::__class_type_info const*, void
// const*, __cxxabiv1::__class_type_info::__dyncast_result&) const

undefined8 __thiscall
__cxxabiv1::__class_type_info::__do_dyncast
          (__class_type_info *this,undefined8 param_1,undefined4 param_2,type_info *param_3,
          longlong param_4,type_info *param_5,longlong param_6,longlong *param_7)

{
  undefined8 uVar1;
  
  if (param_4 == param_6) {
    uVar1 = std::type_info::operator==((type_info *)this,param_5);
    if ((char)uVar1 != '\0') {
      *(undefined4 *)((longlong)param_7 + 0xc) = param_2;
      return 0;
    }
  }
  uVar1 = std::type_info::operator==((type_info *)this,param_3);
  if ((char)uVar1 != '\0') {
    *param_7 = param_4;
    *(undefined4 *)(param_7 + 1) = param_2;
    *(undefined4 *)(param_7 + 2) = 1;
  }
  return 0;
}



// __cxxabiv1::__class_type_info::__do_find_public_src(long long, void const*,
// __cxxabiv1::__class_type_info const*, void const*) const

char __thiscall
__cxxabiv1::__class_type_info::__do_find_public_src
          (__class_type_info *this,undefined8 param_2_00,longlong param_2,undefined8 param_4_00,
          longlong param_4)

{
  return (param_4 == param_2) * '\x05' + '\x01';
}



// __cxxabiv1::__si_class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info::__upcast_result&) const

void __thiscall
__cxxabiv1::__si_class_type_info::__do_upcast
          (__si_class_type_info *this,type_info *param_1,undefined8 param_2,undefined8 *param_3)

{
  char cVar1;
  
  cVar1 = __class_type_info::__do_upcast((__class_type_info *)this,param_1,param_2,param_3);
  if (cVar1 == '\0') {
                    // WARNING: Could not recover jumptable at 0x0001400221d9. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)(**(longlong **)(this + 0x10) + 0x30))
              (*(longlong **)(this + 0x10),param_1,param_2,param_3);
    return;
  }
  return;
}



// __cxxabiv1::__si_class_type_info::__do_dyncast(long long,
// __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info::__dyncast_result&) const

undefined8 __thiscall
__cxxabiv1::__si_class_type_info::__do_dyncast
          (__si_class_type_info *this,longlong param_1,undefined4 param_2,type_info *param_3,
          longlong param_4,type_info *param_5,longlong param_6,longlong *param_7)

{
  undefined8 uVar1;
  
  uVar1 = std::type_info::operator==((type_info *)this,param_3);
  if ((char)uVar1 != '\0') {
    *param_7 = param_4;
    *(undefined4 *)(param_7 + 1) = param_2;
    if (param_1 < 0) {
      if (param_1 == -2) {
        *(undefined4 *)(param_7 + 2) = 1;
      }
    }
    else {
      *(uint *)(param_7 + 2) = (uint)(param_6 == param_4 + param_1) * 5 + 1;
    }
    return 0;
  }
  if ((param_4 == param_6) &&
     (uVar1 = std::type_info::operator==((type_info *)this,param_5), (char)uVar1 != '\0')) {
    *(undefined4 *)((longlong)param_7 + 0xc) = param_2;
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140022285. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(**(longlong **)(this + 0x10) + 0x38))
                    (*(longlong **)(this + 0x10),param_1,param_2,param_3);
  return uVar1;
}



// __cxxabiv1::__si_class_type_info::__do_find_public_src(long long, void const*,
// __cxxabiv1::__class_type_info const*, void const*) const

undefined8 __thiscall
__cxxabiv1::__si_class_type_info::__do_find_public_src
          (__si_class_type_info *this,undefined8 param_1,longlong param_2,type_info *param_3,
          longlong param_4)

{
  undefined8 uVar1;
  
  if (param_4 == param_2) {
    uVar1 = std::type_info::operator==((type_info *)this,param_3);
    if ((char)uVar1 != '\0') {
      return 6;
    }
  }
                    // WARNING: Could not recover jumptable at 0x000140022331. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(**(longlong **)(this + 0x10) + 0x40))
                    (*(longlong **)(this + 0x10),param_1,param_2,param_3);
  return uVar1;
}



// __cxxabiv1::__vmi_class_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info::__upcast_result&) const

bool __thiscall
__cxxabiv1::__vmi_class_type_info::__do_upcast
          (__vmi_class_type_info *this,type_info *param_1,longlong *param_2,longlong *param_3)

{
  uint uVar1;
  ulonglong uVar2;
  type_info *ptVar3;
  char cVar4;
  longlong lVar5;
  undefined8 uVar6;
  __vmi_class_type_info *p_Var7;
  ulonglong uVar8;
  uint uVar9;
  bool bVar10;
  longlong local_68;
  uint uStack_60;
  uint uStack_5c;
  type_info *local_58;
  
  cVar4 = __class_type_info::__do_upcast((__class_type_info *)this,param_1,param_2,param_3);
  if (cVar4 == '\0') {
    uVar9 = *(uint *)((longlong)param_3 + 0xc);
    if ((uVar9 & 0x10) != 0) {
      uVar9 = *(uint *)(this + 0x10);
    }
    uVar8 = (ulonglong)*(uint *)(this + 0x14);
    if (uVar8 != 0) {
      p_Var7 = this + uVar8 * 0x10;
      do {
        while( true ) {
          uVar2 = *(ulonglong *)(p_Var7 + 0x10);
          uStack_60 = 0;
          local_68 = 0;
          local_58 = (type_info *)0x0;
          if (((uVar2 & 2) != 0) || ((uVar9 & 1) != 0)) break;
LAB_14002241f:
          p_Var7 = p_Var7 + -0x10;
          uVar8 = uVar8 - 1;
          if (uVar8 == 0) goto LAB_140022580;
        }
        lVar5 = 0;
        if (param_2 != (longlong *)0x0) {
          lVar5 = (longlong)uVar2 >> 8;
          if ((uVar2 & 1) != 0) {
            lVar5 = *(longlong *)(*param_2 + lVar5);
          }
          lVar5 = (longlong)param_2 + lVar5;
        }
        uStack_5c = uVar9;
        cVar4 = (**(code **)(**(longlong **)(p_Var7 + 8) + 0x30))
                          (*(longlong **)(p_Var7 + 8),param_1,lVar5,&local_68);
        if (cVar4 == '\0') goto LAB_14002241f;
        if ((local_58 == (type_info *)&DAT_00000010) && ((uVar2 & 1) != 0)) {
          local_58 = *(type_info **)(p_Var7 + 8);
        }
        if (((uVar2 & 2) == 0) && (3 < (int)uStack_60)) {
          uStack_60 = uStack_60 & 0xfffffffd;
        }
        ptVar3 = (type_info *)param_3[2];
        if (ptVar3 != (type_info *)0x0) {
          if (*param_3 == local_68) {
            if (*param_3 != 0) {
LAB_140022417:
              *(uint *)(param_3 + 1) = *(uint *)(param_3 + 1) | uStack_60;
              goto LAB_14002241f;
            }
            if ((ptVar3 != (type_info *)&DAT_00000010) && (local_58 != (type_info *)&DAT_00000010))
            {
              uVar6 = std::type_info::operator==(local_58,ptVar3);
              if ((char)uVar6 != '\0') goto LAB_140022417;
            }
            *(undefined4 *)(param_3 + 1) = 2;
          }
          else {
            *param_3 = 0;
            *(undefined4 *)(param_3 + 1) = 2;
          }
          goto LAB_140022500;
        }
        param_3[2] = (longlong)local_58;
        *param_3 = local_68;
        param_3[1] = CONCAT44(uStack_5c,uStack_60);
        uVar1 = *(uint *)(param_3 + 1);
        if ((int)uVar1 < 4) goto LAB_140022500;
        if ((uVar1 & 2) != 0) {
          if (((byte)this[0x10] & 1) != 0) goto LAB_14002241f;
          goto LAB_140022500;
        }
        if (((uVar1 & 1) == 0) || (((byte)this[0x10] & 2) == 0)) goto LAB_140022500;
        p_Var7 = p_Var7 + -0x10;
        uVar8 = uVar8 - 1;
      } while (uVar8 != 0);
    }
LAB_140022580:
    bVar10 = (int)param_3[1] != 0;
  }
  else {
LAB_140022500:
    bVar10 = true;
  }
  return bVar10;
}



// __cxxabiv1::__vmi_class_type_info::__do_dyncast(long long,
// __cxxabiv1::__class_type_info::__sub_kind, __cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info const*, void const*,
// __cxxabiv1::__class_type_info::__dyncast_result&) const

uint __thiscall
__cxxabiv1::__vmi_class_type_info::__do_dyncast
          (__vmi_class_type_info *this,longlong param_1,uint param_2,type_info *param_3,
          longlong *param_4,type_info *param_5,longlong *param_6,longlong *param_7)

{
  ulonglong uVar1;
  uint uVar2;
  uint uVar3;
  undefined8 uVar4;
  longlong lVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  uint uVar8;
  byte bVar9;
  byte local_6b;
  bool local_6a;
  byte local_69;
  longlong local_68;
  undefined8 local_60;
  ulonglong local_58;
  
  if ((*(byte *)((longlong)param_7 + 0x14) & 0x10) != 0) {
    *(undefined4 *)((longlong)param_7 + 0x14) = *(undefined4 *)(this + 0x10);
  }
  if ((param_4 == param_6) &&
     (uVar4 = std::type_info::operator==((type_info *)this,param_5), (char)uVar4 != '\0')) {
    *(uint *)((longlong)param_7 + 0xc) = param_2;
  }
  else {
    uVar4 = std::type_info::operator==((type_info *)this,param_3);
    if ((char)uVar4 == '\0') {
      local_69 = 0;
      local_6a = true;
      uVar6 = (longlong)param_6 - param_1;
      if (param_1 < 0) {
        uVar6 = 0;
      }
      local_6b = 0;
      do {
        uVar7 = (ulonglong)*(uint *)(this + 0x14);
joined_r0x000140022655:
        if (uVar7 != 0) {
          do {
            local_68 = 0;
            uVar1 = *(ulonglong *)(this + uVar7 * 0x10 + 0x10);
            local_58 = (ulonglong)*(uint *)((longlong)param_7 + 0x14) << 0x20;
            local_60 = 0;
            lVar5 = (longlong)uVar1 >> 8;
            uVar8 = param_2;
            if ((uVar1 & 1) != 0) {
              uVar8 = param_2 | 1;
              lVar5 = *(longlong *)(*param_4 + lVar5);
            }
            if ((uVar6 == 0) || (local_6a != uVar6 < (ulonglong)(lVar5 + (longlong)param_4))) {
              if ((uVar1 & 2) == 0) {
                if ((param_1 == -2) && ((*(uint *)((longlong)param_7 + 0x14) & 3) == 0))
                goto code_r0x00014002289a;
                uVar8 = uVar8 & 0xfffffffd;
              }
              uVar2 = (**(code **)(**(longlong **)(this + uVar7 * 0x10 + 8) + 0x38))
                                (*(longlong **)(this + uVar7 * 0x10 + 8),param_1,uVar8,param_3,
                                 lVar5 + (longlong)param_4,param_5,param_6,&local_68);
              uVar3 = (uint)local_58;
              uVar8 = *(uint *)((longlong)param_7 + 0xc) | local_60._4_4_;
              *(uint *)((longlong)param_7 + 0xc) = uVar8;
              if (((uint)local_58 & 0xfffffffb) == 2) {
                *(uint *)(param_7 + 2) = (uint)local_58;
                *param_7 = local_68;
                *(uint *)(param_7 + 1) = (uint)local_60;
                return uVar2;
              }
              lVar5 = *param_7;
              bVar9 = (byte)uVar2;
              if (local_6b == 0) {
                if (lVar5 != 0) goto LAB_140022681;
                *param_7 = local_68;
                *(uint *)(param_7 + 1) = (uint)local_60;
                local_6b = bVar9;
                if (((uVar8 != 0) && (local_68 != 0)) && (((byte)this[0x10] & 1) == 0)) {
                  return uVar2;
                }
              }
              else if (lVar5 == 0) {
                if (local_68 == 0) goto joined_r0x0001400228e2;
                uVar2 = *(uint *)(param_7 + 2);
joined_r0x00014002269a:
                if ((3 < (int)uVar8) &&
                   (((uVar8 & 1) == 0 || ((*(byte *)((longlong)param_7 + 0x14) & 2) == 0)))) {
                  if (uVar2 == 0) {
                    uVar2 = 1;
                  }
                  if ((uint)local_58 == 0) {
                    uVar3 = 1;
                  }
                  goto LAB_1400226bd;
                }
                if ((int)uVar2 < 1) {
                  if ((int)(uint)local_58 < 4) {
                    if (param_1 < 0) {
                      if (param_1 != -2) {
LAB_140022bbb:
                        uVar2 = (**(code **)(*(longlong *)param_3 + 0x40))
                                          (param_3,param_1,lVar5,param_5,param_6);
                        if ((int)uVar3 < 1) {
                          if ((int)uVar2 < 4) goto LAB_140022b3f;
                          goto LAB_140022841;
                        }
                        goto LAB_1400226bd;
                      }
                      if (0 < (int)(uint)local_58) goto LAB_140022c23;
                      goto LAB_14002292e;
                    }
                    if (param_6 == (longlong *)(lVar5 + param_1)) {
                      if ((int)(uint)local_58 < 1) goto LAB_140022ab0;
                      uVar2 = 6;
                    }
                    else {
                      if ((int)(uint)local_58 < 1) {
                        if (param_6 == (longlong *)(param_1 + local_68)) goto LAB_140022aa6;
                        goto LAB_14002292e;
                      }
LAB_140022c23:
                      uVar2 = 1;
                    }
LAB_1400226bd:
                    if ((int)(uVar3 ^ uVar2) < 4) {
LAB_140022920:
                      if (3 < (int)(uVar3 & uVar2)) {
                        *param_7 = 0;
                        *(undefined4 *)(param_7 + 2) = 2;
                        return 1;
                      }
                      goto LAB_14002292b;
                    }
                    if (3 < (int)uVar3) goto LAB_1400226d8;
                    uVar8 = uVar2 & 2;
                  }
                  else {
                    if ((local_58 & 1) == 0) {
                      if (((uint)local_58 ^ 1) < 4) goto LAB_14002292e;
                    }
                    else {
                      if (((byte)this[0x10] & 2) != 0) {
                        if (param_1 < 0) {
                          if (param_1 == -2) goto LAB_140022c23;
                          goto LAB_140022bbb;
                        }
                        uVar2 = (uint)(param_6 == (longlong *)(lVar5 + param_1)) * 5 + 1;
                        goto LAB_1400226bd;
                      }
                      if (((uint)local_58 ^ 1) < 4) goto LAB_14002292b;
                    }
LAB_1400226d8:
                    *param_7 = local_68;
                    local_6b = 0;
                    uVar8 = uVar3 & 2;
                    *(uint *)(param_7 + 1) = (uint)local_60;
                    uVar2 = uVar3;
                  }
LAB_1400226ec:
                  *(uint *)(param_7 + 2) = uVar2;
                  if (uVar8 != 0) {
                    return 0;
                  }
                  if ((uVar2 & 1) == 0) {
                    return 0;
                  }
                }
                else {
                  if (0 < (int)(uint)local_58) goto LAB_1400226bd;
                  if (uVar2 < 4) {
                    if (param_1 < 0) {
                      if (param_1 != -2) {
LAB_140022b3f:
                        uVar3 = (**(code **)(*(longlong *)param_3 + 0x40))
                                          (param_3,param_1,local_68,param_5,param_6);
                        goto LAB_1400226bd;
                      }
                    }
                    else if (param_6 == (longlong *)(param_1 + local_68)) {
LAB_140022aa6:
                      *param_7 = local_68;
                      *(uint *)(param_7 + 1) = (uint)local_60;
LAB_140022ab0:
                      *(undefined4 *)(param_7 + 2) = 6;
                      return 0;
                    }
LAB_14002292b:
                    uVar8 = *(uint *)((longlong)param_7 + 0xc);
LAB_14002292e:
                    *param_7 = 0;
                    *(undefined4 *)(param_7 + 2) = 1;
                    local_6b = 1;
                    goto joined_r0x0001400228e2;
                  }
LAB_140022841:
                  if ((uVar2 & 1) == 0) {
                    if (3 < (uVar2 ^ 1)) {
                      *(uint *)(param_7 + 2) = uVar2;
                      return 0;
                    }
                    goto LAB_14002292b;
                  }
                  if (((byte)this[0x10] & 2) != 0) {
                    if (param_1 < 0) {
                      if (param_1 != -2) goto LAB_140022b3f;
LAB_140022a3d:
                      uVar8 = uVar2 & 2;
                      if ((uVar2 ^ 1) < 4) goto LAB_14002292b;
                      goto LAB_1400226ec;
                    }
                    if (param_6 != (longlong *)(param_1 + local_68)) goto LAB_140022a3d;
                    if (3 < (uVar2 ^ 6)) goto LAB_140022aa6;
                    uVar3 = 6;
                    goto LAB_140022920;
                  }
                  if ((uVar2 ^ 1) < 4) goto LAB_14002292b;
                  *(uint *)(param_7 + 2) = uVar2;
                  if ((uVar2 & 2) != 0) {
                    return 0;
                  }
                }
                uVar8 = *(uint *)((longlong)param_7 + 0xc);
              }
              else {
LAB_140022681:
                if (lVar5 == local_68) {
                  *(uint *)(param_7 + 1) = *(uint *)(param_7 + 1) | (uint)local_60;
                }
                else if ((local_68 != 0) || (bVar9 != 0)) {
                  uVar2 = *(uint *)(param_7 + 2);
                  goto joined_r0x00014002269a;
                }
              }
joined_r0x0001400228e2:
              if (uVar8 == 4) goto LAB_1400228f0;
            }
            else {
              local_69 = 1;
            }
            uVar7 = uVar7 - 1;
            if (uVar7 == 0) break;
          } while( true );
        }
        local_69 = local_69 & local_6a;
        if (local_69 == 0) {
LAB_1400228f0:
          return (uint)local_6b;
        }
        local_6a = false;
      } while( true );
    }
    *param_7 = (longlong)param_4;
    *(uint *)(param_7 + 1) = param_2;
    if (param_1 < 0) {
      if (param_1 == -2) {
        *(undefined4 *)(param_7 + 2) = 1;
      }
    }
    else {
      *(uint *)(param_7 + 2) = (uint)(param_6 == (longlong *)((longlong)param_4 + param_1)) * 5 + 1;
    }
  }
  return 0;
code_r0x00014002289a:
  uVar7 = uVar7 - 1;
  goto joined_r0x000140022655;
}



// __cxxabiv1::__vmi_class_type_info::__do_find_public_src(long long, void const*,
// __cxxabiv1::__class_type_info const*, void const*) const

uint __thiscall
__cxxabiv1::__vmi_class_type_info::__do_find_public_src
          (__vmi_class_type_info *this,longlong param_1,longlong *param_2,type_info *param_3,
          longlong *param_4)

{
  ulonglong uVar1;
  uint uVar2;
  undefined8 uVar3;
  longlong lVar4;
  __vmi_class_type_info *p_Var5;
  ulonglong uVar6;
  
  if ((param_2 == param_4) &&
     (uVar3 = std::type_info::operator==((type_info *)this,param_3), (char)uVar3 != '\0')) {
    return 6;
  }
  uVar6 = (ulonglong)*(uint *)(this + 0x14);
  p_Var5 = this + uVar6 * 0x10;
  do {
    if (uVar6 == 0) {
      return 1;
    }
    uVar1 = *(ulonglong *)(p_Var5 + 0x10);
    if ((uVar1 & 2) != 0) {
      lVar4 = (longlong)uVar1 >> 8;
      if ((uVar1 & 1) != 0) {
        if (param_1 == -3) goto LAB_140022d21;
        lVar4 = *(longlong *)(*param_2 + lVar4);
      }
      uVar2 = (**(code **)(**(longlong **)(p_Var5 + 8) + 0x40))
                        (*(longlong **)(p_Var5 + 8),param_1,(longlong)param_2 + lVar4,param_3,
                         param_4);
      if (3 < (int)uVar2) {
        return uVar2 | (uint)uVar1 & 1;
      }
    }
LAB_140022d21:
    p_Var5 = p_Var5 + -0x10;
    uVar6 = uVar6 - 1;
  } while( true );
}



char * _text__ZNK12_GLOBAL__N_117io_error_category4nameEv(void)

{
  return "iostream";
}



string * _text__ZNK12_GLOBAL__N_117io_error_category7messageB5cxx11Ei
                   (string *param_1,undefined8 param_2,int param_3)

{
  *(undefined8 *)(param_1 + 8) = 0;
  *(string **)param_1 = param_1 + 0x10;
  param_1[0x10] = (string)0x0;
  if (param_3 != 1) {
    std::__cxx11::string::_M_replace(param_1,0,0,(string *)"Unknown error",0xd);
    return param_1;
  }
  std::__cxx11::string::_M_replace(param_1,0,0,(string *)"iostream error",0xe);
  return param_1;
}



bool _text__ZNK12_GLOBAL__N_121system_error_category10equivalentEiRKSt15error_condition
               (undefined8 param_1,int param_2,int *param_3)

{
  int local_18 [2];
  longlong local_10;
  
  _text__ZNK12_GLOBAL__N_121system_error_category23default_error_conditionEi
            (local_18,param_1,param_2);
  if (*(longlong *)(param_3 + 2) != local_10) {
    return false;
  }
  return *param_3 == local_18[0];
}



void _text__ZNK12_GLOBAL__N_121system_error_category23default_error_conditionEi
               (int *param_1,undefined8 param_2,int param_3)

{
  if (param_3 < 0x218) {
    switch(param_3) {
    case 0:
      *param_1 = 0;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 2:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 3:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 4:
      *param_1 = 0x18;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 5:
      *param_1 = 0xd;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 6:
      *param_1 = 9;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 8:
      *param_1 = 0xc;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xd:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xe:
      *param_1 = 0xc;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xf:
      *param_1 = 0x13;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x11:
      *param_1 = 0x12;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x13:
      *param_1 = 0x1e;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x14:
      *param_1 = 0x13;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x17:
      *param_1 = 5;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x19:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x1b:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x20:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x21:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x24:
      *param_1 = 0x27;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x27:
      *param_1 = 0x1c;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x32:
      *param_1 = 0x28;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x35:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x37:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x3a:
      *param_1 = 0x28;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x3b:
      *param_1 = 5;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x40:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x43:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x50:
      *param_1 = 0x11;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x52:
      *param_1 = 1;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x57:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x59:
      *param_1 = 0xb;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x68:
      *param_1 = 4;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x6d:
      *param_1 = 0x20;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x6e:
      *param_1 = 5;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x70:
      *param_1 = 0x1c;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x71:
      *param_1 = 0x17;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x78:
      *param_1 = 0x28;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x7b:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x7e:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x7f:
      *param_1 = 3;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x81:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x83:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x91:
      *param_1 = 0x29;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x9c:
      *param_1 = 5;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xa1:
      *param_1 = 2;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xa2:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xa4:
      *param_1 = 0xb;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xaa:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xb7:
      *param_1 = 0x11;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xbf:
      *param_1 = 8;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xc0:
      *param_1 = 8;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xc1:
      *param_1 = 8;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xc5:
      *param_1 = 8;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xcd:
      *param_1 = 5;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xce:
      *param_1 = 0x26;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xd0:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xd1:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xd2:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xd8:
      *param_1 = 8;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xe6:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xe7:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xe8:
      *param_1 = 0x20;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xea:
      *param_1 = 0x73;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0xfe:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x10b:
      *param_1 = 0x14;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x120:
      *param_1 = 1;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x1e7:
      *param_1 = 0x16;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    case 0x217:
      *param_1 = 0x10;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    }
  }
  else if (param_3 < 0x4ca) {
    if (param_3 < 0x44c) {
      if (param_3 < 0x3f1) {
        if (0x3e3 < param_3) {
          switch(param_3) {
          case 0x3e4:
            *param_1 = 0xb;
            *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
            return;
          case 0x3e5:
            *param_1 = 0xb;
            *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
            return;
          case 0x3e6:
            *param_1 = 0xe;
            *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
            return;
          case 0x3ee:
            *param_1 = 6;
            *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
            return;
          case 0x3f0:
            *param_1 = 0x16;
            *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
            return;
          }
        }
      }
      else {
        if (param_3 == 0x41d) {
          *param_1 = 0x10;
          *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
          return;
        }
        if (param_3 == 0x42b) {
          *param_1 = 0xe;
          *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
          return;
        }
      }
    }
    else {
      switch(param_3) {
      case 0x44c:
        *param_1 = 0x1c;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x44d:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x44e:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x44f:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x450:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x452:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x457:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x45d:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x469:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x46b:
        *param_1 = 0x24;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x476:
        *param_1 = 0x1f;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x48d:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x48e:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x4b0:
        *param_1 = 0x13;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x4c7:
        *param_1 = 4;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x4c9:
        *param_1 = 0x6b;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
    }
  }
  else if (param_3 < 0x5b5) {
    if (param_3 < 0x570) {
      if (param_3 == 0x522) {
        *param_1 = 1;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
      if (param_3 == 0x534) {
        *param_1 = 0x16;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
    }
    else {
      switch(param_3) {
      case 0x570:
        *param_1 = 0x11;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x571:
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5aa:
        *param_1 = 0x1b;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5ab:
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5ac:
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5ad:
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5ae:
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5af:
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      case 0x5b4:
        *param_1 = 0x10;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
    }
  }
  else {
    if (param_3 == 0x962) {
      *param_1 = 0xb;
      *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
      return;
    }
    if (param_3 < 0x963) {
      if (param_3 == 0x89a) {
        *param_1 = 0x16;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
      if (param_3 == 0x961) {
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
      if (param_3 == 0x718) {
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
    }
    else {
      if (param_3 == 0x964) {
        *param_1 = 0xb;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
      if (param_3 == 0x2095) {
        *param_1 = 5;
        *(undefined ***)(param_1 + 2) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
        return;
      }
    }
  }
  *param_1 = param_3;
  *(undefined8 *)(param_1 + 2) = param_2;
  return;
}



char * _text__ZNK12_GLOBAL__N_121system_error_category4nameEv(void)

{
  return "system";
}



longlong *
_text__ZNK12_GLOBAL__N_121system_error_category7messageB5cxx11Ei
          (longlong *param_1,undefined8 param_2,DWORD param_3)

{
  undefined1 *hMem;
  DWORD DVar1;
  ulonglong uVar2;
  undefined1 *local_20 [2];
  
  local_20[0] = (undefined1 *)0x0;
  DVar1 = FormatMessageA(0x1100,(LPCVOID)0x0,param_3,0x400,(LPSTR)local_20,0,(va_list *)0x0);
  hMem = local_20[0];
  if (DVar1 == 0) {
    *param_1 = (longlong)(param_1 + 2);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,"Unknown error code",0x1400c932c);
    return param_1;
  }
  uVar2 = (ulonglong)DVar1;
  if (((3 < DVar1) && (*(short *)(local_20[0] + (uVar2 - 3)) == 0xd2e)) &&
     ((char)*(short *)((longlong)(local_20[0] + (uVar2 - 3)) + 2) == '\n')) {
    uVar2 = (ulonglong)(DVar1 - 3);
  }
  *param_1 = (longlong)(param_1 + 2);
  if (local_20[0] != (undefined1 *)0x0) {
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,local_20[0],(longlong)(local_20[0] + uVar2));
    LocalFree(hMem);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("basic_string: construction from null is not valid");
}



bool _text__ZNK12_GLOBAL__N_122generic_error_category10equivalentEiRKSt15error_condition
               (longlong param_1,int param_2,int *param_3)

{
  if (param_2 != *param_3) {
    return false;
  }
  return *(longlong *)(param_3 + 2) == param_1;
}



char * _text__ZNK12_GLOBAL__N_122generic_error_category4nameEv(void)

{
  return "generic";
}



longlong *
_text__ZNK12_GLOBAL__N_122generic_error_category7messageB5cxx11Ei
          (longlong *param_1,undefined8 param_2,int param_3)

{
  char *_Str;
  size_t sVar1;
  
  _Str = strerror(param_3);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("basic_string: construction from null is not valid");
}



// __gnu_cxx::__concurrence_lock_error::what() const

char * __gnu_cxx::__concurrence_lock_error::what(void)

{
  return "__gnu_cxx::__concurrence_lock_error";
}



// __gnu_cxx::__concurrence_wait_error::what() const

char * __gnu_cxx::__concurrence_wait_error::what(void)

{
  return "__gnu_cxx::__concurrence_wait_error";
}



// __gnu_cxx::__concurrence_unlock_error::what() const

char * __gnu_cxx::__concurrence_unlock_error::what(void)

{
  return "__gnu_cxx::__concurrence_unlock_error";
}



// __gnu_cxx::__concurrence_broadcast_error::what() const

char * __gnu_cxx::__concurrence_broadcast_error::what(void)

{
  return "__gnu_cxx::__concurrence_broadcast_error";
}



// std::wstring::_M_disjunct(wchar_t const*) const

ulonglong __thiscall std::wstring::_M_disjunct(wstring *this,ulonglong param_1)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)this;
  uVar2 = 1;
  if (uVar1 <= param_1) {
    uVar2 = CONCAT71((int7)((ulonglong)*(longlong *)(uVar1 - 0x18) >> 8),
                     uVar1 + *(longlong *)(uVar1 - 0x18) * 2 < param_1);
  }
  return uVar2 & 0xffffffff;
}



// std::wstring::find_last_of(wchar_t const*, unsigned long long) const

void __thiscall std::wstring::find_last_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find_last_of(this,param_1,param_2,sVar1);
  return;
}



// std::wstring::find_last_of(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::wstring::find_last_of(wstring *this,short *param_1,ulonglong param_2,longlong param_3)

{
  short *psVar1;
  longlong lVar2;
  ulonglong uVar3;
  bool bVar4;
  
  lVar2 = *(longlong *)(*(longlong *)this + -0x18);
  if ((lVar2 == 0) || (param_3 == 0)) {
    return 0xffffffffffffffff;
  }
  uVar3 = lVar2 - 1;
  if (param_2 < uVar3) {
    uVar3 = param_2;
  }
  if (param_1 == (short *)0x0) {
    do {
      if (uVar3 == 0) {
        return 0xffffffffffffffff;
      }
      bVar4 = uVar3 != 1;
      uVar3 = uVar3 - 2;
    } while (bVar4);
    return 0xffffffffffffffff;
  }
  do {
    psVar1 = param_1;
    lVar2 = param_3;
    do {
      if (*(short *)(*(longlong *)this + uVar3 * 2) == *psVar1) {
        return uVar3;
      }
      psVar1 = psVar1 + 1;
      lVar2 = lVar2 + -1;
    } while (lVar2 != 0);
    bVar4 = uVar3 != 0;
    uVar3 = uVar3 - 1;
  } while (bVar4);
  return 0xffffffffffffffff;
}



// std::wstring::find_last_of(std::wstring const&, unsigned long long) const

void __thiscall std::wstring::find_last_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find_last_of(this,(short *)*param_1,param_2,*(longlong *)((short *)*param_1 + -0xc));
  return;
}



// std::wstring::find_last_of(wchar_t, unsigned long long) const

ulonglong __thiscall std::wstring::find_last_of(wstring *this,short param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  
  uVar2 = 0xffffffffffffffff;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (uVar2 <= param_2) {
      param_2 = uVar2;
    }
    do {
      uVar2 = param_2 - 1;
      if (param_1 == *(short *)(*(longlong *)this + 2 + uVar2 * 2)) {
        return param_2;
      }
      param_2 = uVar2;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return uVar2;
}



// std::wstring::find_first_of(wchar_t const*, unsigned long long) const

void __thiscall std::wstring::find_first_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find_first_of(this,param_1,param_2,sVar1);
  return;
}



// std::wstring::find_first_of(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::wstring::find_first_of(wstring *this,short *param_1,ulonglong param_2,longlong param_3)

{
  ulonglong uVar1;
  short *psVar2;
  longlong lVar3;
  
  if (param_3 != 0) {
    uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
    for (; param_2 < uVar1; param_2 = param_2 + 1) {
      if (param_1 != (short *)0x0) {
        do {
          psVar2 = param_1;
          lVar3 = param_3;
          do {
            if (*(short *)(*(longlong *)this + param_2 * 2) == *psVar2) {
              return param_2;
            }
            psVar2 = psVar2 + 1;
            lVar3 = lVar3 + -1;
          } while (lVar3 != 0);
          param_2 = param_2 + 1;
        } while (param_2 < uVar1);
        return 0xffffffffffffffff;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::wstring::find_first_of(std::wstring const&, unsigned long long) const

void __thiscall std::wstring::find_first_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find_first_of(this,(short *)*param_1,param_2,*(longlong *)((short *)*param_1 + -0xc));
  return;
}



// std::wstring::find_first_of(wchar_t, unsigned long long) const

void __thiscall std::wstring::find_first_of(wstring *this,short param_1,ulonglong param_2)

{
  find(this,param_1,param_2);
  return;
}



// std::wstring::get_allocator() const

wstring * __thiscall std::wstring::get_allocator(wstring *this)

{
  return this;
}



// std::wstring::_M_check_length(unsigned long long, unsigned long long, char const*) const

void __thiscall
std::wstring::_M_check_length(wstring *this,longlong param_1,ulonglong param_2,char *param_3)

{
  if (param_2 <=
      (ulonglong)((param_1 + 0x1ffffffffffffffc) - *(longlong *)(*(longlong *)this + -0x18))) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error(param_3);
}



// std::wstring::find_last_not_of(wchar_t const*, unsigned long long) const

void __thiscall std::wstring::find_last_not_of(wstring *this,wchar_t *param_1,short *param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find_last_not_of(this,param_1,param_2,sVar1);
  return;
}



// std::wstring::find_last_not_of(wchar_t const*, unsigned long long, unsigned long long) const

short * __thiscall
std::wstring::find_last_not_of(wstring *this,short *param_1,short *param_2,longlong param_3)

{
  short *psVar1;
  short *psVar2;
  longlong lVar3;
  short *psVar4;
  
  psVar4 = (short *)0xffffffffffffffff;
  lVar3 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar3 != 0) {
    psVar2 = (short *)(lVar3 - 1);
    psVar4 = param_2;
    if (psVar2 <= param_2) {
      psVar4 = psVar2;
    }
    psVar1 = psVar4;
    psVar2 = param_1;
    if (param_3 != 0) {
      while (psVar4 = psVar1, psVar2 != (short *)0x0) {
        psVar2 = param_1;
        lVar3 = param_3;
        while (*(short *)(*(longlong *)this + (longlong)psVar4 * 2) != *psVar2) {
          psVar2 = psVar2 + 1;
          lVar3 = lVar3 + -1;
          if (lVar3 == 0) {
            return psVar4;
          }
        }
        psVar1 = (short *)((longlong)psVar4 - 1);
        psVar2 = psVar4;
      }
    }
  }
  return psVar4;
}



// std::wstring::find_last_not_of(std::wstring const&, unsigned long long) const

void __thiscall std::wstring::find_last_not_of(wstring *this,undefined8 *param_1,short *param_2)

{
  find_last_not_of(this,(short *)*param_1,param_2,*(longlong *)((short *)*param_1 + -0xc));
  return;
}



// std::wstring::find_last_not_of(wchar_t, unsigned long long) const

ulonglong __thiscall std::wstring::find_last_not_of(wstring *this,short param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  bool bVar3;
  
  uVar2 = 0xffffffffffffffff;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (uVar2 <= param_2) {
      param_2 = uVar2;
    }
    do {
      if (*(short *)(*(longlong *)this + param_2 * 2) != param_1) {
        return param_2;
      }
      bVar3 = param_2 != 0;
      uVar2 = param_2 - 1;
      param_2 = uVar2;
    } while (bVar3);
  }
  return uVar2;
}



// std::wstring::find_first_not_of(wchar_t const*, unsigned long long) const

ulonglong __thiscall
std::wstring::find_first_not_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  longlong lVar1;
  size_t sVar2;
  wchar_t *pwVar3;
  size_t sVar4;
  wchar_t wVar5;
  
  sVar2 = wcslen(param_1);
  lVar1 = *(longlong *)this;
  if (param_2 < *(ulonglong *)(lVar1 + -0x18)) {
    if ((param_1 == (wchar_t *)0x0) || (sVar2 == 0)) {
      return param_2;
    }
    wVar5 = *(wchar_t *)(lVar1 + param_2 * 2);
    pwVar3 = param_1;
    sVar4 = sVar2;
    do {
      while (*pwVar3 == wVar5) {
        param_2 = param_2 + 1;
        if (param_2 == *(ulonglong *)(lVar1 + -0x18)) goto LAB_140023ce0;
        pwVar3 = param_1;
        sVar4 = sVar2;
        wVar5 = *(wchar_t *)(lVar1 + param_2 * 2);
      }
      sVar4 = sVar4 - 1;
      pwVar3 = pwVar3 + 1;
    } while (sVar4 != 0);
  }
  else {
LAB_140023ce0:
    param_2 = 0xffffffffffffffff;
  }
  return param_2;
}



// std::wstring::find_first_not_of(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::wstring::find_first_not_of(wstring *this,short *param_1,ulonglong param_2,longlong param_3)

{
  ulonglong uVar1;
  short *psVar2;
  longlong lVar3;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (param_2 < uVar1) {
    if (param_1 == (short *)0x0) {
      return param_2;
    }
    if (param_3 == 0) {
      return param_2;
    }
    do {
      psVar2 = param_1;
      lVar3 = param_3;
      while (*psVar2 != *(short *)(*(longlong *)this + param_2 * 2)) {
        psVar2 = psVar2 + 1;
        lVar3 = lVar3 + -1;
        if (lVar3 == 0) {
          return param_2;
        }
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



// std::wstring::find_first_not_of(std::wstring const&, unsigned long long) const

ulonglong __thiscall
std::wstring::find_first_not_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  short *psVar1;
  longlong lVar2;
  longlong lVar3;
  short *psVar4;
  short sVar5;
  
  psVar1 = (short *)*param_1;
  lVar2 = *(longlong *)this;
  if (param_2 < *(ulonglong *)(lVar2 + -0x18)) {
    sVar5 = *(short *)(lVar2 + param_2 * 2);
    psVar4 = psVar1;
    for (lVar3 = *(longlong *)(psVar1 + -0xc); lVar3 != 0; lVar3 = lVar3 + -1) {
      while (sVar5 == *psVar4) {
        param_2 = param_2 + 1;
        if (param_2 == *(ulonglong *)(lVar2 + -0x18)) goto LAB_140023db0;
        lVar3 = *(longlong *)(psVar1 + -0xc);
        psVar4 = psVar1;
        sVar5 = *(short *)(lVar2 + param_2 * 2);
      }
      psVar4 = psVar4 + 1;
    }
  }
  else {
LAB_140023db0:
    param_2 = 0xffffffffffffffff;
  }
  return param_2;
}



// std::wstring::find_first_not_of(wchar_t, unsigned long long) const

ulonglong __thiscall std::wstring::find_first_not_of(wstring *this,short param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (param_2 < uVar1) {
    do {
      if (*(short *)(*(longlong *)this + param_2 * 2) != param_1) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



// std::wstring::at(unsigned long long) const

longlong __thiscall
std::wstring::at(wstring *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (param_1 < uVar1) {
    return *(longlong *)this + param_1 * 2;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,uVar1,
             param_3);
}



// std::wstring::end() const

longlong __thiscall std::wstring::end(wstring *this)

{
  return *(longlong *)this + *(longlong *)(*(longlong *)this + -0x18) * 2;
}



// std::wstring::_Rep::_M_is_leaked() const

uint __thiscall std::wstring::_Rep::_M_is_leaked(_Rep *this)

{
  return *(uint *)(this + 0x10) >> 0x1f;
}



// std::wstring::_Rep::_M_is_shared() const

undefined4 __thiscall std::wstring::_Rep::_M_is_shared(_Rep *this)

{
  if (_CRT_MT == 0) {
    return CONCAT31((int3)((uint)*(int *)(this + 0x10) >> 8),0 < *(int *)(this + 0x10));
  }
  return CONCAT31((int3)((uint)*(int *)(this + 0x10) >> 8),0 < *(int *)(this + 0x10));
}



// std::wstring::back() const

longlong __thiscall std::wstring::back(wstring *this)

{
  return *(longlong *)this + -2 + *(longlong *)(*(longlong *)this + -0x18) * 2;
}



// std::wstring::cend() const

longlong __thiscall std::wstring::cend(wstring *this)

{
  return *(longlong *)this + *(longlong *)(*(longlong *)this + -0x18) * 2;
}



// std::wstring::copy(wchar_t*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::wstring::copy(wstring *this,undefined2 *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c50cc,param_3,uVar1);
  }
  uVar2 = uVar1 - param_3;
  if (param_2 < uVar1 - param_3) {
    uVar2 = param_2;
  }
  if (uVar2 != 0) {
    _Src = (undefined2 *)(*(longlong *)this + param_3 * 2);
    if (uVar2 == 1) {
      *param_1 = *_Src;
      return 1;
    }
    memcpy(param_1,_Src,uVar2 * 2);
  }
  return uVar2;
}



// std::wstring::data() const

undefined8 __thiscall std::wstring::data(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::find(wchar_t const*, unsigned long long) const

void __thiscall std::wstring::find(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find(this,param_1,param_2,sVar1);
  return;
}



// std::wstring::find(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::wstring::find(wstring *this,short *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  short *psVar5;
  
  lVar1 = *(longlong *)this;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_3 == 0) {
    uVar4 = 0xffffffffffffffff;
    if (param_2 <= uVar2) {
      uVar4 = param_2;
    }
    return uVar4;
  }
  if (param_2 < uVar2) {
    psVar5 = (short *)(lVar1 + param_2 * 2);
    if (param_3 <= uVar2 - param_2) {
      lVar3 = (uVar2 - param_2) + (1 - param_3);
      if (lVar3 != 0) {
        do {
          while (*param_1 == *psVar5) {
            if (param_1 == psVar5) {
LAB_140024008:
              return (longlong)psVar5 - lVar1 >> 1;
            }
            uVar4 = 0;
            while (psVar5[uVar4] == param_1[uVar4]) {
              uVar4 = uVar4 + 1;
              if (param_3 == uVar4) goto LAB_140024008;
            }
            psVar5 = psVar5 + 1;
            uVar4 = (longlong)((lVar1 + uVar2 * 2) - (longlong)psVar5) >> 1;
            if (uVar4 < param_3) {
              return 0xffffffffffffffff;
            }
            lVar3 = uVar4 + (1 - param_3);
            if (lVar3 == 0) {
              return 0xffffffffffffffff;
            }
          }
          psVar5 = psVar5 + 1;
          lVar3 = lVar3 + -1;
        } while (lVar3 != 0);
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::wstring::find(std::wstring const&, unsigned long long) const

void __thiscall std::wstring::find(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find(this,(short *)*param_1,param_2,*(ulonglong *)((short *)*param_1 + -0xc));
  return;
}



// std::wstring::find(wchar_t, unsigned long long) const

longlong __thiscall std::wstring::find(wstring *this,short param_1,ulonglong param_2)

{
  longlong lVar1;
  longlong lVar2;
  short *psVar3;
  
  lVar2 = -1;
  lVar1 = *(longlong *)this;
  if (param_2 < *(ulonglong *)(lVar1 + -0x18)) {
    lVar2 = *(ulonglong *)(lVar1 + -0x18) - param_2;
    psVar3 = (short *)(lVar1 + param_2 * 2);
    while (*psVar3 != param_1) {
      psVar3 = psVar3 + 1;
      lVar2 = lVar2 + -1;
      if (lVar2 == 0) {
        return -1;
      }
    }
    lVar2 = (longlong)psVar3 - lVar1 >> 1;
  }
  return lVar2;
}



// std::wstring::rend() const

undefined8 * std::wstring::rend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::wstring::size() const

undefined8 __thiscall std::wstring::size(wstring *this)

{
  return *(undefined8 *)(*(longlong *)this + -0x18);
}



// std::wstring::begin() const

undefined8 __thiscall std::wstring::begin(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::c_str() const

undefined8 __thiscall std::wstring::c_str(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::crend() const

undefined8 * std::wstring::crend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::wstring::empty() const

undefined8 __thiscall std::wstring::empty(wstring *this)

{
  return CONCAT71((int7)((ulonglong)*(longlong *)this >> 8),
                  *(longlong *)(*(longlong *)this + -0x18) == 0);
}



// std::wstring::front() const

undefined8 __thiscall std::wstring::front(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::rfind(wchar_t const*, unsigned long long) const

void __thiscall std::wstring::rfind(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  rfind(this,(longlong)param_1,param_2,sVar1);
  return;
}



// std::wstring::rfind(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::wstring::rfind(wstring *this,longlong param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  bool bVar3;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (param_3 <= uVar1) {
    uVar1 = uVar1 - param_3;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    lVar2 = *(longlong *)this + param_2 * 2;
    do {
      if (param_1 == lVar2) {
        return param_2;
      }
      if (param_3 == 0) {
        return param_2;
      }
      if (param_1 != 0) {
        uVar1 = 0;
        while (*(short *)(lVar2 + uVar1 * 2) == *(short *)(param_1 + uVar1 * 2)) {
          uVar1 = uVar1 + 1;
          if (param_3 == uVar1) {
            return param_2;
          }
        }
      }
      lVar2 = lVar2 + -2;
      bVar3 = param_2 != 0;
      param_2 = param_2 - 1;
    } while (bVar3);
  }
  return 0xffffffffffffffff;
}



// std::wstring::rfind(std::wstring const&, unsigned long long) const

void __thiscall std::wstring::rfind(wstring *this,longlong *param_1,ulonglong param_2)

{
  rfind(this,*param_1,param_2,*(ulonglong *)(*param_1 + -0x18));
  return;
}



// std::wstring::rfind(wchar_t, unsigned long long) const

ulonglong __thiscall std::wstring::rfind(wstring *this,short param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  
  uVar2 = 0xffffffffffffffff;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (uVar2 <= param_2) {
      param_2 = uVar2;
    }
    do {
      uVar2 = param_2 - 1;
      if (*(short *)(*(longlong *)this + 2 + uVar2 * 2) == param_1) {
        return param_2;
      }
      param_2 = uVar2;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return uVar2;
}



// std::wstring::_M_rep() const

longlong __thiscall std::wstring::_M_rep(wstring *this)

{
  return *(longlong *)this + -0x18;
}



// std::wstring::cbegin() const

undefined8 __thiscall std::wstring::cbegin(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::length() const

undefined8 __thiscall std::wstring::length(wstring *this)

{
  return *(undefined8 *)(*(longlong *)this + -0x18);
}



// std::wstring::rbegin() const

void std::wstring::rbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + *(longlong *)(*param_2 + -0x18) * 2;
  return;
}



// std::wstring::substr(unsigned long long, unsigned long long) const

undefined8 *
std::wstring::substr(undefined8 *param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong *puVar4;
  
  lVar1 = *param_2;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_3 <= uVar2) {
    uVar3 = uVar2 - param_3;
    if (param_4 < uVar2 - param_3) {
      uVar3 = param_4;
    }
    puVar4 = _S_construct<wchar_t*>
                       ((undefined2 *)(lVar1 + param_3 * 2),lVar1 + (uVar3 + param_3) * 2);
    *param_1 = puVar4;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51ed,param_3,uVar2);
}



// std::wstring::_M_data() const

undefined8 __thiscall std::wstring::_M_data(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::_M_iend() const

longlong __thiscall std::wstring::_M_iend(wstring *this)

{
  return *(longlong *)this + *(longlong *)(*(longlong *)this + -0x18) * 2;
}



// std::wstring::compare(wchar_t const*) const

ulonglong __thiscall std::wstring::compare(wstring *this,wchar_t *param_1)

{
  wchar_t *pwVar1;
  size_t sVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  uVar5 = *(ulonglong *)(*(longlong *)this + -0x18);
  sVar2 = wcslen(param_1);
  pwVar1 = *(wchar_t **)this;
  uVar3 = uVar5;
  if (sVar2 <= uVar5) {
    uVar3 = sVar2;
  }
  if ((param_1 != pwVar1) && (uVar3 != 0)) {
    if ((param_1 != (wchar_t *)0x0) != (pwVar1 != (wchar_t *)0x0)) {
      return (ulonglong)(-(uint)(param_1 != (wchar_t *)0x0) | 1);
    }
    uVar4 = 0;
    do {
      if (pwVar1[uVar4] != param_1[uVar4]) {
        return (ulonglong)(-(uint)((ushort)pwVar1[uVar4] < (ushort)param_1[uVar4]) | 1);
      }
      uVar4 = uVar4 + 1;
    } while (uVar3 != uVar4);
  }
  uVar5 = uVar5 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar5 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar5)) {
    uVar3 = uVar5 & 0xffffffff;
  }
  return uVar3;
}



// std::wstring::compare(std::wstring const&) const

ulonglong __thiscall std::wstring::compare(wstring *this,longlong *param_1)

{
  ushort uVar1;
  ushort uVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  
  lVar3 = *(longlong *)this;
  uVar7 = *(ulonglong *)(lVar3 + -0x18);
  lVar4 = *param_1;
  uVar6 = *(ulonglong *)(lVar4 + -0x18);
  uVar8 = uVar7;
  if (uVar6 <= uVar7) {
    uVar8 = uVar6;
  }
  if ((uVar8 != 0) && (lVar4 != lVar3)) {
    uVar5 = 0;
    do {
      uVar1 = *(ushort *)(lVar4 + uVar5 * 2);
      uVar2 = *(ushort *)(lVar3 + uVar5 * 2);
      if (uVar2 != uVar1) {
        return (ulonglong)(-(uint)(uVar2 < uVar1) | 1);
      }
      uVar5 = uVar5 + 1;
    } while (uVar5 != uVar8);
  }
  uVar7 = uVar7 - uVar6;
  if (0x7fffffff < (longlong)uVar7) {
    return 0x7fffffff;
  }
  uVar6 = 0x80000000;
  if (-0x80000001 < (longlong)uVar7) {
    uVar6 = uVar7 & 0xffffffff;
  }
  return uVar6;
}



// std::wstring::compare(unsigned long long, unsigned long long, wchar_t const*) const

ulonglong __thiscall
std::wstring::compare(wstring *this,ulonglong param_1,ulonglong param_2,wchar_t *param_3)

{
  wchar_t *pwVar1;
  size_t sVar2;
  ulonglong uVar3;
  size_t sVar4;
  ulonglong uVar5;
  
  uVar3 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar3 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c50df,param_1,uVar3);
  }
  uVar5 = uVar3 - param_1;
  if (param_2 < uVar3 - param_1) {
    uVar5 = param_2;
  }
  sVar2 = wcslen(param_3);
  pwVar1 = (wchar_t *)(*(longlong *)this + param_1 * 2);
  uVar3 = uVar5;
  if (sVar2 <= uVar5) {
    uVar3 = sVar2;
  }
  if ((pwVar1 != param_3) && (uVar3 != 0)) {
    if ((param_3 != (wchar_t *)0x0) != (pwVar1 != (wchar_t *)0x0)) {
      return (ulonglong)(-(uint)(param_3 != (wchar_t *)0x0) | 1);
    }
    sVar4 = 0;
    do {
      if (pwVar1[sVar4] != param_3[sVar4]) {
        return (ulonglong)(-(uint)((ushort)pwVar1[sVar4] < (ushort)param_3[sVar4]) | 1);
      }
      sVar4 = sVar4 + 1;
    } while (uVar3 != sVar4);
  }
  uVar5 = uVar5 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar5 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar5)) {
    uVar3 = uVar5 & 0xffffffff;
  }
  return uVar3;
}



// std::wstring::compare(unsigned long long, unsigned long long, wchar_t const*, unsigned long long)
// const

ulonglong __thiscall
std::wstring::compare
          (wstring *this,ulonglong param_1,ulonglong param_2,longlong param_3,ulonglong param_4)

{
  longlong lVar1;
  ushort uVar2;
  ushort uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  uVar5 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar5 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c50df,param_1,uVar5);
  }
  lVar1 = *(longlong *)this + param_1 * 2;
  if (uVar5 - param_1 <= param_2) {
    param_2 = uVar5 - param_1;
  }
  uVar5 = param_4;
  if (param_2 <= param_4) {
    uVar5 = param_2;
  }
  if ((uVar5 != 0) && (lVar1 != param_3)) {
    if (param_3 == 0) {
      return 1;
    }
    uVar4 = 0;
    do {
      uVar2 = *(ushort *)(param_3 + uVar4 * 2);
      uVar3 = *(ushort *)(lVar1 + uVar4 * 2);
      if (uVar3 != uVar2) {
        return (ulonglong)(-(uint)(uVar3 < uVar2) | 1);
      }
      uVar4 = uVar4 + 1;
    } while (uVar5 != uVar4);
  }
  uVar4 = param_2 - param_4;
  uVar5 = 0x7fffffff;
  if (((longlong)uVar4 < 0x80000000) && (uVar5 = 0x80000000, -0x80000001 < (longlong)uVar4)) {
    uVar5 = uVar4 & 0xffffffff;
  }
  return uVar5;
}



// std::wstring::compare(unsigned long long, unsigned long long, std::wstring const&) const

ulonglong __thiscall
std::wstring::compare(wstring *this,ulonglong param_1,ulonglong param_2,longlong *param_3)

{
  longlong lVar1;
  ushort uVar2;
  ushort uVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  
  uVar7 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar7 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c50df,param_1,uVar7);
  }
  lVar4 = *param_3;
  lVar1 = *(longlong *)this + param_1 * 2;
  if (uVar7 - param_1 <= param_2) {
    param_2 = uVar7 - param_1;
  }
  uVar7 = *(ulonglong *)(lVar4 + -0x18);
  uVar6 = param_2;
  if (uVar7 <= param_2) {
    uVar6 = uVar7;
  }
  if ((uVar6 != 0) && (lVar1 != lVar4)) {
    uVar5 = 0;
    do {
      uVar2 = *(ushort *)(lVar4 + uVar5 * 2);
      uVar3 = *(ushort *)(lVar1 + uVar5 * 2);
      if (uVar3 != uVar2) {
        return (ulonglong)(-(uint)(uVar3 < uVar2) | 1);
      }
      uVar5 = uVar5 + 1;
    } while (uVar6 != uVar5);
  }
  uVar7 = param_2 - uVar7;
  uVar6 = 0x7fffffff;
  if (((longlong)uVar7 < 0x80000000) && (uVar6 = 0x80000000, -0x80000001 < (longlong)uVar7)) {
    uVar6 = uVar7 & 0xffffffff;
  }
  return uVar6;
}



// std::wstring::compare(unsigned long long, unsigned long long, std::wstring const&, unsigned long
// long, unsigned long long) const

ulonglong __thiscall
std::wstring::compare
          (wstring *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_4,
          ulonglong param_5)

{
  longlong lVar1;
  longlong lVar2;
  ushort uVar3;
  ushort uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  
  uVar7 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar7 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c50df,param_1,uVar7);
  }
  uVar6 = *(ulonglong *)(*param_3 + -0x18);
  if (param_4 <= uVar6) {
    lVar1 = *(longlong *)this + param_1 * 2;
    if (uVar7 - param_1 <= param_2) {
      param_2 = uVar7 - param_1;
    }
    lVar2 = *param_3 + param_4 * 2;
    uVar7 = uVar6 - param_4;
    if (param_5 < uVar6 - param_4) {
      uVar7 = param_5;
    }
    uVar6 = param_2;
    if (uVar7 <= param_2) {
      uVar6 = uVar7;
    }
    if ((uVar6 != 0) && (lVar2 != lVar1)) {
      uVar5 = 0;
      do {
        uVar3 = *(ushort *)(lVar2 + uVar5 * 2);
        uVar4 = *(ushort *)(lVar1 + uVar5 * 2);
        if (uVar4 != uVar3) {
          return (ulonglong)(-(uint)(uVar4 < uVar3) | 1);
        }
        uVar5 = uVar5 + 1;
      } while (uVar6 != uVar5);
    }
    uVar7 = param_2 - uVar7;
    uVar6 = 0x7fffffff;
    if (((longlong)uVar7 < 0x80000000) && (uVar6 = 0x80000000, -0x80000001 < (longlong)uVar7)) {
      uVar6 = uVar7 & 0xffffffff;
    }
    return uVar6;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c50df,param_4,uVar6);
}



// std::wstring::crbegin() const

void std::wstring::crbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + *(longlong *)(*param_2 + -0x18) * 2;
  return;
}



// std::wstring::_M_check(unsigned long long, char const*) const

void __thiscall std::wstring::_M_check(wstring *this,ulonglong param_1,ulonglong param_2)

{
  if (param_1 <= *(ulonglong *)(*(longlong *)this + -0x18)) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",param_2,param_1,
             *(ulonglong *)(*(longlong *)this + -0x18));
}



// std::wstring::_M_limit(unsigned long long, unsigned long long) const

ulonglong __thiscall std::wstring::_M_limit(wstring *this,longlong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(longlong *)(*(longlong *)this + -0x18) - param_1;
  if (param_2 < uVar1) {
    uVar1 = param_2;
  }
  return uVar1;
}



// std::wstring::capacity() const

undefined8 __thiscall std::wstring::capacity(wstring *this)

{
  return *(undefined8 *)(*(longlong *)this + -0x10);
}



// std::wstring::max_size() const

undefined8 std::wstring::max_size(void)

{
  return 0x1ffffffffffffffc;
}



// std::wstring::_M_ibegin() const

undefined8 __thiscall std::wstring::_M_ibegin(wstring *this)

{
  return *(undefined8 *)this;
}



// std::wstring::operator[](unsigned long long) const

longlong __thiscall std::wstring::operator[](wstring *this,longlong param_1)

{
  return *(longlong *)this + param_1 * 2;
}



// std::istream::gcount() const

undefined8 __thiscall std::istream::gcount(istream *this)

{
  return *(undefined8 *)(this + 8);
}



// std::istream::sentry::operator bool() const

sentry __thiscall std::istream::sentry::operator_cast_to_bool(sentry *this)

{
  return *this;
}



// std::ostream::sentry::operator bool() const

sentry __thiscall std::ostream::sentry::operator_cast_to_bool(sentry *this)

{
  return *this;
}



// std::string::_M_disjunct(char const*) const

bool __thiscall std::string::_M_disjunct(string *this,ulonglong param_1)

{
  ulonglong uVar1;
  bool bVar2;
  
  uVar1 = *(ulonglong *)this;
  bVar2 = true;
  if (uVar1 <= param_1) {
    bVar2 = uVar1 + *(longlong *)(uVar1 - 0x18) < param_1;
  }
  return bVar2;
}



// std::string::find_last_of(char const*, unsigned long long) const

void __thiscall std::string::find_last_of(string *this,char *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  find_last_of(this,param_1,param_2,sVar1);
  return;
}



// std::string::find_last_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::string::find_last_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  longlong lVar1;
  longlong lVar2;
  void *pvVar3;
  ulonglong uVar4;
  bool bVar5;
  
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
  if ((lVar2 != 0) && (param_3 != 0)) {
    uVar4 = lVar2 - 1;
    if (param_2 < uVar4) {
      uVar4 = param_2;
    }
    do {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar1 + uVar4),param_3);
      if (pvVar3 != (void *)0x0) {
        return uVar4;
      }
      bVar5 = uVar4 != 0;
      uVar4 = uVar4 - 1;
    } while (bVar5);
    return 0xffffffffffffffff;
  }
  return 0xffffffffffffffff;
}



// std::string::find_last_of(std::string const&, unsigned long long) const

void __thiscall std::string::find_last_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  find_last_of(this,(void *)*param_1,param_2,*(size_t *)((longlong)*param_1 + -0x18));
  return;
}



// std::string::find_last_of(char, unsigned long long) const

ulonglong __thiscall std::string::find_last_of(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  
  uVar2 = 0xffffffffffffffff;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (uVar2 <= param_2) {
      param_2 = uVar2;
    }
    do {
      uVar2 = param_2 - 1;
      if (param_1 == *(char *)(*(longlong *)this + 1 + uVar2)) {
        return param_2;
      }
      param_2 = uVar2;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return uVar2;
}



// std::string::find_first_of(char const*, unsigned long long) const

ulonglong __thiscall std::string::find_first_of(string *this,char *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  size_t _MaxCount;
  void *pvVar3;
  
  _MaxCount = strlen(param_1);
  if (_MaxCount != 0) {
    lVar1 = *(longlong *)this;
    uVar2 = *(ulonglong *)(lVar1 + -0x18);
    for (; param_2 < uVar2; param_2 = param_2 + 1) {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar1 + param_2),_MaxCount);
      if (pvVar3 != (void *)0x0) {
        return param_2;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::string::find_first_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::string::find_first_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  void *pvVar3;
  
  if (param_3 != 0) {
    lVar1 = *(longlong *)this;
    uVar2 = *(ulonglong *)(lVar1 + -0x18);
    for (; param_2 < uVar2; param_2 = param_2 + 1) {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar1 + param_2),param_3);
      if (pvVar3 != (void *)0x0) {
        return param_2;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::string::find_first_of(std::string const&, unsigned long long) const

ulonglong __thiscall std::string::find_first_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  void *_Buf;
  size_t _MaxCount;
  longlong lVar1;
  ulonglong uVar2;
  void *pvVar3;
  
  _Buf = (void *)*param_1;
  _MaxCount = *(size_t *)((longlong)_Buf + -0x18);
  if (_MaxCount != 0) {
    lVar1 = *(longlong *)this;
    uVar2 = *(ulonglong *)(lVar1 + -0x18);
    for (; param_2 < uVar2; param_2 = param_2 + 1) {
      pvVar3 = memchr(_Buf,(int)*(char *)(lVar1 + param_2),_MaxCount);
      if (pvVar3 != (void *)0x0) {
        return param_2;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::string::find_first_of(char, unsigned long long) const

longlong __thiscall std::string::find_first_of(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  void *pvVar2;
  longlong lVar3;
  
  lVar1 = *(longlong *)this;
  lVar3 = -1;
  if (param_2 < *(ulonglong *)(lVar1 + -0x18)) {
    pvVar2 = memchr((void *)(lVar1 + param_2),(int)param_1,*(ulonglong *)(lVar1 + -0x18) - param_2);
    if (pvVar2 != (void *)0x0) {
      lVar3 = (longlong)pvVar2 - lVar1;
    }
  }
  return lVar3;
}



// std::string::get_allocator() const

string * __thiscall std::string::get_allocator(string *this)

{
  return this;
}



// std::string::_M_check_length(unsigned long long, unsigned long long, char const*) const

void __thiscall
std::string::_M_check_length(string *this,longlong param_1,ulonglong param_2,char *param_3)

{
  if (param_2 <=
      (ulonglong)((param_1 + 0x3ffffffffffffff9) - *(longlong *)(*(longlong *)this + -0x18))) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error(param_3);
}



// std::string::find_last_not_of(char const*, unsigned long long) const

size_t __thiscall std::string::find_last_not_of(string *this,char *param_1,size_t param_2)

{
  longlong lVar1;
  longlong lVar2;
  size_t sVar3;
  size_t _MaxCount;
  void *pvVar4;
  size_t sVar5;
  ulonglong uVar6;
  
  sVar5 = 0xffffffffffffffff;
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
  if (lVar2 != 0) {
    uVar6 = lVar2 - 1;
    _MaxCount = strlen(param_1);
    sVar3 = _MaxCount;
    if (uVar6 <= param_2) {
      param_2 = uVar6;
    }
    while ((sVar5 = param_2, sVar3 != 0 &&
           (pvVar4 = memchr(param_1,(int)*(char *)(lVar1 + sVar5),_MaxCount), pvVar4 != (void *)0x0)
           )) {
      param_2 = sVar5 - 1;
      sVar3 = sVar5;
    }
  }
  return sVar5;
}



// std::string::find_last_not_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::string::find_last_not_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  longlong lVar1;
  longlong lVar2;
  ulonglong uVar3;
  void *pvVar4;
  ulonglong uVar5;
  
  uVar5 = 0xffffffffffffffff;
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
  if (lVar2 != 0) {
    uVar5 = lVar2 - 1;
    uVar3 = param_3;
    if (uVar5 <= param_2) {
      param_2 = uVar5;
    }
    while ((uVar5 = param_2, uVar3 != 0 &&
           (pvVar4 = memchr(param_1,(int)*(char *)(lVar1 + uVar5),param_3), pvVar4 != (void *)0x0)))
    {
      param_2 = uVar5 - 1;
      uVar3 = uVar5;
    }
  }
  return uVar5;
}



// std::string::find_last_not_of(std::string const&, unsigned long long) const

size_t __thiscall std::string::find_last_not_of(string *this,undefined8 *param_1,size_t param_2)

{
  longlong lVar1;
  longlong lVar2;
  void *_Buf;
  size_t _MaxCount;
  size_t sVar3;
  ulonglong uVar4;
  void *pvVar5;
  size_t sVar6;
  
  sVar6 = 0xffffffffffffffff;
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
  if (lVar2 != 0) {
    _Buf = (void *)*param_1;
    uVar4 = lVar2 - 1;
    _MaxCount = *(size_t *)((longlong)_Buf + -0x18);
    sVar3 = _MaxCount;
    if (uVar4 <= param_2) {
      param_2 = uVar4;
    }
    while ((sVar6 = param_2, sVar3 != 0 &&
           (pvVar5 = memchr(_Buf,(int)*(char *)(lVar1 + sVar6),_MaxCount), pvVar5 != (void *)0x0)))
    {
      param_2 = sVar6 - 1;
      sVar3 = sVar6;
    }
  }
  return sVar6;
}



// std::string::find_last_not_of(char, unsigned long long) const

ulonglong __thiscall std::string::find_last_not_of(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  bool bVar3;
  
  uVar2 = 0xffffffffffffffff;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (uVar2 <= param_2) {
      param_2 = uVar2;
    }
    do {
      if (*(char *)(*(longlong *)this + param_2) != param_1) {
        return param_2;
      }
      bVar3 = param_2 != 0;
      uVar2 = param_2 - 1;
      param_2 = uVar2;
    } while (bVar3);
  }
  return uVar2;
}



// std::string::find_first_not_of(char const*, unsigned long long) const

ulonglong __thiscall std::string::find_first_not_of(string *this,char *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  size_t _MaxCount;
  void *pvVar3;
  
  _MaxCount = strlen(param_1);
  lVar1 = *(longlong *)this;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_2 < uVar2) {
    if (_MaxCount == 0) {
      return param_2;
    }
    do {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar1 + param_2),_MaxCount);
      if (pvVar3 == (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (uVar2 != param_2);
  }
  return 0xffffffffffffffff;
}



// std::string::find_first_not_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::string::find_first_not_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  void *pvVar3;
  
  lVar1 = *(longlong *)this;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_2 < uVar2) {
    if (param_3 == 0) {
      return param_2;
    }
    do {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar1 + param_2),param_3);
      if (pvVar3 == (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar2);
  }
  return 0xffffffffffffffff;
}



// std::string::find_first_not_of(std::string const&, unsigned long long) const

ulonglong __thiscall
std::string::find_first_not_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  longlong lVar1;
  void *_Buf;
  ulonglong uVar2;
  size_t _MaxCount;
  void *pvVar3;
  
  lVar1 = *(longlong *)this;
  _Buf = (void *)*param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  _MaxCount = *(size_t *)((longlong)_Buf + -0x18);
  if (param_2 < uVar2) {
    if (_MaxCount == 0) {
      return param_2;
    }
    do {
      pvVar3 = memchr(_Buf,(int)*(char *)(lVar1 + param_2),_MaxCount);
      if (pvVar3 == (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (uVar2 != param_2);
  }
  return 0xffffffffffffffff;
}



// std::string::find_first_not_of(char, unsigned long long) const

ulonglong __thiscall std::string::find_first_not_of(string *this,char param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (param_2 < uVar1) {
    do {
      if (*(char *)(*(longlong *)this + param_2) != param_1) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



// std::string::at(unsigned long long) const

longlong __thiscall
std::string::at(string *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (param_1 < uVar1) {
    return *(longlong *)this + param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,uVar1,
             param_3);
}



// std::string::end() const

longlong __thiscall std::string::end(string *this)

{
  return *(longlong *)this + *(longlong *)(*(longlong *)this + -0x18);
}



// std::string::_Rep::_M_is_leaked() const

uint __thiscall std::string::_Rep::_M_is_leaked(_Rep *this)

{
  return *(uint *)(this + 0x10) >> 0x1f;
}



// std::string::_Rep::_M_is_shared() const

undefined4 __thiscall std::string::_Rep::_M_is_shared(_Rep *this)

{
  if (_CRT_MT == 0) {
    return CONCAT31((int3)((uint)*(int *)(this + 0x10) >> 8),0 < *(int *)(this + 0x10));
  }
  return CONCAT31((int3)((uint)*(int *)(this + 0x10) >> 8),0 < *(int *)(this + 0x10));
}



// std::string::back() const

longlong __thiscall std::string::back(string *this)

{
  return *(longlong *)this + -1 + *(longlong *)(*(longlong *)this + -0x18);
}



// std::string::cend() const

longlong __thiscall std::string::cend(string *this)

{
  return *(longlong *)this + *(longlong *)(*(longlong *)this + -0x18);
}



// std::string::copy(char*, unsigned long long, unsigned long long) const

size_t __thiscall
std::string::copy(string *this,undefined1 *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  undefined1 *_Src;
  ulonglong _Size;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f0c,param_3,uVar1);
  }
  _Size = uVar1 - param_3;
  if (param_2 < uVar1 - param_3) {
    _Size = param_2;
  }
  if (_Size != 0) {
    _Src = (undefined1 *)(*(longlong *)this + param_3);
    if (_Size == 1) {
      *param_1 = *_Src;
      return 1;
    }
    memcpy(param_1,_Src,_Size);
  }
  return _Size;
}



// std::string::data() const

undefined8 __thiscall std::string::data(string *this)

{
  return *(undefined8 *)this;
}



// std::string::find(char const*, unsigned long long) const

void __thiscall std::string::find(string *this,char *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  find(this,param_1,param_2,sVar1);
  return;
}



// std::string::find(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::string::find(string *this,char *param_1,ulonglong param_2,ulonglong param_3)

{
  char cVar1;
  longlong lVar2;
  ulonglong uVar3;
  int iVar4;
  size_t _MaxCount;
  void *pvVar5;
  ulonglong uVar6;
  
  lVar2 = *(longlong *)this;
  uVar3 = *(ulonglong *)(lVar2 + -0x18);
  if (param_3 == 0) {
    uVar6 = 0xffffffffffffffff;
    if (param_2 <= uVar3) {
      uVar6 = param_2;
    }
  }
  else {
    uVar6 = 0xffffffffffffffff;
    if (param_2 < uVar3) {
      pvVar5 = (void *)(lVar2 + param_2);
      if (param_3 <= uVar3 - param_2) {
        _MaxCount = (uVar3 - param_2) + (1 - param_3);
        if (_MaxCount != 0) {
          cVar1 = *param_1;
          while (pvVar5 = memchr(pvVar5,(int)cVar1,_MaxCount), pvVar5 != (void *)0x0) {
            iVar4 = memcmp(pvVar5,param_1,param_3);
            if (iVar4 == 0) {
              return (longlong)pvVar5 - lVar2;
            }
            pvVar5 = (void *)((longlong)pvVar5 + 1);
            uVar6 = (lVar2 + uVar3) - (longlong)pvVar5;
            if ((uVar6 < param_3) || (_MaxCount = uVar6 + (1 - param_3), _MaxCount == 0)) break;
          }
          uVar6 = 0xffffffffffffffff;
        }
      }
    }
  }
  return uVar6;
}



// std::string::find(std::string const&, unsigned long long) const

void __thiscall std::string::find(string *this,undefined8 *param_1,ulonglong param_2)

{
  find(this,(char *)*param_1,param_2,*(ulonglong *)((char *)*param_1 + -0x18));
  return;
}



// std::string::find(char, unsigned long long) const

longlong __thiscall std::string::find(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  void *pvVar2;
  longlong lVar3;
  
  lVar1 = *(longlong *)this;
  lVar3 = -1;
  if (param_2 < *(ulonglong *)(lVar1 + -0x18)) {
    pvVar2 = memchr((void *)(lVar1 + param_2),(int)param_1,*(ulonglong *)(lVar1 + -0x18) - param_2);
    if (pvVar2 != (void *)0x0) {
      lVar3 = (longlong)pvVar2 - lVar1;
    }
  }
  return lVar3;
}



// std::string::rend() const

undefined8 * std::string::rend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::string::size() const

undefined8 __thiscall std::string::size(string *this)

{
  return *(undefined8 *)(*(longlong *)this + -0x18);
}



// std::string::begin() const

undefined8 __thiscall std::string::begin(string *this)

{
  return *(undefined8 *)this;
}



// std::string::c_str() const

undefined8 __thiscall std::string::c_str(string *this)

{
  return *(undefined8 *)this;
}



// std::string::crend() const

undefined8 * std::string::crend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::string::empty() const

undefined8 __thiscall std::string::empty(string *this)

{
  return CONCAT71((int7)((ulonglong)*(longlong *)this >> 8),
                  *(longlong *)(*(longlong *)this + -0x18) == 0);
}



// std::string::front() const

undefined8 __thiscall std::string::front(string *this)

{
  return *(undefined8 *)this;
}



// std::string::rfind(char const*, unsigned long long) const

void __thiscall std::string::rfind(string *this,char *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  rfind(this,param_1,param_2,sVar1);
  return;
}



// std::string::rfind(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::string::rfind(string *this,void *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  int iVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  lVar1 = *(longlong *)this;
  uVar3 = *(ulonglong *)(lVar1 + -0x18);
  if (param_3 <= uVar3) {
    uVar3 = uVar3 - param_3;
    uVar4 = param_2;
    if (uVar3 <= param_2) {
      uVar4 = uVar3;
    }
    if (param_3 != 0) {
      do {
        iVar2 = memcmp((void *)(lVar1 + uVar4),param_1,param_3);
        if (iVar2 == 0) {
          return uVar4;
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
      uVar4 = 0xffffffffffffffff;
    }
  }
  return uVar4;
}



// std::string::rfind(std::string const&, unsigned long long) const

ulonglong __thiscall std::string::rfind(string *this,undefined8 *param_1,ulonglong param_2)

{
  void *_Buf2;
  longlong lVar1;
  ulonglong _Size;
  int iVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  _Buf2 = (void *)*param_1;
  lVar1 = *(longlong *)this;
  _Size = *(ulonglong *)((longlong)_Buf2 + -0x18);
  uVar3 = *(ulonglong *)(lVar1 + -0x18);
  if (_Size <= uVar3) {
    uVar3 = uVar3 - _Size;
    uVar4 = param_2;
    if (uVar3 <= param_2) {
      uVar4 = uVar3;
    }
    if (_Size != 0) {
      do {
        iVar2 = memcmp((void *)(lVar1 + uVar4),_Buf2,_Size);
        if (iVar2 == 0) {
          return uVar4;
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
      uVar4 = 0xffffffffffffffff;
    }
  }
  return uVar4;
}



// std::string::rfind(char, unsigned long long) const

ulonglong __thiscall std::string::rfind(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  
  uVar2 = 0xffffffffffffffff;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  if (lVar1 != 0) {
    uVar2 = lVar1 - 1;
    if (uVar2 <= param_2) {
      param_2 = uVar2;
    }
    do {
      uVar2 = param_2 - 1;
      if (*(char *)(*(longlong *)this + 1 + uVar2) == param_1) {
        return param_2;
      }
      param_2 = uVar2;
    } while (uVar2 != 0xffffffffffffffff);
  }
  return uVar2;
}



// std::string::_M_rep() const

longlong __thiscall std::string::_M_rep(string *this)

{
  return *(longlong *)this + -0x18;
}



// std::string::cbegin() const

undefined8 __thiscall std::string::cbegin(string *this)

{
  return *(undefined8 *)this;
}



// std::string::length() const

undefined8 __thiscall std::string::length(string *this)

{
  return *(undefined8 *)(*(longlong *)this + -0x18);
}



// std::string::rbegin() const

longlong * std::string::rbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + *(longlong *)(*param_2 + -0x18);
  return param_1;
}



// std::string::substr(unsigned long long, unsigned long long) const

undefined8 *
std::string::substr(undefined8 *param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  ulonglong uVar4;
  
  lVar1 = *param_2;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_3 <= uVar2) {
    uVar4 = uVar2 - param_3;
    if (param_4 < uVar2 - param_3) {
      uVar4 = param_4;
    }
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_3),uVar4 + param_3 + lVar1);
    *param_1 = puVar3;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c502f,param_3,uVar2);
}



// std::string::_M_data() const

undefined8 __thiscall std::string::_M_data(string *this)

{
  return *(undefined8 *)this;
}



// std::string::_M_iend() const

longlong __thiscall std::string::_M_iend(string *this)

{
  return *(longlong *)this + *(longlong *)(*(longlong *)this + -0x18);
}



// std::string::compare(char const*) const

ulonglong __thiscall std::string::compare(string *this,char *param_1)

{
  void *_Buf1;
  int iVar1;
  size_t sVar2;
  undefined4 extraout_var;
  ulonglong uVar3;
  ulonglong uVar4;
  
  _Buf1 = *(void **)this;
  uVar4 = *(ulonglong *)((longlong)_Buf1 + -0x18);
  sVar2 = strlen(param_1);
  uVar3 = uVar4;
  if (sVar2 <= uVar4) {
    uVar3 = sVar2;
  }
  if (uVar3 != 0) {
    iVar1 = memcmp(_Buf1,param_1,uVar3);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar4 = uVar4 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar4 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar4)) {
    uVar3 = uVar4 & 0xffffffff;
  }
  return uVar3;
}



// std::string::compare(std::string const&) const

ulonglong __thiscall std::string::compare(string *this,undefined8 *param_1)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong _Size;
  
  uVar3 = *(ulonglong *)((longlong)*(void **)this + -0x18);
  uVar2 = *(ulonglong *)((longlong)*param_1 + -0x18);
  _Size = uVar3;
  if (uVar2 <= uVar3) {
    _Size = uVar2;
  }
  if (_Size != 0) {
    iVar1 = memcmp(*(void **)this,(void *)*param_1,_Size);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar3 = uVar3 - uVar2;
  uVar2 = 0x7fffffff;
  if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
    uVar2 = uVar3 & 0xffffffff;
  }
  return uVar2;
}



// std::string::compare(unsigned long long, unsigned long long, char const*) const

ulonglong __thiscall
std::string::compare(string *this,ulonglong param_1,ulonglong param_2,char *param_3)

{
  longlong lVar1;
  int iVar2;
  size_t sVar3;
  undefined4 extraout_var;
  ulonglong uVar4;
  ulonglong uVar5;
  
  lVar1 = *(longlong *)this;
  uVar4 = *(ulonglong *)(lVar1 + -0x18);
  if (uVar4 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f1f,param_1,uVar4);
  }
  uVar5 = uVar4 - param_1;
  if (param_2 < uVar4 - param_1) {
    uVar5 = param_2;
  }
  sVar3 = strlen(param_3);
  uVar4 = uVar5;
  if (sVar3 <= uVar5) {
    uVar4 = sVar3;
  }
  if (uVar4 != 0) {
    iVar2 = memcmp((void *)(lVar1 + param_1),param_3,uVar4);
    if (iVar2 != 0) {
      return CONCAT44(extraout_var,iVar2);
    }
  }
  uVar5 = uVar5 - sVar3;
  uVar4 = 0x7fffffff;
  if (((longlong)uVar5 < 0x80000000) && (uVar4 = 0x80000000, -0x80000001 < (longlong)uVar5)) {
    uVar4 = uVar5 & 0xffffffff;
  }
  return uVar4;
}



// std::string::compare(unsigned long long, unsigned long long, char const*, unsigned long long)
// const

ulonglong __thiscall
std::string::compare
          (string *this,ulonglong param_1,ulonglong param_2,void *param_3,ulonglong param_4)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar2 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f1f,param_1,uVar2);
  }
  uVar3 = uVar2 - param_1;
  if (param_2 < uVar2 - param_1) {
    uVar3 = param_2;
  }
  uVar2 = uVar3;
  if (param_4 <= uVar3) {
    uVar2 = param_4;
  }
  if (uVar2 != 0) {
    iVar1 = memcmp((void *)(*(longlong *)this + param_1),param_3,uVar2);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar3 = uVar3 - param_4;
  uVar2 = 0x7fffffff;
  if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
    uVar2 = uVar3 & 0xffffffff;
  }
  return uVar2;
}



// std::string::compare(unsigned long long, unsigned long long, std::string const&) const

ulonglong __thiscall
std::string::compare(string *this,ulonglong param_1,ulonglong param_2,undefined8 *param_3)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong _Size;
  
  uVar2 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f1f,param_1,uVar2);
  }
  uVar3 = uVar2 - param_1;
  if (param_2 < uVar2 - param_1) {
    uVar3 = param_2;
  }
  uVar2 = *(ulonglong *)((longlong)*param_3 + -0x18);
  _Size = uVar3;
  if (uVar2 <= uVar3) {
    _Size = uVar2;
  }
  if (_Size != 0) {
    iVar1 = memcmp((void *)(*(longlong *)this + param_1),(void *)*param_3,_Size);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar3 = uVar3 - uVar2;
  uVar2 = 0x7fffffff;
  if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
    uVar2 = uVar3 & 0xffffffff;
  }
  return uVar2;
}



// std::string::compare(unsigned long long, unsigned long long, std::string const&, unsigned long
// long, unsigned long long) const

ulonglong __thiscall
std::string::compare
          (string *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_4,
          ulonglong param_5)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar2 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f1f,param_1,uVar2);
  }
  uVar4 = *(ulonglong *)(*param_3 + -0x18);
  if (param_4 <= uVar4) {
    uVar3 = uVar2 - param_1;
    if (param_2 < uVar2 - param_1) {
      uVar3 = param_2;
    }
    uVar2 = uVar4 - param_4;
    if (param_5 < uVar4 - param_4) {
      uVar2 = param_5;
    }
    uVar4 = uVar3;
    if (uVar2 <= uVar3) {
      uVar4 = uVar2;
    }
    if (uVar4 != 0) {
      iVar1 = memcmp((void *)(*(longlong *)this + param_1),(void *)(*param_3 + param_4),uVar4);
      if (iVar1 != 0) {
        return CONCAT44(extraout_var,iVar1);
      }
    }
    uVar3 = uVar3 - uVar2;
    uVar2 = 0x7fffffff;
    if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
      uVar2 = uVar3 & 0xffffffff;
    }
    return uVar2;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f1f,param_4,uVar4);
}



// std::string::crbegin() const

longlong * std::string::crbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + *(longlong *)(*param_2 + -0x18);
  return param_1;
}



// std::string::_M_check(unsigned long long, char const*) const

void __thiscall std::string::_M_check(string *this,ulonglong param_1,ulonglong param_2)

{
  if (param_1 <= *(ulonglong *)(*(longlong *)this + -0x18)) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",param_2,param_1,
             *(ulonglong *)(*(longlong *)this + -0x18));
}



// std::string::_M_limit(unsigned long long, unsigned long long) const

ulonglong __thiscall std::string::_M_limit(string *this,longlong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(longlong *)(*(longlong *)this + -0x18) - param_1;
  if (param_2 < uVar1) {
    uVar1 = param_2;
  }
  return uVar1;
}



// std::string::capacity() const

undefined8 __thiscall std::string::capacity(string *this)

{
  return *(undefined8 *)(*(longlong *)this + -0x10);
}



// std::string::max_size() const

undefined8 std::string::max_size(void)

{
  return 0x3ffffffffffffff9;
}



// std::string::_M_ibegin() const

undefined8 __thiscall std::string::_M_ibegin(string *this)

{
  return *(undefined8 *)this;
}



// std::string::operator[](unsigned long long) const

longlong __thiscall std::string::operator[](string *this,longlong param_1)

{
  return *(longlong *)this + param_1;
}



// std::bad_typeid::what() const

char * std::bad_typeid::what(void)

{
  return "std::bad_typeid";
}



// std::error_code::default_error_condition() const

undefined8 std::error_code::default_error_condition(undefined8 param_1,undefined4 *param_2)

{
  (**(code **)(**(longlong **)(param_2 + 2) + 0x28))(param_1,*(longlong **)(param_2 + 2),*param_2);
  return param_1;
}



// std::moneypunct<char, false>::neg_format() const

ulonglong __thiscall std::moneypunct<char,false>::neg_format(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x0001400257c0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::moneypunct<char, false>::pos_format() const

ulonglong __thiscall std::moneypunct<char,false>::pos_format(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x0001400257f0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::moneypunct<char, false>::curr_symbol() const

undefined8 * std::moneypunct<char,false>::curr_symbol(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x28) == do_curr_symbol) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x28);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))(param_1);
  return param_1;
}



// std::moneypunct<char, false>::do_grouping() const

undefined8 * std::moneypunct<char,false>::do_grouping(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, false>::frac_digits() const

ulonglong __thiscall std::moneypunct<char,false>::frac_digits(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x0001400258e0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::moneypunct<char, false>::decimal_point() const

ulonglong __thiscall std::moneypunct<char,false>::decimal_point(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x21);
  }
                    // WARNING: Could not recover jumptable at 0x000140025910. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::moneypunct<char, false>::do_neg_format() const

undefined4 __thiscall std::moneypunct<char,false>::do_neg_format(moneypunct<char,false> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::moneypunct<char, false>::do_pos_format() const

undefined4 __thiscall std::moneypunct<char,false>::do_pos_format(moneypunct<char,false> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::moneypunct<char, false>::negative_sign() const

undefined8 * std::moneypunct<char,false>::negative_sign(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x38) == do_negative_sign) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x48);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))(param_1);
  return param_1;
}



// std::moneypunct<char, false>::positive_sign() const

undefined8 * std::moneypunct<char,false>::positive_sign(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x30) == do_positive_sign) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x38);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))(param_1);
  return param_1;
}



// std::moneypunct<char, false>::thousands_sep() const

ulonglong __thiscall std::moneypunct<char,false>::thousands_sep(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x000140025a40. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::moneypunct<char, false>::do_curr_symbol() const

undefined8 * std::moneypunct<char,false>::do_curr_symbol(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x28);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, false>::do_frac_digits() const

undefined4 __thiscall std::moneypunct<char,false>::do_frac_digits(moneypunct<char,false> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::moneypunct<char, false>::do_decimal_point() const

undefined1 __thiscall std::moneypunct<char,false>::do_decimal_point(moneypunct<char,false> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x21);
}



// std::moneypunct<char, false>::do_negative_sign() const

undefined8 * std::moneypunct<char,false>::do_negative_sign(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x48);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, false>::do_positive_sign() const

undefined8 * std::moneypunct<char,false>::do_positive_sign(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x38);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, false>::do_thousands_sep() const

undefined1 __thiscall std::moneypunct<char,false>::do_thousands_sep(moneypunct<char,false> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::moneypunct<char, false>::grouping() const

undefined8 * std::moneypunct<char,false>::grouping(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x20) == do_grouping) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::moneypunct<char, true>::neg_format() const

ulonglong __thiscall std::moneypunct<char,true>::neg_format(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x000140025c00. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::moneypunct<char, true>::pos_format() const

ulonglong __thiscall std::moneypunct<char,true>::pos_format(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x000140025c30. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::moneypunct<char, true>::curr_symbol() const

undefined8 * std::moneypunct<char,true>::curr_symbol(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x28) == do_curr_symbol) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x28);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))(param_1);
  return param_1;
}



// std::moneypunct<char, true>::do_grouping() const

undefined8 * std::moneypunct<char,true>::do_grouping(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, true>::frac_digits() const

ulonglong __thiscall std::moneypunct<char,true>::frac_digits(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x000140025d20. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::moneypunct<char, true>::decimal_point() const

ulonglong __thiscall std::moneypunct<char,true>::decimal_point(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x21);
  }
                    // WARNING: Could not recover jumptable at 0x000140025d50. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::moneypunct<char, true>::do_neg_format() const

undefined4 __thiscall std::moneypunct<char,true>::do_neg_format(moneypunct<char,true> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::moneypunct<char, true>::do_pos_format() const

undefined4 __thiscall std::moneypunct<char,true>::do_pos_format(moneypunct<char,true> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::moneypunct<char, true>::negative_sign() const

undefined8 * std::moneypunct<char,true>::negative_sign(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x38) == do_negative_sign) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x48);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))(param_1);
  return param_1;
}



// std::moneypunct<char, true>::positive_sign() const

undefined8 * std::moneypunct<char,true>::positive_sign(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x30) == do_positive_sign) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x38);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))(param_1);
  return param_1;
}



// std::moneypunct<char, true>::thousands_sep() const

ulonglong __thiscall std::moneypunct<char,true>::thousands_sep(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x000140025e80. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::moneypunct<char, true>::do_curr_symbol() const

undefined8 * std::moneypunct<char,true>::do_curr_symbol(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x28);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, true>::do_frac_digits() const

undefined4 __thiscall std::moneypunct<char,true>::do_frac_digits(moneypunct<char,true> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::moneypunct<char, true>::do_decimal_point() const

undefined1 __thiscall std::moneypunct<char,true>::do_decimal_point(moneypunct<char,true> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x21);
}



// std::moneypunct<char, true>::do_negative_sign() const

undefined8 * std::moneypunct<char,true>::do_negative_sign(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x48);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, true>::do_positive_sign() const

undefined8 * std::moneypunct<char,true>::do_positive_sign(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x38);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<char, true>::do_thousands_sep() const

undefined1 __thiscall std::moneypunct<char,true>::do_thousands_sep(moneypunct<char,true> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::moneypunct<char, true>::grouping() const

undefined8 * std::moneypunct<char,true>::grouping(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x20) == do_grouping) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, false>::neg_format() const

ulonglong __thiscall std::moneypunct<>::neg_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x000140026040. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::moneypunct<wchar_t, false>::pos_format() const

ulonglong __thiscall std::moneypunct<>::pos_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x000140026070. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::moneypunct<wchar_t, false>::curr_symbol() const

undefined8 * std::moneypunct<>::curr_symbol(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x28) == do_curr_symbol) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x28);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, false>::do_grouping() const

undefined8 * std::moneypunct<>::do_grouping(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, false>::frac_digits() const

ulonglong __thiscall std::moneypunct<>::frac_digits(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x000140026160. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::moneypunct<wchar_t, false>::decimal_point() const

ulonglong __thiscall std::moneypunct<>::decimal_point(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x000140026190. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::moneypunct<wchar_t, false>::do_neg_format() const

undefined4 __thiscall std::moneypunct<>::do_neg_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::moneypunct<wchar_t, false>::do_pos_format() const

undefined4 __thiscall std::moneypunct<>::do_pos_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::moneypunct<wchar_t, false>::negative_sign() const

undefined8 * std::moneypunct<>::negative_sign(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x38) == do_negative_sign) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x48);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, false>::positive_sign() const

undefined8 * std::moneypunct<>::positive_sign(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x30) == do_positive_sign) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x38);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, false>::thousands_sep() const

ulonglong __thiscall std::moneypunct<>::thousands_sep(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x24);
  }
                    // WARNING: Could not recover jumptable at 0x0001400262c0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::moneypunct<wchar_t, false>::do_curr_symbol() const

undefined8 * std::moneypunct<>::do_curr_symbol(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x28);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, false>::do_frac_digits() const

undefined4 __thiscall std::moneypunct<>::do_frac_digits(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::moneypunct<wchar_t, false>::do_decimal_point() const

undefined2 __thiscall std::moneypunct<>::do_decimal_point(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::moneypunct<wchar_t, false>::do_negative_sign() const

undefined8 * std::moneypunct<>::do_negative_sign(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x48);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, false>::do_positive_sign() const

undefined8 * std::moneypunct<>::do_positive_sign(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x38);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, false>::do_thousands_sep() const

undefined2 __thiscall std::moneypunct<>::do_thousands_sep(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x24);
}



// std::moneypunct<wchar_t, false>::grouping() const

undefined8 * std::moneypunct<>::grouping(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x20) == do_grouping) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, true>::neg_format() const

ulonglong __thiscall std::moneypunct<>::neg_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x000140026480. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::moneypunct<wchar_t, true>::pos_format() const

ulonglong __thiscall std::moneypunct<>::pos_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x0001400264b0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::moneypunct<wchar_t, true>::curr_symbol() const

undefined8 * std::moneypunct<>::curr_symbol(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x28) == do_curr_symbol) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x28);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, true>::do_grouping() const

undefined8 * std::moneypunct<>::do_grouping(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, true>::frac_digits() const

ulonglong __thiscall std::moneypunct<>::frac_digits(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x0001400265a0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::moneypunct<wchar_t, true>::decimal_point() const

ulonglong __thiscall std::moneypunct<>::decimal_point(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x0001400265d0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::moneypunct<wchar_t, true>::do_neg_format() const

undefined4 __thiscall std::moneypunct<>::do_neg_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::moneypunct<wchar_t, true>::do_pos_format() const

undefined4 __thiscall std::moneypunct<>::do_pos_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::moneypunct<wchar_t, true>::negative_sign() const

undefined8 * std::moneypunct<>::negative_sign(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x38) == do_negative_sign) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x48);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, true>::positive_sign() const

undefined8 * std::moneypunct<>::positive_sign(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x30) == do_positive_sign) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x38);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))(param_1);
  return param_1;
}



// std::moneypunct<wchar_t, true>::thousands_sep() const

ulonglong __thiscall std::moneypunct<>::thousands_sep(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x24);
  }
                    // WARNING: Could not recover jumptable at 0x000140026700. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::moneypunct<wchar_t, true>::do_curr_symbol() const

undefined8 * std::moneypunct<>::do_curr_symbol(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x28);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, true>::do_frac_digits() const

undefined4 __thiscall std::moneypunct<>::do_frac_digits(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::moneypunct<wchar_t, true>::do_decimal_point() const

undefined2 __thiscall std::moneypunct<>::do_decimal_point(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::moneypunct<wchar_t, true>::do_negative_sign() const

undefined8 * std::moneypunct<>::do_negative_sign(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x48);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, true>::do_positive_sign() const

undefined8 * std::moneypunct<>::do_positive_sign(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x38);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::moneypunct<wchar_t, true>::do_thousands_sep() const

undefined2 __thiscall std::moneypunct<>::do_thousands_sep(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x24);
}



// std::moneypunct<wchar_t, true>::grouping() const

undefined8 * std::moneypunct<>::grouping(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x20) == do_grouping) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::__timepunct<char>::_M_am_pm_format(char const*) const

void std::__timepunct<char>::_M_am_pm_format(void)

{
  return;
}



// std::__timepunct<char>::_M_am_pm_format(char const**) const

void __thiscall std::__timepunct<char>::_M_am_pm_format(__timepunct<char> *this,undefined8 *param_1)

{
  *param_1 = *(undefined8 *)(*(longlong *)(this + 0x10) + 0x50);
  return;
}



// std::__timepunct<char>::_M_date_formats(char const**) const

void __thiscall std::__timepunct<char>::_M_date_formats(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x10);
  param_1[1] = *(undefined8 *)(lVar1 + 0x18);
  return;
}



// std::__timepunct<char>::_M_time_formats(char const**) const

void __thiscall std::__timepunct<char>::_M_time_formats(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x20);
  param_1[1] = *(undefined8 *)(lVar1 + 0x28);
  return;
}



// std::__timepunct<char>::_M_days_abbreviated(char const**) const

void __thiscall
std::__timepunct<char>::_M_days_abbreviated(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x90);
  param_1[1] = *(undefined8 *)(lVar1 + 0x98);
  param_1[2] = *(undefined8 *)(lVar1 + 0xa0);
  param_1[3] = *(undefined8 *)(lVar1 + 0xa8);
  param_1[4] = *(undefined8 *)(lVar1 + 0xb0);
  param_1[5] = *(undefined8 *)(lVar1 + 0xb8);
  param_1[6] = *(undefined8 *)(lVar1 + 0xc0);
  return;
}



// std::__timepunct<char>::_M_date_time_formats(char const**) const

void __thiscall
std::__timepunct<char>::_M_date_time_formats(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x30);
  param_1[1] = *(undefined8 *)(lVar1 + 0x38);
  return;
}



// std::__timepunct<char>::_M_months_abbreviated(char const**) const

void __thiscall
std::__timepunct<char>::_M_months_abbreviated(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x128);
  param_1[1] = *(undefined8 *)(lVar1 + 0x130);
  param_1[2] = *(undefined8 *)(lVar1 + 0x138);
  param_1[3] = *(undefined8 *)(lVar1 + 0x140);
  param_1[4] = *(undefined8 *)(lVar1 + 0x148);
  param_1[5] = *(undefined8 *)(lVar1 + 0x150);
  param_1[6] = *(undefined8 *)(lVar1 + 0x158);
  param_1[7] = *(undefined8 *)(lVar1 + 0x160);
  param_1[8] = *(undefined8 *)(lVar1 + 0x168);
  param_1[9] = *(undefined8 *)(lVar1 + 0x170);
  param_1[10] = *(undefined8 *)(lVar1 + 0x178);
  param_1[0xb] = *(undefined8 *)(lVar1 + 0x180);
  return;
}



// std::__timepunct<char>::_M_put(char*, unsigned long long, char const*, tm const*) const

void __thiscall
std::__timepunct<char>::_M_put
          (__timepunct<char> *this,char *param_1,size_t param_2,char *param_3,tm *param_4)

{
  char *_Str;
  size_t sVar1;
  char *_Locale;
  
  _Str = setlocale(0,(char *)0x0);
  sVar1 = strlen(_Str);
  _Locale = operator_new__(sVar1 + 1);
  memcpy(_Locale,_Str,sVar1 + 1);
  setlocale(0,*(char **)(this + 0x20));
  sVar1 = strftime(param_1,param_2,param_3,param_4);
  setlocale(0,_Locale);
  operator_delete__(_Locale);
  if (sVar1 == 0) {
    *param_1 = '\0';
  }
  return;
}



// std::__timepunct<char>::_M_days(char const**) const

void __thiscall std::__timepunct<char>::_M_days(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x58);
  param_1[1] = *(undefined8 *)(lVar1 + 0x60);
  param_1[2] = *(undefined8 *)(lVar1 + 0x68);
  param_1[3] = *(undefined8 *)(lVar1 + 0x70);
  param_1[4] = *(undefined8 *)(lVar1 + 0x78);
  param_1[5] = *(undefined8 *)(lVar1 + 0x80);
  param_1[6] = *(undefined8 *)(lVar1 + 0x88);
  return;
}



// std::__timepunct<char>::_M_am_pm(char const**) const

void __thiscall std::__timepunct<char>::_M_am_pm(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x40);
  param_1[1] = *(undefined8 *)(lVar1 + 0x48);
  return;
}



// std::__timepunct<char>::_M_months(char const**) const

void __thiscall std::__timepunct<char>::_M_months(__timepunct<char> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 200);
  param_1[1] = *(undefined8 *)(lVar1 + 0xd0);
  param_1[2] = *(undefined8 *)(lVar1 + 0xd8);
  param_1[3] = *(undefined8 *)(lVar1 + 0xe0);
  param_1[4] = *(undefined8 *)(lVar1 + 0xe8);
  param_1[5] = *(undefined8 *)(lVar1 + 0xf0);
  param_1[6] = *(undefined8 *)(lVar1 + 0xf8);
  param_1[7] = *(undefined8 *)(lVar1 + 0x100);
  param_1[8] = *(undefined8 *)(lVar1 + 0x108);
  param_1[9] = *(undefined8 *)(lVar1 + 0x110);
  param_1[10] = *(undefined8 *)(lVar1 + 0x118);
  param_1[0xb] = *(undefined8 *)(lVar1 + 0x120);
  return;
}



// std::__timepunct<wchar_t>::_M_am_pm_format(wchar_t const*) const

void std::__timepunct<wchar_t>::_M_am_pm_format(void)

{
  return;
}



// std::__timepunct<wchar_t>::_M_am_pm_format(wchar_t const**) const

void __thiscall
std::__timepunct<wchar_t>::_M_am_pm_format(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  *param_1 = *(undefined8 *)(*(longlong *)(this + 0x10) + 0x50);
  return;
}



// std::__timepunct<wchar_t>::_M_date_formats(wchar_t const**) const

void __thiscall
std::__timepunct<wchar_t>::_M_date_formats(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x10);
  param_1[1] = *(undefined8 *)(lVar1 + 0x18);
  return;
}



// std::__timepunct<wchar_t>::_M_time_formats(wchar_t const**) const

void __thiscall
std::__timepunct<wchar_t>::_M_time_formats(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x20);
  param_1[1] = *(undefined8 *)(lVar1 + 0x28);
  return;
}



// std::__timepunct<wchar_t>::_M_days_abbreviated(wchar_t const**) const

void __thiscall
std::__timepunct<wchar_t>::_M_days_abbreviated(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x90);
  param_1[1] = *(undefined8 *)(lVar1 + 0x98);
  param_1[2] = *(undefined8 *)(lVar1 + 0xa0);
  param_1[3] = *(undefined8 *)(lVar1 + 0xa8);
  param_1[4] = *(undefined8 *)(lVar1 + 0xb0);
  param_1[5] = *(undefined8 *)(lVar1 + 0xb8);
  param_1[6] = *(undefined8 *)(lVar1 + 0xc0);
  return;
}



// std::__timepunct<wchar_t>::_M_date_time_formats(wchar_t const**) const

void __thiscall
std::__timepunct<wchar_t>::_M_date_time_formats(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x30);
  param_1[1] = *(undefined8 *)(lVar1 + 0x38);
  return;
}



// std::__timepunct<wchar_t>::_M_months_abbreviated(wchar_t const**) const

void __thiscall
std::__timepunct<wchar_t>::_M_months_abbreviated(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x128);
  param_1[1] = *(undefined8 *)(lVar1 + 0x130);
  param_1[2] = *(undefined8 *)(lVar1 + 0x138);
  param_1[3] = *(undefined8 *)(lVar1 + 0x140);
  param_1[4] = *(undefined8 *)(lVar1 + 0x148);
  param_1[5] = *(undefined8 *)(lVar1 + 0x150);
  param_1[6] = *(undefined8 *)(lVar1 + 0x158);
  param_1[7] = *(undefined8 *)(lVar1 + 0x160);
  param_1[8] = *(undefined8 *)(lVar1 + 0x168);
  param_1[9] = *(undefined8 *)(lVar1 + 0x170);
  param_1[10] = *(undefined8 *)(lVar1 + 0x178);
  param_1[0xb] = *(undefined8 *)(lVar1 + 0x180);
  return;
}



// std::__timepunct<wchar_t>::_M_put(wchar_t*, unsigned long long, wchar_t const*, tm const*) const

void __thiscall
std::__timepunct<wchar_t>::_M_put
          (__timepunct<wchar_t> *this,wchar_t *param_1,size_t param_2,wchar_t *param_3,tm *param_4)

{
  char *_Str;
  size_t sVar1;
  char *_Locale;
  
  _Str = setlocale(0,(char *)0x0);
  sVar1 = strlen(_Str);
  _Locale = operator_new__(sVar1 + 1);
  memcpy(_Locale,_Str,sVar1 + 1);
  setlocale(0,*(char **)(this + 0x20));
  sVar1 = wcsftime(param_1,param_2,param_3,param_4);
  setlocale(0,_Locale);
  operator_delete__(_Locale);
  if (sVar1 == 0) {
    *param_1 = L'\0';
  }
  return;
}



// std::__timepunct<wchar_t>::_M_days(wchar_t const**) const

void __thiscall std::__timepunct<wchar_t>::_M_days(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x58);
  param_1[1] = *(undefined8 *)(lVar1 + 0x60);
  param_1[2] = *(undefined8 *)(lVar1 + 0x68);
  param_1[3] = *(undefined8 *)(lVar1 + 0x70);
  param_1[4] = *(undefined8 *)(lVar1 + 0x78);
  param_1[5] = *(undefined8 *)(lVar1 + 0x80);
  param_1[6] = *(undefined8 *)(lVar1 + 0x88);
  return;
}



// std::__timepunct<wchar_t>::_M_am_pm(wchar_t const**) const

void __thiscall std::__timepunct<wchar_t>::_M_am_pm(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 0x40);
  param_1[1] = *(undefined8 *)(lVar1 + 0x48);
  return;
}



// std::__timepunct<wchar_t>::_M_months(wchar_t const**) const

void __thiscall std::__timepunct<wchar_t>::_M_months(__timepunct<wchar_t> *this,undefined8 *param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 0x10);
  *param_1 = *(undefined8 *)(lVar1 + 200);
  param_1[1] = *(undefined8 *)(lVar1 + 0xd0);
  param_1[2] = *(undefined8 *)(lVar1 + 0xd8);
  param_1[3] = *(undefined8 *)(lVar1 + 0xe0);
  param_1[4] = *(undefined8 *)(lVar1 + 0xe8);
  param_1[5] = *(undefined8 *)(lVar1 + 0xf0);
  param_1[6] = *(undefined8 *)(lVar1 + 0xf8);
  param_1[7] = *(undefined8 *)(lVar1 + 0x100);
  param_1[8] = *(undefined8 *)(lVar1 + 0x108);
  param_1[9] = *(undefined8 *)(lVar1 + 0x110);
  param_1[10] = *(undefined8 *)(lVar1 + 0x118);
  param_1[0xb] = *(undefined8 *)(lVar1 + 0x120);
  return;
}



longlong _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong lVar3;
  __numpunct_cache<char> *this;
  
  lVar3 = std::locale::id::_M_id((id *)&std::numpunct<char>::id);
  plVar1 = (longlong *)(*(longlong *)(*param_1 + 0x18) + lVar3 * 8);
  lVar2 = *plVar1;
  if (lVar2 != 0) {
    return lVar2;
  }
  this = operator_new(0x90);
  *(undefined4 *)(this + 8) = 0;
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  this[0x20] = (__numpunct_cache<char>)0x0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined2 *)(this + 0x48) = 0;
  this[0x88] = (__numpunct_cache<char>)0x0;
  std::__numpunct_cache<char>::_M_cache(this,param_1);
  std::locale::_Impl::_M_install_cache((_Impl *)*param_1,(longlong *)this,lVar3);
  return *plVar1;
}



longlong _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0(longlong *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong lVar3;
  __numpunct_cache<wchar_t> *this;
  
  lVar3 = std::locale::id::_M_id((id *)&std::numpunct<wchar_t>::id);
  plVar1 = (longlong *)(*(longlong *)(*param_1 + 0x18) + lVar3 * 8);
  lVar2 = *plVar1;
  if (lVar2 != 0) {
    return lVar2;
  }
  this = operator_new(0xd0);
  *(undefined4 *)(this + 8) = 0;
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  this[0x20] = (__numpunct_cache<wchar_t>)0x0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined4 *)(this + 0x48) = 0;
  this[200] = (__numpunct_cache<wchar_t>)0x0;
  std::__numpunct_cache<wchar_t>::_M_cache(this,param_1);
  std::locale::_Impl::_M_install_cache((_Impl *)*param_1,(longlong *)this,lVar3);
  return *plVar1;
}



// std::logic_error::what() const

undefined8 __thiscall std::logic_error::what(logic_error *this)

{
  return *(undefined8 *)(this + 8);
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIcE10do_compareEPKcS4_S4_S4_
               (longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  std::__facet_shims::__collate_compare<char>
            (0,*(longlong **)(param_1 + 0x18),param_2,param_3,param_4);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIcE10do_compareEPKcS4_S4_S4_
               (longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  std::__facet_shims::__collate_compare<char>
            (0,*(longlong **)(param_1 + 0x18),param_2,param_3,param_4);
  return;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIcE12do_transformEPKcS4_
          (undefined8 *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong *puVar1;
  undefined1 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__collate_transform<char>
            (0,*(longlong **)(param_2 + 0x18),(longlong *)&local_48,param_3,param_4);
  if (local_28 != (code *)0x0) {
    puVar1 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (local_48,(longlong)(local_48 + local_40));
    *param_1 = puVar1;
    if (local_28 != (code *)0x0) {
      (*local_28)(&local_48);
    }
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



longlong *
_text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIcE12do_transformEPKcS4_
          (longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined1 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__collate_transform<char>
            (0,*(longlong **)(param_2 + 0x18),&local_48,param_3,param_4);
  if (local_28 != (code *)0x0) {
    *param_1 = (longlong)(param_1 + 2);
    if ((local_48 != (undefined1 *)0x0) || (local_40 == 0)) {
      _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
                (param_1,local_48,(longlong)(local_48 + local_40));
      if (local_28 != (code *)0x0) {
        (*local_28)(&local_48);
      }
      return param_1;
    }
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIwE10do_compareEPKwS4_S4_S4_
               (longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  std::__facet_shims::__collate_compare<wchar_t>
            (0,*(longlong **)(param_1 + 0x18),param_2,param_3,param_4);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIwE10do_compareEPKwS4_S4_S4_
               (longlong param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  std::__facet_shims::__collate_compare<wchar_t>
            (0,*(longlong **)(param_1 + 0x18),param_2,param_3,param_4);
  return;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIwE12do_transformEPKwS4_
          (undefined8 *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  ulonglong *puVar1;
  undefined2 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__collate_transform<wchar_t>
            (0,*(longlong **)(param_2 + 0x18),(longlong *)&local_48,param_3,param_4);
  if (local_28 != (code *)0x0) {
    puVar1 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (local_48,(longlong)(local_48 + local_40));
    *param_1 = puVar1;
    if (local_28 != (code *)0x0) {
      (*local_28)(&local_48);
    }
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



longlong *
_text__ZNKSt13__facet_shims12_GLOBAL__N_112collate_shimIwE12do_transformEPKwS4_
          (longlong *param_1,longlong param_2,undefined8 param_3,undefined8 param_4)

{
  undefined2 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__collate_transform<wchar_t>
            (0,*(longlong **)(param_2 + 0x18),&local_48,param_3,param_4);
  if (local_28 != (code *)0x0) {
    *param_1 = (longlong)(param_1 + 2);
    if ((local_48 != (undefined2 *)0x0) || (local_40 == 0)) {
      _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
                (param_1,local_48,(longlong)(local_48 + local_40));
      if (local_28 != (code *)0x0) {
        (*local_28)(&local_48);
      }
      return param_1;
    }
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



longlong *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIcE6do_getEiiiRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
          (longlong *param_1,longlong param_2,undefined4 param_3,undefined4 param_4,
          undefined4 param_5,undefined8 *param_6)

{
  undefined1 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__messages_get<char>
            (0,*(longlong **)(param_2 + 0x20),&local_48,param_3,param_4,param_5,
             (undefined1 *)*param_6,param_6[1]);
  if (local_28 != (code *)0x0) {
    *param_1 = (longlong)(param_1 + 2);
    if ((local_48 != (undefined1 *)0x0) || (local_40 == 0)) {
      _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
                (param_1,local_48,(longlong)(local_48 + local_40));
      if (local_28 != (code *)0x0) {
        (*local_28)(&local_48);
      }
      return param_1;
    }
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIcE6do_getEiiiRKSs
          (undefined8 *param_1,longlong param_2,undefined4 param_3,undefined4 param_4,
          undefined4 param_5,undefined8 *param_6)

{
  ulonglong *puVar1;
  undefined1 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__messages_get<char>
            (0,*(longlong **)(param_2 + 0x20),(longlong *)&local_48,param_3,param_4,param_5,
             (undefined1 *)*param_6,*(longlong *)((undefined1 *)*param_6 + -0x18));
  if (local_28 != (code *)0x0) {
    puVar1 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (local_48,(longlong)(local_48 + local_40));
    *param_1 = puVar1;
    if (local_28 != (code *)0x0) {
      (*local_28)(&local_48);
    }
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIcE7do_openERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale
               (longlong param_1,undefined8 *param_2,undefined8 param_3)

{
  std::__facet_shims::__messages_open<char>
            (0,*(longlong **)(param_1 + 0x20),(undefined1 *)*param_2,param_2[1],param_3);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIcE7do_openERKSsRKSt6locale
               (longlong param_1,undefined8 *param_2,undefined8 param_3)

{
  std::__facet_shims::__messages_open<char>
            (0,*(longlong **)(param_1 + 0x20),(undefined1 *)*param_2,
             *(longlong *)((undefined1 *)*param_2 + -0x18),param_3);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIcE8do_closeEi
               (longlong param_1,undefined4 param_2)

{
  std::__facet_shims::__messages_close<char>(0,*(longlong **)(param_1 + 0x20),param_2);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIcE8do_closeEi
               (longlong param_1,undefined4 param_2)

{
  std::__facet_shims::__messages_close<char>(0,*(longlong **)(param_1 + 0x20),param_2);
  return;
}



longlong *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIwE6do_getEiiiRKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE
          (longlong *param_1,longlong param_2,undefined4 param_3,undefined4 param_4,
          undefined4 param_5,undefined8 *param_6)

{
  undefined2 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__messages_get<wchar_t>
            (0,*(longlong **)(param_2 + 0x20),&local_48,param_3,param_4,param_5,
             (undefined2 *)*param_6,param_6[1]);
  if (local_28 != (code *)0x0) {
    *param_1 = (longlong)(param_1 + 2);
    if ((local_48 != (undefined2 *)0x0) || (local_40 == 0)) {
      _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
                (param_1,local_48,(longlong)(local_48 + local_40));
      if (local_28 != (code *)0x0) {
        (*local_28)(&local_48);
      }
      return param_1;
    }
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIwE6do_getEiiiRKSbIwSt11char_traitsIwESaIwEE
          (undefined8 *param_1,longlong param_2,undefined4 param_3,undefined4 param_4,
          undefined4 param_5,undefined8 *param_6)

{
  ulonglong *puVar1;
  undefined2 *local_48;
  longlong local_40;
  code *local_28;
  
  local_28 = (code *)0x0;
  std::__facet_shims::__messages_get<wchar_t>
            (0,*(longlong **)(param_2 + 0x20),(longlong *)&local_48,param_3,param_4,param_5,
             (undefined2 *)*param_6,*(longlong *)((undefined2 *)*param_6 + -0xc));
  if (local_28 != (code *)0x0) {
    puVar1 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (local_48,(longlong)(local_48 + local_40));
    *param_1 = puVar1;
    if (local_28 != (code *)0x0) {
      (*local_28)(&local_48);
    }
    return param_1;
  }
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("uninitialized __any_string");
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIwE7do_openERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale
               (longlong param_1,undefined8 *param_2,undefined8 param_3)

{
  std::__facet_shims::__messages_open<wchar_t>
            (0,*(longlong **)(param_1 + 0x20),(undefined1 *)*param_2,param_2[1],param_3);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIwE7do_openERKSsRKSt6locale
               (longlong param_1,undefined8 *param_2,undefined8 param_3)

{
  std::__facet_shims::__messages_open<wchar_t>
            (0,*(longlong **)(param_1 + 0x20),(undefined1 *)*param_2,
             *(longlong *)((undefined1 *)*param_2 + -0x18),param_3);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIwE8do_closeEi
               (longlong param_1,undefined4 param_2)

{
  std::__facet_shims::__messages_close<wchar_t>(0,*(longlong **)(param_1 + 0x20),param_2);
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113messages_shimIwE8do_closeEi
               (longlong param_1,undefined4 param_2)

{
  std::__facet_shims::__messages_close<wchar_t>(0,*(longlong **)(param_1 + 0x20),param_2);
  return;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE11do_get_dateESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          longlong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             100);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE11do_get_dateESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          ulonglong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(ulonglong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             100);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE11do_get_timeESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          longlong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x74);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE11do_get_timeESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          ulonglong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(ulonglong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x74);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE11do_get_yearESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          longlong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x79);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE11do_get_yearESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          ulonglong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(ulonglong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x79);
  return param_1;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE13do_date_orderEv(longlong param_1)

{
  std::__facet_shims::__time_get_dateorder<char>(0,*(longlong **)(param_1 + 0x10));
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE13do_date_orderEv(longlong param_1)

{
  std::__facet_shims::__time_get_dateorder<char>(0,*(longlong **)(param_1 + 0x10));
  return;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE14do_get_weekdayESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          longlong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x77);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE14do_get_weekdayESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          ulonglong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(ulonglong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x77);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE16do_get_monthnameESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          longlong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x6d);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIcE16do_get_monthnameESt19istreambuf_iteratorIcSt11char_traitsIcEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          ulonglong *param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<char>
            (param_1,0,*(ulonglong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             0x6d);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE11do_get_dateESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'd');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE11do_get_dateESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'd');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE11do_get_timeESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             't');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE11do_get_timeESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             't');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE11do_get_yearESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'y');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE11do_get_yearESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'y');
  return param_1;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE13do_date_orderEv(longlong param_1)

{
  std::__facet_shims::__time_get_dateorder<wchar_t>(0,*(longlong **)(param_1 + 0x10));
  return;
}



void _text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE13do_date_orderEv(longlong param_1)

{
  std::__facet_shims::__time_get_dateorder<wchar_t>(0,*(longlong **)(param_1 + 0x10));
  return;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE14do_get_weekdayESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'w');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE14do_get_weekdayESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'w');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE16do_get_monthnameESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'm');
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_113time_get_shimIwE16do_get_monthnameESt19istreambuf_iteratorIwSt11char_traitsIwEES6_RSt8ios_baseRSt12_Ios_IostateP2tm
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  std::__facet_shims::__time_get<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,&local_28,param_5,param_6,param_7,
             'm');
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIcE6do_getESt19istreambuf_iteratorIcSt11char_traitsIcEES6_bRSt8ios_baseRSt12_Ios_IostateRNSt7__cxx1112basic_stringIcS5_SaIcEEE
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,undefined8 *param_8)

{
  ulonglong uVar1;
  uint uVar2;
  ulonglong uVar3;
  __facet_shims *this;
  longlong lVar4;
  uint uVar5;
  ulonglong uVar6;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  ulonglong local_c0;
  undefined8 local_b8;
  uint local_b0;
  int local_a4;
  ulonglong local_a0;
  __facet_shims *local_98;
  undefined8 local_90;
  ulonglong auStack_88 [2];
  undefined1 *local_78;
  ulonglong local_70;
  code *local_58;
  
  local_c8 = *param_3;
  uVar1 = param_3[1];
  local_d8 = *param_4;
  local_d0 = param_4[1];
  this = (__facet_shims *)&local_b8;
  local_58 = (code *)0x0;
  local_a4 = 0;
  local_c0 = uVar1;
  std::__facet_shims::__money_get<char>
            (this,0,*(longlong **)(param_2 + 0x10),&local_c8,&local_d8,param_5,param_6,&local_a4,0,
             &local_78);
  if (local_a4 != 0) {
    *param_7 = local_a4;
    goto LAB_140028370;
  }
  if (local_58 == (code *)0x0) {
                    // WARNING: Subroutine does not return
    std::__throw_logic_error("uninitialized __any_string");
  }
  local_98 = (__facet_shims *)auStack_88;
  if ((local_78 == (undefined1 *)0x0) && (local_70 != 0)) {
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
LAB_1400285b0:
    *this = auStack_88[0]._0_1_;
    this = (__facet_shims *)*param_8;
    uVar6 = local_90;
LAB_14002858e:
    param_8[1] = uVar6;
    this[uVar6] = (__facet_shims)0x0;
  }
  else {
    local_a0 = local_70;
    if (local_70 < 0x10) {
      if (local_70 == 1) {
        auStack_88[0] = CONCAT71(auStack_88[0]._1_7_,*local_78);
      }
      else if (local_70 != 0) goto LAB_1400284e3;
    }
    else {
      local_98 = (__facet_shims *)std::__cxx11::string::_M_create(&local_98,&local_a0,0);
      auStack_88[0] = local_a0;
LAB_1400284e3:
      memcpy(local_98,local_78,local_70);
    }
    local_90 = local_a0;
    local_98[local_a0] = (__facet_shims)0x0;
    this = (__facet_shims *)*param_8;
    if (this == (__facet_shims *)(param_8 + 2)) {
      if (local_98 == (__facet_shims *)auStack_88) goto LAB_140028540;
      *param_8 = local_98;
      param_8[1] = local_a0;
      param_8[2] = auStack_88[0];
      local_98 = (__facet_shims *)auStack_88;
    }
    else {
      if (local_98 == (__facet_shims *)auStack_88) {
LAB_140028540:
        uVar6 = local_a0;
        if (local_a0 != 0) {
          if (local_a0 == 1) goto LAB_1400285b0;
          uVar2 = (uint)local_a0;
          uVar3 = local_a0 & 0xffffffff;
          if (uVar2 < 8) {
            if ((local_a0 & 4) == 0) {
              if (uVar2 != 0) {
                *this = auStack_88[0]._0_1_;
                if ((local_a0 & 2) == 0) goto LAB_14002857c;
                *(undefined2 *)(this + (uVar3 - 2)) =
                     *(undefined2 *)((longlong)auStack_88 + (uVar3 - 2));
                this = (__facet_shims *)*param_8;
              }
            }
            else {
              *(undefined4 *)this = (undefined4)auStack_88[0];
              *(undefined4 *)(this + (uVar3 - 4)) =
                   *(undefined4 *)((longlong)auStack_88 + (uVar3 - 4));
              this = (__facet_shims *)*param_8;
            }
          }
          else {
            *(ulonglong *)this = auStack_88[0];
            *(undefined8 *)(this + ((local_a0 & 0xffffffff) - 8)) =
                 *(undefined8 *)((longlong)auStack_88 + ((local_a0 & 0xffffffff) - 8));
            lVar4 = (longlong)this - ((ulonglong)(this + 8) & 0xfffffffffffffff8);
            uVar2 = (int)lVar4 + uVar2 & 0xfffffff8;
            if (7 < uVar2) {
              uVar3 = 0;
              do {
                uVar5 = (int)uVar3 + 8;
                *(undefined8 *)(((ulonglong)(this + 8) & 0xfffffffffffffff8) + uVar3) =
                     *(undefined8 *)((__facet_shims *)auStack_88 + (uVar3 - lVar4));
                uVar3 = (ulonglong)uVar5;
              } while (uVar5 < uVar2);
            }
LAB_14002857c:
            this = (__facet_shims *)*param_8;
          }
        }
        goto LAB_14002858e;
      }
      uVar6 = param_8[2];
      *param_8 = local_98;
      param_8[1] = local_a0;
      param_8[2] = auStack_88[0];
      local_98 = (__facet_shims *)auStack_88;
      if (this != (__facet_shims *)0x0) {
        local_98 = this;
        auStack_88[0] = uVar6;
      }
    }
  }
  local_90 = 0;
  *local_98 = (__facet_shims)0x0;
  if (local_98 != (__facet_shims *)auStack_88) {
    operator_delete(local_98);
  }
LAB_140028370:
  *param_1 = local_b8;
  param_1[1] = uVar1 & 0xffffffff00000000 | (ulonglong)local_b0;
  if (local_58 != (code *)0x0) {
    (*local_58)(&local_78);
  }
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIcE6do_getESt19istreambuf_iteratorIcSt11char_traitsIcEES6_bRSt8ios_baseRSt12_Ios_IostateRSs
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,string *param_8)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  int iVar3;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined8 local_78;
  uint local_70;
  int local_64;
  ulonglong *local_60;
  undefined1 *local_58;
  longlong local_50;
  code *local_38;
  
  local_88 = *param_3;
  uVar2 = param_3[1];
  local_98 = *param_4;
  uStack_90 = param_4[1];
  local_38 = (code *)0x0;
  local_64 = 0;
  local_80 = uVar2;
  std::__facet_shims::__money_get<char>
            ((__facet_shims *)&local_78,0,*(longlong **)(param_2 + 0x10),&local_88,&local_98,param_5
             ,param_6,&local_64,0,(longlong *)&local_58);
  if (local_64 == 0) {
    if (local_38 == (code *)0x0) {
                    // WARNING: Subroutine does not return
      std::__throw_logic_error("uninitialized __any_string");
    }
    local_60 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                         (local_58,(longlong)(local_58 + local_50));
    std::string::swap(param_8,(longlong *)&local_60);
    if (_CRT_MT == 0) {
      iVar3 = (int)local_60[-1];
      *(int *)(local_60 + -1) = iVar3 + -1;
    }
    else {
      LOCK();
      puVar1 = local_60 + -1;
      iVar3 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar3 < 1) {
      std::string::_Rep::_M_destroy(local_60 + -3);
    }
  }
  else {
    *param_7 = local_64;
  }
  *param_1 = local_78;
  param_1[1] = uVar2 & 0xffffffff00000000 | (ulonglong)local_70;
  if (local_38 != (code *)0x0) {
    (*local_38)(&local_58);
  }
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIcE6do_getESt19istreambuf_iteratorIcSt11char_traitsIcEES6_bRSt8ios_baseRSt12_Ios_IostateRe
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,undefined1 (*param_8) [10])

{
  ulonglong uVar1;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  uint local_40;
  int local_2c;
  undefined1 local_28 [2] [10];
  
  local_58 = *param_3;
  uVar1 = param_3[1];
  local_68 = *param_4;
  uStack_60 = param_4[1];
  local_2c = 0;
  local_50 = uVar1;
  std::__facet_shims::__money_get<char>
            ((__facet_shims *)&local_48,0,*(longlong **)(param_2 + 0x10),&local_58,&local_68,param_5
             ,param_6,&local_2c,(longlong)local_28,(longlong *)0x0);
  if (local_2c == 0) {
    *param_8 = local_28[0];
  }
  else {
    *param_7 = local_2c;
  }
  *param_1 = local_48;
  param_1[1] = uVar1 & 0xffffffff00000000 | (ulonglong)local_40;
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIcE6do_getESt19istreambuf_iteratorIcSt11char_traitsIcEES6_bRSt8ios_baseRSt12_Ios_IostateRe
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,undefined1 (*param_8) [10])

{
  ulonglong uVar1;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  uint local_40;
  int local_2c;
  undefined1 local_28 [2] [10];
  
  local_58 = *param_3;
  uVar1 = param_3[1];
  local_68 = *param_4;
  uStack_60 = param_4[1];
  local_2c = 0;
  local_50 = uVar1;
  std::__facet_shims::__money_get<char>
            ((__facet_shims *)&local_48,0,*(longlong **)(param_2 + 0x10),&local_58,&local_68,param_5
             ,param_6,&local_2c,(longlong)local_28,(undefined8 *)0x0);
  if (local_2c == 0) {
    *param_8 = local_28[0];
  }
  else {
    *param_7 = local_2c;
  }
  *param_1 = local_48;
  param_1[1] = uVar1 & 0xffffffff00000000 | (ulonglong)local_40;
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIwE6do_getESt19istreambuf_iteratorIwSt11char_traitsIwEES6_bRSt8ios_baseRSt12_Ios_IostateRNSt7__cxx1112basic_stringIwS5_SaIwEEE
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,uint *param_7,undefined8 *param_8)

{
  ulonglong uVar1;
  ulonglong uVar2;
  __facet_shims *this;
  __facet_shims *p_Var3;
  longlong *_Size;
  ulonglong uVar4;
  undefined8 local_d8;
  undefined8 local_d0;
  undefined8 local_c8;
  ulonglong local_c0;
  undefined8 local_b8;
  ushort local_b0;
  uint local_a4;
  ulonglong local_a0;
  __facet_shims *local_98;
  ulonglong local_90;
  ulonglong local_88 [2];
  undefined2 *local_78;
  longlong local_70;
  code *local_58;
  
  local_c8 = *param_3;
  uVar1 = param_3[1];
  local_d8 = *param_4;
  local_d0 = param_4[1];
  _Size = *(longlong **)(param_2 + 0x10);
  this = (__facet_shims *)&local_b8;
  local_58 = (code *)0x0;
  local_a4 = 0;
  local_c0 = uVar1;
  std::__facet_shims::__money_get<wchar_t>
            (this,0,_Size,&local_c8,&local_d8,param_5,param_6,(int *)&local_a4,0,&local_78);
  p_Var3 = (__facet_shims *)(ulonglong)local_a4;
  if (local_a4 != 0) {
    *param_7 = local_a4;
    goto LAB_140028b1f;
  }
  if (local_58 == (code *)0x0) {
                    // WARNING: Subroutine does not return
    std::__throw_logic_error("uninitialized __any_string");
  }
  local_98 = (__facet_shims *)local_88;
  if ((local_78 == (undefined2 *)0x0) && (local_70 != 0)) {
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
LAB_140028d88:
    *(undefined2 *)this = *(undefined2 *)p_Var3;
    uVar2 = 1;
LAB_140028ced:
    param_8[1] = uVar2;
    *(undefined2 *)(this + (longlong)_Size) = 0;
    this = p_Var3;
    p_Var3 = local_98;
    uVar2 = local_88[0];
  }
  else {
    uVar2 = local_70 * 2;
    uVar4 = (longlong)uVar2 >> 1;
    local_a0 = uVar4;
    if (0xe < uVar2) {
      local_98 = (__facet_shims *)std::__cxx11::wstring::_M_create(&local_98,&local_a0,0);
      local_88[0] = local_a0;
LAB_140028c63:
      if (uVar4 != 0) {
        memcpy(local_98,local_78,uVar2);
      }
      local_90 = local_a0;
      _Size = (longlong *)(local_a0 * 2);
      *(undefined2 *)(local_98 + (longlong)_Size) = 0;
      this = (__facet_shims *)*param_8;
      if (this != (__facet_shims *)(param_8 + 2)) goto LAB_140028bf4;
      if (local_98 != (__facet_shims *)local_88) {
        *param_8 = local_98;
        param_8[1] = local_a0;
        param_8[2] = local_88[0];
        goto LAB_140028b1f;
      }
LAB_140028ce8:
      uVar2 = 0;
      p_Var3 = local_98;
      if (local_a0 != 0) {
        if (local_a0 == 1) goto LAB_140028d88;
        memcpy(this,local_98,(size_t)_Size);
        this = (__facet_shims *)*param_8;
        _Size = (longlong *)(local_90 * 2);
        uVar2 = local_90;
        p_Var3 = local_98;
      }
      goto LAB_140028ced;
    }
    if (uVar4 != 1) goto LAB_140028c63;
    _Size = (longlong *)0x2;
    local_90 = 1;
    local_88[0] = CONCAT62((int6)(local_88[0] >> 0x10),*local_78) & 0xffffffff0000ffff;
    this = (__facet_shims *)*param_8;
    p_Var3 = (__facet_shims *)local_88;
    if (this == (__facet_shims *)(param_8 + 2)) goto LAB_140028d88;
LAB_140028bf4:
    if (local_98 == (__facet_shims *)local_88) goto LAB_140028ce8;
    uVar2 = param_8[2];
    *param_8 = local_98;
    param_8[1] = local_a0;
    param_8[2] = local_88[0];
    p_Var3 = this;
    if (this == (__facet_shims *)0x0) goto LAB_140028b1f;
  }
  local_88[0] = uVar2;
  local_98 = p_Var3;
  local_90 = 0;
  *(undefined2 *)this = 0;
  if (this != (__facet_shims *)local_88) {
    operator_delete(this);
  }
LAB_140028b1f:
  *param_1 = local_b8;
  param_1[1] = uVar1 & 0xffffffffffff0000 | (ulonglong)local_b0;
  if (local_58 != (code *)0x0) {
    (*local_58)(&local_78);
  }
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIwE6do_getESt19istreambuf_iteratorIwSt11char_traitsIwEES6_bRSt8ios_baseRSt12_Ios_IostateRSbIwS5_SaIwEE
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,wstring *param_8)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  int iVar3;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined8 local_78;
  ushort local_70;
  int local_64;
  ulonglong *local_60;
  undefined2 *local_58;
  longlong local_50;
  code *local_38;
  
  local_88 = *param_3;
  uVar2 = param_3[1];
  local_98 = *param_4;
  uStack_90 = param_4[1];
  local_38 = (code *)0x0;
  local_64 = 0;
  local_80 = uVar2;
  std::__facet_shims::__money_get<wchar_t>
            ((__facet_shims *)&local_78,0,*(longlong **)(param_2 + 0x10),&local_88,&local_98,param_5
             ,param_6,&local_64,0,(longlong *)&local_58);
  if (local_64 == 0) {
    if (local_38 == (code *)0x0) {
                    // WARNING: Subroutine does not return
      std::__throw_logic_error("uninitialized __any_string");
    }
    local_60 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                         (local_58,(longlong)(local_58 + local_50));
    std::wstring::swap(param_8,(longlong *)&local_60);
    if (_CRT_MT == 0) {
      iVar3 = (int)local_60[-1];
      *(int *)(local_60 + -1) = iVar3 + -1;
    }
    else {
      LOCK();
      puVar1 = local_60 + -1;
      iVar3 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar3 < 1) {
      std::wstring::_Rep::_M_destroy(local_60 + -3);
    }
  }
  else {
    *param_7 = local_64;
  }
  *param_1 = local_78;
  param_1[1] = uVar2 & 0xffffffffffff0000 | (ulonglong)local_70;
  if (local_38 != (code *)0x0) {
    (*local_38)(&local_58);
  }
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIwE6do_getESt19istreambuf_iteratorIwSt11char_traitsIwEES6_bRSt8ios_baseRSt12_Ios_IostateRe
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,undefined1 (*param_8) [10])

{
  ulonglong uVar1;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  ushort local_40;
  int local_2c;
  undefined1 local_28 [2] [10];
  
  local_58 = *param_3;
  local_50 = param_3[1];
  local_68 = *param_4;
  uStack_60 = param_4[1];
  uVar1 = local_50 & 0xffffffffffff0000;
  local_2c = 0;
  std::__facet_shims::__money_get<wchar_t>
            ((__facet_shims *)&local_48,0,*(longlong **)(param_2 + 0x10),&local_58,&local_68,param_5
             ,param_6,&local_2c,(longlong)local_28,(longlong *)0x0);
  if (local_2c == 0) {
    *param_8 = local_28[0];
  }
  else {
    *param_7 = local_2c;
  }
  *param_1 = local_48;
  param_1[1] = uVar1 | local_40;
  return param_1;
}



undefined8 *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_get_shimIwE6do_getESt19istreambuf_iteratorIwSt11char_traitsIwEES6_bRSt8ios_baseRSt12_Ios_IostateRe
          (undefined8 *param_1,longlong param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,int *param_7,undefined1 (*param_8) [10])

{
  ulonglong uVar1;
  undefined8 local_68;
  undefined8 uStack_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  ushort local_40;
  int local_2c;
  undefined1 local_28 [2] [10];
  
  local_58 = *param_3;
  local_50 = param_3[1];
  local_68 = *param_4;
  uStack_60 = param_4[1];
  uVar1 = local_50 & 0xffffffffffff0000;
  local_2c = 0;
  std::__facet_shims::__money_get<wchar_t>
            ((__facet_shims *)&local_48,0,*(longlong **)(param_2 + 0x10),&local_58,&local_68,param_5
             ,param_6,&local_2c,(longlong)local_28,(undefined8 *)0x0);
  if (local_2c == 0) {
    *param_8 = local_28[0];
  }
  else {
    *param_7 = local_2c;
  }
  *param_1 = local_48;
  param_1[1] = uVar1 | local_40;
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIcE6do_putESt19ostreambuf_iteratorIcSt11char_traitsIcEEbRSt8ios_basecRKNSt7__cxx1112basic_stringIcS5_SaIcEEE
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,char param_6,undefined8 *param_7)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined1 local_88 [10];
  undefined8 local_78;
  undefined8 uStack_70;
  undefined1 *local_68 [2];
  undefined1 local_58 [16];
  code *local_48;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  local_68[0] = local_58;
  local_48 = (code *)0x0;
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag_isra_0
            ((longlong *)local_68,(undefined1 *)*param_7,
             (longlong)((undefined1 *)*param_7 + param_7[1]));
  local_88 = (undefined1  [10])(float10)0;
  local_48 = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
  local_78 = uVar1;
  uStack_70 = uVar2;
  std::__facet_shims::__money_put<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_78,param_4,param_5,param_6,&local_88,
             local_68);
  if (local_48 != (code *)0x0) {
    (*local_48)(local_68);
  }
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIcE6do_putESt19ostreambuf_iteratorIcSt11char_traitsIcEEbRSt8ios_basecRKSs
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,char param_6,longlong *param_7)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined1 local_98 [10];
  undefined8 local_88;
  undefined8 uStack_80;
  undefined1 local_69;
  longlong *local_68;
  undefined8 local_60;
  code *local_48;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  local_68 = (longlong *)*param_7;
  local_48 = (code *)0x0;
  if ((int)local_68[-1] < 0) {
    local_68 = std::string::_Rep::_M_clone((_Rep *)(local_68 + -3),&local_69,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(local_68 + -1) = (int)local_68[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(local_68 + -1) = (int)local_68[-1] + 1;
    UNLOCK();
  }
  local_98 = (undefined1  [10])(float10)0;
  local_60 = *(undefined8 *)(*param_7 + -0x18);
  local_48 = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
  local_88 = uVar1;
  uStack_80 = uVar2;
  std::__facet_shims::__money_put<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_88,param_4,param_5,param_6,&local_98,
             &local_68);
  if (local_48 != (code *)0x0) {
    (*local_48)(&local_68);
  }
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIcE6do_putESt19ostreambuf_iteratorIcSt11char_traitsIcEEbRSt8ios_basece
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,char param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  std::__facet_shims::__money_put<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,param_4,param_5,param_6,&local_28,
             (undefined8 *)0x0);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIcE6do_putESt19ostreambuf_iteratorIcSt11char_traitsIcEEbRSt8ios_basece
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,char param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  std::__facet_shims::__money_put<char>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,param_4,param_5,param_6,&local_28,
             (undefined8 *)0x0);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIwE6do_putESt19ostreambuf_iteratorIwSt11char_traitsIwEEbRSt8ios_basewRKNSt7__cxx1112basic_stringIwS5_SaIwEEE
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,undefined2 param_6,undefined8 *param_7)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined1 local_88 [10];
  undefined8 local_78;
  undefined8 uStack_70;
  undefined1 *local_68 [2];
  undefined1 local_58 [16];
  code *local_48;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  local_68[0] = local_58;
  local_48 = (code *)0x0;
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag_isra_0
            (local_68,(undefined2 *)*param_7,(longlong)((undefined2 *)*param_7 + param_7[1]));
  local_88 = (undefined1  [10])(float10)0;
  local_48 = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
  local_78 = uVar1;
  uStack_70 = uVar2;
  std::__facet_shims::__money_put<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_78,param_4,param_5,param_6,&local_88,
             local_68);
  if (local_48 != (code *)0x0) {
    (*local_48)(local_68);
  }
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIwE6do_putESt19ostreambuf_iteratorIwSt11char_traitsIwEEbRSt8ios_basewRKSbIwS5_SaIwEE
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,undefined2 param_6,longlong *param_7)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined1 local_98 [10];
  undefined8 local_88;
  undefined8 uStack_80;
  undefined1 local_69;
  longlong *local_68;
  undefined8 local_60;
  code *local_48;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  local_68 = (longlong *)*param_7;
  local_48 = (code *)0x0;
  if ((int)local_68[-1] < 0) {
    local_68 = std::wstring::_Rep::_M_clone((_Rep *)(local_68 + -3),&local_69,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(local_68 + -1) = (int)local_68[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(local_68 + -1) = (int)local_68[-1] + 1;
    UNLOCK();
  }
  local_98 = (undefined1  [10])(float10)0;
  local_60 = *(undefined8 *)(*param_7 + -0x18);
  local_48 = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
  local_88 = uVar1;
  uStack_80 = uVar2;
  std::__facet_shims::__money_put<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_88,param_4,param_5,param_6,&local_98,
             &local_68);
  if (local_48 != (code *)0x0) {
    (*local_48)(&local_68);
  }
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIwE6do_putESt19ostreambuf_iteratorIwSt11char_traitsIwEEbRSt8ios_basewe
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,undefined2 param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  std::__facet_shims::__money_put<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,param_4,param_5,param_6,&local_28,
             (undefined8 *)0x0);
  return param_1;
}



__facet_shims *
_text__ZNKSt13__facet_shims12_GLOBAL__N_114money_put_shimIwE6do_putESt19ostreambuf_iteratorIwSt11char_traitsIwEEbRSt8ios_basewe
          (__facet_shims *param_1,longlong param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,undefined2 param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  std::__facet_shims::__money_put<wchar_t>
            (param_1,0,*(longlong **)(param_2 + 0x10),&local_18,param_4,param_5,param_6,&local_28,
             (undefined8 *)0x0);
  return param_1;
}



// std::bad_exception::what() const

char * std::bad_exception::what(void)

{
  return "std::bad_exception";
}



// std::wistream::gcount() const

undefined8 __thiscall std::wistream::gcount(wistream *this)

{
  return *(undefined8 *)(this + 8);
}



// std::wistream::sentry::operator bool() const

sentry __thiscall std::wistream::sentry::operator_cast_to_bool(sentry *this)

{
  return *this;
}



// std::wostream::sentry::operator bool() const

sentry __thiscall std::wostream::sentry::operator_cast_to_bool(sentry *this)

{
  return *this;
}



// std::random_device::_M_getentropy() const

undefined8 __thiscall std::random_device::_M_getentropy(random_device *this)

{
  code *pcVar1;
  
  pcVar1 = *(code **)(this + 8);
  if ((pcVar1 != _text__ZNSt12_GLOBAL__N_114__winxp_rand_sEPv) &&
     ((pcVar1 == _text__ZNSt12_GLOBAL__N_112__x86_rdseedEPv ||
       pcVar1 == _text__ZNSt12_GLOBAL__N_119__x86_rdseed_rdrandEPv ||
      (pcVar1 == _text__ZNSt12_GLOBAL__N_112__x86_rdrandEPv)))) {
    return 0x4040000000000000;
  }
  return 0;
}



// std::streambuf::gptr() const

undefined8 __thiscall std::streambuf::gptr(streambuf *this)

{
  return *(undefined8 *)(this + 0x10);
}



// std::streambuf::pptr() const

undefined8 __thiscall std::streambuf::pptr(streambuf *this)

{
  return *(undefined8 *)(this + 0x28);
}



// std::streambuf::eback() const

undefined8 __thiscall std::streambuf::eback(streambuf *this)

{
  return *(undefined8 *)(this + 8);
}



// std::streambuf::egptr() const

undefined8 __thiscall std::streambuf::egptr(streambuf *this)

{
  return *(undefined8 *)(this + 0x18);
}



// std::streambuf::epptr() const

undefined8 __thiscall std::streambuf::epptr(streambuf *this)

{
  return *(undefined8 *)(this + 0x30);
}



// std::streambuf::pbase() const

undefined8 __thiscall std::streambuf::pbase(streambuf *this)

{
  return *(undefined8 *)(this + 0x20);
}



// std::streambuf::getloc() const

locale * std::streambuf::getloc(locale *param_1,longlong param_2)

{
  locale::locale(param_1,(undefined8 *)(param_2 + 0x38));
  return param_1;
}



// std::wstreambuf::gptr() const

undefined8 __thiscall std::wstreambuf::gptr(wstreambuf *this)

{
  return *(undefined8 *)(this + 0x10);
}



// std::wstreambuf::pptr() const

undefined8 __thiscall std::wstreambuf::pptr(wstreambuf *this)

{
  return *(undefined8 *)(this + 0x28);
}



// std::wstreambuf::eback() const

undefined8 __thiscall std::wstreambuf::eback(wstreambuf *this)

{
  return *(undefined8 *)(this + 8);
}



// std::wstreambuf::egptr() const

undefined8 __thiscall std::wstreambuf::egptr(wstreambuf *this)

{
  return *(undefined8 *)(this + 0x18);
}



// std::wstreambuf::epptr() const

undefined8 __thiscall std::wstreambuf::epptr(wstreambuf *this)

{
  return *(undefined8 *)(this + 0x30);
}



// std::wstreambuf::pbase() const

undefined8 __thiscall std::wstreambuf::pbase(wstreambuf *this)

{
  return *(undefined8 *)(this + 0x20);
}



// std::wstreambuf::getloc() const

locale * std::wstreambuf::getloc(locale *param_1,longlong param_2)

{
  locale::locale(param_1,(undefined8 *)(param_2 + 0x38));
  return param_1;
}



// std::__codecvt_utf8_base<char32_t>::do_max_length() const

int __thiscall
std::__codecvt_utf8_base<char32_t>::do_max_length(__codecvt_utf8_base<char32_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x10) & 4) == 0) & 0xfffffffd) + 7;
}



// std::__codecvt_utf8_base<char32_t>::do_in(int&, char const*, char const*, char const*&,
// char32_t*, char32_t*, char32_t*&) const

undefined1 __thiscall
std::__codecvt_utf8_base<char32_t>::do_in
          (__codecvt_utf8_base<char32_t> *this,undefined8 param_2_00,short *param_2,short *param_3,
          undefined8 *param_4,uint *param_5,uint *param_6,undefined8 *param_7)

{
  uint uVar1;
  uint uVar2;
  short *psVar3;
  short **ppsVar4;
  uint *puVar5;
  undefined1 uVar6;
  short *local_38;
  short *local_30;
  
  uVar1 = *(uint *)(this + 0xc);
  local_38 = param_2;
  if ((((((byte)this[0x10] & 4) != 0) && (2 < (ulonglong)((longlong)param_3 - (longlong)param_2)))
      && (*param_2 == -0x4411)) && ((char)param_2[1] == -0x41)) {
    local_38 = (short *)((longlong)param_2 + 3);
  }
  psVar3 = local_38;
  if (local_38 != param_3) {
    ppsVar4 = &local_38;
    puVar5 = param_5;
    local_30 = param_3;
    do {
      psVar3 = local_38;
      param_5 = puVar5;
      if (param_6 == puVar5) break;
      uVar2 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                        (ppsVar4,uVar1);
      if (uVar2 == 0xfffffffe) {
        uVar6 = 1;
        goto LAB_140029a95;
      }
      if (uVar1 < uVar2) {
        uVar6 = 2;
        goto LAB_140029a95;
      }
      param_5 = puVar5 + 1;
      *puVar5 = uVar2;
      psVar3 = param_3;
      puVar5 = param_5;
    } while (param_3 != local_38);
  }
  uVar6 = param_3 != psVar3;
  puVar5 = param_5;
LAB_140029a95:
  *param_4 = local_38;
  *param_7 = puVar5;
  return uVar6;
}



// std::__codecvt_utf8_base<char32_t>::do_out(int&, char32_t const*, char32_t const*, char32_t
// const*&, char*, char*, char*&) const

undefined8 __thiscall
std::__codecvt_utf8_base<char32_t>::do_out
          (__codecvt_utf8_base<char32_t> *this,undefined8 param_2_00,uint *param_2,uint *param_3,
          undefined8 *param_4,undefined2 *param_5,longlong param_6,undefined8 *param_7)

{
  undefined8 uVar1;
  undefined2 **ppuVar2;
  ulonglong uVar3;
  undefined2 *local_18;
  longlong local_10;
  
  uVar3 = (ulonglong)*(uint *)(this + 0xc);
  local_18 = param_5;
  local_10 = param_6;
  if (((byte)this[0x10] & 2) != 0) {
    uVar1 = 1;
    if ((ulonglong)(param_6 - (longlong)param_5) < 3) goto LAB_140029b72;
    *(undefined1 *)(param_5 + 1) = 0xbf;
    local_18 = (undefined2 *)((longlong)param_5 + 3);
    *param_5 = 0xbbef;
  }
  ppuVar2 = &local_18;
  if (param_2 != param_3) {
    do {
      if ((uint)uVar3 < *param_2) {
        uVar1 = 2;
        goto LAB_140029b72;
      }
      uVar1 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIcEEbRNS_5rangeIT_Lb1EEEDi
                        ((longlong *)ppuVar2,*param_2);
      if ((char)uVar1 == '\0') {
        uVar1 = 1;
        goto LAB_140029b72;
      }
      param_2 = param_2 + 1;
    } while (param_3 != param_2);
  }
  uVar1 = 0;
LAB_140029b72:
  *param_4 = param_2;
  *param_7 = local_18;
  return uVar1;
}



// std::__codecvt_utf8_base<char32_t>::do_length(int&, char const*, char const*, unsigned long long)
// const

int __thiscall
std::__codecvt_utf8_base<char32_t>::do_length
          (__codecvt_utf8_base<char32_t> *this,undefined8 param_2_00,short *param_2,longlong param_3
          ,longlong param_4)

{
  uint uVar1;
  uint uVar2;
  short **ppsVar3;
  short *local_28;
  longlong local_20;
  
  uVar1 = *(uint *)(this + 0xc);
  local_28 = param_2;
  if ((((((byte)this[0x10] & 4) != 0) && (2 < (ulonglong)(param_3 - (longlong)param_2))) &&
      (*param_2 == -0x4411)) && ((char)param_2[1] == -0x41)) {
    local_28 = (short *)((longlong)param_2 + 3);
  }
  if (param_4 != 0) {
    ppsVar3 = &local_28;
    local_20 = param_3;
    do {
      param_4 = param_4 + -1;
      uVar2 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                        (ppsVar3,uVar1);
    } while (param_4 != 0 && uVar2 <= uVar1);
  }
  return (int)local_28 - (int)param_2;
}



// std::__codecvt_utf8_base<char16_t>::do_max_length() const

int __thiscall
std::__codecvt_utf8_base<char16_t>::do_max_length(__codecvt_utf8_base<char16_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x10) & 4) == 0) & 0xfffffffd) + 6;
}



// std::__codecvt_utf8_base<char16_t>::do_in(int&, char const*, char const*, char const*&,
// char16_t*, char16_t*, char16_t*&) const

void __thiscall
std::__codecvt_utf8_base<char16_t>::do_in
          (__codecvt_utf8_base<char16_t> *this,undefined8 param_2_00,undefined8 param_2,
          undefined8 param_3,undefined8 *param_4,longlong param_5,undefined8 param_6,
          longlong *param_7)

{
  uint uVar1;
  undefined8 local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  uVar1 = *(uint *)(this + 0xc);
  local_10 = param_6;
  if (0xffff < uVar1) {
    uVar1 = 0xffff;
  }
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_18utf16_inIcDsEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_mode
            (&local_28,&local_18,uVar1,*(uint *)(this + 0x10) & 6 | 1);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::__codecvt_utf8_base<char16_t>::do_out(int&, char16_t const*, char16_t const*, char16_t
// const*&, char*, char*, char*&) const

void __thiscall
std::__codecvt_utf8_base<char16_t>::do_out
          (__codecvt_utf8_base<char16_t> *this,undefined8 param_2_00,longlong param_2,
          undefined8 param_3,longlong *param_4,longlong param_5,undefined8 param_6,longlong *param_7
          )

{
  uint uVar1;
  longlong local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  uVar1 = *(uint *)(this + 0xc);
  if (0xffff < *(uint *)(this + 0xc)) {
    uVar1 = 0xffff;
  }
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_19utf16_outIDscEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_modeNS_10surrogatesE
            (&local_28,&local_18,uVar1,*(uint *)(this + 0x10),1);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::__codecvt_utf8_base<char16_t>::do_length(int&, char const*, char const*, unsigned long long)
// const

int __thiscall
std::__codecvt_utf8_base<char16_t>::do_length
          (__codecvt_utf8_base<char16_t> *this,undefined8 param_2_00,short *param_2,longlong param_3
          ,longlong param_4)

{
  short *psVar1;
  
  psVar1 = _text__ZNSt12_GLOBAL__N_19ucs2_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                     (param_2,param_3,param_4,*(uint *)(this + 0xc),
                      (byte)*(undefined4 *)(this + 0x10));
  return (int)psVar1 - (int)param_2;
}



// std::__codecvt_utf8_base<wchar_t>::do_max_length() const

int __thiscall std::__codecvt_utf8_base<wchar_t>::do_max_length(__codecvt_utf8_base<wchar_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x1c) & 4) == 0) & 0xfffffffd) + 6;
}



// std::__codecvt_utf8_base<wchar_t>::do_in(int&, char const*, char const*, char const*&, wchar_t*,
// wchar_t*, wchar_t*&) const

void __thiscall
std::__codecvt_utf8_base<wchar_t>::do_in
          (__codecvt_utf8_base<wchar_t> *this,undefined8 param_2_00,undefined8 param_2,
          undefined8 param_3,undefined8 *param_4,longlong param_5,undefined8 param_6,
          longlong *param_7)

{
  uint uVar1;
  undefined8 local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  uVar1 = *(uint *)(this + 0x18);
  local_10 = param_6;
  if (0xffff < uVar1) {
    uVar1 = 0xffff;
  }
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_18utf16_inIcDsEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_mode
            (&local_28,&local_18,uVar1,1);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::__codecvt_utf8_base<wchar_t>::do_out(int&, wchar_t const*, wchar_t const*, wchar_t const*&,
// char*, char*, char*&) const

void __thiscall
std::__codecvt_utf8_base<wchar_t>::do_out
          (__codecvt_utf8_base<wchar_t> *this,undefined8 param_2_00,longlong param_2,
          undefined8 param_3,longlong *param_4,longlong param_5,undefined8 param_6,longlong *param_7
          )

{
  uint uVar1;
  longlong local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_28 = param_5;
  local_20 = param_6;
  uVar1 = *(uint *)(this + 0x18);
  if (0xffff < *(uint *)(this + 0x18)) {
    uVar1 = 0xffff;
  }
  local_18 = param_2;
  local_10 = param_3;
  _text__ZNSt12_GLOBAL__N_19utf16_outIDscEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_modeNS_10surrogatesE
            (&local_18,&local_28,uVar1,*(uint *)(this + 0x1c),1);
  *param_4 = local_18;
  *param_7 = local_28;
  return;
}



// std::__codecvt_utf8_base<wchar_t>::do_length(int&, char const*, char const*, unsigned long long)
// const

int __thiscall
std::__codecvt_utf8_base<wchar_t>::do_length
          (__codecvt_utf8_base<wchar_t> *this,undefined8 param_2_00,short *param_2,longlong param_3,
          longlong param_4)

{
  short *psVar1;
  
  psVar1 = _text__ZNSt12_GLOBAL__N_19ucs2_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                     (param_2,param_3,param_4,*(uint *)(this + 0x18),
                      (byte)*(undefined4 *)(this + 0x1c));
  return (int)psVar1 - (int)param_2;
}



// std::__iosfail_type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const

void __thiscall
std::__iosfail_type_info::__do_upcast
          (__iosfail_type_info *this,type_info *param_1,longlong *param_2)

{
  char cVar1;
  
  cVar1 = __is_ios_failure_handler(param_1);
  if (cVar1 != '\0') {
    *param_2 = *param_2 + 0x20;
    return;
  }
  __cxxabiv1::__class_type_info::__do_upcast((__class_type_info *)this,param_1,param_2);
  return;
}



// std::istreambuf_iterator<char, std::char_traits<char> >::equal(std::istreambuf_iterator<char,
// std::char_traits<char> > const&) const

ulonglong __thiscall
std::istreambuf_iterator<>::equal(istreambuf_iterator<> *this,longlong *param_1)

{
  longlong *plVar1;
  bool bVar2;
  int iVar3;
  undefined8 in_RAX;
  undefined7 uVar5;
  ulonglong uVar4;
  bool bVar6;
  
  plVar1 = *(longlong **)this;
  bVar6 = *(int *)(this + 8) == -1;
  bVar2 = plVar1 != (longlong *)0x0 && bVar6;
  uVar4 = CONCAT71((int7)((ulonglong)in_RAX >> 8),bVar2);
  if (bVar2) {
    uVar4 = plVar1[3];
    if (uVar4 <= (ulonglong)plVar1[2]) {
      uVar4 = (**(code **)(*plVar1 + 0x48))();
      if ((int)uVar4 == -1) {
        *(undefined8 *)this = 0;
        bVar6 = true;
        goto LAB_140029f66;
      }
    }
    bVar6 = false;
  }
LAB_140029f66:
  plVar1 = (longlong *)*param_1;
  bVar2 = (int)param_1[1] == -1;
  uVar5 = (undefined7)(uVar4 >> 8);
  if (plVar1 == (longlong *)0x0 || !bVar2) {
LAB_140029f7a:
    return CONCAT71(uVar5,bVar6 == bVar2);
  }
  if ((ulonglong)plVar1[3] <= (ulonglong)plVar1[2]) {
    iVar3 = (**(code **)(*plVar1 + 0x48))();
    if (iVar3 == -1) {
      *param_1 = 0;
      uVar5 = 0;
      bVar2 = plVar1 != (longlong *)0x0 && bVar2;
      goto LAB_140029f7a;
    }
  }
  return (ulonglong)(bVar6 == false);
}



// std::istreambuf_iterator<char, std::char_traits<char> >::_M_get() const

ulonglong __thiscall std::istreambuf_iterator<>::_M_get(istreambuf_iterator<> *this)

{
  longlong *plVar1;
  ulonglong uVar2;
  
  uVar2 = (ulonglong)*(uint *)(this + 8);
  plVar1 = *(longlong **)this;
  if ((*(uint *)(this + 8) == 0xffffffff) && (plVar1 != (longlong *)0x0)) {
    if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
      return (ulonglong)*(byte *)plVar1[2];
    }
    uVar2 = (**(code **)(*plVar1 + 0x48))();
    if ((int)uVar2 == -1) {
      *(undefined8 *)this = 0;
    }
  }
  return uVar2;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t>
// >::equal(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > const&) const

bool __thiscall std::istreambuf_iterator<>::equal(istreambuf_iterator<> *this,longlong *param_1)

{
  longlong *plVar1;
  short sVar2;
  bool bVar3;
  bool bVar4;
  
  plVar1 = *(longlong **)this;
  bVar3 = *(short *)(this + 8) == -1;
  if (plVar1 != (longlong *)0x0 && bVar3) {
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar2 = *(short *)plVar1[2];
    }
    else {
      sVar2 = (**(code **)(*plVar1 + 0x48))();
    }
    bVar3 = false;
    if (sVar2 == -1) {
      *(undefined8 *)this = 0;
      bVar3 = true;
    }
  }
  plVar1 = (longlong *)*param_1;
  bVar4 = (short)param_1[1] == -1;
  if (plVar1 != (longlong *)0x0 && bVar4) {
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar2 = *(short *)plVar1[2];
    }
    else {
      sVar2 = (**(code **)(*plVar1 + 0x48))();
    }
    bVar4 = false;
    if (sVar2 == -1) {
      *param_1 = 0;
      bVar4 = true;
    }
  }
  return bVar3 == bVar4;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >::_M_get() const

void __thiscall std::istreambuf_iterator<>::_M_get(istreambuf_iterator<> *this)

{
  longlong *plVar1;
  short sVar2;
  
  plVar1 = *(longlong **)this;
  if ((*(short *)(this + 8) == -1) && (plVar1 != (longlong *)0x0)) {
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar2 = *(short *)plVar1[2];
    }
    else {
      sVar2 = (**(code **)(*plVar1 + 0x48))();
    }
    if (sVar2 == -1) {
      *(undefined8 *)this = 0;
    }
  }
  return;
}



// std::__codecvt_utf16_base<char32_t>::do_max_length() const

int __thiscall
std::__codecvt_utf16_base<char32_t>::do_max_length(__codecvt_utf16_base<char32_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x10) & 4) == 0) & 0xfffffffe) + 6;
}



// std::__codecvt_utf16_base<char32_t>::do_in(int&, char const*, char const*, char const*&,
// char32_t*, char32_t*, char32_t*&) const

uint __thiscall
std::__codecvt_utf16_base<char32_t>::do_in
          (__codecvt_utf16_base<char32_t> *this,undefined8 param_2_00,ushort *param_2,
          ushort *param_3,undefined8 *param_4,uint *param_5,uint *param_6,undefined8 *param_7)

{
  uint uVar1;
  bool bVar2;
  ushort uVar3;
  uint uVar4;
  ulonglong uVar5;
  ushort *puVar6;
  ushort *puVar7;
  ushort uVar8;
  longlong lVar9;
  uint local_3c;
  ushort *local_38;
  ushort *local_30;
  
  local_3c = *(uint *)(this + 0x10);
  uVar1 = *(uint *)(this + 0xc);
  local_38 = param_2;
  local_30 = param_3;
  _text__ZNSt12_GLOBAL__N_114read_utf16_bomILb0EEEvRNS_5rangeIKDsXT_EEERSt12codecvt_mode
            (&local_38,&local_3c);
  uVar5 = (ulonglong)((longlong)param_3 - (longlong)local_38) >> 1;
  puVar6 = local_38;
  if (uVar5 != 0) {
    bVar2 = false;
    local_3c = local_3c & 1;
    do {
      puVar7 = puVar6;
      if (param_6 == param_5) {
LAB_14002a2f0:
        local_3c = 1;
        if (!bVar2) {
          puVar7 = local_38;
        }
        goto LAB_14002a2bc;
      }
      uVar3 = *puVar6;
      if (local_3c == 0) {
        uVar3 = uVar3 << 8 | uVar3 >> 8;
        if (0x3ff < uVar3 - 0xd800) goto LAB_14002a298;
        if (uVar5 == 1) goto LAB_14002a2f0;
        uVar8 = puVar6[1] << 8 | puVar6[1] >> 8;
LAB_14002a213:
        if (0x3ff < uVar8 - 0xdc00) goto LAB_14002a2e0;
        uVar4 = uVar8 + 0xfca02400 + (uint)uVar3 * 0x400;
        lVar9 = 2;
        if (uVar1 < uVar4) goto LAB_14002a2af;
LAB_14002a23b:
        puVar6 = puVar6 + lVar9;
        bVar2 = true;
      }
      else {
        if (uVar3 - 0xd800 < 0x400) {
          if (uVar5 != 1) {
            uVar8 = puVar6[1];
            goto LAB_14002a213;
          }
          if (!bVar2) {
            puVar7 = local_38;
          }
          goto LAB_14002a2bc;
        }
LAB_14002a298:
        uVar4 = (uint)uVar3;
        if (0x3ff < uVar4 - 0xdc00) {
          lVar9 = 1;
          if (uVar3 <= uVar1) goto LAB_14002a23b;
LAB_14002a2af:
          local_3c = 2;
          if (!bVar2) {
            puVar7 = local_38;
          }
          goto LAB_14002a2bc;
        }
LAB_14002a2e0:
        if (uVar1 != 0xffffffff) {
          local_3c = 2;
          puVar7 = local_38;
          if (bVar2) {
            puVar7 = puVar6;
          }
          goto LAB_14002a2bc;
        }
        uVar4 = 0xffffffff;
      }
      *param_5 = uVar4;
      param_5 = param_5 + 1;
      uVar5 = (ulonglong)((longlong)param_3 - (longlong)puVar6) >> 1;
    } while (uVar5 != 0);
    if (!bVar2) {
      puVar6 = local_38;
    }
  }
  local_3c = (uint)(param_3 != puVar6) * 2;
  puVar7 = puVar6;
LAB_14002a2bc:
  *param_4 = puVar7;
  *param_7 = param_5;
  return local_3c;
}



// std::__codecvt_utf16_base<char32_t>::do_out(int&, char32_t const*, char32_t const*, char32_t
// const*&, char*, char*, char*&) const

uint __thiscall
std::__codecvt_utf16_base<char32_t>::do_out
          (__codecvt_utf16_base<char32_t> *this,undefined8 param_2_00,uint *param_2,uint *param_3,
          undefined8 *param_4,ushort *param_5,longlong param_6,undefined8 *param_7)

{
  uint uVar1;
  uint uVar2;
  ushort uVar3;
  ushort uVar4;
  uint uVar5;
  ushort uVar6;
  ulonglong uVar7;
  ushort *puVar8;
  
  uVar1 = *(uint *)(this + 0x10);
  uVar2 = *(uint *)(this + 0xc);
  if ((uVar1 & 2) != 0) {
    uVar5 = uVar1 & 1;
    if (uVar5 == 0) {
      uVar5 = 1;
      if ((ulonglong)(param_6 - (longlong)param_5) < 2) goto LAB_14002a395;
      *param_5 = 0xfffe;
      param_5 = param_5 + 1;
    }
    else {
      if ((ulonglong)(param_6 - (longlong)param_5) < 2) goto LAB_14002a395;
      *param_5 = 0xfeff;
      param_5 = param_5 + 1;
    }
  }
  for (; param_2 != param_3; param_2 = param_2 + 1) {
    uVar5 = *param_2;
    if (uVar2 < uVar5) {
      uVar5 = 2;
      goto LAB_14002a395;
    }
    uVar7 = (ulonglong)(param_6 - (longlong)param_5) >> 1;
    uVar3 = (ushort)uVar5;
    if (uVar5 < 0x10000) {
      if (uVar7 == 0) {
LAB_14002a390:
        uVar5 = 1;
        goto LAB_14002a395;
      }
      if ((uVar1 & 1) == 0) {
        uVar5 = (uint)(ushort)(uVar3 << 8 | uVar3 >> 8);
      }
      puVar8 = param_5 + 1;
      *param_5 = (ushort)uVar5;
    }
    else {
      if (uVar7 < 2) goto LAB_14002a390;
      uVar4 = (uVar3 & 0x3ff) + 0xdc00;
      uVar6 = (short)(uVar5 >> 10) + 0xd7c0;
      if ((uVar1 & 1) == 0) {
        uVar6 = uVar6 * 0x100 | uVar6 >> 8;
        uVar4 = uVar3 << 8 | uVar4 >> 8;
      }
      *param_5 = uVar6;
      puVar8 = param_5 + 2;
      param_5[1] = uVar4;
    }
    param_5 = puVar8;
  }
  uVar5 = 0;
LAB_14002a395:
  *param_4 = param_2;
  *param_7 = param_5;
  return uVar5;
}



// std::__codecvt_utf16_base<char32_t>::do_length(int&, char const*, char const*, unsigned long
// long) const

int __thiscall
std::__codecvt_utf16_base<char32_t>::do_length
          (__codecvt_utf16_base<char32_t> *this,undefined8 param_2_00,ushort *param_2,
          longlong param_3,longlong param_4)

{
  uint uVar1;
  bool bVar2;
  longlong lVar3;
  ulonglong uVar4;
  ushort uVar5;
  uint uVar6;
  uint uVar7;
  ushort *puVar8;
  longlong lVar9;
  bool bVar10;
  uint local_3c;
  ushort *local_38;
  longlong local_30;
  
  local_3c = *(uint *)(this + 0x10);
  uVar1 = *(uint *)(this + 0xc);
  lVar9 = param_4 + -1;
  local_38 = param_2;
  local_30 = param_3;
  _text__ZNSt12_GLOBAL__N_114read_utf16_bomILb0EEEvRNS_5rangeIKDsXT_EEERSt12codecvt_mode
            (&local_38,&local_3c);
  if (param_4 != 0) {
    bVar2 = false;
    puVar8 = local_38;
    do {
      uVar4 = (ulonglong)(param_3 - (longlong)puVar8) >> 1;
      if (uVar4 == 0) {
LAB_14002a5a0:
        uVar7 = 0xfffffffe;
      }
      else {
        uVar5 = *puVar8;
        uVar6 = (uint)uVar5;
        if ((local_3c & 1) != 0) {
          uVar7 = uVar6;
          if (0x3ff < uVar6 - 0xd800) goto LAB_14002a570;
          if (uVar4 != 1) {
            uVar5 = puVar8[1];
            goto LAB_14002a4e1;
          }
          goto LAB_14002a5a0;
        }
        uVar5 = uVar5 << 8 | uVar5 >> 8;
        uVar6 = (uint)uVar5;
        uVar7 = (uint)uVar5;
        if (uVar5 - 0xd800 < 0x400) {
          if (uVar4 == 1) goto LAB_14002a5a0;
          uVar5 = puVar8[1] << 8 | puVar8[1] >> 8;
LAB_14002a4e1:
          if (0x3ff < uVar5 - 0xdc00) goto LAB_14002a5b0;
          uVar7 = uVar5 + 0xfca02400 + uVar6 * 0x400;
          lVar3 = 2;
          if (uVar1 < uVar7) break;
LAB_14002a509:
          puVar8 = puVar8 + lVar3;
          bVar2 = true;
        }
        else {
LAB_14002a570:
          if (0x3ff < uVar7 - 0xdc00) {
            lVar3 = 1;
            if (uVar7 <= uVar1) goto LAB_14002a509;
            break;
          }
LAB_14002a5b0:
          uVar7 = 0xffffffff;
        }
      }
      bVar10 = lVar9 != 0;
      lVar9 = lVar9 + -1;
    } while (bVar10 && uVar7 <= uVar1);
    if (bVar2) {
      local_38 = puVar8;
    }
  }
  return (int)local_38 - (int)param_2;
}



// std::__codecvt_utf16_base<char16_t>::do_max_length() const

int __thiscall
std::__codecvt_utf16_base<char16_t>::do_max_length(__codecvt_utf16_base<char16_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x10) & 4) == 0) & 0xfffffffe) + 4;
}



// std::__codecvt_utf16_base<char16_t>::do_in(int&, char const*, char const*, char const*&,
// char16_t*, char16_t*, char16_t*&) const

ulonglong __thiscall
std::__codecvt_utf16_base<char16_t>::do_in
          (__codecvt_utf16_base<char16_t> *this,undefined8 param_2_00,longlong param_2,
          longlong param_3,longlong *param_4,undefined8 param_5,undefined8 param_6,
          undefined8 *param_7)

{
  ulonglong uVar1;
  longlong local_28;
  longlong local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  uVar1 = _text__ZNSt12_GLOBAL__N_17ucs2_inERNS_5rangeIKDsLb0EEERNS0_IDsLb1EEEDiSt12codecvt_mode
                    (&local_28,&local_18,*(uint *)(this + 0xc),*(uint *)(this + 0x10));
  *param_4 = local_28;
  *param_7 = local_18;
  if ((int)uVar1 == 0) {
    uVar1 = (ulonglong)((uint)(local_28 != param_3) * 2);
  }
  return uVar1;
}



// std::__codecvt_utf16_base<char16_t>::do_out(int&, char16_t const*, char16_t const*, char16_t
// const*&, char*, char*, char*&) const

uint __thiscall
std::__codecvt_utf16_base<char16_t>::do_out
          (__codecvt_utf16_base<char16_t> *this,undefined8 param_2_00,longlong param_2,
          undefined8 param_3,longlong *param_4,undefined2 *param_5,longlong param_6,
          undefined8 *param_7)

{
  uint uVar1;
  uint uVar2;
  bool bVar3;
  uint uVar4;
  undefined7 extraout_var;
  longlong local_28;
  undefined8 local_20;
  undefined2 *local_18;
  longlong local_10;
  
  uVar1 = *(uint *)(this + 0x10);
  uVar2 = *(uint *)(this + 0xc);
  local_18 = param_5;
  local_10 = param_6;
  if ((uVar1 & 2) != 0) {
    uVar4 = uVar1 & 1;
    if (uVar4 == 0) {
      uVar4 = 1;
      if ((ulonglong)(param_6 - (longlong)param_5) < 2) goto LAB_14002a6d6;
      local_18 = param_5 + 1;
      *param_5 = 0xfffe;
    }
    else {
      if ((ulonglong)(param_6 - (longlong)param_5) < 2) goto LAB_14002a6d6;
      local_18 = param_5 + 1;
      *param_5 = 0xfeff;
    }
  }
  local_28 = param_2;
  local_20 = param_3;
  bVar3 = _text__ZNSt12_GLOBAL__N_18ucs2_outERNS_5rangeIKDsLb1EEERNS0_IDsLb0EEEDiSt12codecvt_mode_part_0
                    (&local_28,(longlong *)&local_18,uVar2,uVar1);
  uVar4 = (uint)CONCAT71(extraout_var,bVar3);
  param_2 = local_28;
  param_5 = local_18;
LAB_14002a6d6:
  *param_4 = param_2;
  *param_7 = param_5;
  return uVar4;
}



// std::__codecvt_utf16_base<char16_t>::do_length(int&, char const*, char const*, unsigned long
// long) const

int __thiscall
std::__codecvt_utf16_base<char16_t>::do_length
          (__codecvt_utf16_base<char16_t> *this,undefined8 param_2_00,ushort *param_2,
          longlong param_3,longlong param_4)

{
  uint uVar1;
  bool bVar2;
  bool bVar3;
  ushort *puVar4;
  longlong lVar5;
  ushort uVar6;
  uint uVar7;
  uint local_2c;
  ushort *local_28;
  longlong local_20;
  
  local_2c = *(uint *)(this + 0x10);
  uVar1 = *(uint *)(this + 0xc);
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_114read_utf16_bomILb0EEEvRNS_5rangeIKDsXT_EEERSt12codecvt_mode
            (&local_28,&local_2c);
  lVar5 = param_4 + -1;
  if (0xffff < uVar1) {
    uVar1 = 0xffff;
  }
  puVar4 = local_28;
  if (param_4 != 0) {
    bVar3 = false;
    bVar2 = false;
    do {
      if ((ulonglong)(param_3 - (longlong)puVar4) >> 1 == 0) {
LAB_14002a7d8:
        if (!bVar2) {
          puVar4 = local_28;
        }
        break;
      }
      uVar6 = *puVar4;
      if ((local_2c & 1) == 0) {
        uVar6 = uVar6 << 8 | uVar6 >> 8;
      }
      uVar7 = (uint)uVar6;
      bVar2 = bVar3;
      if (((uVar7 - 0xd800 < 0x400) || (uVar7 - 0xdc00 < 0x400)) || (uVar1 < uVar7))
      goto LAB_14002a7d8;
      lVar5 = lVar5 + -1;
      puVar4 = puVar4 + 1;
      bVar3 = true;
      bVar2 = true;
    } while (lVar5 != -1);
  }
  return (int)puVar4 - (int)param_2;
}



// std::__codecvt_utf16_base<wchar_t>::do_max_length() const

int __thiscall
std::__codecvt_utf16_base<wchar_t>::do_max_length(__codecvt_utf16_base<wchar_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x1c) & 4) == 0) & 0xfffffffe) + 4;
}



// std::__codecvt_utf16_base<wchar_t>::do_in(int&, char const*, char const*, char const*&, wchar_t*,
// wchar_t*, wchar_t*&) const

ulonglong __thiscall
std::__codecvt_utf16_base<wchar_t>::do_in
          (__codecvt_utf16_base<wchar_t> *this,undefined8 param_2_00,longlong param_2,
          longlong param_3,longlong *param_4,undefined8 param_5,undefined8 param_6,
          undefined8 *param_7)

{
  ulonglong uVar1;
  longlong local_28;
  longlong local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  uVar1 = _text__ZNSt12_GLOBAL__N_17ucs2_inERNS_5rangeIKDsLb0EEERNS0_IDsLb1EEEDiSt12codecvt_mode
                    (&local_28,&local_18,*(uint *)(this + 0x18),*(uint *)(this + 0x1c));
  *param_4 = local_28;
  *param_7 = local_18;
  if ((int)uVar1 == 0) {
    uVar1 = (ulonglong)((uint)(local_28 != param_3) * 2);
  }
  return uVar1;
}



// std::__codecvt_utf16_base<wchar_t>::do_out(int&, wchar_t const*, wchar_t const*, wchar_t const*&,
// char*, char*, char*&) const

uint __thiscall
std::__codecvt_utf16_base<wchar_t>::do_out
          (__codecvt_utf16_base<wchar_t> *this,undefined8 param_2_00,longlong param_2,
          undefined8 param_3,longlong *param_4,undefined2 *param_5,longlong param_6,
          undefined8 *param_7)

{
  uint uVar1;
  uint uVar2;
  bool bVar3;
  uint uVar4;
  undefined7 extraout_var;
  undefined2 *local_28;
  longlong local_20;
  longlong local_18;
  undefined8 local_10;
  
  uVar1 = *(uint *)(this + 0x1c);
  uVar2 = *(uint *)(this + 0x18);
  local_28 = param_5;
  local_20 = param_6;
  if ((uVar1 & 2) != 0) {
    uVar4 = uVar1 & 1;
    if (uVar4 == 0) {
      uVar4 = 1;
      if ((ulonglong)(param_6 - (longlong)param_5) < 2) goto LAB_14002a906;
      local_28 = param_5 + 1;
      *param_5 = 0xfffe;
    }
    else {
      if ((ulonglong)(param_6 - (longlong)param_5) < 2) goto LAB_14002a906;
      local_28 = param_5 + 1;
      *param_5 = 0xfeff;
    }
  }
  local_18 = param_2;
  local_10 = param_3;
  bVar3 = _text__ZNSt12_GLOBAL__N_18ucs2_outERNS_5rangeIKDsLb1EEERNS0_IDsLb0EEEDiSt12codecvt_mode_part_0
                    (&local_18,(longlong *)&local_28,uVar2,uVar1);
  uVar4 = (uint)CONCAT71(extraout_var,bVar3);
  param_2 = local_18;
  param_5 = local_28;
LAB_14002a906:
  *param_4 = param_2;
  *param_7 = param_5;
  return uVar4;
}



// std::__codecvt_utf16_base<wchar_t>::do_length(int&, char const*, char const*, unsigned long long)
// const

int __thiscall
std::__codecvt_utf16_base<wchar_t>::do_length
          (__codecvt_utf16_base<wchar_t> *this,undefined8 param_2_00,ushort *param_2,
          longlong param_3,longlong param_4)

{
  uint uVar1;
  bool bVar2;
  bool bVar3;
  ushort *puVar4;
  longlong lVar5;
  ushort uVar6;
  uint uVar7;
  uint local_2c;
  ushort *local_28;
  longlong local_20;
  
  local_2c = *(uint *)(this + 0x1c);
  uVar1 = *(uint *)(this + 0x18);
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_114read_utf16_bomILb0EEEvRNS_5rangeIKDsXT_EEERSt12codecvt_mode
            (&local_28,&local_2c);
  lVar5 = param_4 + -1;
  if (0xffff < uVar1) {
    uVar1 = 0xffff;
  }
  puVar4 = local_28;
  if (param_4 != 0) {
    bVar3 = false;
    bVar2 = false;
    do {
      if ((ulonglong)(param_3 - (longlong)puVar4) >> 1 == 0) {
LAB_14002aa08:
        if (!bVar2) {
          puVar4 = local_28;
        }
        break;
      }
      uVar6 = *puVar4;
      if ((local_2c & 1) == 0) {
        uVar6 = uVar6 << 8 | uVar6 >> 8;
      }
      uVar7 = (uint)uVar6;
      bVar2 = bVar3;
      if (((uVar7 - 0xd800 < 0x400) || (uVar7 - 0xdc00 < 0x400)) || (uVar1 < uVar7))
      goto LAB_14002aa08;
      lVar5 = lVar5 + -1;
      puVar4 = puVar4 + 1;
      bVar3 = true;
      bVar2 = true;
    } while (lVar5 != -1);
  }
  return (int)puVar4 - (int)param_2;
}



// std::bad_array_new_length::what() const

char * std::bad_array_new_length::what(void)

{
  return "std::bad_array_new_length";
}



// std::__codecvt_utf8_utf16_base<char32_t>::do_max_length() const

int __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::do_max_length(__codecvt_utf8_utf16_base<char32_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x10) & 4) == 0) & 0xfffffffd) + 7;
}



// std::__codecvt_utf8_utf16_base<char32_t>::do_in(int&, char const*, char const*, char const*&,
// char32_t*, char32_t*, char32_t*&) const

undefined1 __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::do_in
          (__codecvt_utf8_utf16_base<char32_t> *this,undefined8 param_2_00,short *param_2,
          short *param_3,undefined8 *param_4,uint *param_5,uint *param_6,longlong *param_7)

{
  uint uVar1;
  short *psVar2;
  uint uVar3;
  short *psVar4;
  short **ppsVar5;
  undefined1 uVar6;
  short *local_38;
  short *local_30;
  
  uVar1 = *(uint *)(this + 0xc);
  local_38 = param_2;
  if ((((((byte)this[0x10] & 4) != 0) && (2 < (ulonglong)((longlong)param_3 - (longlong)param_2)))
      && (*param_2 == -0x4411)) && ((char)param_2[1] == -0x41)) {
    local_38 = (short *)((longlong)param_2 + 3);
  }
  ppsVar5 = &local_38;
  local_30 = param_3;
  psVar2 = local_38;
  while ((psVar4 = param_3, local_38 = psVar2, param_3 != psVar2 &&
         (psVar4 = psVar2, param_6 != param_5))) {
    uVar3 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                      (ppsVar5,uVar1);
    if (uVar3 == 0xfffffffe) {
      uVar6 = 1;
      goto LAB_14002aaf1;
    }
    if (uVar1 < uVar3) {
      uVar6 = 2;
      goto LAB_14002aaf1;
    }
    if (uVar3 < 0x10000) {
      *param_5 = uVar3;
      param_5 = param_5 + 1;
      psVar2 = local_38;
    }
    else {
      if ((ulonglong)((longlong)param_6 - (longlong)param_5) < 5) {
        uVar6 = 1;
        local_38 = psVar2;
        goto LAB_14002aaf1;
      }
      param_5[1] = (uint)(ushort)(((ushort)uVar3 & 0x3ff) + 0xdc00);
      *param_5 = (uint)(ushort)((short)(uVar3 >> 10) + 0xd7c0);
      param_5 = param_5 + 2;
      psVar2 = local_38;
    }
  }
  uVar6 = param_3 != psVar4;
LAB_14002aaf1:
  *param_4 = local_38;
  *param_7 = (longlong)param_5;
  return uVar6;
}



// std::__codecvt_utf8_utf16_base<char32_t>::do_out(int&, char32_t const*, char32_t const*, char32_t
// const*&, char*, char*, char*&) const

undefined8 __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::do_out
          (__codecvt_utf8_utf16_base<char32_t> *this,undefined8 param_2_00,uint *param_2,
          uint *param_3,longlong *param_4,undefined2 *param_5,longlong param_6,undefined8 *param_7)

{
  uint uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  uint uVar4;
  longlong lVar5;
  undefined2 *local_28;
  longlong local_20;
  
  uVar1 = *(uint *)(this + 0xc);
  local_28 = param_5;
  local_20 = param_6;
  if (((byte)this[0x10] & 2) != 0) {
    uVar2 = 1;
    if ((ulonglong)(param_6 - (longlong)param_5) < 3) goto LAB_14002ac79;
    *(undefined1 *)(param_5 + 1) = 0xbf;
    local_28 = (undefined2 *)((longlong)param_5 + 3);
    *param_5 = 0xbbef;
  }
  uVar3 = (longlong)param_3 - (longlong)param_2;
  if (param_2 != param_3) {
    do {
      uVar4 = *param_2;
      if (uVar4 - 0xd800 < 0x400) {
        if (uVar3 < 5) {
LAB_14002ac98:
          uVar2 = 1;
        }
        else {
          if (param_2[1] - 0xdc00 < 0x400) {
            lVar5 = 2;
            uVar4 = param_2[1] + 0xfca02400 + uVar4 * 0x400;
            if (uVar4 <= uVar1) goto LAB_14002ac2d;
          }
LAB_14002ac6f:
          uVar2 = 2;
        }
        goto LAB_14002ac79;
      }
      if ((uVar4 - 0xdc00 < 0x400) || (lVar5 = 1, uVar1 < uVar4)) goto LAB_14002ac6f;
LAB_14002ac2d:
      uVar2 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIcEEbRNS_5rangeIT_Lb1EEEDi
                        ((longlong *)&local_28,uVar4);
      if ((char)uVar2 == '\0') goto LAB_14002ac98;
      param_2 = param_2 + lVar5;
      uVar3 = (longlong)param_3 - (longlong)param_2;
    } while (param_3 != param_2);
  }
  uVar2 = 0;
LAB_14002ac79:
  *param_4 = (longlong)param_2;
  *param_7 = local_28;
  return uVar2;
}



// std::__codecvt_utf8_utf16_base<char32_t>::do_length(int&, char const*, char const*, unsigned long
// long) const

int __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::do_length
          (__codecvt_utf8_utf16_base<char32_t> *this,undefined8 param_2_00,short *param_2,
          longlong param_3,ulonglong param_4)

{
  short *psVar1;
  
  psVar1 = _text__ZNSt12_GLOBAL__N_110utf16_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                     (param_2,param_3,param_4,*(uint *)(this + 0xc),
                      (byte)*(undefined4 *)(this + 0x10));
  return (int)psVar1 - (int)param_2;
}



// std::__codecvt_utf8_utf16_base<char16_t>::do_max_length() const

int __thiscall
std::__codecvt_utf8_utf16_base<char16_t>::do_max_length(__codecvt_utf8_utf16_base<char16_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x10) & 4) == 0) & 0xfffffffd) + 7;
}



// std::__codecvt_utf8_utf16_base<char16_t>::do_in(int&, char const*, char const*, char const*&,
// char16_t*, char16_t*, char16_t*&) const

void __thiscall
std::__codecvt_utf8_utf16_base<char16_t>::do_in
          (__codecvt_utf8_utf16_base<char16_t> *this,undefined8 param_2_00,undefined8 param_2,
          undefined8 param_3,undefined8 *param_4,longlong param_5,undefined8 param_6,
          longlong *param_7)

{
  undefined8 local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_18utf16_inIcDsEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_mode
            (&local_28,&local_18,*(uint *)(this + 0xc),*(uint *)(this + 0x10) & 6 | 1);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::__codecvt_utf8_utf16_base<char16_t>::do_out(int&, char16_t const*, char16_t const*, char16_t
// const*&, char*, char*, char*&) const

void __thiscall
std::__codecvt_utf8_utf16_base<char16_t>::do_out
          (__codecvt_utf8_utf16_base<char16_t> *this,undefined8 param_2_00,longlong param_2,
          undefined8 param_3,longlong *param_4,longlong param_5,undefined8 param_6,longlong *param_7
          )

{
  longlong local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_19utf16_outIDscEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_modeNS_10surrogatesE
            (&local_28,&local_18,*(uint *)(this + 0xc),*(uint *)(this + 0x10),0);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::__codecvt_utf8_utf16_base<char16_t>::do_length(int&, char const*, char const*, unsigned long
// long) const

int __thiscall
std::__codecvt_utf8_utf16_base<char16_t>::do_length
          (__codecvt_utf8_utf16_base<char16_t> *this,undefined8 param_2_00,short *param_2,
          longlong param_3,ulonglong param_4)

{
  short *psVar1;
  
  psVar1 = _text__ZNSt12_GLOBAL__N_110utf16_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                     (param_2,param_3,param_4,*(uint *)(this + 0xc),
                      (byte)*(undefined4 *)(this + 0x10));
  return (int)psVar1 - (int)param_2;
}



// std::__codecvt_utf8_utf16_base<wchar_t>::do_max_length() const

int __thiscall
std::__codecvt_utf8_utf16_base<wchar_t>::do_max_length(__codecvt_utf8_utf16_base<wchar_t> *this)

{
  return (-(uint)((*(uint *)(this + 0x1c) & 4) == 0) & 0xfffffffd) + 7;
}



// std::__codecvt_utf8_utf16_base<wchar_t>::do_in(int&, char const*, char const*, char const*&,
// wchar_t*, wchar_t*, wchar_t*&) const

undefined1 __thiscall
std::__codecvt_utf8_utf16_base<wchar_t>::do_in
          (__codecvt_utf8_utf16_base<wchar_t> *this,undefined8 param_2_00,short *param_2,
          short *param_3,undefined8 *param_4,ushort *param_5,ushort *param_6,longlong *param_7)

{
  uint uVar1;
  short *psVar2;
  uint uVar3;
  short *psVar4;
  short **ppsVar5;
  undefined1 uVar6;
  short *local_38;
  short *local_30;
  
  uVar1 = *(uint *)(this + 0x18);
  local_38 = param_2;
  if ((((((byte)this[0x1c] & 4) != 0) && (2 < (ulonglong)((longlong)param_3 - (longlong)param_2)))
      && (*param_2 == -0x4411)) && ((char)param_2[1] == -0x41)) {
    local_38 = (short *)((longlong)param_2 + 3);
  }
  ppsVar5 = &local_38;
  local_30 = param_3;
  psVar2 = local_38;
  while ((psVar4 = param_3, local_38 = psVar2, param_3 != psVar2 &&
         (psVar4 = psVar2, param_6 != param_5))) {
    uVar3 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                      (ppsVar5,uVar1);
    if (uVar3 == 0xfffffffe) {
      uVar6 = 1;
      goto LAB_14002af01;
    }
    if (uVar1 < uVar3) {
      uVar6 = 2;
      goto LAB_14002af01;
    }
    if (uVar3 < 0x10000) {
      *param_5 = (ushort)uVar3;
      param_5 = param_5 + 1;
      psVar2 = local_38;
    }
    else {
      if ((ulonglong)((longlong)param_6 - (longlong)param_5) < 3) {
        uVar6 = 1;
        local_38 = psVar2;
        goto LAB_14002af01;
      }
      param_5[1] = ((ushort)uVar3 & 0x3ff) + 0xdc00;
      *param_5 = (short)(uVar3 >> 10) + 0xd7c0;
      param_5 = param_5 + 2;
      psVar2 = local_38;
    }
  }
  uVar6 = param_3 != psVar4;
LAB_14002af01:
  *param_4 = local_38;
  *param_7 = (longlong)param_5;
  return uVar6;
}



// std::__codecvt_utf8_utf16_base<wchar_t>::do_out(int&, wchar_t const*, wchar_t const*, wchar_t
// const*&, char*, char*, char*&) const

undefined8 __thiscall
std::__codecvt_utf8_utf16_base<wchar_t>::do_out
          (__codecvt_utf8_utf16_base<wchar_t> *this,undefined8 param_2_00,ushort *param_2,
          ushort *param_3,longlong *param_4,undefined2 *param_5,longlong param_6,undefined8 *param_7
          )

{
  ushort uVar1;
  uint uVar2;
  undefined8 uVar3;
  ulonglong uVar4;
  uint uVar5;
  longlong lVar6;
  undefined2 *local_28;
  longlong local_20;
  
  uVar2 = *(uint *)(this + 0x18);
  local_28 = param_5;
  local_20 = param_6;
  if (((byte)this[0x1c] & 2) != 0) {
    uVar3 = 1;
    if ((ulonglong)(param_6 - (longlong)param_5) < 3) goto LAB_14002b089;
    *(undefined1 *)(param_5 + 1) = 0xbf;
    local_28 = (undefined2 *)((longlong)param_5 + 3);
    *param_5 = 0xbbef;
  }
  uVar4 = (longlong)param_3 - (longlong)param_2;
  if (param_2 != param_3) {
    do {
      uVar1 = *param_2;
      uVar5 = (uint)uVar1;
      if (uVar1 - 0xd800 < 0x400) {
        if (uVar4 < 3) {
LAB_14002b0a8:
          uVar3 = 1;
        }
        else {
          if (param_2[1] - 0xdc00 < 0x400) {
            lVar6 = 2;
            uVar5 = param_2[1] + 0xfca02400 + uVar5 * 0x400;
            if (uVar5 <= uVar2) goto LAB_14002b03f;
          }
LAB_14002b07f:
          uVar3 = 2;
        }
        goto LAB_14002b089;
      }
      if ((uVar1 - 0xdc00 < 0x400) || (lVar6 = 1, uVar2 < uVar5)) goto LAB_14002b07f;
LAB_14002b03f:
      uVar3 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIcEEbRNS_5rangeIT_Lb1EEEDi
                        ((longlong *)&local_28,uVar5);
      if ((char)uVar3 == '\0') goto LAB_14002b0a8;
      param_2 = param_2 + lVar6;
      uVar4 = (longlong)param_3 - (longlong)param_2;
    } while (param_3 != param_2);
  }
  uVar3 = 0;
LAB_14002b089:
  *param_4 = (longlong)param_2;
  *param_7 = local_28;
  return uVar3;
}



// std::__codecvt_utf8_utf16_base<wchar_t>::do_length(int&, char const*, char const*, unsigned long
// long) const

int __thiscall
std::__codecvt_utf8_utf16_base<wchar_t>::do_length
          (__codecvt_utf8_utf16_base<wchar_t> *this,undefined8 param_2_00,short *param_2,
          longlong param_3,ulonglong param_4)

{
  short *psVar1;
  
  psVar1 = _text__ZNSt12_GLOBAL__N_110utf16_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                     (param_2,param_3,param_4,*(uint *)(this + 0x18),
                      (byte)*(undefined4 *)(this + 0x1c));
  return (int)psVar1 - (int)param_2;
}



// std::_V2::error_category::_M_message[abi:cxx11](int) const

error_category * __thiscall
std::_V2::error_category::_M_message_abi_cxx11_(error_category *this,longlong *param_1)

{
  undefined1 *local_38;
  ulonglong local_30;
  undefined1 local_28 [24];
  
  (**(code **)(*param_1 + 0x20))(&local_38);
  __cow_string::__cow_string((__cow_string *)this,local_38,local_30);
  if (local_38 != local_28) {
    operator_delete(local_38);
  }
  return this;
}



// std::_V2::error_category::_M_message(int) const

error_category * __thiscall
std::_V2::error_category::_M_message(error_category *this,longlong *param_1)

{
  __sso_string *p_Var1;
  int iVar2;
  __sso_string *local_10;
  
  (**(code **)(*param_1 + 0x18))(&local_10);
  __sso_string::__sso_string((__sso_string *)this,local_10,*(ulonglong *)(local_10 + -0x18));
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(local_10 + -8);
    *(int *)(local_10 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    p_Var1 = local_10 + -8;
    iVar2 = *(int *)p_Var1;
    *(int *)p_Var1 = *(int *)p_Var1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return this;
  }
  std::string::_Rep::_M_destroy(local_10 + -0x18);
  return this;
}



// std::_V2::error_category::equivalent(std::error_code const&, int) const

bool __thiscall std::_V2::error_category::equivalent(error_category *this,int *param_1,int param_2)

{
  if (*(error_category **)(param_1 + 2) != this) {
    return false;
  }
  return *param_1 == param_2;
}



// std::_V2::error_category::equivalent(int, std::error_condition const&) const

bool __thiscall
std::_V2::error_category::equivalent(error_category *this,undefined4 param_1,int *param_2)

{
  int local_18 [2];
  longlong local_10;
  
  (**(code **)(*(longlong *)this + 0x28))(local_18,this,param_1);
  if (*(longlong *)(param_2 + 2) != local_10) {
    return false;
  }
  return *param_2 == local_18[0];
}



// std::_V2::error_category::default_error_condition(int) const

undefined4 *
std::_V2::error_category::default_error_condition
          (undefined4 *param_1,undefined8 param_2,undefined4 param_3)

{
  *param_1 = param_3;
  *(undefined8 *)(param_1 + 2) = param_2;
  return param_1;
}



// std::ctype<char>::do_tolower(char*, char const*) const

byte * __thiscall std::ctype<char>::do_tolower(ctype<char> *this,byte *param_1,byte *param_2)

{
  byte bVar1;
  byte *pbVar2;
  
  if (param_1 < param_2) {
    do {
      while( true ) {
        bVar1 = *param_1;
        if (*(code **)(*(longlong *)this + 0x20) == do_tolower) break;
        pbVar2 = param_1 + 1;
        bVar1 = (**(code **)(*(longlong *)this + 0x20))(this,(int)(char)bVar1);
        *param_1 = bVar1;
        param_1 = pbVar2;
        if (param_2 == pbVar2) {
          return param_2;
        }
      }
      if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)bVar1 * 2) & 1) != 0) {
        bVar1 = bVar1 + 0x20;
      }
      pbVar2 = param_1 + 1;
      *param_1 = bVar1;
      param_1 = pbVar2;
    } while (param_2 != pbVar2);
  }
  return param_2;
}



// std::ctype<char>::do_tolower(char) const

uint __thiscall std::ctype<char>::do_tolower(ctype<char> *this,uint param_1)

{
  uint uVar1;
  
  uVar1 = param_1 + 0x20;
  if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)(param_1 & 0xff) * 2) & 1) == 0) {
    uVar1 = param_1;
  }
  return uVar1;
}



// std::ctype<char>::do_toupper(char*, char const*) const

byte * __thiscall std::ctype<char>::do_toupper(ctype<char> *this,byte *param_1,byte *param_2)

{
  byte bVar1;
  byte *pbVar2;
  
  if (param_1 < param_2) {
    do {
      while( true ) {
        bVar1 = *param_1;
        if (*(code **)(*(longlong *)this + 0x10) == do_toupper) break;
        pbVar2 = param_1 + 1;
        bVar1 = (**(code **)(*(longlong *)this + 0x10))(this,(int)(char)bVar1);
        *param_1 = bVar1;
        param_1 = pbVar2;
        if (param_2 == pbVar2) {
          return param_2;
        }
      }
      if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)bVar1 * 2) & 2) != 0) {
        bVar1 = bVar1 - 0x20;
      }
      pbVar2 = param_1 + 1;
      *param_1 = bVar1;
      param_1 = pbVar2;
    } while (param_2 != pbVar2);
  }
  return param_2;
}



// std::ctype<char>::do_toupper(char) const

uint __thiscall std::ctype<char>::do_toupper(ctype<char> *this,uint param_1)

{
  uint uVar1;
  
  uVar1 = param_1 - 0x20;
  if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)(param_1 & 0xff) * 2) & 2) == 0) {
    uVar1 = param_1;
  }
  return uVar1;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// std::ctype<char>::_M_widen_init() const

void __thiscall std::ctype<char>::_M_widen_init(ctype<char> *this)

{
  short sVar1;
  short sVar2;
  short sVar3;
  short sVar4;
  short sVar5;
  short sVar6;
  short sVar7;
  short sVar8;
  short sVar9;
  short sVar10;
  short sVar11;
  short sVar12;
  short sVar13;
  short sVar14;
  short sVar15;
  short sVar16;
  ulonglong uVar17;
  undefined1 auVar18 [16];
  undefined1 auVar19 [16];
  undefined1 auVar20 [16];
  undefined1 auVar21 [16];
  undefined1 auVar22 [12];
  undefined1 auVar23 [12];
  undefined1 auVar24 [12];
  int iVar25;
  char *pcVar26;
  char *pcVar27;
  undefined1 auVar28 [16];
  undefined1 auVar30 [16];
  undefined1 auVar34 [16];
  undefined1 auVar37 [16];
  undefined2 uVar50;
  undefined2 uVar51;
  longlong lVar38;
  undefined2 uVar52;
  undefined1 auVar39 [16];
  undefined1 auVar42 [16];
  undefined1 auVar46 [16];
  undefined1 auVar49 [16];
  undefined1 auVar54 [16];
  longlong lVar56;
  undefined8 local_198;
  undefined8 uStack_190;
  undefined8 local_188;
  undefined8 uStack_180;
  undefined8 local_178;
  undefined8 uStack_170;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  char local_98 [128];
  undefined1 auVar31 [16];
  undefined1 auVar29 [16];
  undefined1 auVar32 [16];
  undefined1 auVar35 [16];
  undefined1 auVar33 [16];
  undefined1 auVar36 [16];
  undefined1 auVar40 [16];
  undefined1 auVar43 [16];
  undefined1 auVar41 [16];
  undefined1 auVar44 [16];
  undefined1 auVar47 [16];
  undefined1 auVar45 [16];
  undefined1 auVar48 [16];
  longlong lVar53;
  longlong lVar55;
  
  pcVar26 = (char *)&local_198;
  auVar39 = _DAT_1400c5220;
  do {
    pcVar27 = pcVar26 + 0x10;
    lVar53 = auVar39._0_8_;
    lVar55 = auVar39._8_8_;
    auVar54._0_8_ = lVar53 + 0x10;
    auVar54._8_8_ = lVar55 + 0x10;
    lVar38 = lVar53 + 2;
    uVar17 = CONCAT44((int)lVar38,auVar39._8_4_);
    auVar29._0_10_ = (unkuint10)uVar17 << 0x20;
    auVar23._8_2_ = auVar39._10_2_;
    auVar23._0_8_ = uVar17;
    auVar23._10_2_ = (short)((ulonglong)(lVar55 + 4) >> 0x10);
    auVar29._12_4_ = auVar23._8_4_;
    uVar51 = (undefined2)(lVar55 + 4);
    auVar29._10_2_ = uVar51;
    auVar22._4_2_ = auVar39._8_2_;
    auVar22._0_4_ = auVar39._8_4_;
    auVar22._6_6_ = auVar29._10_6_;
    uVar50 = (undefined2)((ulonglong)(lVar53 + 4) >> 0x10);
    auVar18._2_8_ = auVar22._4_8_;
    auVar18._0_2_ = uVar50;
    auVar18._10_6_ = 0;
    auVar37._0_2_ = auVar39._0_2_;
    auVar28._12_4_ = 0;
    auVar28._0_12_ = SUB1612(auVar18 << 0x30,4);
    auVar28 = auVar28 << 0x20;
    uVar52 = (undefined2)(lVar53 + 6);
    auVar33._0_12_ = auVar28._0_12_;
    auVar33._12_2_ = uVar50;
    auVar33._14_2_ = (short)((ulonglong)(lVar53 + 6) >> 0x10);
    auVar32._12_4_ = auVar33._12_4_;
    auVar32._0_10_ = auVar28._0_10_;
    auVar32._10_2_ = (short)((ulonglong)lVar38 >> 0x10);
    auVar31._10_6_ = auVar32._10_6_;
    auVar31._0_8_ = auVar28._0_8_;
    auVar31._8_2_ = auVar39._2_2_;
    auVar19._2_8_ = auVar31._8_8_;
    auVar19._0_2_ = uVar52;
    auVar19._10_6_ = 0;
    auVar30._12_4_ = 0;
    auVar30._0_12_ = SUB1612(auVar19 << 0x30,4);
    auVar30 = auVar30 << 0x20;
    auVar36._0_12_ = auVar30._0_12_;
    auVar36._12_2_ = uVar52;
    auVar36._14_2_ = (short)(lVar55 + 6);
    auVar35._12_4_ = auVar36._12_4_;
    auVar35._0_10_ = auVar30._0_10_;
    auVar35._10_2_ = uVar51;
    auVar34._10_6_ = auVar35._10_6_;
    auVar34._0_8_ = auVar30._0_8_;
    auVar34._8_2_ = (short)(lVar53 + 4);
    auVar37._8_8_ = auVar34._8_8_;
    auVar37._6_2_ = (short)(lVar55 + 2);
    auVar37._4_2_ = (short)lVar38;
    auVar37._2_2_ = auVar39._8_2_;
    lVar56 = lVar53 + 10;
    lVar38 = lVar55 + 8;
    auVar37 = auVar37 & _DAT_1400c52b0;
    auVar40._0_8_ = lVar38 << 0x20;
    uVar17 = CONCAT44((int)lVar56,(int)lVar38);
    auVar41._0_10_ = (unkuint10)uVar17 << 0x20;
    auVar24._8_2_ = (short)((ulonglong)lVar38 >> 0x10);
    auVar24._0_8_ = uVar17;
    auVar24._10_2_ = (short)((ulonglong)(lVar55 + 0xc) >> 0x10);
    auVar41._12_4_ = auVar24._8_4_;
    uVar51 = (undefined2)(lVar55 + 0xc);
    auVar41._10_2_ = uVar51;
    auVar40._10_6_ = auVar41._10_6_;
    auVar40._8_2_ = (short)lVar38;
    uVar50 = (undefined2)((ulonglong)(lVar53 + 0xc) >> 0x10);
    auVar20._2_8_ = auVar40._8_8_;
    auVar20._0_2_ = uVar50;
    auVar20._10_6_ = 0;
    auVar49._0_2_ = (undefined2)(lVar53 + 8);
    auVar39._12_4_ = 0;
    auVar39._0_12_ = SUB1612(auVar20 << 0x30,4);
    auVar39 = auVar39 << 0x20;
    uVar52 = (undefined2)(lVar53 + 0xe);
    auVar45._0_12_ = auVar39._0_12_;
    auVar45._12_2_ = uVar50;
    auVar45._14_2_ = (short)((ulonglong)(lVar53 + 0xe) >> 0x10);
    auVar44._12_4_ = auVar45._12_4_;
    auVar44._0_10_ = auVar39._0_10_;
    auVar44._10_2_ = (short)((ulonglong)lVar56 >> 0x10);
    auVar43._10_6_ = auVar44._10_6_;
    auVar43._0_8_ = auVar39._0_8_;
    auVar43._8_2_ = (short)((ulonglong)(lVar53 + 8) >> 0x10);
    auVar21._2_8_ = auVar43._8_8_;
    auVar21._0_2_ = uVar52;
    auVar21._10_6_ = 0;
    auVar42._12_4_ = 0;
    auVar42._0_12_ = SUB1612(auVar21 << 0x30,4);
    auVar42 = auVar42 << 0x20;
    auVar48._0_12_ = auVar42._0_12_;
    auVar48._12_2_ = uVar52;
    auVar48._14_2_ = (short)(lVar55 + 0xe);
    auVar47._12_4_ = auVar48._12_4_;
    auVar47._0_10_ = auVar42._0_10_;
    auVar47._10_2_ = uVar51;
    auVar46._10_6_ = auVar47._10_6_;
    auVar46._0_8_ = auVar42._0_8_;
    auVar46._8_2_ = (short)(lVar53 + 0xc);
    auVar49._8_8_ = auVar46._8_8_;
    auVar49._6_2_ = (short)(lVar55 + 10);
    auVar49._4_2_ = (short)lVar56;
    auVar49._2_2_ = (short)lVar38;
    auVar49 = auVar49 & _DAT_1400c52b0;
    sVar1 = auVar37._0_2_;
    sVar2 = auVar37._2_2_;
    sVar3 = auVar37._4_2_;
    sVar4 = auVar37._6_2_;
    sVar5 = auVar37._8_2_;
    sVar6 = auVar37._10_2_;
    sVar7 = auVar37._12_2_;
    sVar8 = auVar37._14_2_;
    sVar9 = auVar49._0_2_;
    sVar10 = auVar49._2_2_;
    sVar11 = auVar49._4_2_;
    sVar12 = auVar49._6_2_;
    sVar13 = auVar49._8_2_;
    sVar14 = auVar49._10_2_;
    sVar15 = auVar49._12_2_;
    sVar16 = auVar49._14_2_;
    *pcVar26 = (0 < sVar1) * (sVar1 < 0x100) * auVar37[0] - (0xff < sVar1);
    pcVar26[1] = (0 < sVar2) * (sVar2 < 0x100) * auVar37[2] - (0xff < sVar2);
    pcVar26[2] = (0 < sVar3) * (sVar3 < 0x100) * auVar37[4] - (0xff < sVar3);
    pcVar26[3] = (0 < sVar4) * (sVar4 < 0x100) * auVar37[6] - (0xff < sVar4);
    pcVar26[4] = (0 < sVar5) * (sVar5 < 0x100) * auVar37[8] - (0xff < sVar5);
    pcVar26[5] = (0 < sVar6) * (sVar6 < 0x100) * auVar37[10] - (0xff < sVar6);
    pcVar26[6] = (0 < sVar7) * (sVar7 < 0x100) * auVar37[0xc] - (0xff < sVar7);
    pcVar26[7] = (0 < sVar8) * (sVar8 < 0x100) * auVar37[0xe] - (0xff < sVar8);
    pcVar26[8] = (0 < sVar9) * (sVar9 < 0x100) * auVar49[0] - (0xff < sVar9);
    pcVar26[9] = (0 < sVar10) * (sVar10 < 0x100) * auVar49[2] - (0xff < sVar10);
    pcVar26[10] = (0 < sVar11) * (sVar11 < 0x100) * auVar49[4] - (0xff < sVar11);
    pcVar26[0xb] = (0 < sVar12) * (sVar12 < 0x100) * auVar49[6] - (0xff < sVar12);
    pcVar26[0xc] = (0 < sVar13) * (sVar13 < 0x100) * auVar49[8] - (0xff < sVar13);
    pcVar26[0xd] = (0 < sVar14) * (sVar14 < 0x100) * auVar49[10] - (0xff < sVar14);
    pcVar26[0xe] = (0 < sVar15) * (sVar15 < 0x100) * auVar49[0xc] - (0xff < sVar15);
    pcVar26[0xf] = (0 < sVar16) * (sVar16 < 0x100) * auVar49[0xe] - (0xff < sVar16);
    pcVar26 = pcVar27;
    auVar39 = auVar54;
  } while (pcVar27 != local_98);
  if (*(code **)(*(longlong *)this + 0x38) == do_widen) {
    *(undefined8 *)(this + 0x39) = local_198;
    *(undefined8 *)(this + 0x41) = uStack_190;
    *(undefined8 *)(this + 0x49) = local_188;
    *(undefined8 *)(this + 0x51) = uStack_180;
    *(undefined8 *)(this + 0x59) = local_178;
    *(undefined8 *)(this + 0x61) = uStack_170;
    *(undefined8 *)(this + 0x69) = local_168;
    *(undefined8 *)(this + 0x71) = uStack_160;
    *(undefined8 *)(this + 0x79) = local_158;
    *(undefined8 *)(this + 0x81) = uStack_150;
    *(undefined8 *)(this + 0x89) = local_148;
    *(undefined8 *)(this + 0x91) = uStack_140;
    *(undefined8 *)(this + 0x99) = local_138;
    *(undefined8 *)(this + 0xa1) = uStack_130;
    *(undefined8 *)(this + 0xa9) = local_128;
    *(undefined8 *)(this + 0xb1) = uStack_120;
    *(undefined8 *)(this + 0xb9) = local_118;
    *(undefined8 *)(this + 0xc1) = uStack_110;
    *(undefined8 *)(this + 0xc9) = local_108;
    *(undefined8 *)(this + 0xd1) = uStack_100;
    *(undefined8 *)(this + 0xd9) = local_f8;
    *(undefined8 *)(this + 0xe1) = uStack_f0;
    *(undefined8 *)(this + 0xe9) = local_e8;
    *(undefined8 *)(this + 0xf1) = uStack_e0;
    *(undefined8 *)(this + 0xf9) = local_d8;
    *(undefined8 *)(this + 0x101) = uStack_d0;
    *(undefined8 *)(this + 0x109) = local_c8;
    *(undefined8 *)(this + 0x111) = uStack_c0;
    *(undefined8 *)(this + 0x119) = local_b8;
    *(undefined8 *)(this + 0x121) = uStack_b0;
    *(undefined8 *)(this + 0x129) = local_a8;
    *(undefined8 *)(this + 0x131) = uStack_a0;
  }
  else {
    (**(code **)(*(longlong *)this + 0x38))(this,&local_198,local_98,this + 0x39);
  }
  iVar25 = memcmp(&local_198,this + 0x39,0x100);
  this[0x38] = (ctype<char>)('\x02' - (iVar25 == 0));
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// std::ctype<char>::_M_narrow_init() const

void __thiscall std::ctype<char>::_M_narrow_init(ctype<char> *this)

{
  short sVar1;
  short sVar2;
  short sVar3;
  short sVar4;
  short sVar5;
  short sVar6;
  short sVar7;
  short sVar8;
  short sVar9;
  short sVar10;
  short sVar11;
  short sVar12;
  short sVar13;
  short sVar14;
  short sVar15;
  short sVar16;
  ulonglong uVar17;
  undefined1 auVar18 [16];
  undefined1 auVar19 [16];
  undefined1 auVar20 [16];
  undefined1 auVar21 [16];
  undefined1 auVar22 [12];
  undefined1 auVar23 [12];
  undefined1 auVar24 [12];
  int iVar25;
  char *pcVar26;
  char *pcVar27;
  undefined1 auVar28 [16];
  undefined1 auVar30 [16];
  undefined1 auVar34 [16];
  undefined1 auVar37 [16];
  undefined2 uVar50;
  undefined2 uVar51;
  longlong lVar38;
  undefined2 uVar52;
  undefined1 auVar39 [16];
  undefined1 auVar42 [16];
  undefined1 auVar46 [16];
  undefined1 auVar49 [16];
  undefined1 auVar54 [16];
  longlong lVar56;
  char local_1a9;
  char local_1a8;
  undefined1 auStack_1a7 [2];
  char acStack_1a5 [5];
  undefined8 uStack_1a0;
  undefined8 local_198;
  undefined8 uStack_190;
  undefined8 local_188;
  undefined8 uStack_180;
  undefined8 local_178;
  undefined8 uStack_170;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  char local_a8 [136];
  undefined1 auVar31 [16];
  undefined1 auVar29 [16];
  undefined1 auVar32 [16];
  undefined1 auVar35 [16];
  undefined1 auVar33 [16];
  undefined1 auVar36 [16];
  undefined1 auVar40 [16];
  undefined1 auVar43 [16];
  undefined1 auVar41 [16];
  undefined1 auVar44 [16];
  undefined1 auVar47 [16];
  undefined1 auVar45 [16];
  undefined1 auVar48 [16];
  longlong lVar53;
  longlong lVar55;
  
  pcVar26 = &local_1a8;
  auVar39 = _DAT_1400c5220;
  do {
    pcVar27 = pcVar26 + 0x10;
    lVar53 = auVar39._0_8_;
    lVar55 = auVar39._8_8_;
    auVar54._0_8_ = lVar53 + 0x10;
    auVar54._8_8_ = lVar55 + 0x10;
    lVar38 = lVar53 + 2;
    uVar17 = CONCAT44((int)lVar38,auVar39._8_4_);
    auVar29._0_10_ = (unkuint10)uVar17 << 0x20;
    auVar23._8_2_ = auVar39._10_2_;
    auVar23._0_8_ = uVar17;
    auVar23._10_2_ = (short)((ulonglong)(lVar55 + 4) >> 0x10);
    auVar29._12_4_ = auVar23._8_4_;
    uVar51 = (undefined2)(lVar55 + 4);
    auVar29._10_2_ = uVar51;
    auVar22._4_2_ = auVar39._8_2_;
    auVar22._0_4_ = auVar39._8_4_;
    auVar22._6_6_ = auVar29._10_6_;
    uVar50 = (undefined2)((ulonglong)(lVar53 + 4) >> 0x10);
    auVar18._2_8_ = auVar22._4_8_;
    auVar18._0_2_ = uVar50;
    auVar18._10_6_ = 0;
    auVar37._0_2_ = auVar39._0_2_;
    auVar28._12_4_ = 0;
    auVar28._0_12_ = SUB1612(auVar18 << 0x30,4);
    auVar28 = auVar28 << 0x20;
    uVar52 = (undefined2)(lVar53 + 6);
    auVar33._0_12_ = auVar28._0_12_;
    auVar33._12_2_ = uVar50;
    auVar33._14_2_ = (short)((ulonglong)(lVar53 + 6) >> 0x10);
    auVar32._12_4_ = auVar33._12_4_;
    auVar32._0_10_ = auVar28._0_10_;
    auVar32._10_2_ = (short)((ulonglong)lVar38 >> 0x10);
    auVar31._10_6_ = auVar32._10_6_;
    auVar31._0_8_ = auVar28._0_8_;
    auVar31._8_2_ = auVar39._2_2_;
    auVar19._2_8_ = auVar31._8_8_;
    auVar19._0_2_ = uVar52;
    auVar19._10_6_ = 0;
    auVar30._12_4_ = 0;
    auVar30._0_12_ = SUB1612(auVar19 << 0x30,4);
    auVar30 = auVar30 << 0x20;
    auVar36._0_12_ = auVar30._0_12_;
    auVar36._12_2_ = uVar52;
    auVar36._14_2_ = (short)(lVar55 + 6);
    auVar35._12_4_ = auVar36._12_4_;
    auVar35._0_10_ = auVar30._0_10_;
    auVar35._10_2_ = uVar51;
    auVar34._10_6_ = auVar35._10_6_;
    auVar34._0_8_ = auVar30._0_8_;
    auVar34._8_2_ = (short)(lVar53 + 4);
    auVar37._8_8_ = auVar34._8_8_;
    auVar37._6_2_ = (short)(lVar55 + 2);
    auVar37._4_2_ = (short)lVar38;
    auVar37._2_2_ = auVar39._8_2_;
    lVar56 = lVar53 + 10;
    lVar38 = lVar55 + 8;
    auVar37 = auVar37 & _DAT_1400c52b0;
    auVar40._0_8_ = lVar38 << 0x20;
    uVar17 = CONCAT44((int)lVar56,(int)lVar38);
    auVar41._0_10_ = (unkuint10)uVar17 << 0x20;
    auVar24._8_2_ = (short)((ulonglong)lVar38 >> 0x10);
    auVar24._0_8_ = uVar17;
    auVar24._10_2_ = (short)((ulonglong)(lVar55 + 0xc) >> 0x10);
    auVar41._12_4_ = auVar24._8_4_;
    uVar51 = (undefined2)(lVar55 + 0xc);
    auVar41._10_2_ = uVar51;
    auVar40._10_6_ = auVar41._10_6_;
    auVar40._8_2_ = (short)lVar38;
    uVar50 = (undefined2)((ulonglong)(lVar53 + 0xc) >> 0x10);
    auVar20._2_8_ = auVar40._8_8_;
    auVar20._0_2_ = uVar50;
    auVar20._10_6_ = 0;
    auVar49._0_2_ = (undefined2)(lVar53 + 8);
    auVar39._12_4_ = 0;
    auVar39._0_12_ = SUB1612(auVar20 << 0x30,4);
    auVar39 = auVar39 << 0x20;
    uVar52 = (undefined2)(lVar53 + 0xe);
    auVar45._0_12_ = auVar39._0_12_;
    auVar45._12_2_ = uVar50;
    auVar45._14_2_ = (short)((ulonglong)(lVar53 + 0xe) >> 0x10);
    auVar44._12_4_ = auVar45._12_4_;
    auVar44._0_10_ = auVar39._0_10_;
    auVar44._10_2_ = (short)((ulonglong)lVar56 >> 0x10);
    auVar43._10_6_ = auVar44._10_6_;
    auVar43._0_8_ = auVar39._0_8_;
    auVar43._8_2_ = (short)((ulonglong)(lVar53 + 8) >> 0x10);
    auVar21._2_8_ = auVar43._8_8_;
    auVar21._0_2_ = uVar52;
    auVar21._10_6_ = 0;
    auVar42._12_4_ = 0;
    auVar42._0_12_ = SUB1612(auVar21 << 0x30,4);
    auVar42 = auVar42 << 0x20;
    auVar48._0_12_ = auVar42._0_12_;
    auVar48._12_2_ = uVar52;
    auVar48._14_2_ = (short)(lVar55 + 0xe);
    auVar47._12_4_ = auVar48._12_4_;
    auVar47._0_10_ = auVar42._0_10_;
    auVar47._10_2_ = uVar51;
    auVar46._10_6_ = auVar47._10_6_;
    auVar46._0_8_ = auVar42._0_8_;
    auVar46._8_2_ = (short)(lVar53 + 0xc);
    auVar49._8_8_ = auVar46._8_8_;
    auVar49._6_2_ = (short)(lVar55 + 10);
    auVar49._4_2_ = (short)lVar56;
    auVar49._2_2_ = (short)lVar38;
    auVar49 = auVar49 & _DAT_1400c52b0;
    sVar1 = auVar37._0_2_;
    sVar2 = auVar37._2_2_;
    sVar3 = auVar37._4_2_;
    sVar4 = auVar37._6_2_;
    sVar5 = auVar37._8_2_;
    sVar6 = auVar37._10_2_;
    sVar7 = auVar37._12_2_;
    sVar8 = auVar37._14_2_;
    sVar9 = auVar49._0_2_;
    sVar10 = auVar49._2_2_;
    sVar11 = auVar49._4_2_;
    sVar12 = auVar49._6_2_;
    sVar13 = auVar49._8_2_;
    sVar14 = auVar49._10_2_;
    sVar15 = auVar49._12_2_;
    sVar16 = auVar49._14_2_;
    *pcVar26 = (0 < sVar1) * (sVar1 < 0x100) * auVar37[0] - (0xff < sVar1);
    pcVar26[1] = (0 < sVar2) * (sVar2 < 0x100) * auVar37[2] - (0xff < sVar2);
    pcVar26[2] = (0 < sVar3) * (sVar3 < 0x100) * auVar37[4] - (0xff < sVar3);
    pcVar26[3] = (0 < sVar4) * (sVar4 < 0x100) * auVar37[6] - (0xff < sVar4);
    pcVar26[4] = (0 < sVar5) * (sVar5 < 0x100) * auVar37[8] - (0xff < sVar5);
    pcVar26[5] = (0 < sVar6) * (sVar6 < 0x100) * auVar37[10] - (0xff < sVar6);
    pcVar26[6] = (0 < sVar7) * (sVar7 < 0x100) * auVar37[0xc] - (0xff < sVar7);
    pcVar26[7] = (0 < sVar8) * (sVar8 < 0x100) * auVar37[0xe] - (0xff < sVar8);
    pcVar26[8] = (0 < sVar9) * (sVar9 < 0x100) * auVar49[0] - (0xff < sVar9);
    pcVar26[9] = (0 < sVar10) * (sVar10 < 0x100) * auVar49[2] - (0xff < sVar10);
    pcVar26[10] = (0 < sVar11) * (sVar11 < 0x100) * auVar49[4] - (0xff < sVar11);
    pcVar26[0xb] = (0 < sVar12) * (sVar12 < 0x100) * auVar49[6] - (0xff < sVar12);
    pcVar26[0xc] = (0 < sVar13) * (sVar13 < 0x100) * auVar49[8] - (0xff < sVar13);
    pcVar26[0xd] = (0 < sVar14) * (sVar14 < 0x100) * auVar49[10] - (0xff < sVar14);
    pcVar26[0xe] = (0 < sVar15) * (sVar15 < 0x100) * auVar49[0xc] - (0xff < sVar15);
    pcVar26[0xf] = (0 < sVar16) * (sVar16 < 0x100) * auVar49[0xe] - (0xff < sVar16);
    pcVar26 = pcVar27;
    auVar39 = auVar54;
  } while (pcVar27 != local_a8);
  if (*(code **)(*(longlong *)this + 0x48) == do_narrow) {
    *(ulonglong *)(this + 0x139) = CONCAT71(_auStack_1a7,local_1a8);
    *(undefined8 *)(this + 0x141) = uStack_1a0;
    *(undefined8 *)(this + 0x149) = local_198;
    *(undefined8 *)(this + 0x151) = uStack_190;
    *(undefined8 *)(this + 0x159) = local_188;
    *(undefined8 *)(this + 0x161) = uStack_180;
    *(undefined8 *)(this + 0x169) = local_178;
    *(undefined8 *)(this + 0x171) = uStack_170;
    *(undefined8 *)(this + 0x179) = local_168;
    *(undefined8 *)(this + 0x181) = uStack_160;
    *(undefined8 *)(this + 0x189) = local_158;
    *(undefined8 *)(this + 0x191) = uStack_150;
    *(undefined8 *)(this + 0x199) = local_148;
    *(undefined8 *)(this + 0x1a1) = uStack_140;
    *(undefined8 *)(this + 0x1a9) = local_138;
    *(undefined8 *)(this + 0x1b1) = uStack_130;
    *(undefined8 *)(this + 0x1b9) = local_128;
    *(undefined8 *)(this + 0x1c1) = uStack_120;
    *(undefined8 *)(this + 0x1c9) = local_118;
    *(undefined8 *)(this + 0x1d1) = uStack_110;
    *(undefined8 *)(this + 0x1d9) = local_108;
    *(undefined8 *)(this + 0x1e1) = uStack_100;
    *(undefined8 *)(this + 0x1e9) = local_f8;
    *(undefined8 *)(this + 0x1f1) = uStack_f0;
    *(undefined8 *)(this + 0x1f9) = local_e8;
    *(undefined8 *)(this + 0x201) = uStack_e0;
    *(undefined8 *)(this + 0x209) = local_d8;
    *(undefined8 *)(this + 0x211) = uStack_d0;
    *(undefined8 *)(this + 0x219) = local_c8;
    *(undefined8 *)(this + 0x221) = uStack_c0;
    *(undefined8 *)(this + 0x229) = local_b8;
    *(undefined8 *)(this + 0x231) = uStack_b0;
  }
  else {
    (**(code **)(*(longlong *)this + 0x48))(this,&local_1a8,local_a8,0,this + 0x139);
  }
  this[0x239] = (ctype<char>)0x1;
  iVar25 = memcmp(&local_1a8,this + 0x139,0x100);
  if (iVar25 == 0) {
    if (*(code **)(*(longlong *)this + 0x48) == do_narrow) {
      local_1a9 = local_1a8;
    }
    else {
      (**(code **)(*(longlong *)this + 0x48))(this,&local_1a8,auStack_1a7,1,&local_1a9);
    }
    if (local_1a9 != '\x01') {
      return;
    }
  }
  this[0x239] = (ctype<char>)0x2;
                    // WARNING: Read-only address (ram,0x0001400c5220) is written
                    // WARNING: Read-only address (ram,0x0001400c52b0) is written
  return;
}



void _text__ZNKSt5ctypeIcE5widenEPKcS2_Pc_isra_0
               (ctype<char> *param_1,void *param_2,void *param_3,void *param_4)

{
  if (param_1[0x38] != (ctype<char>)0x1) {
    if (param_1[0x38] == (ctype<char>)0x0) {
      std::ctype<char>::_M_widen_init(param_1);
    }
    if (*(code **)(*(longlong *)param_1 + 0x38) != std::ctype<char>::do_widen) {
                    // WARNING: Could not recover jumptable at 0x00014002bab4. Too many branches
                    // WARNING: Treating indirect jump as call
      (**(code **)(*(longlong *)param_1 + 0x38))(param_1,param_2,param_3,param_4);
      return;
    }
  }
  if (param_2 != param_3) {
    memcpy(param_4,param_2,(longlong)param_3 - (longlong)param_2);
    return;
  }
  return;
}



ulonglong _text__ZNKSt5ctypeIcE5widenEc_part_0(ctype<char> *param_1,uint param_2)

{
  ulonglong uVar1;
  
  std::ctype<char>::_M_widen_init(param_1);
  if (*(code **)(*(longlong *)param_1 + 0x30) == std::ctype<char>::do_widen) {
    return (ulonglong)param_2;
  }
                    // WARNING: Could not recover jumptable at 0x00014002bb0e. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)param_1 + 0x30))(param_1,(int)(char)param_2);
  return uVar1;
}



// std::ctype<char>::narrow(char, char) const

uint __thiscall std::ctype<char>::narrow(ctype<char> *this,ulonglong param_2_00,ctype<char> param_3)

{
  uint uVar1;
  uint uVar2;
  
  uVar2 = (uint)param_2_00;
  uVar1 = (uint)(byte)this[(param_2_00 & 0xff) + 0x139];
  if (this[(param_2_00 & 0xff) + 0x139] == (ctype<char>)0x0) {
    if (*(code **)(*(longlong *)this + 0x40) != do_narrow) {
      uVar2 = (**(code **)(*(longlong *)this + 0x40))(this,(int)(char)param_2_00,(int)(char)param_3)
      ;
    }
    uVar1 = uVar2;
    if (param_3 != SUB41(uVar2,0)) {
      this[(param_2_00 & 0xff) + 0x139] = SUB41(uVar2,0);
    }
  }
  return uVar1;
}



// std::ctype<char>::do_widen(char const*, char const*, char*) const

void * __thiscall
std::ctype<char>::do_widen(undefined8 param_1_00,void *param_2,void *param_3,void *param_4)

{
  if (param_3 != param_2) {
    memcpy(param_4,param_2,(longlong)param_3 - (longlong)param_2);
  }
  return param_3;
}



// std::ctype<char>::do_widen(char) const

undefined4 __thiscall std::ctype<char>::do_widen(ctype<char> *this,undefined4 param_1)

{
  return param_1;
}



// std::ctype<char>::do_narrow(char const*, char const*, char, char*) const

void * __thiscall
std::ctype<char>::do_narrow
          (undefined8 param_1_00,void *param_2,void *param_3,undefined8 param_4_00,void *param_5)

{
  if (param_3 != param_2) {
    memcpy(param_5,param_2,(longlong)param_3 - (longlong)param_2);
  }
  return param_3;
}



// std::ctype<char>::do_narrow(char, char) const

undefined4 std::ctype<char>::do_narrow(undefined8 param_1,undefined4 param_2)

{
  return param_2;
}



// std::ctype<wchar_t>::do_scan_is(unsigned short, wchar_t const*, wchar_t const*) const

wint_t * __thiscall
std::ctype<wchar_t>::do_scan_is(ctype<wchar_t> *this,ushort param_1,wint_t *param_2,wint_t *param_3)

{
  wint_t _C;
  char cVar1;
  int iVar2;
  ctype<wchar_t> *pcVar3;
  
  if (param_2 < param_3) {
    do {
      _C = *param_2;
      if (*(code **)(*(longlong *)this + 0x10) == do_is) {
        pcVar3 = this + 0x29a;
        do {
          if (((param_1 & *(ushort *)pcVar3) != 0) &&
             (iVar2 = iswctype(_C,*(wctype_t *)(pcVar3 + 0x20)), iVar2 != 0)) {
            return param_2;
          }
          pcVar3 = pcVar3 + 2;
        } while (pcVar3 != this + 0x2ba);
      }
      else {
        cVar1 = (**(code **)(*(longlong *)this + 0x10))(this,param_1,_C);
        if (cVar1 != '\0') {
          return param_2;
        }
      }
      param_2 = param_2 + 1;
    } while (param_2 < param_3);
  }
  return param_2;
}



// std::ctype<wchar_t>::do_tolower(wchar_t*, wchar_t const*) const

wint_t * __thiscall
std::ctype<wchar_t>::do_tolower(undefined8 param_1_00,wint_t *param_2,wint_t *param_3)

{
  wint_t wVar1;
  wint_t *pwVar2;
  wint_t *pwVar3;
  
  if (param_2 < param_3) {
    pwVar2 = param_2;
    do {
      pwVar3 = pwVar2 + 1;
      wVar1 = towlower(*pwVar2);
      *pwVar2 = wVar1;
      pwVar2 = pwVar3;
    } while (pwVar3 != (wint_t *)
                       ((longlong)param_2 +
                       ((longlong)param_3 + (-1 - (longlong)param_2) & 0xfffffffffffffffeU) + 2));
  }
  return param_3;
}



// std::ctype<wchar_t>::do_tolower(wchar_t) const

void __thiscall std::ctype<wchar_t>::do_tolower(undefined8 param_1_00,wint_t param_2)

{
  towlower(param_2);
  return;
}



// std::ctype<wchar_t>::do_toupper(wchar_t*, wchar_t const*) const

wint_t * __thiscall
std::ctype<wchar_t>::do_toupper(undefined8 param_1_00,wint_t *param_2,wint_t *param_3)

{
  wint_t wVar1;
  wint_t *pwVar2;
  wint_t *pwVar3;
  
  if (param_2 < param_3) {
    pwVar2 = param_2;
    do {
      pwVar3 = pwVar2 + 1;
      wVar1 = towupper(*pwVar2);
      *pwVar2 = wVar1;
      pwVar2 = pwVar3;
    } while (pwVar3 != (wint_t *)
                       ((longlong)param_2 +
                       ((longlong)param_3 + (-1 - (longlong)param_2) & 0xfffffffffffffffeU) + 2));
  }
  return param_3;
}



// std::ctype<wchar_t>::do_toupper(wchar_t) const

void __thiscall std::ctype<wchar_t>::do_toupper(undefined8 param_1_00,wint_t param_2)

{
  towupper(param_2);
  return;
}



// std::ctype<wchar_t>::do_scan_not(unsigned short, wchar_t const*, wchar_t const*) const

wint_t * __thiscall
std::ctype<wchar_t>::do_scan_not
          (ctype<wchar_t> *this,ushort param_1,wint_t *param_2,wint_t *param_3)

{
  wint_t _C;
  char cVar1;
  int iVar2;
  ctype<wchar_t> *pcVar3;
  
  if (param_2 < param_3) {
    do {
      while( true ) {
        _C = *param_2;
        if (*(code **)(*(longlong *)this + 0x10) == do_is) break;
        cVar1 = (**(code **)(*(longlong *)this + 0x10))(this,param_1,_C);
        if (cVar1 == '\0') {
          return param_2;
        }
        param_2 = param_2 + 1;
        if (param_3 <= param_2) {
          return param_2;
        }
      }
      pcVar3 = this + 0x29a;
      while (((param_1 & *(ushort *)pcVar3) == 0 ||
             (iVar2 = iswctype(_C,*(wctype_t *)(pcVar3 + 0x20)), iVar2 == 0))) {
        pcVar3 = pcVar3 + 2;
        if (pcVar3 == this + 0x2ba) {
          return param_2;
        }
      }
      param_2 = param_2 + 1;
    } while (param_2 < param_3);
  }
  return param_2;
}



// std::ctype<wchar_t>::_M_convert_to_wmask(unsigned short) const

wctype_t __thiscall std::ctype<wchar_t>::_M_convert_to_wmask(undefined8 param_1_00,ushort param_2)

{
  wctype_t wVar1;
  
  if (param_2 < 0x41) {
    if (param_2 == 0) {
      return 0;
    }
    switch(param_2) {
    case 1:
      wVar1 = wctype("upper");
      return wVar1;
    case 2:
      wVar1 = wctype("lower");
      return wVar1;
    case 4:
      wVar1 = wctype("alpha");
      return wVar1;
    case 8:
      wVar1 = wctype("digit");
      return wVar1;
    case 0xc:
      wVar1 = wctype("alnum");
      return wVar1;
    case 0x10:
      wVar1 = wctype("xdigit");
      return wVar1;
    case 0x20:
      wVar1 = wctype("space");
      return wVar1;
    case 0x40:
      wVar1 = wctype("print");
      return wVar1;
    }
  }
  else {
    if (param_2 == 0x200) {
      wVar1 = wctype("punct");
      return wVar1;
    }
    if (param_2 == 0x20c) {
      wVar1 = wctype("graph");
      return wVar1;
    }
    if (param_2 == 0x100) {
      wVar1 = wctype("cntrl");
      return wVar1;
    }
  }
  if (param_2 != 0x400) {
    return 0;
  }
  wVar1 = wctype("blank");
  return wVar1;
}



// std::ctype<wchar_t>::do_is(wchar_t const*, wchar_t const*, unsigned short*) const

wint_t * __thiscall
std::ctype<wchar_t>::do_is(ctype<wchar_t> *this,wint_t *param_1,wint_t *param_2,ushort *param_3)

{
  int iVar1;
  ctype<wchar_t> *pcVar2;
  ushort uVar3;
  
  for (; param_1 < param_2; param_1 = param_1 + 1) {
    uVar3 = 0;
    pcVar2 = this + 0x29a;
    do {
      iVar1 = iswctype(*param_1,*(wctype_t *)(pcVar2 + 0x20));
      if (iVar1 != 0) {
        uVar3 = uVar3 | *(ushort *)pcVar2;
      }
      pcVar2 = pcVar2 + 2;
    } while (pcVar2 != this + 0x2ba);
    *param_3 = uVar3;
    param_3 = param_3 + 1;
  }
  return param_2;
}



// std::ctype<wchar_t>::do_is(unsigned short, wchar_t) const

undefined8 __thiscall std::ctype<wchar_t>::do_is(ctype<wchar_t> *this,ushort param_1,wint_t param_2)

{
  int iVar1;
  ctype<wchar_t> *pcVar2;
  
  pcVar2 = this + 0x29a;
  do {
    if ((param_1 & *(ushort *)pcVar2) != 0) {
      iVar1 = iswctype(param_2,*(wctype_t *)(pcVar2 + 0x20));
      if (iVar1 != 0) {
        return 1;
      }
    }
    pcVar2 = pcVar2 + 2;
  } while (pcVar2 != this + 0x2ba);
  return 0;
}



// std::ctype<wchar_t>::do_widen(char const*, char const*, wchar_t*) const

ulonglong __thiscall
std::ctype<wchar_t>::do_widen
          (ctype<wchar_t> *this,ulonglong param_1,ulonglong param_2,longlong param_3)

{
  longlong lVar1;
  
  if (param_1 < param_2) {
    lVar1 = 0;
    do {
      *(undefined2 *)(param_3 + lVar1 * 2) =
           *(undefined2 *)(this + (ulonglong)*(byte *)(param_1 + lVar1) * 2 + 0x9a);
      lVar1 = lVar1 + 1;
    } while (param_2 - param_1 != lVar1);
  }
  return param_2;
}



// std::ctype<wchar_t>::do_widen(char) const

undefined2 __thiscall std::ctype<wchar_t>::do_widen(ctype<wchar_t> *this,byte param_1)

{
  return *(undefined2 *)(this + (ulonglong)param_1 * 2 + 0x9a);
}



// std::ctype<wchar_t>::do_narrow(wchar_t const*, wchar_t const*, char, char*) const

wint_t * __thiscall
std::ctype<wchar_t>::do_narrow
          (ctype<wchar_t> *this,wint_t *param_1,wint_t *param_2,int param_4_00,
          ctype<wchar_t> *param_4)

{
  ushort wc;
  longlong lVar1;
  ctype<wchar_t> cVar2;
  int iVar3;
  ctype<wchar_t> *pcVar4;
  ctype<wchar_t> *pcVar5;
  
  if (this[0x18] == (ctype<wchar_t>)0x0) {
    if (param_1 < param_2) {
      lVar1 = -1 - (longlong)param_1;
      pcVar4 = param_4;
      do {
        iVar3 = wctob(*param_1);
        if (iVar3 == -1) {
          iVar3 = param_4_00;
        }
        pcVar5 = pcVar4 + 1;
        param_1 = param_1 + 1;
        *pcVar4 = SUB41(iVar3,0);
        pcVar4 = pcVar5;
      } while (pcVar5 != param_4 + ((ulonglong)((longlong)param_2 + lVar1) >> 1) + 1);
    }
  }
  else if (param_1 < param_2) {
    pcVar4 = param_4 + ((ulonglong)((longlong)param_2 + (-1 - (longlong)param_1)) >> 1) + 1;
    do {
      wc = *param_1;
      if (wc < 0x80) {
        cVar2 = this[(longlong)(int)(uint)wc + 0x19];
      }
      else {
        iVar3 = wctob(wc);
        if (iVar3 == -1) {
          iVar3 = param_4_00;
        }
        cVar2 = SUB41(iVar3,0);
      }
      *param_4 = cVar2;
      param_4 = param_4 + 1;
      param_1 = param_1 + 1;
    } while (pcVar4 != param_4);
  }
  return param_2;
}



// std::ctype<wchar_t>::do_narrow(wchar_t, char) const

uint __thiscall std::ctype<wchar_t>::do_narrow(ctype<wchar_t> *this,ushort param_1,uint param_2)

{
  uint uVar1;
  
  if ((param_1 < 0x80) && (this[0x18] != (ctype<wchar_t>)0x0)) {
    return (uint)(byte)this[(ulonglong)param_1 + 0x19];
  }
  uVar1 = wctob(param_1);
  if (uVar1 == 0xffffffff) {
    uVar1 = param_2;
  }
  return uVar1;
}



// std::locale::id::_M_id() const

longlong __thiscall std::locale::id::_M_id(id *this)

{
  int iVar1;
  longlong lVar2;
  int iVar3;
  
  lVar2 = *(longlong *)this;
  if (lVar2 == 0) {
    if (_CRT_MT != 0) {
      LOCK();
      iVar1 = _S_refcount + 1;
      UNLOCK();
      iVar3 = _S_refcount + 1;
      LOCK();
      _S_refcount = iVar1;
      if (*(longlong *)this == 0) {
        *(longlong *)this = (longlong)iVar3;
      }
      UNLOCK();
      return *(longlong *)this + -1;
    }
    _S_refcount = _S_refcount + 1;
    lVar2 = (longlong)_S_refcount;
    *(longlong *)this = lVar2;
  }
  return lVar2 + -1;
}



// std::locale::name[abi:cxx11]() const

string * std::locale::name_abi_cxx11_(string *param_1,longlong *param_2)

{
  string *psVar1;
  undefined8 *puVar2;
  int iVar3;
  size_t sVar4;
  string *psVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  longlong lVar8;
  
  param_1[0x10] = (string)0x0;
  lVar8 = *param_2;
  psVar1 = param_1 + 0x10;
  *(string **)param_1 = psVar1;
  puVar2 = *(undefined8 **)(lVar8 + 0x20);
  *(undefined8 *)(param_1 + 8) = 0;
  psVar5 = (string *)*puVar2;
  if (psVar5 == (string *)0x0) {
    __cxx11::string::_M_replace_aux(param_1,0,0,1,(string)0x2a);
  }
  else {
    if (puVar2[1] != 0) {
      uVar6 = 0;
      do {
        uVar7 = uVar6 + 1;
        iVar3 = strcmp((char *)puVar2[uVar6],(char *)puVar2[uVar7]);
        if (iVar3 != 0) {
          __cxx11::string::reserve(param_1,0x80);
          sVar4 = strlen("LC_CTYPE");
          if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < sVar4) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
          __cxx11::string::_M_append(param_1,(string *)"LC_CTYPE",sVar4);
          sVar4 = *(size_t *)(param_1 + 8);
          psVar5 = *(string **)param_1;
          if (psVar1 == psVar5) {
            uVar6 = 0xf;
          }
          else {
            uVar6 = *(ulonglong *)(param_1 + 0x10);
          }
          if (uVar6 < sVar4 + 1) {
            __cxx11::string::_M_mutate(param_1,sVar4,0,(undefined1 *)0x0,1);
            psVar5 = *(string **)param_1;
          }
          psVar5[sVar4] = (string)0x3d;
          *(size_t *)(param_1 + 8) = sVar4 + 1;
          *(undefined1 *)(*(longlong *)param_1 + 1 + sVar4) = 0;
          psVar5 = (string *)**(undefined8 **)(*param_2 + 0x20);
          sVar4 = strlen((char *)psVar5);
          if (sVar4 <= 0x3fffffffffffffffU - *(longlong *)(param_1 + 8)) {
            __cxx11::string::_M_append(param_1,psVar5,sVar4);
            lVar8 = 8;
            while( true ) {
              sVar4 = *(size_t *)(param_1 + 8);
              psVar5 = *(string **)param_1;
              if (psVar1 == psVar5) {
                uVar6 = 0xf;
              }
              else {
                uVar6 = *(ulonglong *)(param_1 + 0x10);
              }
              if (uVar6 < sVar4 + 1) {
                __cxx11::string::_M_mutate(param_1,sVar4,0,(undefined1 *)0x0,1);
                psVar5 = *(string **)param_1;
              }
              psVar5[sVar4] = (string)0x3b;
              *(size_t *)(param_1 + 8) = sVar4 + 1;
              *(undefined1 *)(*(longlong *)param_1 + 1 + sVar4) = 0;
              psVar5 = *(string **)((longlong)&_rdata__ZN9__gnu_cxxL14category_namesE + lVar8);
              sVar4 = strlen((char *)psVar5);
              if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < sVar4) {
                    // WARNING: Subroutine does not return
                __throw_length_error("basic_string::append");
              }
              __cxx11::string::_M_append(param_1,psVar5,sVar4);
              sVar4 = *(size_t *)(param_1 + 8);
              psVar5 = *(string **)param_1;
              if (psVar1 == psVar5) {
                uVar6 = 0xf;
              }
              else {
                uVar6 = *(ulonglong *)(param_1 + 0x10);
              }
              if (uVar6 < sVar4 + 1) {
                __cxx11::string::_M_mutate(param_1,sVar4,0,(undefined1 *)0x0,1);
                psVar5 = *(string **)param_1;
              }
              psVar5[sVar4] = (string)0x3d;
              *(size_t *)(param_1 + 8) = sVar4 + 1;
              *(undefined1 *)(*(longlong *)param_1 + 1 + sVar4) = 0;
              psVar5 = *(string **)(*(longlong *)(*param_2 + 0x20) + lVar8);
              sVar4 = strlen((char *)psVar5);
              if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < sVar4) break;
              __cxx11::string::_M_append(param_1,psVar5,sVar4);
              lVar8 = lVar8 + 8;
              if (lVar8 == 0x30) {
                return param_1;
              }
            }
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
        uVar6 = uVar7;
      } while (uVar7 < 5);
    }
    sVar4 = strlen((char *)psVar5);
    __cxx11::string::_M_replace(param_1,0,0,psVar5,sVar4);
  }
  return param_1;
}



// std::locale::name() const

string * std::locale::name(string *param_1,longlong *param_2)

{
  undefined8 *puVar1;
  char *pcVar2;
  int iVar3;
  ulonglong *puVar4;
  size_t sVar5;
  longlong lVar6;
  longlong lVar7;
  ulonglong uVar8;
  longlong lVar10;
  ulonglong uVar9;
  
  puVar4 = std::string::_S_construct(0,'\0');
  lVar10 = *param_2;
  *(ulonglong **)param_1 = puVar4;
  puVar1 = *(undefined8 **)(lVar10 + 0x20);
  pcVar2 = (char *)*puVar1;
  if (pcVar2 == (char *)0x0) {
    std::string::_M_replace_aux(param_1,0,puVar4[-3],1,'*');
    return param_1;
  }
  if (puVar1[1] != 0) {
    uVar9 = 0;
    do {
      uVar8 = uVar9 + 1;
      iVar3 = strcmp((char *)puVar1[uVar9],(char *)puVar1[uVar8]);
      if (iVar3 != 0) {
        std::string::reserve(param_1,0x80);
        sVar5 = strlen("LC_CTYPE");
        std::string::append(param_1,"LC_CTYPE",sVar5);
        lVar10 = *(longlong *)param_1;
        lVar6 = *(longlong *)(lVar10 + -0x18);
        uVar9 = lVar6 + 1;
        if (*(ulonglong *)(lVar10 + -0x10) < uVar9) {
LAB_14002c614:
          std::string::reserve(param_1,uVar9);
        }
        else {
          if (_CRT_MT == 0) {
            iVar3 = *(int *)(lVar10 + -8);
          }
          else {
            iVar3 = *(int *)(lVar10 + -8);
          }
          if (0 < iVar3) goto LAB_14002c614;
        }
        *(undefined1 *)(*(longlong *)param_1 + *(longlong *)(*(longlong *)param_1 + -0x18)) = 0x3d;
        lVar10 = *(longlong *)param_1;
        *(ulonglong *)(lVar10 + -0x18) = uVar9;
        *(undefined4 *)(lVar10 + -8) = 0;
        *(undefined1 *)(lVar10 + 1 + lVar6) = 0;
        pcVar2 = (char *)**(undefined8 **)(*param_2 + 0x20);
        sVar5 = strlen(pcVar2);
        std::string::append(param_1,pcVar2,sVar5);
        lVar10 = 8;
        goto LAB_14002c742;
      }
      uVar9 = uVar8;
    } while (uVar8 < 5);
  }
  sVar5 = strlen(pcVar2);
  std::string::assign(param_1,pcVar2,sVar5);
  return param_1;
LAB_14002c742:
  lVar6 = *(longlong *)param_1;
  lVar7 = *(longlong *)(lVar6 + -0x18);
  uVar9 = lVar7 + 1;
  if (*(ulonglong *)(lVar6 + -0x10) < uVar9) {
LAB_14002c677:
    std::string::reserve(param_1,uVar9);
LAB_14002c682:
    lVar6 = *(longlong *)param_1;
    lVar7 = *(longlong *)(lVar6 + -0x18);
  }
  else {
    if (_CRT_MT != 0) {
      if (0 < *(int *)(lVar6 + -8)) goto LAB_14002c677;
      goto LAB_14002c682;
    }
    if (0 < *(int *)(lVar6 + -8)) goto LAB_14002c677;
  }
  *(undefined1 *)(lVar6 + lVar7) = 0x3b;
  lVar6 = *(longlong *)param_1;
  *(ulonglong *)(lVar6 + -0x18) = uVar9;
  *(undefined4 *)(lVar6 + -8) = 0;
  *(undefined1 *)(lVar6 + uVar9) = 0;
  pcVar2 = *(char **)((longlong)&_rdata__ZN9__gnu_cxxL14category_namesE + lVar10);
  sVar5 = strlen(pcVar2);
  std::string::append(param_1,pcVar2,sVar5);
  lVar6 = *(longlong *)param_1;
  lVar7 = *(longlong *)(lVar6 + -0x18);
  uVar9 = lVar7 + 1;
  if (*(ulonglong *)(lVar6 + -0x10) < uVar9) {
LAB_14002c6e9:
    std::string::reserve(param_1,uVar9);
  }
  else {
    if (_CRT_MT == 0) {
      iVar3 = *(int *)(lVar6 + -8);
    }
    else {
      iVar3 = *(int *)(lVar6 + -8);
    }
    if (0 < iVar3) goto LAB_14002c6e9;
  }
  *(undefined1 *)(*(longlong *)param_1 + *(longlong *)(*(longlong *)param_1 + -0x18)) = 0x3d;
  lVar6 = *(longlong *)param_1;
  *(ulonglong *)(lVar6 + -0x18) = uVar9;
  *(undefined4 *)(lVar6 + -8) = 0;
  *(undefined1 *)(lVar6 + 1 + lVar7) = 0;
  pcVar2 = *(char **)(*(longlong *)(*param_2 + 0x20) + lVar10);
  sVar5 = strlen(pcVar2);
  std::string::append(param_1,pcVar2,sVar5);
  lVar10 = lVar10 + 8;
  if (lVar10 == 0x30) {
    return param_1;
  }
  goto LAB_14002c742;
}



// std::locale::facet::_M_cow_shim(std::locale::id const*) const

messages<wchar_t> * __thiscall std::locale::facet::_M_cow_shim(facet *this,undefined8 *param_1)

{
  longlong *plVar1;
  messages<wchar_t> *this_00;
  longlong lVar2;
  undefined8 *puVar3;
  
  plVar1 = __dynamic_cast((longlong *)this,&typeinfo,(type_info *)&__shim::typeinfo,-2);
  if (plVar1 == (longlong *)0x0) {
    if (param_1 == &numpunct<char>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x90);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____numpunct_cache_1400ddb60;
      *(undefined2 *)(puVar3 + 9) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      *(undefined1 *)(puVar3 + 0x11) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__numpunct_1400debb0;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      numpunct<char>::_M_initialize_numpunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbaf0;
      __facet_shims::__numpunct_fill_cache<char>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == &collate<char>::id) {
      this_00 = operator_new(0x20);
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__collate_1400de8a0;
      lVar2 = _S_get_c_locale();
      *(longlong *)(this_00 + 0x10) = lVar2;
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db8f0;
    }
    else if (param_1 == &time_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__time_get_1400dec50;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc30;
    }
    else if (param_1 == &money_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_get_1400dedf0;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbd90;
    }
    else if (param_1 == (undefined8 *)&money_put<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_put_1400dee50;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe50;
    }
    else if (param_1 == (undefined8 *)&moneypunct<char,true>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x70);
      *(undefined4 *)(puVar3 + 1) = 0;
      *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dddf0;
      *(undefined1 *)(puVar3 + 4) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dd160;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dbff0;
      __facet_shims::__moneypunct_fill_cache<char,true>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&moneypunct<char,false>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x70);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dddd0;
      *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dd0f0;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf10;
      __facet_shims::__moneypunct_fill_cache<char,false>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&messages<char>::id) {
      this_00 = operator_new(0x28);
      messages<char>::messages((messages<char> *)this_00,0);
      *(facet **)(this_00 + 0x20) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400db9f0;
    }
    else if (param_1 == (undefined8 *)&numpunct<wchar_t>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0xd0);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____numpunct_cache_1400ddb80;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      *(undefined4 *)(puVar3 + 9) = 0;
      *(undefined1 *)(puVar3 + 0x19) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__numpunct_1400dec00;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbb90;
      __facet_shims::__numpunct_fill_cache<wchar_t>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&collate<wchar_t>::id) {
      this_00 = operator_new(0x20);
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__collate_1400de8e0;
      lVar2 = _S_get_c_locale();
      *(longlong *)(this_00 + 0x10) = lVar2;
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db970;
    }
    else if (param_1 == (undefined8 *)&time_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__time_get_1400deca0;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbce0;
    }
    else if (param_1 == (undefined8 *)&money_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_get_1400dee20;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbdf0;
    }
    else if (param_1 == (undefined8 *)&money_put<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_put_1400dee80;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbeb0;
    }
    else if (param_1 == (undefined8 *)&moneypunct<>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x80);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dde30;
      *(undefined4 *)((longlong)puVar3 + 0x22) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x7a) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dd240;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      moneypunct<>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc1b0;
      __facet_shims::__moneypunct_fill_cache<>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&moneypunct<>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x80);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dde10;
      *(undefined4 *)((longlong)puVar3 + 0x22) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x7a) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dd1d0;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      moneypunct<>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc0d0;
      __facet_shims::__moneypunct_fill_cache<>(0,(longlong *)this,(longlong)puVar3);
    }
    else {
      if (param_1 != (undefined8 *)&messages<wchar_t>::id) {
                    // WARNING: Subroutine does not return
        __throw_logic_error("cannot create shim for unknown locale::facet");
      }
      this_00 = operator_new(0x28);
      messages<wchar_t>::messages(this_00,0);
      *(facet **)(this_00 + 0x20) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dba70;
    }
  }
  else {
    this_00 = (messages<wchar_t> *)*plVar1;
  }
  return this_00;
}



// std::locale::facet::_M_sso_shim(std::locale::id const*) const

messages<wchar_t> * __thiscall std::locale::facet::_M_sso_shim(facet *this,undefined8 *param_1)

{
  longlong *plVar1;
  messages<wchar_t> *this_00;
  longlong lVar2;
  undefined8 *puVar3;
  
  plVar1 = __dynamic_cast((longlong *)this,&typeinfo,(type_info *)&__shim::typeinfo,-2);
  if (plVar1 == (longlong *)0x0) {
    if (param_1 == &__cxx11::numpunct<char>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x90);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____numpunct_cache_1400ddb60;
      *(undefined2 *)(puVar3 + 9) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      *(undefined1 *)(puVar3 + 0x11) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__numpunct_1400dcd20;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      __cxx11::numpunct<char>::_M_initialize_numpunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbb40;
      __facet_shims::__numpunct_fill_cache<char>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == &__cxx11::collate<char>::id) {
      this_00 = operator_new(0x20);
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__collate_1400dcc20;
      lVar2 = _S_get_c_locale();
      *(longlong *)(this_00 + 0x10) = lVar2;
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db930;
    }
    else if (param_1 == &__cxx11::time_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__time_get_1400dcdc0;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc80;
    }
    else if (param_1 == (undefined8 *)&__cxx11::money_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_get_1400dce80;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbdc0;
    }
    else if (param_1 == (undefined8 *)&__cxx11::money_put<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_put_1400dcee0;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe80;
    }
    else if (param_1 == (undefined8 *)&__cxx11::moneypunct<char,true>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x70);
      *(undefined4 *)(puVar3 + 1) = 0;
      *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dddf0;
      *(undefined1 *)(puVar3 + 4) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dc370;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      __cxx11::moneypunct<char,true>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dc060;
      __facet_shims::__moneypunct_fill_cache<char,true>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&__cxx11::moneypunct<char,false>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x70);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dddd0;
      *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dc300;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      __cxx11::moneypunct<char,false>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf80;
      __facet_shims::__moneypunct_fill_cache<char,false>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&__cxx11::messages<char>::id) {
      this_00 = operator_new(0x28);
      __cxx11::messages<char>::messages((messages<char> *)this_00,0);
      *(facet **)(this_00 + 0x20) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400dba30;
    }
    else if (param_1 == (undefined8 *)&__cxx11::numpunct<wchar_t>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0xd0);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____numpunct_cache_1400ddb80;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      *(undefined4 *)(puVar3 + 9) = 0;
      *(undefined1 *)(puVar3 + 0x19) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__numpunct_1400dcd70;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      __cxx11::numpunct<wchar_t>::_M_initialize_numpunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbbe0;
      __facet_shims::__numpunct_fill_cache<wchar_t>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&__cxx11::collate<wchar_t>::id) {
      this_00 = operator_new(0x20);
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__collate_1400dcc60;
      lVar2 = _S_get_c_locale();
      *(longlong *)(this_00 + 0x10) = lVar2;
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db9b0;
    }
    else if (param_1 == (undefined8 *)&__cxx11::time_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__time_get_1400dce20;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbd30;
    }
    else if (param_1 == (undefined8 *)&__cxx11::money_get<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_get_1400dceb0;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbe20;
    }
    else if (param_1 == (undefined8 *)&__cxx11::money_put<>::id) {
      this_00 = operator_new(0x18);
      *(undefined4 *)(this_00 + 8) = 0;
      *(facet **)(this_00 + 0x10) = this;
      *(undefined ***)this_00 = &PTR__money_put_1400dcf10;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbee0;
    }
    else if (param_1 == (undefined8 *)&__cxx11::moneypunct<>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x80);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dde30;
      *(undefined4 *)((longlong)puVar3 + 0x22) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x7a) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dc450;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      __cxx11::moneypunct<>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc220;
      __facet_shims::__moneypunct_fill_cache<>(0,(longlong *)this,(longlong)puVar3);
    }
    else if (param_1 == (undefined8 *)&__cxx11::moneypunct<>::id) {
      this_00 = operator_new(0x28);
      puVar3 = operator_new(0x80);
      *(undefined4 *)(puVar3 + 1) = 0;
      puVar3[2] = 0;
      puVar3[3] = 0;
      *(undefined1 *)(puVar3 + 4) = 0;
      *puVar3 = &PTR____moneypunct_cache_1400dde10;
      *(undefined4 *)((longlong)puVar3 + 0x22) = 0;
      puVar3[5] = 0;
      puVar3[6] = 0;
      puVar3[7] = 0;
      puVar3[8] = 0;
      puVar3[9] = 0;
      puVar3[10] = 0;
      *(undefined4 *)(puVar3 + 0xb) = 0;
      *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
      *(undefined1 *)((longlong)puVar3 + 0x7a) = 0;
      *(undefined4 *)(this_00 + 8) = 0;
      *(undefined ***)this_00 = &PTR__moneypunct_1400dc3e0;
      *(undefined8 **)(this_00 + 0x10) = puVar3;
      __cxx11::moneypunct<>::_M_initialize_moneypunct((longlong)this_00);
      *(facet **)(this_00 + 0x18) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined8 **)(this_00 + 0x20) = puVar3;
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc140;
      __facet_shims::__moneypunct_fill_cache<>(0,(longlong *)this,(longlong)puVar3);
    }
    else {
      if (param_1 != (undefined8 *)&__cxx11::messages<wchar_t>::id) {
                    // WARNING: Subroutine does not return
        __throw_logic_error("cannot create shim for unknown locale::facet");
      }
      this_00 = operator_new(0x28);
      __cxx11::messages<wchar_t>::messages(this_00,0);
      *(facet **)(this_00 + 0x20) = this;
      if (_CRT_MT == 0) {
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
      }
      else {
        LOCK();
        *(int *)(this + 8) = *(int *)(this + 8) + 1;
        UNLOCK();
      }
      *(undefined ***)this_00 =
           &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dbab0;
    }
  }
  else {
    this_00 = (messages<wchar_t> *)*plVar1;
  }
  return this_00;
}



// std::locale::facet::_M_remove_reference() const

void __thiscall std::locale::facet::_M_remove_reference(facet *this)

{
  facet *pfVar1;
  int iVar2;
  
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(this + 8);
    *(int *)(this + 8) = iVar2 + -1;
  }
  else {
    LOCK();
    pfVar1 = this + 8;
    iVar2 = *(int *)pfVar1;
    *(int *)pfVar1 = *(int *)pfVar1 + -1;
    UNLOCK();
  }
  if (iVar2 != 1) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x00014002de03. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*(longlong *)this + 8))();
  return;
}



// std::locale::TEMPNAMEPLACEHOLDERVALUE(std::locale const&) const

ulonglong __thiscall std::locale::operator==(locale *this,longlong *param_1)

{
  undefined8 *puVar1;
  char *_Str1;
  undefined8 *puVar2;
  char *_Str2;
  int iVar3;
  undefined4 extraout_var;
  ulonglong uVar4;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58 [16];
  undefined1 *local_48;
  size_t local_40;
  undefined1 local_38 [24];
  
  if (*(longlong *)this == *param_1) {
    return 1;
  }
  puVar1 = *(undefined8 **)(*(longlong *)this + 0x20);
  _Str1 = (char *)*puVar1;
  if (_Str1 != (char *)0x0) {
    puVar2 = *(undefined8 **)(*param_1 + 0x20);
    _Str2 = (char *)*puVar2;
    if ((_Str2 != (char *)0x0) && (iVar3 = strcmp(_Str1,_Str2), iVar3 == 0)) {
      if ((puVar1[1] == 0) && (puVar2[1] == 0)) {
        return 1;
      }
      name_abi_cxx11_((string *)&local_48,param_1);
      name_abi_cxx11_((string *)&local_68,(longlong *)this);
      uVar4 = 0;
      if (local_60 == local_40) {
        if (local_60 == 0) {
          uVar4 = 1;
        }
        else {
          iVar3 = memcmp(local_68,local_48,local_60);
          uVar4 = CONCAT71((int7)(CONCAT44(extraout_var,iVar3) >> 8),iVar3 == 0);
        }
      }
      if (local_68 != local_58) {
        operator_delete(local_68);
        uVar4 = uVar4 & 0xff;
      }
      if (local_48 == local_38) {
        return uVar4;
      }
      operator_delete(local_48);
      return uVar4 & 0xff;
    }
  }
  return 0;
}



// std::__cxx11::moneypunct<char, false>::neg_format() const

ulonglong __thiscall std::__cxx11::moneypunct<char,false>::neg_format(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x00014002dfb0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, false>::pos_format() const

ulonglong __thiscall std::__cxx11::moneypunct<char,false>::pos_format(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x00014002dfe0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, false>::curr_symbol() const

longlong * std::__cxx11::moneypunct<char,false>::curr_symbol(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x28) != do_curr_symbol) {
    (**(code **)(*param_2 + 0x28))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::do_grouping() const

longlong * std::__cxx11::moneypunct<char,false>::do_grouping(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::frac_digits() const

ulonglong __thiscall std::__cxx11::moneypunct<char,false>::frac_digits(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e0e0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, false>::decimal_point() const

ulonglong __thiscall
std::__cxx11::moneypunct<char,false>::decimal_point(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x21);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e110. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, false>::do_neg_format() const

undefined4 __thiscall
std::__cxx11::moneypunct<char,false>::do_neg_format(moneypunct<char,false> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::__cxx11::moneypunct<char, false>::do_pos_format() const

undefined4 __thiscall
std::__cxx11::moneypunct<char,false>::do_pos_format(moneypunct<char,false> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::__cxx11::moneypunct<char, false>::negative_sign() const

longlong * std::__cxx11::moneypunct<char,false>::negative_sign(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x38) != do_negative_sign) {
    (**(code **)(*param_2 + 0x38))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::positive_sign() const

longlong * std::__cxx11::moneypunct<char,false>::positive_sign(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x30) != do_positive_sign) {
    (**(code **)(*param_2 + 0x30))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::thousands_sep() const

ulonglong __thiscall
std::__cxx11::moneypunct<char,false>::thousands_sep(moneypunct<char,false> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e260. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, false>::do_curr_symbol() const

longlong * std::__cxx11::moneypunct<char,false>::do_curr_symbol(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::do_frac_digits() const

undefined4 __thiscall
std::__cxx11::moneypunct<char,false>::do_frac_digits(moneypunct<char,false> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::__cxx11::moneypunct<char, false>::do_decimal_point() const

undefined1 __thiscall
std::__cxx11::moneypunct<char,false>::do_decimal_point(moneypunct<char,false> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x21);
}



// std::__cxx11::moneypunct<char, false>::do_negative_sign() const

longlong *
std::__cxx11::moneypunct<char,false>::do_negative_sign(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::do_positive_sign() const

longlong *
std::__cxx11::moneypunct<char,false>::do_positive_sign(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, false>::do_thousands_sep() const

undefined1 __thiscall
std::__cxx11::moneypunct<char,false>::do_thousands_sep(moneypunct<char,false> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::__cxx11::moneypunct<char, false>::grouping() const

longlong * std::__cxx11::moneypunct<char,false>::grouping(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x20) != do_grouping) {
    (**(code **)(*param_2 + 0x20))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::neg_format() const

ulonglong __thiscall std::__cxx11::moneypunct<char,true>::neg_format(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e430. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, true>::pos_format() const

ulonglong __thiscall std::__cxx11::moneypunct<char,true>::pos_format(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e460. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, true>::curr_symbol() const

longlong * std::__cxx11::moneypunct<char,true>::curr_symbol(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x28) != do_curr_symbol) {
    (**(code **)(*param_2 + 0x28))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::do_grouping() const

longlong * std::__cxx11::moneypunct<char,true>::do_grouping(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::frac_digits() const

ulonglong __thiscall std::__cxx11::moneypunct<char,true>::frac_digits(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e560. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, true>::decimal_point() const

ulonglong __thiscall std::__cxx11::moneypunct<char,true>::decimal_point(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x21);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e590. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, true>::do_neg_format() const

undefined4 __thiscall
std::__cxx11::moneypunct<char,true>::do_neg_format(moneypunct<char,true> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::__cxx11::moneypunct<char, true>::do_pos_format() const

undefined4 __thiscall
std::__cxx11::moneypunct<char,true>::do_pos_format(moneypunct<char,true> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::__cxx11::moneypunct<char, true>::negative_sign() const

longlong * std::__cxx11::moneypunct<char,true>::negative_sign(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x38) != do_negative_sign) {
    (**(code **)(*param_2 + 0x38))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::positive_sign() const

longlong * std::__cxx11::moneypunct<char,true>::positive_sign(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x30) != do_positive_sign) {
    (**(code **)(*param_2 + 0x30))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::thousands_sep() const

ulonglong __thiscall std::__cxx11::moneypunct<char,true>::thousands_sep(moneypunct<char,true> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e6e0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::__cxx11::moneypunct<char, true>::do_curr_symbol() const

longlong * std::__cxx11::moneypunct<char,true>::do_curr_symbol(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::do_frac_digits() const

undefined4 __thiscall
std::__cxx11::moneypunct<char,true>::do_frac_digits(moneypunct<char,true> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::__cxx11::moneypunct<char, true>::do_decimal_point() const

undefined1 __thiscall
std::__cxx11::moneypunct<char,true>::do_decimal_point(moneypunct<char,true> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x21);
}



// std::__cxx11::moneypunct<char, true>::do_negative_sign() const

longlong * std::__cxx11::moneypunct<char,true>::do_negative_sign(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::do_positive_sign() const

longlong * std::__cxx11::moneypunct<char,true>::do_positive_sign(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<char, true>::do_thousands_sep() const

undefined1 __thiscall
std::__cxx11::moneypunct<char,true>::do_thousands_sep(moneypunct<char,true> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::__cxx11::moneypunct<char, true>::grouping() const

longlong * std::__cxx11::moneypunct<char,true>::grouping(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x20) != do_grouping) {
    (**(code **)(*param_2 + 0x20))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::neg_format() const

ulonglong __thiscall std::__cxx11::moneypunct<>::neg_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e8b0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, false>::pos_format() const

ulonglong __thiscall std::__cxx11::moneypunct<>::pos_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e8e0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, false>::curr_symbol() const

longlong * std::__cxx11::moneypunct<>::curr_symbol(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x28) != do_curr_symbol) {
    (**(code **)(*param_2 + 0x28))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::do_grouping() const

longlong * std::__cxx11::moneypunct<>::do_grouping(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::frac_digits() const

ulonglong __thiscall std::__cxx11::moneypunct<>::frac_digits(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x00014002e9e0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, false>::decimal_point() const

ulonglong __thiscall std::__cxx11::moneypunct<>::decimal_point(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x00014002ea10. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, false>::do_neg_format() const

undefined4 __thiscall std::__cxx11::moneypunct<>::do_neg_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::__cxx11::moneypunct<wchar_t, false>::do_pos_format() const

undefined4 __thiscall std::__cxx11::moneypunct<>::do_pos_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::__cxx11::moneypunct<wchar_t, false>::negative_sign() const

longlong * std::__cxx11::moneypunct<>::negative_sign(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x38) != do_negative_sign) {
    (**(code **)(*param_2 + 0x38))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::positive_sign() const

longlong * std::__cxx11::moneypunct<>::positive_sign(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x30) != do_positive_sign) {
    (**(code **)(*param_2 + 0x30))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::thousands_sep() const

ulonglong __thiscall std::__cxx11::moneypunct<>::thousands_sep(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x24);
  }
                    // WARNING: Could not recover jumptable at 0x00014002eb60. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, false>::do_curr_symbol() const

longlong * std::__cxx11::moneypunct<>::do_curr_symbol(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::do_frac_digits() const

undefined4 __thiscall std::__cxx11::moneypunct<>::do_frac_digits(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::__cxx11::moneypunct<wchar_t, false>::do_decimal_point() const

undefined2 __thiscall std::__cxx11::moneypunct<>::do_decimal_point(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::__cxx11::moneypunct<wchar_t, false>::do_negative_sign() const

longlong * std::__cxx11::moneypunct<>::do_negative_sign(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::do_positive_sign() const

longlong * std::__cxx11::moneypunct<>::do_positive_sign(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, false>::do_thousands_sep() const

undefined2 __thiscall std::__cxx11::moneypunct<>::do_thousands_sep(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x24);
}



// std::__cxx11::moneypunct<wchar_t, false>::grouping() const

longlong * std::__cxx11::moneypunct<>::grouping(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x20) != do_grouping) {
    (**(code **)(*param_2 + 0x20))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::neg_format() const

ulonglong __thiscall std::__cxx11::moneypunct<>::neg_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x50) == do_neg_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x60);
  }
                    // WARNING: Could not recover jumptable at 0x00014002ed30. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x50))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, true>::pos_format() const

ulonglong __thiscall std::__cxx11::moneypunct<>::pos_format(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x48) == do_pos_format) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x5c);
  }
                    // WARNING: Could not recover jumptable at 0x00014002ed60. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, true>::curr_symbol() const

longlong * std::__cxx11::moneypunct<>::curr_symbol(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x28) != do_curr_symbol) {
    (**(code **)(*param_2 + 0x28))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::do_grouping() const

longlong * std::__cxx11::moneypunct<>::do_grouping(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::frac_digits() const

ulonglong __thiscall std::__cxx11::moneypunct<>::frac_digits(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x40) == do_frac_digits) {
    return (ulonglong)*(uint *)(*(longlong *)(this + 0x10) + 0x58);
  }
                    // WARNING: Could not recover jumptable at 0x00014002ee60. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x40))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, true>::decimal_point() const

ulonglong __thiscall std::__cxx11::moneypunct<>::decimal_point(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x22);
  }
                    // WARNING: Could not recover jumptable at 0x00014002ee90. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, true>::do_neg_format() const

undefined4 __thiscall std::__cxx11::moneypunct<>::do_neg_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x60);
}



// std::__cxx11::moneypunct<wchar_t, true>::do_pos_format() const

undefined4 __thiscall std::__cxx11::moneypunct<>::do_pos_format(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x5c);
}



// std::__cxx11::moneypunct<wchar_t, true>::negative_sign() const

longlong * std::__cxx11::moneypunct<>::negative_sign(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x38) != do_negative_sign) {
    (**(code **)(*param_2 + 0x38))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::positive_sign() const

longlong * std::__cxx11::moneypunct<>::positive_sign(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x30) != do_positive_sign) {
    (**(code **)(*param_2 + 0x30))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::thousands_sep() const

ulonglong __thiscall std::__cxx11::moneypunct<>::thousands_sep(moneypunct<> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x24);
  }
                    // WARNING: Could not recover jumptable at 0x00014002efe0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::__cxx11::moneypunct<wchar_t, true>::do_curr_symbol() const

longlong * std::__cxx11::moneypunct<>::do_curr_symbol(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::do_frac_digits() const

undefined4 __thiscall std::__cxx11::moneypunct<>::do_frac_digits(moneypunct<> *this)

{
  return *(undefined4 *)(*(longlong *)(this + 0x10) + 0x58);
}



// std::__cxx11::moneypunct<wchar_t, true>::do_decimal_point() const

undefined2 __thiscall std::__cxx11::moneypunct<>::do_decimal_point(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x22);
}



// std::__cxx11::moneypunct<wchar_t, true>::do_negative_sign() const

longlong * std::__cxx11::moneypunct<>::do_negative_sign(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x48);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::do_positive_sign() const

longlong * std::__cxx11::moneypunct<>::do_positive_sign(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::moneypunct<wchar_t, true>::do_thousands_sep() const

undefined2 __thiscall std::__cxx11::moneypunct<>::do_thousands_sep(moneypunct<> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x24);
}



// std::__cxx11::moneypunct<wchar_t, true>::grouping() const

longlong * std::__cxx11::moneypunct<>::grouping(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x20) != do_grouping) {
    (**(code **)(*param_2 + 0x20))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::string::_M_disjunct(char const*) const

bool __thiscall std::__cxx11::string::_M_disjunct(string *this,ulonglong param_1)

{
  bool bVar1;
  
  bVar1 = true;
  if (*(ulonglong *)this <= param_1) {
    bVar1 = *(ulonglong *)this + *(longlong *)(this + 8) < param_1;
  }
  return bVar1;
}



// std::__cxx11::string::_M_is_local() const

undefined8 __thiscall std::__cxx11::string::_M_is_local(string *this)

{
  return CONCAT71((int7)((ulonglong)(this + 0x10) >> 8),this + 0x10 == *(string **)this);
}



// std::__cxx11::string::find_last_of(char const*, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_of(string *this,char *param_1,ulonglong param_2)

{
  longlong lVar1;
  size_t _MaxCount;
  void *pvVar2;
  ulonglong uVar3;
  bool bVar4;
  
  _MaxCount = strlen(param_1);
  if ((*(longlong *)(this + 8) != 0) && (_MaxCount != 0)) {
    uVar3 = *(longlong *)(this + 8) - 1;
    lVar1 = *(longlong *)this;
    if (param_2 < uVar3) {
      uVar3 = param_2;
    }
    do {
      pvVar2 = memchr(param_1,(int)*(char *)(lVar1 + uVar3),_MaxCount);
      if (pvVar2 != (void *)0x0) {
        return uVar3;
      }
      bVar4 = uVar3 != 0;
      uVar3 = uVar3 - 1;
    } while (bVar4);
    return 0xffffffffffffffff;
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_last_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  longlong lVar1;
  void *pvVar2;
  ulonglong uVar3;
  bool bVar4;
  
  if ((*(longlong *)(this + 8) != 0) && (param_3 != 0)) {
    uVar3 = *(longlong *)(this + 8) - 1;
    lVar1 = *(longlong *)this;
    if (param_2 < uVar3) {
      uVar3 = param_2;
    }
    do {
      pvVar2 = memchr(param_1,(int)*(char *)(lVar1 + uVar3),param_3);
      if (pvVar2 != (void *)0x0) {
        return uVar3;
      }
      bVar4 = uVar3 != 0;
      uVar3 = uVar3 - 1;
    } while (bVar4);
    return 0xffffffffffffffff;
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_last_of(std::__cxx11::string const&, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  size_t _MaxCount;
  void *_Buf;
  longlong lVar1;
  void *pvVar2;
  ulonglong uVar3;
  bool bVar4;
  
  _MaxCount = param_1[1];
  if ((*(longlong *)(this + 8) != 0) && (_MaxCount != 0)) {
    uVar3 = *(longlong *)(this + 8) - 1;
    _Buf = (void *)*param_1;
    lVar1 = *(longlong *)this;
    if (param_2 < uVar3) {
      uVar3 = param_2;
    }
    do {
      pvVar2 = memchr(_Buf,(int)*(char *)(lVar1 + uVar3),_MaxCount);
      if (pvVar2 != (void *)0x0) {
        return uVar3;
      }
      bVar4 = uVar3 != 0;
      uVar3 = uVar3 - 1;
    } while (bVar4);
    return 0xffffffffffffffff;
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_last_of(char, unsigned long long) const

ulonglong __thiscall std::__cxx11::string::find_last_of(string *this,char param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    do {
      uVar1 = param_2 - 1;
      if (param_1 == *(char *)(*(longlong *)this + param_2)) {
        return param_2;
      }
      param_2 = uVar1;
    } while (uVar1 != 0xffffffffffffffff);
  }
  return uVar1;
}



// std::__cxx11::string::_M_local_data() const

string * __thiscall std::__cxx11::string::_M_local_data(string *this)

{
  return this + 0x10;
}



// std::__cxx11::string::find_first_of(char const*, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_first_of(string *this,char *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  size_t _MaxCount;
  void *pvVar2;
  
  _MaxCount = strlen(param_1);
  if (_MaxCount != 0) {
    uVar1 = *(ulonglong *)(this + 8);
    for (; param_2 < uVar1; param_2 = param_2 + 1) {
      pvVar2 = memchr(param_1,(int)*(char *)(*(longlong *)this + param_2),_MaxCount);
      if (pvVar2 != (void *)0x0) {
        return param_2;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_first_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_first_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  ulonglong uVar1;
  void *pvVar2;
  
  if (param_3 != 0) {
    uVar1 = *(ulonglong *)(this + 8);
    for (; param_2 < uVar1; param_2 = param_2 + 1) {
      pvVar2 = memchr(param_1,(int)*(char *)(*(longlong *)this + param_2),param_3);
      if (pvVar2 != (void *)0x0) {
        return param_2;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_first_of(std::__cxx11::string const&, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_first_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  size_t _MaxCount;
  void *_Buf;
  ulonglong uVar1;
  void *pvVar2;
  
  _MaxCount = param_1[1];
  _Buf = (void *)*param_1;
  if (_MaxCount != 0) {
    uVar1 = *(ulonglong *)(this + 8);
    for (; param_2 < uVar1; param_2 = param_2 + 1) {
      pvVar2 = memchr(_Buf,(int)*(char *)(*(longlong *)this + param_2),_MaxCount);
      if (pvVar2 != (void *)0x0) {
        return param_2;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_first_of(char, unsigned long long) const

longlong __thiscall std::__cxx11::string::find_first_of(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  void *pvVar2;
  longlong lVar3;
  
  lVar3 = -1;
  if (param_2 < *(ulonglong *)(this + 8)) {
    lVar1 = *(longlong *)this;
    pvVar2 = memchr((void *)(lVar1 + param_2),(int)param_1,*(ulonglong *)(this + 8) - param_2);
    if (pvVar2 != (void *)0x0) {
      lVar3 = (longlong)pvVar2 - lVar1;
    }
  }
  return lVar3;
}



// std::__cxx11::string::get_allocator() const

string * __thiscall std::__cxx11::string::get_allocator(string *this)

{
  return this;
}



// std::__cxx11::string::_M_check_length(unsigned long long, unsigned long long, char const*) const

void __thiscall
std::__cxx11::string::_M_check_length(string *this,longlong param_1,ulonglong param_2,char *param_3)

{
  if (param_2 <= (ulonglong)((param_1 + 0x3fffffffffffffff) - *(longlong *)(this + 8))) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error(param_3);
}



// std::__cxx11::string::_M_get_allocator() const

string * __thiscall std::__cxx11::string::_M_get_allocator(string *this)

{
  return this;
}



// std::__cxx11::string::find_last_not_of(char const*, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_not_of(string *this,char *param_1,ulonglong param_2)

{
  longlong lVar1;
  size_t _MaxCount;
  void *pvVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar3 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar4 = *(longlong *)(this + 8) - 1;
    _MaxCount = strlen(param_1);
    uVar3 = param_2;
    if (uVar4 <= param_2) {
      uVar3 = uVar4;
    }
    if (_MaxCount != 0) {
      lVar1 = *(longlong *)this;
      do {
        pvVar2 = memchr(param_1,(int)*(char *)(lVar1 + uVar3),_MaxCount);
        if (pvVar2 == (void *)0x0) {
          return uVar3;
        }
        bVar5 = uVar3 != 0;
        uVar3 = uVar3 - 1;
      } while (bVar5);
    }
  }
  return uVar3;
}



// std::__cxx11::string::find_last_not_of(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_not_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  void *pvVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar2 = *(longlong *)(this + 8) - 1;
    uVar4 = param_2;
    if (uVar2 <= param_2) {
      uVar4 = uVar2;
    }
    if (param_3 != 0) {
      lVar1 = *(longlong *)this;
      do {
        pvVar3 = memchr(param_1,(int)*(char *)(lVar1 + uVar4),param_3);
        if (pvVar3 == (void *)0x0) {
          return uVar4;
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
    }
  }
  return uVar4;
}



// std::__cxx11::string::find_last_not_of(std::__cxx11::string const&, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_not_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  size_t _MaxCount;
  void *_Buf;
  longlong lVar1;
  ulonglong uVar2;
  void *pvVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar2 = *(longlong *)(this + 8) - 1;
    _MaxCount = param_1[1];
    uVar4 = param_2;
    if (uVar2 <= param_2) {
      uVar4 = uVar2;
    }
    if (_MaxCount != 0) {
      _Buf = (void *)*param_1;
      lVar1 = *(longlong *)this;
      do {
        pvVar3 = memchr(_Buf,(int)*(char *)(lVar1 + uVar4),_MaxCount);
        if (pvVar3 == (void *)0x0) {
          return uVar4;
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
    }
  }
  return uVar4;
}



// std::__cxx11::string::find_last_not_of(char, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_last_not_of(string *this,char param_1,ulonglong param_2)

{
  ulonglong uVar1;
  bool bVar2;
  
  uVar1 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    do {
      if (*(char *)(*(longlong *)this + param_2) != param_1) {
        return param_2;
      }
      bVar2 = param_2 != 0;
      uVar1 = param_2 - 1;
      param_2 = uVar1;
    } while (bVar2);
  }
  return uVar1;
}



// std::__cxx11::string::find_first_not_of(char const*, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_first_not_of(string *this,char *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  size_t _MaxCount;
  void *pvVar3;
  
  _MaxCount = strlen(param_1);
  uVar1 = *(ulonglong *)(this + 8);
  if (param_2 < uVar1) {
    lVar2 = *(longlong *)this;
    if (_MaxCount == 0) {
      return param_2;
    }
    do {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),_MaxCount);
      if (pvVar3 == (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_first_not_of(char const*, unsigned long long, unsigned long long)
// const

ulonglong __thiscall
std::__cxx11::string::find_first_not_of(string *this,void *param_1,ulonglong param_2,size_t param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  void *pvVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (param_2 < uVar1) {
    lVar2 = *(longlong *)this;
    if (param_3 == 0) {
      return param_2;
    }
    do {
      pvVar3 = memchr(param_1,(int)*(char *)(lVar2 + param_2),param_3);
      if (pvVar3 == (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_first_not_of(std::__cxx11::string const&, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_first_not_of(string *this,undefined8 *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  size_t _MaxCount;
  longlong lVar2;
  void *_Buf;
  void *pvVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  _MaxCount = param_1[1];
  if (param_2 < uVar1) {
    lVar2 = *(longlong *)this;
    if (_MaxCount == 0) {
      return param_2;
    }
    _Buf = (void *)*param_1;
    do {
      pvVar3 = memchr(_Buf,(int)*(char *)(lVar2 + param_2),_MaxCount);
      if (pvVar3 == (void *)0x0) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != uVar1);
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::find_first_not_of(char, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find_first_not_of(string *this,char param_1,ulonglong param_2)

{
  if (param_2 < *(ulonglong *)(this + 8)) {
    do {
      if (*(char *)(*(longlong *)this + param_2) != param_1) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != *(ulonglong *)(this + 8));
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::string::at(unsigned long long) const

longlong __thiscall
std::__cxx11::string::at(string *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  if (param_1 < *(ulonglong *)(this + 8)) {
    return *(longlong *)this + param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,
             *(ulonglong *)(this + 8),param_3);
}



// std::__cxx11::string::end() const

longlong __thiscall std::__cxx11::string::end(string *this)

{
  return *(longlong *)this + *(longlong *)(this + 8);
}



// std::__cxx11::string::back() const

longlong __thiscall std::__cxx11::string::back(string *this)

{
  return *(longlong *)this + -1 + *(longlong *)(this + 8);
}



// std::__cxx11::string::cend() const

longlong __thiscall std::__cxx11::string::cend(string *this)

{
  return *(longlong *)this + *(longlong *)(this + 8);
}



// std::__cxx11::string::copy(char*, unsigned long long, unsigned long long) const

size_t __thiscall
std::__cxx11::string::copy(string *this,undefined1 *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong _Size;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5fe3,param_3,uVar1);
  }
  _Size = uVar1 - param_3;
  if (param_2 < uVar1 - param_3) {
    _Size = param_2;
  }
  if (_Size != 0) {
    if (_Size == 1) {
      *param_1 = *(undefined1 *)(param_3 + *(longlong *)this);
      return 1;
    }
    memcpy(param_1,(undefined1 *)(param_3 + *(longlong *)this),_Size);
  }
  return _Size;
}



// std::__cxx11::string::data() const

undefined8 __thiscall std::__cxx11::string::data(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::find(char const*, unsigned long long) const

void __thiscall std::__cxx11::string::find(string *this,char *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  find(this,param_1,param_2,sVar1);
  return;
}



// std::__cxx11::string::find(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::find(string *this,char *param_1,ulonglong param_2,ulonglong param_3)

{
  char cVar1;
  ulonglong uVar2;
  longlong lVar3;
  int iVar4;
  size_t _MaxCount;
  void *pvVar5;
  ulonglong uVar6;
  
  uVar2 = *(ulonglong *)(this + 8);
  if (param_3 == 0) {
    uVar6 = 0xffffffffffffffff;
    if (param_2 <= uVar2) {
      uVar6 = param_2;
    }
  }
  else {
    uVar6 = 0xffffffffffffffff;
    if (param_2 < uVar2) {
      lVar3 = *(longlong *)this;
      pvVar5 = (void *)(lVar3 + param_2);
      if (param_3 <= uVar2 - param_2) {
        _MaxCount = (uVar2 - param_2) + (1 - param_3);
        if (_MaxCount != 0) {
          cVar1 = *param_1;
          while (pvVar5 = memchr(pvVar5,(int)cVar1,_MaxCount), pvVar5 != (void *)0x0) {
            iVar4 = memcmp(pvVar5,param_1,param_3);
            if (iVar4 == 0) {
              return (longlong)pvVar5 - lVar3;
            }
            pvVar5 = (void *)((longlong)pvVar5 + 1);
            uVar6 = (lVar3 + uVar2) - (longlong)pvVar5;
            if ((uVar6 < param_3) || (_MaxCount = uVar6 + (1 - param_3), _MaxCount == 0)) break;
          }
          uVar6 = 0xffffffffffffffff;
        }
      }
    }
  }
  return uVar6;
}



// std::__cxx11::string::find(std::__cxx11::string const&, unsigned long long) const

void __thiscall std::__cxx11::string::find(string *this,undefined8 *param_1,ulonglong param_2)

{
  find(this,(char *)*param_1,param_2,param_1[1]);
  return;
}



// std::__cxx11::string::find(char, unsigned long long) const

longlong __thiscall std::__cxx11::string::find(string *this,char param_1,ulonglong param_2)

{
  longlong lVar1;
  void *pvVar2;
  longlong lVar3;
  
  lVar3 = -1;
  if (param_2 < *(ulonglong *)(this + 8)) {
    lVar1 = *(longlong *)this;
    pvVar2 = memchr((void *)(lVar1 + param_2),(int)param_1,*(ulonglong *)(this + 8) - param_2);
    if (pvVar2 != (void *)0x0) {
      lVar3 = (longlong)pvVar2 - lVar1;
    }
  }
  return lVar3;
}



// std::__cxx11::string::rend() const

undefined8 * std::__cxx11::string::rend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::__cxx11::string::size() const

undefined8 __thiscall std::__cxx11::string::size(string *this)

{
  return *(undefined8 *)(this + 8);
}



// std::__cxx11::string::begin() const

undefined8 __thiscall std::__cxx11::string::begin(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::c_str() const

undefined8 __thiscall std::__cxx11::string::c_str(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::crend() const

undefined8 * std::__cxx11::string::crend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::__cxx11::string::empty() const

bool __thiscall std::__cxx11::string::empty(string *this)

{
  return *(longlong *)(this + 8) == 0;
}



// std::__cxx11::string::front() const

undefined8 __thiscall std::__cxx11::string::front(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::rfind(char const*, unsigned long long) const

void __thiscall std::__cxx11::string::rfind(string *this,char *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  rfind(this,param_1,param_2,sVar1);
  return;
}



// std::__cxx11::string::rfind(char const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::rfind(string *this,void *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  int iVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  if (param_3 <= *(ulonglong *)(this + 8)) {
    uVar3 = *(ulonglong *)(this + 8) - param_3;
    uVar4 = param_2;
    if (uVar3 <= param_2) {
      uVar4 = uVar3;
    }
    if (param_3 != 0) {
      lVar1 = *(longlong *)this;
      do {
        iVar2 = memcmp((void *)(lVar1 + uVar4),param_1,param_3);
        if (iVar2 == 0) {
          return uVar4;
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
      uVar4 = 0xffffffffffffffff;
    }
  }
  return uVar4;
}



// std::__cxx11::string::rfind(std::__cxx11::string const&, unsigned long long) const

ulonglong __thiscall std::__cxx11::string::rfind(string *this,undefined8 *param_1,ulonglong param_2)

{
  ulonglong _Size;
  void *_Buf2;
  longlong lVar1;
  int iVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  _Size = param_1[1];
  if (_Size <= *(ulonglong *)(this + 8)) {
    uVar3 = *(ulonglong *)(this + 8) - _Size;
    uVar4 = param_2;
    if (uVar3 <= param_2) {
      uVar4 = uVar3;
    }
    if (_Size != 0) {
      _Buf2 = (void *)*param_1;
      lVar1 = *(longlong *)this;
      do {
        iVar2 = memcmp((void *)(lVar1 + uVar4),_Buf2,_Size);
        if (iVar2 == 0) {
          return uVar4;
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
      uVar4 = 0xffffffffffffffff;
    }
  }
  return uVar4;
}



// std::__cxx11::string::rfind(char, unsigned long long) const

ulonglong __thiscall std::__cxx11::string::rfind(string *this,char param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    do {
      uVar1 = param_2 - 1;
      if (*(char *)(*(longlong *)this + param_2) == param_1) {
        return param_2;
      }
      param_2 = uVar1;
    } while (uVar1 != 0xffffffffffffffff);
  }
  return uVar1;
}



// std::__cxx11::string::cbegin() const

undefined8 __thiscall std::__cxx11::string::cbegin(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::length() const

undefined8 __thiscall std::__cxx11::string::length(string *this)

{
  return *(undefined8 *)(this + 8);
}



// std::__cxx11::string::rbegin() const

void std::__cxx11::string::rbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + param_2[1];
  return;
}



// std::__cxx11::string::substr(unsigned long long, unsigned long long) const

longlong *
std::__cxx11::string::substr
          (longlong *param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_2[1];
  if (param_3 <= uVar1) {
    *param_1 = (longlong)(param_1 + 2);
    uVar2 = uVar1 - param_3;
    if (param_4 < uVar1 - param_3) {
      uVar2 = param_4;
    }
    _M_construct<>(param_1,(undefined1 *)(*param_2 + param_3),
                   (longlong)((undefined1 *)(*param_2 + param_3) + uVar2));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c606a,param_3,uVar1);
}



// std::__cxx11::string::_M_data() const

undefined8 __thiscall std::__cxx11::string::_M_data(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::compare(char const*) const

ulonglong __thiscall std::__cxx11::string::compare(string *this,char *param_1)

{
  int iVar1;
  size_t sVar2;
  undefined4 extraout_var;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar4 = *(ulonglong *)(this + 8);
  sVar2 = strlen(param_1);
  uVar3 = uVar4;
  if (sVar2 <= uVar4) {
    uVar3 = sVar2;
  }
  if (uVar3 != 0) {
    iVar1 = memcmp(*(void **)this,param_1,uVar3);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar4 = uVar4 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar4 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar4)) {
    uVar3 = uVar4 & 0xffffffff;
  }
  return uVar3;
}



// std::__cxx11::string::compare(std::__cxx11::string const&) const

ulonglong __thiscall std::__cxx11::string::compare(string *this,undefined8 *param_1)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong _Size;
  
  uVar3 = *(ulonglong *)(this + 8);
  uVar2 = param_1[1];
  _Size = uVar3;
  if (uVar2 <= uVar3) {
    _Size = uVar2;
  }
  if (_Size != 0) {
    iVar1 = memcmp(*(void **)this,(void *)*param_1,_Size);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar3 = uVar3 - uVar2;
  uVar2 = 0x7fffffff;
  if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
    uVar2 = uVar3 & 0xffffffff;
  }
  return uVar2;
}



// std::__cxx11::string::compare(unsigned long long, unsigned long long, char const*) const

ulonglong __thiscall
std::__cxx11::string::compare(string *this,ulonglong param_1,ulonglong param_2,char *param_3)

{
  int iVar1;
  size_t sVar2;
  undefined4 extraout_var;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *(ulonglong *)(this + 8);
  if (uVar3 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ff6,param_1,uVar3);
  }
  uVar4 = uVar3 - param_1;
  if (param_2 < uVar3 - param_1) {
    uVar4 = param_2;
  }
  sVar2 = strlen(param_3);
  uVar3 = uVar4;
  if (sVar2 <= uVar4) {
    uVar3 = sVar2;
  }
  if (uVar3 != 0) {
    iVar1 = memcmp((void *)(param_1 + *(longlong *)this),param_3,uVar3);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar4 = uVar4 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar4 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar4)) {
    uVar3 = uVar4 & 0xffffffff;
  }
  return uVar3;
}



// std::__cxx11::string::compare(unsigned long long, unsigned long long, char const*, unsigned long
// long) const

ulonglong __thiscall
std::__cxx11::string::compare
          (string *this,ulonglong param_1,ulonglong param_2,void *param_3,ulonglong param_4)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar2 = *(ulonglong *)(this + 8);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ff6,param_1,uVar2);
  }
  uVar3 = uVar2 - param_1;
  if (param_2 < uVar2 - param_1) {
    uVar3 = param_2;
  }
  uVar2 = uVar3;
  if (param_4 <= uVar3) {
    uVar2 = param_4;
  }
  if (uVar2 != 0) {
    iVar1 = memcmp((void *)(param_1 + *(longlong *)this),param_3,uVar2);
    if (iVar1 != 0) {
      return CONCAT44(extraout_var,iVar1);
    }
  }
  uVar3 = uVar3 - param_4;
  uVar2 = 0x7fffffff;
  if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
    uVar2 = uVar3 & 0xffffffff;
  }
  return uVar2;
}



// std::__cxx11::string::compare(unsigned long long, unsigned long long, std::__cxx11::string
// const&) const

ulonglong __thiscall
std::__cxx11::string::compare(string *this,ulonglong param_1,ulonglong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  int iVar2;
  undefined4 extraout_var;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar3 = *(ulonglong *)(this + 8);
  if (uVar3 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ff6,param_1,uVar3);
  }
  uVar1 = param_3[1];
  uVar4 = uVar3 - param_1;
  if (param_2 < uVar3 - param_1) {
    uVar4 = param_2;
  }
  uVar3 = uVar4;
  if (uVar1 <= uVar4) {
    uVar3 = uVar1;
  }
  if (uVar3 != 0) {
    iVar2 = memcmp((void *)(*(longlong *)this + param_1),(void *)*param_3,uVar3);
    if (iVar2 != 0) {
      return CONCAT44(extraout_var,iVar2);
    }
  }
  uVar4 = uVar4 - uVar1;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar4 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar4)) {
    uVar3 = uVar4 & 0xffffffff;
  }
  return uVar3;
}



// std::__cxx11::string::compare(unsigned long long, unsigned long long, std::__cxx11::string
// const&, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::string::compare
          (string *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_4,
          ulonglong param_5)

{
  int iVar1;
  undefined4 extraout_var;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  uVar2 = *(ulonglong *)(this + 8);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ff6,param_1,uVar2);
  }
  uVar4 = param_3[1];
  if (param_4 <= uVar4) {
    uVar3 = uVar2 - param_1;
    if (param_2 < uVar2 - param_1) {
      uVar3 = param_2;
    }
    uVar2 = uVar4 - param_4;
    if (param_5 < uVar4 - param_4) {
      uVar2 = param_5;
    }
    uVar4 = uVar3;
    if (uVar2 <= uVar3) {
      uVar4 = uVar2;
    }
    if (uVar4 != 0) {
      iVar1 = memcmp((void *)(param_1 + *(longlong *)this),(void *)(param_4 + *param_3),uVar4);
      if (iVar1 != 0) {
        return CONCAT44(extraout_var,iVar1);
      }
    }
    uVar3 = uVar3 - uVar2;
    uVar2 = 0x7fffffff;
    if (((longlong)uVar3 < 0x80000000) && (uVar2 = 0x80000000, -0x80000001 < (longlong)uVar3)) {
      uVar2 = uVar3 & 0xffffffff;
    }
    return uVar2;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ff6,param_4,uVar4);
}



// std::__cxx11::string::crbegin() const

void std::__cxx11::string::crbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + param_2[1];
  return;
}



// std::__cxx11::string::_M_check(unsigned long long, char const*) const

void __thiscall std::__cxx11::string::_M_check(string *this,ulonglong param_1,ulonglong param_2)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",param_2,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::_M_limit(unsigned long long, unsigned long long) const

ulonglong __thiscall std::__cxx11::string::_M_limit(string *this,longlong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(longlong *)(this + 8) - param_1;
  if (param_2 < (ulonglong)(*(longlong *)(this + 8) - param_1)) {
    uVar1 = param_2;
  }
  return uVar1;
}



// std::__cxx11::string::capacity() const

undefined8 __thiscall std::__cxx11::string::capacity(string *this)

{
  if (*(string **)this != this + 0x10) {
    return *(undefined8 *)(this + 0x10);
  }
  return 0xf;
}



// std::__cxx11::string::max_size() const

undefined8 std::__cxx11::string::max_size(void)

{
  return 0x3fffffffffffffff;
}



// std::__cxx11::string::operator[](unsigned long long) const

longlong __thiscall std::__cxx11::string::operator[](string *this,longlong param_1)

{
  return *(longlong *)this + param_1;
}



// std::__cxx11::wstring::_M_disjunct(wchar_t const*) const

undefined8 __thiscall std::__cxx11::wstring::_M_disjunct(wstring *this,ulonglong param_1)

{
  ulonglong uVar1;
  undefined8 uVar2;
  
  uVar2 = 1;
  if (*(ulonglong *)this <= param_1) {
    uVar1 = *(ulonglong *)this + *(longlong *)(this + 8) * 2;
    uVar2 = CONCAT71((int7)(uVar1 >> 8),uVar1 < param_1);
  }
  return uVar2;
}



// std::__cxx11::wstring::_M_is_local() const

undefined8 __thiscall std::__cxx11::wstring::_M_is_local(wstring *this)

{
  return CONCAT71((int7)((ulonglong)(this + 0x10) >> 8),this + 0x10 == *(wstring **)this);
}



// std::__cxx11::wstring::find_last_of(wchar_t const*, unsigned long long) const

void __thiscall
std::__cxx11::wstring::find_last_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find_last_of(this,param_1,param_2,sVar1);
  return;
}



// std::__cxx11::wstring::find_last_of(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find_last_of(wstring *this,short *param_1,ulonglong param_2,longlong param_3)

{
  short *psVar1;
  longlong lVar2;
  ulonglong uVar3;
  bool bVar4;
  
  if ((*(longlong *)(this + 8) == 0) || (param_3 == 0)) {
    return 0xffffffffffffffff;
  }
  uVar3 = *(longlong *)(this + 8) - 1;
  if (param_2 < uVar3) {
    uVar3 = param_2;
  }
  if (param_1 == (short *)0x0) {
    do {
      if (uVar3 == 0) {
        return 0xffffffffffffffff;
      }
      bVar4 = uVar3 != 1;
      uVar3 = uVar3 - 2;
    } while (bVar4);
    return 0xffffffffffffffff;
  }
  do {
    psVar1 = param_1;
    lVar2 = param_3;
    do {
      if (*(short *)(*(longlong *)this + uVar3 * 2) == *psVar1) {
        return uVar3;
      }
      psVar1 = psVar1 + 1;
      lVar2 = lVar2 + -1;
    } while (lVar2 != 0);
    bVar4 = uVar3 != 0;
    uVar3 = uVar3 - 1;
  } while (bVar4);
  return 0xffffffffffffffff;
}



// std::__cxx11::wstring::find_last_of(std::__cxx11::wstring const&, unsigned long long) const

void __thiscall
std::__cxx11::wstring::find_last_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find_last_of(this,(short *)*param_1,param_2,param_1[1]);
  return;
}



// std::__cxx11::wstring::find_last_of(wchar_t, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find_last_of(wstring *this,short param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    do {
      uVar1 = param_2 - 1;
      if (param_1 == *(short *)(*(longlong *)this + param_2 * 2)) {
        return param_2;
      }
      param_2 = uVar1;
    } while (uVar1 != 0xffffffffffffffff);
  }
  return uVar1;
}



// std::__cxx11::wstring::_M_local_data() const

wstring * __thiscall std::__cxx11::wstring::_M_local_data(wstring *this)

{
  return this + 0x10;
}



// std::__cxx11::wstring::find_first_of(wchar_t const*, unsigned long long) const

void __thiscall
std::__cxx11::wstring::find_first_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  short *psVar1;
  
  psVar1 = (short *)wcslen(param_1);
  find_first_of(this,param_1,param_2,psVar1);
  return;
}



// std::__cxx11::wstring::find_first_of(wchar_t const*, unsigned long long, unsigned long long)
// const

ulonglong __thiscall
std::__cxx11::wstring::find_first_of(wstring *this,short *param_1,ulonglong param_2,short *param_3)

{
  short *psVar1;
  short *psVar2;
  short *psVar3;
  
  if (param_3 != (short *)0x0) {
    for (; param_2 < *(ulonglong *)(this + 8); param_2 = param_2 + 1) {
      psVar2 = param_1;
      psVar3 = param_3;
      psVar1 = param_1;
      while (psVar1 != (short *)0x0) {
        if (*(short *)(*(longlong *)this + param_2 * 2) == *psVar2) {
          return param_2;
        }
        psVar2 = psVar2 + 1;
        psVar3 = (short *)((longlong)psVar3 + -1);
        psVar1 = psVar3;
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::wstring::find_first_of(std::__cxx11::wstring const&, unsigned long long) const

void __thiscall
std::__cxx11::wstring::find_first_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find_first_of(this,(short *)*param_1,param_2,(short *)param_1[1]);
  return;
}



// std::__cxx11::wstring::find_first_of(wchar_t, unsigned long long) const

void __thiscall std::__cxx11::wstring::find_first_of(wstring *this,short param_1,ulonglong param_2)

{
  find(this,param_1,param_2);
  return;
}



// std::__cxx11::wstring::get_allocator() const

wstring * __thiscall std::__cxx11::wstring::get_allocator(wstring *this)

{
  return this;
}



// std::__cxx11::wstring::_M_check_length(unsigned long long, unsigned long long, char const*) const

void __thiscall
std::__cxx11::wstring::_M_check_length
          (wstring *this,longlong param_1,ulonglong param_2,char *param_3)

{
  if (param_2 <= (ulonglong)((param_1 + 0x1fffffffffffffff) - *(longlong *)(this + 8))) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error(param_3);
}



// std::__cxx11::wstring::_M_get_allocator() const

wstring * __thiscall std::__cxx11::wstring::_M_get_allocator(wstring *this)

{
  return this;
}



// std::__cxx11::wstring::find_last_not_of(wchar_t const*, unsigned long long) const

void __thiscall
std::__cxx11::wstring::find_last_not_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find_last_not_of(this,param_1,param_2,sVar1);
  return;
}



// std::__cxx11::wstring::find_last_not_of(wchar_t const*, unsigned long long, unsigned long long)
// const

ulonglong __thiscall
std::__cxx11::wstring::find_last_not_of
          (wstring *this,short *param_1,ulonglong param_2,longlong param_3)

{
  ulonglong uVar1;
  short *psVar2;
  longlong lVar3;
  ulonglong uVar4;
  bool bVar5;
  
  uVar4 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    uVar4 = param_2;
    if (uVar1 <= param_2) {
      uVar4 = uVar1;
    }
    if ((param_3 != 0) && (param_1 != (short *)0x0)) {
      do {
        psVar2 = param_1;
        lVar3 = param_3;
        while (*(short *)(*(longlong *)this + uVar4 * 2) != *psVar2) {
          psVar2 = psVar2 + 1;
          lVar3 = lVar3 + -1;
          if (lVar3 == 0) {
            return uVar4;
          }
        }
        bVar5 = uVar4 != 0;
        uVar4 = uVar4 - 1;
      } while (bVar5);
    }
  }
  return uVar4;
}



// std::__cxx11::wstring::find_last_not_of(std::__cxx11::wstring const&, unsigned long long) const

void __thiscall
std::__cxx11::wstring::find_last_not_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find_last_not_of(this,(short *)*param_1,param_2,param_1[1]);
  return;
}



// std::__cxx11::wstring::find_last_not_of(wchar_t, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find_last_not_of(wstring *this,short param_1,ulonglong param_2)

{
  ulonglong uVar1;
  bool bVar2;
  
  uVar1 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    do {
      if (*(short *)(*(longlong *)this + param_2 * 2) != param_1) {
        return param_2;
      }
      bVar2 = param_2 != 0;
      uVar1 = param_2 - 1;
      param_2 = uVar1;
    } while (bVar2);
  }
  return uVar1;
}



// std::__cxx11::wstring::find_first_not_of(wchar_t const*, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find_first_not_of(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  wchar_t *pwVar2;
  size_t sVar3;
  wchar_t wVar4;
  
  sVar1 = wcslen(param_1);
  if (param_2 < *(ulonglong *)(this + 8)) {
    if ((param_1 == (wchar_t *)0x0) || (sVar1 == 0)) {
      return param_2;
    }
    wVar4 = *(wchar_t *)(*(longlong *)this + param_2 * 2);
    pwVar2 = param_1;
    sVar3 = sVar1;
    do {
      while (*pwVar2 == wVar4) {
        param_2 = param_2 + 1;
        if (param_2 == *(ulonglong *)(this + 8)) goto LAB_140030560;
        pwVar2 = param_1;
        sVar3 = sVar1;
        wVar4 = *(wchar_t *)(*(longlong *)this + param_2 * 2);
      }
      sVar3 = sVar3 - 1;
      pwVar2 = pwVar2 + 1;
    } while (sVar3 != 0);
  }
  else {
LAB_140030560:
    param_2 = 0xffffffffffffffff;
  }
  return param_2;
}



// std::__cxx11::wstring::find_first_not_of(wchar_t const*, unsigned long long, unsigned long long)
// const

ulonglong __thiscall
std::__cxx11::wstring::find_first_not_of
          (wstring *this,short *param_1,ulonglong param_2,longlong param_3)

{
  short *psVar1;
  longlong lVar2;
  short sVar3;
  
  if (param_2 < *(ulonglong *)(this + 8)) {
    if ((param_1 != (short *)0x0) && (param_3 != 0)) {
      sVar3 = *(short *)(*(longlong *)this + param_2 * 2);
      psVar1 = param_1;
      lVar2 = param_3;
      do {
        while (*psVar1 == sVar3) {
          param_2 = param_2 + 1;
          if (param_2 == *(ulonglong *)(this + 8)) goto LAB_1400305d0;
          psVar1 = param_1;
          lVar2 = param_3;
          sVar3 = *(short *)(*(longlong *)this + param_2 * 2);
        }
        lVar2 = lVar2 + -1;
        psVar1 = psVar1 + 1;
      } while (lVar2 != 0);
    }
  }
  else {
LAB_1400305d0:
    param_2 = 0xffffffffffffffff;
  }
  return param_2;
}



// std::__cxx11::wstring::find_first_not_of(std::__cxx11::wstring const&, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find_first_not_of(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  longlong lVar1;
  short *psVar2;
  short *psVar3;
  short sVar4;
  longlong lVar5;
  
  lVar1 = param_1[1];
  psVar2 = (short *)*param_1;
  if (param_2 < *(ulonglong *)(this + 8)) {
    if ((psVar2 != (short *)0x0) && (lVar1 != 0)) {
      sVar4 = *(short *)(*(longlong *)this + param_2 * 2);
      psVar3 = psVar2;
      lVar5 = lVar1;
      do {
        while (*psVar3 == sVar4) {
          param_2 = param_2 + 1;
          if (param_2 == *(ulonglong *)(this + 8)) goto LAB_14003062f;
          psVar3 = psVar2;
          lVar5 = lVar1;
          sVar4 = *(short *)(*(longlong *)this + param_2 * 2);
        }
        lVar5 = lVar5 + -1;
        psVar3 = psVar3 + 1;
      } while (lVar5 != 0);
    }
  }
  else {
LAB_14003062f:
    param_2 = 0xffffffffffffffff;
  }
  return param_2;
}



// std::__cxx11::wstring::find_first_not_of(wchar_t, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find_first_not_of(wstring *this,short param_1,ulonglong param_2)

{
  if (param_2 < *(ulonglong *)(this + 8)) {
    do {
      if (*(short *)(*(longlong *)this + param_2 * 2) != param_1) {
        return param_2;
      }
      param_2 = param_2 + 1;
    } while (param_2 != *(ulonglong *)(this + 8));
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::wstring::at(unsigned long long) const

longlong __thiscall
std::__cxx11::wstring::at(wstring *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  if (param_1 < *(ulonglong *)(this + 8)) {
    return *(longlong *)this + param_1 * 2;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,
             *(ulonglong *)(this + 8),param_3);
}



// std::__cxx11::wstring::end() const

longlong __thiscall std::__cxx11::wstring::end(wstring *this)

{
  return *(longlong *)this + *(longlong *)(this + 8) * 2;
}



// std::__cxx11::wstring::back() const

longlong __thiscall std::__cxx11::wstring::back(wstring *this)

{
  return *(longlong *)this + -2 + *(longlong *)(this + 8) * 2;
}



// std::__cxx11::wstring::cend() const

longlong __thiscall std::__cxx11::wstring::cend(wstring *this)

{
  return *(longlong *)this + *(longlong *)(this + 8) * 2;
}



// std::__cxx11::wstring::copy(wchar_t*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::copy(wstring *this,undefined2 *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c646b,param_3,uVar1);
  }
  uVar2 = uVar1 - param_3;
  if (param_2 < uVar1 - param_3) {
    uVar2 = param_2;
  }
  if (uVar2 != 0) {
    _Src = (undefined2 *)(*(longlong *)this + param_3 * 2);
    if (uVar2 == 1) {
      *param_1 = *_Src;
      return 1;
    }
    memcpy(param_1,_Src,uVar2 * 2);
  }
  return uVar2;
}



// std::__cxx11::wstring::data() const

undefined8 __thiscall std::__cxx11::wstring::data(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::find(wchar_t const*, unsigned long long) const

void __thiscall std::__cxx11::wstring::find(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  find(this,param_1,param_2,sVar1);
  return;
}



// std::__cxx11::wstring::find(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::find(wstring *this,short *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  short *psVar3;
  longlong lVar4;
  ulonglong uVar5;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (param_3 == 0) {
    uVar5 = 0xffffffffffffffff;
    if (param_2 <= uVar1) {
      uVar5 = param_2;
    }
    return uVar5;
  }
  if (param_2 < uVar1) {
    lVar2 = *(longlong *)this;
    psVar3 = (short *)(lVar2 + param_2 * 2);
    if (param_3 <= uVar1 - param_2) {
      lVar4 = (uVar1 - param_2) + (1 - param_3);
      if ((lVar4 != 0) && (psVar3 != (short *)0x0)) {
        do {
          while (*param_1 == *psVar3) {
            if (param_1 == psVar3) {
LAB_140030868:
              return (longlong)psVar3 - lVar2 >> 1;
            }
            uVar5 = 0;
            while (psVar3[uVar5] == param_1[uVar5]) {
              uVar5 = uVar5 + 1;
              if (uVar5 == param_3) goto LAB_140030868;
            }
            psVar3 = psVar3 + 1;
            uVar5 = (longlong)((lVar2 + uVar1 * 2) - (longlong)psVar3) >> 1;
            if (uVar5 < param_3) {
              return 0xffffffffffffffff;
            }
            lVar4 = uVar5 + (1 - param_3);
            if (lVar4 == 0) {
              return 0xffffffffffffffff;
            }
          }
          psVar3 = psVar3 + 1;
          lVar4 = lVar4 + -1;
        } while (lVar4 != 0);
      }
    }
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::wstring::find(std::__cxx11::wstring const&, unsigned long long) const

void __thiscall std::__cxx11::wstring::find(wstring *this,undefined8 *param_1,ulonglong param_2)

{
  find(this,(short *)*param_1,param_2,param_1[1]);
  return;
}



// std::__cxx11::wstring::find(wchar_t, unsigned long long) const

longlong __thiscall std::__cxx11::wstring::find(wstring *this,short param_1,ulonglong param_2)

{
  short sVar1;
  short *psVar2;
  longlong lVar3;
  
  lVar3 = -1;
  if (param_2 < *(ulonglong *)(this + 8)) {
    psVar2 = (short *)(*(longlong *)this + param_2 * 2);
    if (psVar2 != (short *)0x0) {
      lVar3 = *(ulonglong *)(this + 8) - param_2;
      sVar1 = *psVar2;
      while (sVar1 != param_1) {
        psVar2 = psVar2 + 1;
        lVar3 = lVar3 + -1;
        if (lVar3 == 0) {
          return -1;
        }
        sVar1 = *psVar2;
      }
      lVar3 = (longlong)psVar2 - *(longlong *)this >> 1;
    }
  }
  return lVar3;
}



// std::__cxx11::wstring::rend() const

undefined8 * std::__cxx11::wstring::rend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::__cxx11::wstring::size() const

undefined8 __thiscall std::__cxx11::wstring::size(wstring *this)

{
  return *(undefined8 *)(this + 8);
}



// std::__cxx11::wstring::begin() const

undefined8 __thiscall std::__cxx11::wstring::begin(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::c_str() const

undefined8 __thiscall std::__cxx11::wstring::c_str(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::crend() const

undefined8 * std::__cxx11::wstring::crend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::__cxx11::wstring::empty() const

bool __thiscall std::__cxx11::wstring::empty(wstring *this)

{
  return *(longlong *)(this + 8) == 0;
}



// std::__cxx11::wstring::front() const

undefined8 __thiscall std::__cxx11::wstring::front(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::rfind(wchar_t const*, unsigned long long) const

void __thiscall std::__cxx11::wstring::rfind(wstring *this,wchar_t *param_1,ulonglong param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  rfind(this,(longlong)param_1,param_2,sVar1);
  return;
}



// std::__cxx11::wstring::rfind(wchar_t const*, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::rfind(wstring *this,longlong param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  bool bVar3;
  
  if (param_3 <= *(ulonglong *)(this + 8)) {
    uVar1 = *(ulonglong *)(this + 8) - param_3;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    lVar2 = *(longlong *)this + param_2 * 2;
    do {
      if (param_1 == lVar2) {
        return param_2;
      }
      if (param_3 == 0) {
        return param_2;
      }
      if ((param_1 != 0) == (lVar2 != 0)) {
        uVar1 = 0;
        while (*(short *)(lVar2 + uVar1 * 2) == *(short *)(param_1 + uVar1 * 2)) {
          uVar1 = uVar1 + 1;
          if (param_3 == uVar1) {
            return param_2;
          }
        }
      }
      lVar2 = lVar2 + -2;
      bVar3 = param_2 != 0;
      param_2 = param_2 - 1;
    } while (bVar3);
  }
  return 0xffffffffffffffff;
}



// std::__cxx11::wstring::rfind(std::__cxx11::wstring const&, unsigned long long) const

void __thiscall std::__cxx11::wstring::rfind(wstring *this,longlong *param_1,ulonglong param_2)

{
  rfind(this,*param_1,param_2,param_1[1]);
  return;
}



// std::__cxx11::wstring::rfind(wchar_t, unsigned long long) const

ulonglong __thiscall std::__cxx11::wstring::rfind(wstring *this,short param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = 0xffffffffffffffff;
  if (*(longlong *)(this + 8) != 0) {
    uVar1 = *(longlong *)(this + 8) - 1;
    if (uVar1 <= param_2) {
      param_2 = uVar1;
    }
    do {
      uVar1 = param_2 - 1;
      if (*(short *)(*(longlong *)this + param_2 * 2) == param_1) {
        return param_2;
      }
      param_2 = uVar1;
    } while (uVar1 != 0xffffffffffffffff);
  }
  return uVar1;
}



// std::__cxx11::wstring::cbegin() const

undefined8 __thiscall std::__cxx11::wstring::cbegin(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::length() const

undefined8 __thiscall std::__cxx11::wstring::length(wstring *this)

{
  return *(undefined8 *)(this + 8);
}



// std::__cxx11::wstring::rbegin() const

void std::__cxx11::wstring::rbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + param_2[1] * 2;
  return;
}



// std::__cxx11::wstring::substr(unsigned long long, unsigned long long) const

longlong *
std::__cxx11::wstring::substr
          (longlong *param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  undefined2 *_Src;
  longlong *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar3 = param_2[1];
  if (uVar3 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c647e,param_3,uVar3);
  }
  _Dst = param_1 + 2;
  *param_1 = (longlong)_Dst;
  uVar1 = uVar3 - param_3;
  if (param_4 < uVar3 - param_3) {
    uVar1 = param_4;
  }
  _Src = (undefined2 *)(*param_2 + param_3 * 2);
  uVar1 = uVar1 * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(param_1 + 2) = *_Src;
      goto LAB_140030b22;
    }
  }
  else {
    _Dst = (longlong *)_M_create(param_1,local_40,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = (longlong *)*param_1;
LAB_140030b22:
  param_1[1] = uVar2;
  *(undefined2 *)((longlong)_Dst + uVar4) = 0;
  return param_1;
}



// std::__cxx11::wstring::_M_data() const

undefined8 __thiscall std::__cxx11::wstring::_M_data(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::compare(wchar_t const*) const

ulonglong __thiscall std::__cxx11::wstring::compare(wstring *this,wchar_t *param_1)

{
  wchar_t *pwVar1;
  size_t sVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  uVar5 = *(ulonglong *)(this + 8);
  sVar2 = wcslen(param_1);
  pwVar1 = *(wchar_t **)this;
  uVar3 = uVar5;
  if (sVar2 <= uVar5) {
    uVar3 = sVar2;
  }
  if ((param_1 != pwVar1) && (uVar3 != 0)) {
    if ((param_1 != (wchar_t *)0x0) != (pwVar1 != (wchar_t *)0x0)) {
      return (ulonglong)(-(uint)(param_1 != (wchar_t *)0x0) | 1);
    }
    uVar4 = 0;
    do {
      if (pwVar1[uVar4] != param_1[uVar4]) {
        return (ulonglong)(-(uint)((ushort)pwVar1[uVar4] < (ushort)param_1[uVar4]) | 1);
      }
      uVar4 = uVar4 + 1;
    } while (uVar3 != uVar4);
  }
  uVar5 = uVar5 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar5 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar5)) {
    uVar3 = uVar5 & 0xffffffff;
  }
  return uVar3;
}



// std::__cxx11::wstring::compare(std::__cxx11::wstring const&) const

ulonglong __thiscall std::__cxx11::wstring::compare(wstring *this,longlong *param_1)

{
  ushort uVar1;
  ushort uVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  
  uVar7 = *(ulonglong *)(this + 8);
  uVar5 = param_1[1];
  lVar3 = *(longlong *)this;
  lVar4 = *param_1;
  uVar8 = uVar7;
  if (uVar5 <= uVar7) {
    uVar8 = uVar5;
  }
  if ((lVar4 != lVar3) && (uVar8 != 0)) {
    if ((lVar4 != 0) != (lVar3 != 0)) {
      return (ulonglong)(-(uint)(lVar4 != 0) | 1);
    }
    uVar6 = 0;
    do {
      uVar1 = *(ushort *)(lVar4 + uVar6 * 2);
      uVar2 = *(ushort *)(lVar3 + uVar6 * 2);
      if (uVar2 != uVar1) {
        return (ulonglong)(-(uint)(uVar2 < uVar1) | 1);
      }
      uVar6 = uVar6 + 1;
    } while (uVar8 != uVar6);
  }
  uVar7 = uVar7 - uVar5;
  if (0x7fffffff < (longlong)uVar7) {
    return 0x7fffffff;
  }
  uVar5 = 0x80000000;
  if (-0x80000001 < (longlong)uVar7) {
    uVar5 = uVar7 & 0xffffffff;
  }
  return uVar5;
}



// std::__cxx11::wstring::compare(unsigned long long, unsigned long long, wchar_t const*) const

ulonglong __thiscall
std::__cxx11::wstring::compare(wstring *this,ulonglong param_1,ulonglong param_2,wchar_t *param_3)

{
  wchar_t *pwVar1;
  size_t sVar2;
  ulonglong uVar3;
  size_t sVar4;
  ulonglong uVar5;
  
  uVar3 = *(ulonglong *)(this + 8);
  if (uVar3 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6493,param_1,uVar3);
  }
  uVar5 = uVar3 - param_1;
  if (param_2 < uVar3 - param_1) {
    uVar5 = param_2;
  }
  sVar2 = wcslen(param_3);
  uVar3 = uVar5;
  if (sVar2 <= uVar5) {
    uVar3 = sVar2;
  }
  pwVar1 = (wchar_t *)(*(longlong *)this + param_1 * 2);
  if ((uVar3 != 0) && (pwVar1 != param_3)) {
    if ((param_3 != (wchar_t *)0x0) != (pwVar1 != (wchar_t *)0x0)) {
      return (ulonglong)(-(uint)(param_3 != (wchar_t *)0x0) | 1);
    }
    sVar4 = 0;
    do {
      if (pwVar1[sVar4] != param_3[sVar4]) {
        return (ulonglong)(-(uint)((ushort)pwVar1[sVar4] < (ushort)param_3[sVar4]) | 1);
      }
      sVar4 = sVar4 + 1;
    } while (uVar3 != sVar4);
  }
  uVar5 = uVar5 - sVar2;
  uVar3 = 0x7fffffff;
  if (((longlong)uVar5 < 0x80000000) && (uVar3 = 0x80000000, -0x80000001 < (longlong)uVar5)) {
    uVar3 = uVar5 & 0xffffffff;
  }
  return uVar3;
}



// std::__cxx11::wstring::compare(unsigned long long, unsigned long long, wchar_t const*, unsigned
// long long) const

ulonglong __thiscall
std::__cxx11::wstring::compare
          (wstring *this,ulonglong param_1,ulonglong param_2,longlong param_3,ulonglong param_4)

{
  longlong lVar1;
  ushort uVar2;
  ushort uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  uVar4 = *(ulonglong *)(this + 8);
  if (uVar4 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6493,param_1,uVar4);
  }
  if (uVar4 - param_1 <= param_2) {
    param_2 = uVar4 - param_1;
  }
  lVar1 = *(longlong *)this + param_1 * 2;
  uVar4 = param_4;
  if (param_2 <= param_4) {
    uVar4 = param_2;
  }
  if ((uVar4 != 0) && (lVar1 != param_3)) {
    if ((param_3 != 0) != (lVar1 != 0)) {
      return (ulonglong)(-(uint)(param_3 != 0) | 1);
    }
    uVar5 = 0;
    do {
      uVar2 = *(ushort *)(param_3 + uVar5 * 2);
      uVar3 = *(ushort *)(lVar1 + uVar5 * 2);
      if (uVar3 != uVar2) {
        return (ulonglong)(-(uint)(uVar3 < uVar2) | 1);
      }
      uVar5 = uVar5 + 1;
    } while (uVar4 != uVar5);
  }
  uVar5 = param_2 - param_4;
  uVar4 = 0x7fffffff;
  if (((longlong)uVar5 < 0x80000000) && (uVar4 = 0x80000000, -0x80000001 < (longlong)uVar5)) {
    uVar4 = uVar5 & 0xffffffff;
  }
  return uVar4;
}



// std::__cxx11::wstring::compare(unsigned long long, unsigned long long, std::__cxx11::wstring
// const&) const

ulonglong __thiscall
std::__cxx11::wstring::compare(wstring *this,ulonglong param_1,ulonglong param_2,longlong *param_3)

{
  longlong lVar1;
  ushort uVar2;
  ushort uVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  
  uVar5 = *(ulonglong *)(this + 8);
  if (uVar5 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6493,param_1,uVar5);
  }
  uVar7 = param_3[1];
  lVar4 = *param_3;
  if (uVar5 - param_1 <= param_2) {
    param_2 = uVar5 - param_1;
  }
  lVar1 = *(longlong *)this + param_1 * 2;
  uVar5 = param_2;
  if (uVar7 <= param_2) {
    uVar5 = uVar7;
  }
  if ((uVar5 != 0) && (lVar1 != lVar4)) {
    if ((lVar4 != 0) != (lVar1 != 0)) {
      return (ulonglong)(-(uint)(lVar4 != 0) | 1);
    }
    uVar6 = 0;
    do {
      uVar2 = *(ushort *)(lVar4 + uVar6 * 2);
      uVar3 = *(ushort *)(lVar1 + uVar6 * 2);
      if (uVar3 != uVar2) {
        return (ulonglong)(-(uint)(uVar3 < uVar2) | 1);
      }
      uVar6 = uVar6 + 1;
    } while (uVar5 != uVar6);
  }
  uVar7 = param_2 - uVar7;
  uVar5 = 0x7fffffff;
  if (((longlong)uVar7 < 0x80000000) && (uVar5 = 0x80000000, -0x80000001 < (longlong)uVar7)) {
    uVar5 = uVar7 & 0xffffffff;
  }
  return uVar5;
}



// std::__cxx11::wstring::compare(unsigned long long, unsigned long long, std::__cxx11::wstring
// const&, unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::compare
          (wstring *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_4,
          ulonglong param_5)

{
  longlong lVar1;
  longlong lVar2;
  ushort uVar3;
  ushort uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  
  uVar7 = *(ulonglong *)(this + 8);
  if (uVar7 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6493,param_1,uVar7);
  }
  uVar5 = param_3[1];
  if (param_4 <= uVar5) {
    if (uVar7 - param_1 <= param_2) {
      param_2 = uVar7 - param_1;
    }
    uVar7 = uVar5 - param_4;
    if (param_5 < uVar5 - param_4) {
      uVar7 = param_5;
    }
    lVar1 = *param_3 + param_4 * 2;
    lVar2 = *(longlong *)this + param_1 * 2;
    uVar5 = param_2;
    if (uVar7 <= param_2) {
      uVar5 = uVar7;
    }
    if ((lVar1 != lVar2) && (uVar5 != 0)) {
      if ((lVar1 != 0) != (lVar2 != 0)) {
        return (ulonglong)(-(uint)(lVar1 != 0) | 1);
      }
      uVar6 = 0;
      do {
        uVar3 = *(ushort *)(lVar1 + uVar6 * 2);
        uVar4 = *(ushort *)(lVar2 + uVar6 * 2);
        if (uVar4 != uVar3) {
          return (ulonglong)(-(uint)(uVar4 < uVar3) | 1);
        }
        uVar6 = uVar6 + 1;
      } while (uVar5 != uVar6);
    }
    uVar7 = param_2 - uVar7;
    uVar5 = 0x7fffffff;
    if (((longlong)uVar7 < 0x80000000) && (uVar5 = 0x80000000, -0x80000001 < (longlong)uVar7)) {
      uVar5 = uVar7 & 0xffffffff;
    }
    return uVar5;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6493,param_4,uVar5);
}



// std::__cxx11::wstring::crbegin() const

void std::__cxx11::wstring::crbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + param_2[1] * 2;
  return;
}



// std::__cxx11::wstring::_M_check(unsigned long long, char const*) const

void __thiscall std::__cxx11::wstring::_M_check(wstring *this,ulonglong param_1,ulonglong param_2)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",param_2,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::_M_limit(unsigned long long, unsigned long long) const

ulonglong __thiscall
std::__cxx11::wstring::_M_limit(wstring *this,longlong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(longlong *)(this + 8) - param_1;
  if (param_2 < (ulonglong)(*(longlong *)(this + 8) - param_1)) {
    uVar1 = param_2;
  }
  return uVar1;
}



// std::__cxx11::wstring::capacity() const

undefined8 __thiscall std::__cxx11::wstring::capacity(wstring *this)

{
  if (*(wstring **)this != this + 0x10) {
    return *(undefined8 *)(this + 0x10);
  }
  return 7;
}



// std::__cxx11::wstring::max_size() const

undefined8 std::__cxx11::wstring::max_size(void)

{
  return 0x1fffffffffffffff;
}



// std::__cxx11::wstring::operator[](unsigned long long) const

longlong __thiscall std::__cxx11::wstring::operator[](wstring *this,longlong param_1)

{
  return *(longlong *)this + param_1 * 2;
}



// std::__cxx11::stringbuf::_M_high_mark() const

ulonglong __thiscall std::__cxx11::stringbuf::_M_high_mark(stringbuf *this)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(this + 0x28);
  if (uVar1 == 0) {
    return 0;
  }
  uVar2 = *(ulonglong *)(this + 0x18);
  if ((uVar2 != 0) && (uVar1 <= uVar2)) {
    return uVar2;
  }
  return uVar1;
}



// std::__cxx11::stringbuf::str() const

string * std::__cxx11::stringbuf::str(string *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  uVar1 = *(ulonglong *)(param_2 + 0x28);
  *(undefined8 *)(param_1 + 8) = 0;
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x18);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::string::_M_replace
              (param_1,0,0,*(string **)(param_2 + 0x20),
               uVar3 - (longlong)*(string **)(param_2 + 0x20));
    return param_1;
  }
  __cxx11::string::_M_assign(param_1,(string *)(param_2 + 0x48));
  return param_1;
}



// std::__cxx11::wstringbuf::_M_high_mark() const

ulonglong __thiscall std::__cxx11::wstringbuf::_M_high_mark(wstringbuf *this)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(this + 0x28);
  if (uVar1 == 0) {
    return 0;
  }
  uVar2 = *(ulonglong *)(this + 0x18);
  if ((uVar2 != 0) && (uVar1 <= uVar2)) {
    return uVar2;
  }
  return uVar1;
}



// std::__cxx11::wstringbuf::str() const

wstring * std::__cxx11::wstringbuf::str(wstring *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  uVar1 = *(ulonglong *)(param_2 + 0x28);
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x18);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::wstring::_M_replace
              (param_1,0,0,*(wstring **)(param_2 + 0x20),
               (longlong)(uVar3 - (longlong)*(wstring **)(param_2 + 0x20)) >> 1);
    return param_1;
  }
  __cxx11::wstring::_M_assign(param_1,(wstring *)(param_2 + 0x48));
  return param_1;
}



// std::__cxx11::stringstream::str() const

string * std::__cxx11::stringstream::str(string *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  uVar1 = *(ulonglong *)(param_2 + 0x40);
  *(undefined8 *)(param_1 + 8) = 0;
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x30);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::string::_M_replace
              (param_1,0,0,*(string **)(param_2 + 0x38),
               uVar3 - (longlong)*(string **)(param_2 + 0x38));
    return param_1;
  }
  __cxx11::string::_M_assign(param_1,(string *)(param_2 + 0x60));
  return param_1;
}



// std::__cxx11::stringstream::rdbuf() const

stringstream * __thiscall std::__cxx11::stringstream::rdbuf(stringstream *this)

{
  return this + 0x18;
}



// std::__cxx11::wstringstream::str() const

wstring * std::__cxx11::wstringstream::str(wstring *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  uVar1 = *(ulonglong *)(param_2 + 0x40);
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x30);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::wstring::_M_replace
              (param_1,0,0,*(wstring **)(param_2 + 0x38),
               (longlong)(uVar3 - (longlong)*(wstring **)(param_2 + 0x38)) >> 1);
    return param_1;
  }
  __cxx11::wstring::_M_assign(param_1,(wstring *)(param_2 + 0x60));
  return param_1;
}



// std::__cxx11::wstringstream::rdbuf() const

wstringstream * __thiscall std::__cxx11::wstringstream::rdbuf(wstringstream *this)

{
  return this + 0x18;
}



// std::__cxx11::istringstream::str() const

string * std::__cxx11::istringstream::str(string *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  uVar1 = *(ulonglong *)(param_2 + 0x38);
  *(undefined8 *)(param_1 + 8) = 0;
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x28);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::string::_M_replace
              (param_1,0,0,*(string **)(param_2 + 0x30),
               uVar3 - (longlong)*(string **)(param_2 + 0x30));
    return param_1;
  }
  __cxx11::string::_M_assign(param_1,(string *)(param_2 + 0x58));
  return param_1;
}



// std::__cxx11::istringstream::rdbuf() const

istringstream * __thiscall std::__cxx11::istringstream::rdbuf(istringstream *this)

{
  return this + 0x10;
}



// std::__cxx11::wistringstream::str() const

wstring * std::__cxx11::wistringstream::str(wstring *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  uVar1 = *(ulonglong *)(param_2 + 0x38);
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x28);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::wstring::_M_replace
              (param_1,0,0,*(wstring **)(param_2 + 0x30),
               (longlong)(uVar3 - (longlong)*(wstring **)(param_2 + 0x30)) >> 1);
    return param_1;
  }
  __cxx11::wstring::_M_assign(param_1,(wstring *)(param_2 + 0x58));
  return param_1;
}



// std::__cxx11::wistringstream::rdbuf() const

wistringstream * __thiscall std::__cxx11::wistringstream::rdbuf(wistringstream *this)

{
  return this + 0x10;
}



// std::__cxx11::ostringstream::str() const

string * std::__cxx11::ostringstream::str(string *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  uVar1 = *(ulonglong *)(param_2 + 0x30);
  *(undefined8 *)(param_1 + 8) = 0;
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x20);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::string::_M_replace
              (param_1,0,0,*(string **)(param_2 + 0x28),
               uVar3 - (longlong)*(string **)(param_2 + 0x28));
    return param_1;
  }
  __cxx11::string::_M_assign(param_1,(string *)(param_2 + 0x50));
  return param_1;
}



// std::__cxx11::ostringstream::rdbuf() const

ostringstream * __thiscall std::__cxx11::ostringstream::rdbuf(ostringstream *this)

{
  return this + 8;
}



// std::__cxx11::wostringstream::str() const

wstring * std::__cxx11::wostringstream::str(wstring *param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  uVar1 = *(ulonglong *)(param_2 + 0x30);
  if (uVar1 != 0) {
    uVar2 = *(ulonglong *)(param_2 + 0x20);
    uVar3 = uVar1;
    if (uVar1 <= uVar2) {
      uVar3 = uVar2;
    }
    if (uVar2 == 0) {
      uVar3 = uVar1;
    }
    __cxx11::wstring::_M_replace
              (param_1,0,0,*(wstring **)(param_2 + 0x28),
               (longlong)(uVar3 - (longlong)*(wstring **)(param_2 + 0x28)) >> 1);
    return param_1;
  }
  __cxx11::wstring::_M_assign(param_1,(wstring *)(param_2 + 0x50));
  return param_1;
}



// std::__cxx11::wostringstream::rdbuf() const

wostringstream * __thiscall std::__cxx11::wostringstream::rdbuf(wostringstream *this)

{
  return this + 8;
}



// std::__cxx11::collate<char>::_M_compare(char const*, char const*) const

uint __thiscall
std::__cxx11::collate<char>::_M_compare(undefined8 param_1_00,char *param_2,char *param_3)

{
  int iVar1;
  
  iVar1 = strcoll(param_2,param_3);
  return iVar1 >> 0x1e | (uint)(iVar1 != 0);
}



// std::__cxx11::collate<char>::do_compare(char const*, char const*, char const*, char const*) const

uint __thiscall
std::__cxx11::collate<char>::do_compare
          (collate<char> *this,undefined1 *param_1,longlong param_2,undefined1 *param_3,
          longlong param_4)

{
  uint uVar1;
  size_t sVar2;
  char *pcVar3;
  char *pcVar4;
  char *pcVar5;
  char *pcVar6;
  char *local_88;
  longlong local_80;
  char local_78 [16];
  char *local_68;
  longlong local_60;
  char local_58 [24];
  
  local_80 = 0;
  local_88 = local_78;
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)&local_88,param_1,param_2);
  local_60 = 0;
  local_68 = local_58;
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)&local_68,param_3,param_4);
  pcVar5 = local_88 + local_80;
  pcVar6 = local_68 + local_60;
  pcVar4 = local_88;
  pcVar3 = local_68;
  do {
    uVar1 = _M_compare(this,pcVar4,pcVar3);
    if (uVar1 != 0) {
LAB_14003176b:
      if (local_68 != local_58) {
        operator_delete(local_68);
      }
      if (local_88 != local_78) {
        operator_delete(local_88);
      }
      return uVar1;
    }
    sVar2 = strlen(pcVar4);
    pcVar4 = pcVar4 + sVar2;
    sVar2 = strlen(pcVar3);
    pcVar3 = pcVar3 + sVar2;
    if (pcVar5 == pcVar4) {
      if (pcVar6 == pcVar3) goto LAB_14003176b;
      if (pcVar5 == pcVar4) {
        uVar1 = 0xffffffff;
        goto LAB_14003176b;
      }
    }
    if (pcVar6 == pcVar3) {
      uVar1 = 1;
      goto LAB_14003176b;
    }
    pcVar4 = pcVar4 + 1;
    pcVar3 = pcVar3 + 1;
  } while( true );
}



// std::__cxx11::collate<char>::_M_transform(char*, char const*, unsigned long long) const

void __thiscall
std::__cxx11::collate<char>::_M_transform
          (undefined8 param_1_00,char *param_2,char *param_3,size_t param_4)

{
  strxfrm(param_2,param_3,param_4);
  return;
}



// std::__cxx11::collate<char>::do_transform(char const*, char const*) const

string * std::__cxx11::collate<char>::do_transform
                   (string *param_1,undefined8 param_2,undefined1 *param_3,longlong param_4)

{
  size_t sVar1;
  char *pcVar2;
  string *psVar3;
  string *psVar4;
  ulonglong uVar5;
  size_t sVar6;
  char *_Str;
  size_t sVar7;
  char *local_68;
  longlong local_60;
  char local_58 [24];
  
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  *(undefined8 *)(param_1 + 8) = 0;
  local_60 = 0;
  local_68 = local_58;
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)&local_68,param_3,param_4);
  _Str = local_68;
  sVar7 = (param_4 - (longlong)param_3) * 2;
  pcVar2 = local_68 + local_60;
  psVar3 = operator_new__(sVar7);
  while( true ) {
    uVar5 = _M_transform(param_2,(char *)psVar3,_Str,sVar7);
    if (sVar7 <= uVar5) {
      sVar7 = uVar5 + 1;
      if (psVar3 != (string *)0x0) {
        operator_delete__(psVar3);
      }
      psVar3 = operator_new__(sVar7);
      uVar5 = _M_transform(param_2,(char *)psVar3,_Str,sVar7);
    }
    if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < uVar5) break;
    __cxx11::string::_M_append(param_1,psVar3,uVar5);
    sVar6 = strlen(_Str);
    if (pcVar2 == _Str + sVar6) {
      if (psVar3 != (string *)0x0) {
        operator_delete__(psVar3);
      }
      if (local_68 != local_58) {
        operator_delete(local_68);
      }
      return param_1;
    }
    sVar1 = *(size_t *)(param_1 + 8);
    _Str = _Str + sVar6 + 1;
    psVar4 = *(string **)param_1;
    if (param_1 + 0x10 == psVar4) {
      uVar5 = 0xf;
    }
    else {
      uVar5 = *(ulonglong *)(param_1 + 0x10);
    }
    if (uVar5 < sVar1 + 1) {
      __cxx11::string::_M_mutate(param_1,sVar1,0,(undefined1 *)0x0,1);
      psVar4 = *(string **)param_1;
    }
    psVar4[sVar1] = (string)0x0;
    *(size_t *)(param_1 + 8) = sVar1 + 1;
    *(undefined1 *)(*(longlong *)param_1 + 1 + sVar1) = 0;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::collate<char>::hash(char const*, char const*) const

ulonglong __thiscall
std::__cxx11::collate<char>::hash(collate<char> *this,char *param_1,char *param_2)

{
  char cVar1;
  ulonglong uVar2;
  
  if (*(code **)(*(longlong *)this + 0x20) != do_hash) {
                    // WARNING: Could not recover jumptable at 0x000140031a18. Too many branches
                    // WARNING: Treating indirect jump as call
    uVar2 = (**(code **)(*(longlong *)this + 0x20))();
    return uVar2;
  }
  uVar2 = 0;
  if (param_1 < param_2) {
    do {
      cVar1 = *param_1;
      param_1 = param_1 + 1;
      uVar2 = (ulonglong)(((uint)uVar2 << 7 | (uint)uVar2 >> 0x19) + (int)cVar1);
    } while (param_2 != param_1);
  }
  return uVar2;
}



// std::__cxx11::collate<char>::compare(char const*, char const*, char const*, char const*) const

void std::__cxx11::collate<char>::compare(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140031a23. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x10))();
  return;
}



// std::__cxx11::collate<char>::do_hash(char const*, char const*) const

uint __thiscall
std::__cxx11::collate<char>::do_hash(undefined8 param_1_00,char *param_2,char *param_3)

{
  char cVar1;
  uint uVar2;
  
  uVar2 = 0;
  if (param_2 < param_3) {
    do {
      cVar1 = *param_2;
      param_2 = param_2 + 1;
      uVar2 = (uVar2 << 7 | uVar2 >> 0x19) + (int)cVar1;
    } while (param_3 != param_2);
  }
  return uVar2;
}



// std::__cxx11::collate<char>::transform(char const*, char const*) const

undefined8 std::__cxx11::collate<char>::transform(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::__cxx11::collate<wchar_t>::_M_compare(wchar_t const*, wchar_t const*) const

uint __thiscall
std::__cxx11::collate<wchar_t>::_M_compare(undefined8 param_1_00,wchar_t *param_2,wchar_t *param_3)

{
  int iVar1;
  
  iVar1 = wcscoll(param_2,param_3);
  return iVar1 >> 0x1e | (uint)(iVar1 != 0);
}



// std::__cxx11::collate<wchar_t>::do_compare(wchar_t const*, wchar_t const*, wchar_t const*,
// wchar_t const*) const

uint __thiscall
std::__cxx11::collate<wchar_t>::do_compare
          (collate<wchar_t> *this,undefined2 *param_1,longlong param_2,undefined2 *param_3,
          longlong param_4)

{
  wchar_t *pwVar1;
  wchar_t *pwVar2;
  uint uVar3;
  size_t sVar4;
  wchar_t *pwVar5;
  wchar_t *pwVar6;
  wchar_t *local_88;
  longlong local_80;
  wchar_t local_78 [8];
  wchar_t *local_68;
  longlong local_60;
  wchar_t local_58 [12];
  
  local_80 = 0;
  local_88 = local_78;
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            (&local_88,param_1,param_2);
  local_60 = 0;
  local_68 = local_58;
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            (&local_68,param_3,param_4);
  pwVar1 = local_88 + local_80;
  pwVar2 = local_68 + local_60;
  pwVar5 = local_88;
  pwVar6 = local_68;
  do {
    uVar3 = _M_compare(this,pwVar5,pwVar6);
    if (uVar3 != 0) {
LAB_140031b7d:
      if (local_68 != local_58) {
        operator_delete(local_68);
      }
      if (local_88 != local_78) {
        operator_delete(local_88);
      }
      return uVar3;
    }
    sVar4 = wcslen(pwVar5);
    pwVar5 = pwVar5 + sVar4;
    sVar4 = wcslen(pwVar6);
    pwVar6 = pwVar6 + sVar4;
    if (pwVar1 == pwVar5) {
      if (pwVar2 == pwVar6) goto LAB_140031b7d;
      if (pwVar1 == pwVar5) {
        uVar3 = 0xffffffff;
        goto LAB_140031b7d;
      }
    }
    if (pwVar2 == pwVar6) {
      uVar3 = 1;
      goto LAB_140031b7d;
    }
    pwVar5 = pwVar5 + 1;
    pwVar6 = pwVar6 + 1;
  } while( true );
}



// std::__cxx11::collate<wchar_t>::_M_transform(wchar_t*, wchar_t const*, unsigned long long) const

void __thiscall
std::__cxx11::collate<wchar_t>::_M_transform
          (undefined8 param_1_00,wchar_t *param_2,wchar_t *param_3,size_t param_4)

{
  wcsxfrm(param_2,param_3,param_4);
  return;
}



// std::__cxx11::collate<wchar_t>::do_transform(wchar_t const*, wchar_t const*) const

wstring * std::__cxx11::collate<wchar_t>::do_transform
                    (wstring *param_1,undefined8 param_2,undefined2 *param_3,longlong param_4)

{
  wchar_t *pwVar1;
  longlong lVar2;
  wchar_t *pwVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  size_t sVar6;
  wchar_t *_Str;
  ulonglong uVar7;
  wchar_t *local_68;
  longlong local_60;
  wchar_t local_58 [12];
  
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  *(undefined8 *)(param_1 + 8) = 0;
  local_60 = 0;
  local_68 = local_58;
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            (&local_68,param_3,param_4);
  _Str = local_68;
  uVar7 = param_4 - (longlong)param_3;
  pwVar1 = local_68 + local_60;
  if (0x3ffffffffffffffc < uVar7) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  pwVar3 = operator_new__(uVar7 * 2);
  while( true ) {
    uVar5 = _M_transform(param_2,pwVar3,_Str,uVar7);
    if (uVar7 <= uVar5) {
      uVar7 = uVar5 + 1;
      if (pwVar3 != (wchar_t *)0x0) {
        operator_delete__(pwVar3);
      }
      if (0x3ffffffffffffffc < uVar7) {
                    // WARNING: Subroutine does not return
        __cxa_throw_bad_array_new_length();
      }
      pwVar3 = operator_new__(uVar7 * 2);
      uVar5 = _M_transform(param_2,pwVar3,_Str,uVar7);
    }
    if (0x1fffffffffffffffU - *(longlong *)(param_1 + 8) < uVar5) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::append");
    }
    __cxx11::wstring::_M_append(param_1,pwVar3,uVar5);
    sVar6 = wcslen(_Str);
    if (pwVar1 == _Str + sVar6) break;
    lVar2 = *(longlong *)(param_1 + 8);
    pwVar4 = *(wstring **)param_1;
    _Str = _Str + sVar6 + 1;
    if (param_1 + 0x10 == pwVar4) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(param_1 + 0x10);
    }
    if (uVar5 < lVar2 + 1U) {
      __cxx11::wstring::_M_mutate(param_1,lVar2,0,(undefined2 *)0x0,1);
      pwVar4 = *(wstring **)param_1;
    }
    *(undefined2 *)(pwVar4 + lVar2 * 2) = 0;
    *(ulonglong *)(param_1 + 8) = lVar2 + 1U;
    *(undefined2 *)(pwVar4 + lVar2 * 2 + 2) = 0;
  }
  if (pwVar3 != (wchar_t *)0x0) {
    operator_delete__(pwVar3);
  }
  if (local_68 != local_58) {
    operator_delete(local_68);
  }
  return param_1;
}



// std::__cxx11::collate<wchar_t>::hash(wchar_t const*, wchar_t const*) const

ulonglong __thiscall
std::__cxx11::collate<wchar_t>::hash(collate<wchar_t> *this,ushort *param_1,ushort *param_2)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x20) == do_hash) {
    uVar1 = 0;
    for (; param_1 < param_2; param_1 = param_1 + 1) {
      uVar1 = (ulonglong)(((uint)uVar1 << 7 | (uint)uVar1 >> 0x19) + (uint)*param_1);
    }
    return uVar1;
  }
                    // WARNING: Could not recover jumptable at 0x000140031e58. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x20))();
  return uVar1;
}



// std::__cxx11::collate<wchar_t>::compare(wchar_t const*, wchar_t const*, wchar_t const*, wchar_t
// const*) const

void std::__cxx11::collate<wchar_t>::compare(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140031e63. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x10))();
  return;
}



// std::__cxx11::collate<wchar_t>::do_hash(wchar_t const*, wchar_t const*) const

uint __thiscall
std::__cxx11::collate<wchar_t>::do_hash(undefined8 param_1_00,ushort *param_2,ushort *param_3)

{
  uint uVar1;
  
  uVar1 = 0;
  for (; param_2 < param_3; param_2 = param_2 + 1) {
    uVar1 = (uVar1 << 7 | uVar1 >> 0x19) + (uint)*param_2;
  }
  return uVar1;
}



// std::__cxx11::collate<wchar_t>::transform(wchar_t const*, wchar_t const*) const

undefined8 std::__cxx11::collate<wchar_t>::transform(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::__cxx11::messages<char>::_M_convert_to_char(std::__cxx11::string const&) const

undefined8 __thiscall
std::__cxx11::messages<char>::_M_convert_to_char(undefined8 param_1_00,undefined8 *param_2)

{
  return *param_2;
}



// std::__cxx11::messages<char>::_M_convert_from_char(char*) const

longlong * std::__cxx11::messages<char>::_M_convert_from_char(longlong *param_1)

{
  param_1[1] = 0;
  *param_1 = (longlong)(param_1 + 2);
  *(undefined1 *)(param_1 + 2) = 0;
  return param_1;
}



// std::__cxx11::messages<char>::get(int, int, int, std::__cxx11::string const&) const

undefined8 std::__cxx11::messages<char>::get(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))(param_1);
  return param_1;
}



// std::__cxx11::messages<char>::open(std::__cxx11::string const&, std::locale const&) const

undefined8 std::__cxx11::messages<char>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140031f40. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::__cxx11::messages<char>::open(std::__cxx11::string const&, std::locale const&, char const*)
// const

undefined8 std::__cxx11::messages<char>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140031f70. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::__cxx11::messages<char>::close(int) const

void std::__cxx11::messages<char>::close(longlong *param_1)

{
  if (*(code **)(*param_1 + 0x20) == do_close) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140031f98. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x20))();
  return;
}



// std::__cxx11::messages<char>::do_get(int, int, int, std::__cxx11::string const&) const

longlong * std::__cxx11::messages<char>::do_get(longlong *param_1)

{
  ulonglong _Size;
  undefined1 *_Src;
  longlong *_Dst;
  undefined8 *in_stack_00000030;
  ulonglong local_20;
  
  _Size = in_stack_00000030[1];
  _Dst = param_1 + 2;
  *param_1 = (longlong)_Dst;
  _Src = (undefined1 *)*in_stack_00000030;
  local_20 = _Size;
  if (_Size < 0x10) {
    if (_Size == 1) {
      *(undefined1 *)(param_1 + 2) = *_Src;
      goto LAB_140031fd4;
    }
    if (_Size == 0) goto LAB_140031fd4;
  }
  else {
    _Dst = (longlong *)__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,_Src,_Size);
  _Dst = (longlong *)*param_1;
LAB_140031fd4:
  param_1[1] = local_20;
  *(undefined1 *)((longlong)_Dst + local_20) = 0;
  return param_1;
}



// std::__cxx11::messages<char>::do_open(std::__cxx11::string const&, std::locale const&) const

undefined8 std::__cxx11::messages<char>::do_open(void)

{
  return 0;
}



// std::__cxx11::messages<char>::do_close(int) const

void std::__cxx11::messages<char>::do_close(void)

{
  return;
}



// std::__cxx11::messages<wchar_t>::_M_convert_to_char(std::__cxx11::wstring const&) const

undefined8 __thiscall
std::__cxx11::messages<wchar_t>::_M_convert_to_char(undefined8 param_1_00,undefined8 *param_2)

{
  return *param_2;
}



// std::__cxx11::messages<wchar_t>::_M_convert_from_char(char*) const

longlong * std::__cxx11::messages<wchar_t>::_M_convert_from_char(longlong *param_1)

{
  param_1[1] = 0;
  *param_1 = (longlong)(param_1 + 2);
  *(undefined2 *)(param_1 + 2) = 0;
  return param_1;
}



// std::__cxx11::messages<wchar_t>::get(int, int, int, std::__cxx11::wstring const&) const

undefined8 std::__cxx11::messages<wchar_t>::get(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))(param_1);
  return param_1;
}



// std::__cxx11::messages<wchar_t>::open(std::__cxx11::string const&, std::locale const&) const

undefined8 std::__cxx11::messages<wchar_t>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x0001400320e0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::__cxx11::messages<wchar_t>::open(std::__cxx11::string const&, std::locale const&, char
// const*) const

undefined8 std::__cxx11::messages<wchar_t>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140032110. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::__cxx11::messages<wchar_t>::close(int) const

void std::__cxx11::messages<wchar_t>::close(longlong *param_1)

{
  if (*(code **)(*param_1 + 0x20) == do_close) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140032138. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x20))();
  return;
}



// std::__cxx11::messages<wchar_t>::do_get(int, int, int, std::__cxx11::wstring const&) const

longlong * std::__cxx11::messages<wchar_t>::do_get(longlong *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  longlong *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  undefined8 *in_stack_00000030;
  ulonglong local_30 [2];
  
  _Size = in_stack_00000030[1] * 2;
  _Dst = param_1 + 2;
  *param_1 = (longlong)_Dst;
  _Src = (undefined2 *)*in_stack_00000030;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    if (uVar2 == 1) {
      *(undefined2 *)(param_1 + 2) = *_Src;
      lVar1 = 2;
      goto LAB_1400321c0;
    }
  }
  else {
    _Dst = (longlong *)__cxx11::wstring::_M_create(param_1,local_30,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = (longlong *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_1400321c0:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return param_1;
}



// std::__cxx11::messages<wchar_t>::do_open(std::__cxx11::string const&, std::locale const&) const

undefined8 std::__cxx11::messages<wchar_t>::do_open(void)

{
  return 0;
}



// std::__cxx11::messages<wchar_t>::do_close(int) const

void std::__cxx11::messages<wchar_t>::do_close(void)

{
  return;
}



// std::__cxx11::numpunct<char>::do_grouping() const

longlong * std::__cxx11::numpunct<char>::do_grouping(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<char>::do_truename() const

longlong * std::__cxx11::numpunct<char>::do_truename(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<char>::do_falsename() const

longlong * std::__cxx11::numpunct<char>::do_falsename(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<char>::decimal_point() const

ulonglong __thiscall std::__cxx11::numpunct<char>::decimal_point(numpunct<char> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x48);
  }
                    // WARNING: Could not recover jumptable at 0x000140032320. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::numpunct<char>::thousands_sep() const

ulonglong __thiscall std::__cxx11::numpunct<char>::thousands_sep(numpunct<char> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x49);
  }
                    // WARNING: Could not recover jumptable at 0x000140032350. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::__cxx11::numpunct<char>::do_decimal_point() const

undefined1 __thiscall std::__cxx11::numpunct<char>::do_decimal_point(numpunct<char> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x48);
}



// std::__cxx11::numpunct<char>::do_thousands_sep() const

undefined1 __thiscall std::__cxx11::numpunct<char>::do_thousands_sep(numpunct<char> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x49);
}



// std::__cxx11::numpunct<char>::grouping() const

longlong * std::__cxx11::numpunct<char>::grouping(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x20) != do_grouping) {
    (**(code **)(*param_2 + 0x20))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<char>::truename() const

longlong * std::__cxx11::numpunct<char>::truename(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x28) != do_truename) {
    (**(code **)(*param_2 + 0x28))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<char>::falsename() const

longlong * std::__cxx11::numpunct<char>::falsename(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x30) != do_falsename) {
    (**(code **)(*param_2 + 0x30))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<wchar_t>::do_grouping() const

longlong * std::__cxx11::numpunct<wchar_t>::do_grouping(longlong *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<wchar_t>::do_truename() const

longlong * std::__cxx11::numpunct<wchar_t>::do_truename(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<wchar_t>::do_falsename() const

longlong * std::__cxx11::numpunct<wchar_t>::do_falsename(longlong *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<wchar_t>::decimal_point() const

ulonglong __thiscall std::__cxx11::numpunct<wchar_t>::decimal_point(numpunct<wchar_t> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x48);
  }
                    // WARNING: Could not recover jumptable at 0x000140032610. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::numpunct<wchar_t>::thousands_sep() const

ulonglong __thiscall std::__cxx11::numpunct<wchar_t>::thousands_sep(numpunct<wchar_t> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x4a);
  }
                    // WARNING: Could not recover jumptable at 0x000140032640. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::__cxx11::numpunct<wchar_t>::do_decimal_point() const

undefined2 __thiscall std::__cxx11::numpunct<wchar_t>::do_decimal_point(numpunct<wchar_t> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x48);
}



// std::__cxx11::numpunct<wchar_t>::do_thousands_sep() const

undefined2 __thiscall std::__cxx11::numpunct<wchar_t>::do_thousands_sep(numpunct<wchar_t> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x4a);
}



// std::__cxx11::numpunct<wchar_t>::grouping() const

longlong * std::__cxx11::numpunct<wchar_t>::grouping(longlong *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x20) != do_grouping) {
    (**(code **)(*param_2 + 0x20))(param_1);
    return param_1;
  }
  _Str = *(char **)(param_2[2] + 0x10);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<wchar_t>::truename() const

longlong * std::__cxx11::numpunct<wchar_t>::truename(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x28) != do_truename) {
    (**(code **)(*param_2 + 0x28))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x28);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::numpunct<wchar_t>::falsename() const

longlong * std::__cxx11::numpunct<wchar_t>::falsename(longlong *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  
  if (*(code **)(*param_2 + 0x30) != do_falsename) {
    (**(code **)(*param_2 + 0x30))(param_1);
    return param_1;
  }
  _Str = *(wchar_t **)(param_2[2] + 0x38);
  *param_1 = (longlong)(param_1 + 2);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
              (param_1,_Str,(longlong)(_Str + sVar1));
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::date_order() const

undefined8 __thiscall std::__cxx11::time_get<>::date_order(time_get<> *this)

{
  undefined8 uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_date_order) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140032810. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_date(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::__cxx11::time_get<>::do_get_date
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  int iVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(char **)(plVar7[2] + 0x10),(uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_time(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::__cxx11::time_get<>::do_get_time
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  int iVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_4c = 0;
    local_54 = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(char **)(plVar7[2] + 0x20),(uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_year(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::__cxx11::time_get<>::do_get_year
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  byte bVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong *plVar5;
  byte bVar6;
  int iVar7;
  int iVar8;
  uint uVar9;
  longlong lVar10;
  ulonglong uVar11;
  longlong *plVar12;
  bool bVar13;
  ulonglong uVar14;
  bool bVar15;
  longlong *plVar16;
  bool bVar17;
  bool bVar18;
  bool local_9a;
  bool local_98;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  int local_50;
  uint local_4c [3];
  
  plVar16 = (longlong *)*param_4;
  uVar2 = *param_3;
  uVar3 = param_3[1];
  lVar4 = param_4[1];
  local_4c[0] = 0;
  lVar10 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar5 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar10 * 8);
  if (plVar5 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_88 = plVar16;
  local_80 = lVar4;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_num(&local_68,param_2,&local_78,&local_88,&local_50,0,99,2,param_5,local_4c);
  uVar9 = (uint)local_60;
  uVar14 = local_60 & 0xffffffff;
  bVar17 = (int)lVar4 == -1;
  bVar15 = plVar16 != (longlong *)0x0 && bVar17;
  plVar12 = local_68;
  if (local_4c[0] == 0) {
    bVar18 = uVar9 == 0xffffffff;
    bVar13 = local_68 != (longlong *)0x0 && bVar18;
    local_9a = bVar18;
    if (((bVar13) && (local_9a = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) &&
       (iVar7 = (**(code **)(*local_68 + 0x48))(local_68), iVar7 == -1)) {
      plVar12 = (longlong *)0x0;
      bVar13 = false;
      local_9a = true;
    }
    uVar14 = local_60 & 0xffffffff;
    local_98 = bVar17;
    if ((bVar15) && (local_98 = false, (ulonglong)plVar16[3] <= (ulonglong)plVar16[2])) {
      iVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
      local_98 = false;
      if (iVar7 == -1) {
        plVar16 = (longlong *)0x0;
        bVar15 = false;
        local_98 = true;
      }
    }
    if (local_9a == local_98) {
LAB_140032dba:
      if (local_50 < 0x45) {
        local_50 = local_50 + 100;
      }
      *(int *)(param_7 + 0x14) = local_50;
    }
    else {
      if (bVar13 == false) {
LAB_140032e79:
        bVar6 = (byte)uVar9;
        uVar9 = uVar9 & 0xff;
      }
      else if ((byte *)plVar12[2] < (byte *)plVar12[3]) {
        bVar6 = *(byte *)plVar12[2];
        uVar9 = (uint)bVar6;
      }
      else {
        uVar9 = (**(code **)(*plVar12 + 0x48))(plVar12);
        if (uVar9 != 0xffffffff) goto LAB_140032e79;
        uVar9 = 0xff;
        bVar6 = 0xff;
        plVar12 = (longlong *)0x0;
      }
      bVar1 = *(byte *)((longlong)plVar5 + (longlong)(int)uVar9 + 0x139);
      if (bVar1 == 0) {
        if (*(code **)(*plVar5 + 0x40) != ctype<char>::do_narrow) {
          bVar6 = (**(code **)(*plVar5 + 0x40))(plVar5,(int)(char)bVar6,0x2a);
        }
        if (bVar6 == 0x2a) {
          bVar13 = plVar12 != (longlong *)0x0 && bVar18;
          goto LAB_140032dba;
        }
        *(byte *)((longlong)plVar5 + (longlong)(int)uVar9 + 0x139) = bVar6;
        bVar1 = bVar6;
      }
      if (9 < (byte)(bVar1 - 0x30)) {
        bVar13 = plVar12 != (longlong *)0x0 && bVar18;
        goto LAB_140032dba;
      }
      uVar14 = plVar12[3];
      iVar7 = (char)bVar1 + -0x30 + local_50 * 10;
      if ((ulonglong)plVar12[2] < uVar14) {
        uVar11 = plVar12[2] + 1;
        plVar12[2] = uVar11;
      }
      else {
        (**(code **)(*plVar12 + 0x50))(plVar12);
        uVar11 = plVar12[2];
        uVar14 = plVar12[3];
      }
      local_50 = iVar7;
      if ((uVar11 < uVar14) || (iVar8 = (**(code **)(*plVar12 + 0x48))(plVar12), iVar8 != -1)) {
        bVar13 = false;
      }
      else {
        bVar13 = true;
        plVar12 = (longlong *)0x0;
      }
      bVar18 = bVar17;
      if (((bVar15 != false) && (bVar18 = false, (ulonglong)plVar16[3] <= (ulonglong)plVar16[2])) &&
         (iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar8 == -1)) {
        plVar16 = (longlong *)0x0;
        bVar18 = bVar15;
        bVar15 = false;
      }
      if (bVar18 == bVar13) {
        bVar13 = plVar12 != (longlong *)0x0;
      }
      else {
        if (plVar12 == (longlong *)0x0) {
LAB_1400331e8:
          bVar13 = false;
          uVar9 = 0xff;
          bVar6 = 0xff;
          plVar12 = (longlong *)0x0;
        }
        else if ((byte *)plVar12[2] < (byte *)plVar12[3]) {
          bVar6 = *(byte *)plVar12[2];
          uVar9 = (uint)bVar6;
          bVar13 = true;
        }
        else {
          uVar9 = (**(code **)(*plVar12 + 0x48))(plVar12);
          if (uVar9 == 0xffffffff) goto LAB_1400331e8;
          bVar6 = (byte)uVar9;
          uVar9 = uVar9 & 0xff;
          bVar13 = true;
        }
        bVar1 = *(byte *)((longlong)plVar5 + (longlong)(int)uVar9 + 0x139);
        if (bVar1 == 0) {
          if (*(code **)(*plVar5 + 0x40) != ctype<char>::do_narrow) {
            bVar6 = (**(code **)(*plVar5 + 0x40))(plVar5,(int)(char)bVar6,0x2a);
          }
          if (bVar6 == 0x2a) goto LAB_140032f1f;
          *(byte *)((longlong)plVar5 + (longlong)(int)uVar9 + 0x139) = bVar6;
          bVar1 = bVar6;
        }
        if ((byte)(bVar1 - 0x30) < 10) {
          if ((ulonglong)plVar12[2] < (ulonglong)plVar12[3]) {
            plVar12[2] = plVar12[2] + 1;
          }
          else {
            (**(code **)(*plVar12 + 0x50))(plVar12);
          }
          local_50 = (char)bVar1 + -0x30 + iVar7 * 10;
        }
      }
LAB_140032f1f:
      local_50 = local_50 + -0x76c;
      bVar18 = true;
      uVar14 = 0xffffffff;
      *(int *)(param_7 + 0x14) = local_50;
    }
    if (bVar13 == false) goto LAB_140032d33;
  }
  else {
    *param_6 = *param_6 | 4;
    bVar18 = uVar9 == 0xffffffff;
    bVar13 = local_68 != (longlong *)0x0 && bVar18;
    if (local_68 == (longlong *)0x0 || !bVar18) goto LAB_140032d33;
  }
  bVar18 = false;
  if ((ulonglong)plVar12[3] <= (ulonglong)plVar12[2]) {
    iVar7 = (**(code **)(*plVar12 + 0x48))(plVar12);
    bVar18 = false;
    if (iVar7 == -1) {
      plVar12 = (longlong *)0x0;
      bVar18 = bVar13;
    }
  }
LAB_140032d33:
  if ((bVar15 != false) && (bVar17 = false, (ulonglong)plVar16[3] <= (ulonglong)plVar16[2])) {
    iVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
    bVar17 = iVar7 == -1;
  }
  if (bVar18 == bVar17) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar12;
  param_1[1] = uVar3 & 0xffffffff00000000 | uVar14;
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_weekday(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::__cxx11::time_get<>::get_weekday
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x28))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_date_order() const

undefined8 std::__cxx11::time_get<>::do_date_order(void)

{
  return 0;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_monthname(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::__cxx11::time_get<>::get_monthname
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x30))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_num(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, int&, int, int, unsigned long long,
// std::ios_base&, std::_Ios_Iostate&) const

undefined8 *
std::__cxx11::time_get<>::_M_extract_num
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          int *param_5,int param_6,int param_7,ulonglong param_8,longlong param_9,uint *param_10)

{
  char cVar1;
  byte bVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  longlong *plVar5;
  char cVar6;
  int iVar7;
  uint uVar8;
  longlong lVar9;
  ulonglong uVar10;
  longlong *plVar11;
  ulonglong uVar12;
  longlong *plVar13;
  int iVar14;
  ulonglong uVar15;
  bool bVar16;
  bool bVar17;
  bool bVar18;
  
  uVar3 = param_3[1];
  uVar4 = param_4[1];
  plVar11 = (longlong *)*param_3;
  plVar13 = (longlong *)*param_4;
  uVar12 = uVar3 & 0xffffffff;
  lVar9 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar5 = *(longlong **)(*(longlong *)(*(longlong *)(param_9 + 0xd0) + 8) + lVar9 * 8);
  if (plVar5 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  bVar16 = (int)uVar4 == -1;
  iVar14 = 0;
  uVar15 = 0;
  while( true ) {
    bVar17 = (uint)uVar12 == 0xffffffff;
    bVar18 = bVar17;
    if (plVar11 != (longlong *)0x0 && bVar17) {
      if ((ulonglong)plVar11[2] < (ulonglong)plVar11[3]) {
        bVar18 = false;
      }
      else {
        iVar7 = (**(code **)(*plVar11 + 0x48))(plVar11);
        bVar18 = iVar7 == -1;
        if (bVar18) {
          plVar11 = (longlong *)0x0;
        }
      }
    }
    if ((plVar13 == (longlong *)0x0) || (!bVar16)) {
      bVar18 = (bool)(bVar18 ^ bVar16);
    }
    else if (((ulonglong)plVar13[3] <= (ulonglong)plVar13[2]) &&
            (iVar7 = (**(code **)(*plVar13 + 0x48))(plVar13), iVar7 == -1)) {
      bVar18 = (bool)(bVar18 ^ 1);
      plVar13 = (longlong *)0x0;
    }
    if ((param_8 <= uVar15) || (!bVar18)) break;
    if ((plVar11 == (longlong *)0x0) || (!bVar17)) {
      uVar8 = (uint)uVar12 & 0xff;
      uVar10 = uVar12;
    }
    else if ((byte *)plVar11[2] < (byte *)plVar11[3]) {
      bVar2 = *(byte *)plVar11[2];
      uVar10 = (ulonglong)bVar2;
      uVar8 = (uint)bVar2;
    }
    else {
      uVar8 = (**(code **)(*plVar11 + 0x48))(plVar11);
      if (uVar8 == 0xffffffff) {
        uVar8 = 0xff;
        uVar10 = 0xffffffff;
        plVar11 = (longlong *)0x0;
      }
      else {
        uVar10 = (ulonglong)uVar8;
        uVar8 = uVar8 & 0xff;
      }
    }
    cVar6 = (char)uVar10;
    cVar1 = *(char *)((longlong)plVar5 + (longlong)(int)uVar8 + 0x139);
    if (cVar1 == '\0') {
      if (*(code **)(*plVar5 + 0x40) != ctype<char>::do_narrow) {
        cVar6 = (**(code **)(*plVar5 + 0x40))(plVar5,(int)cVar6,0x2a);
      }
      if (cVar6 == '*') break;
      *(char *)((longlong)plVar5 + (longlong)(int)uVar8 + 0x139) = cVar6;
      cVar1 = cVar6;
    }
    if (9 < (byte)(cVar1 - 0x30U)) break;
    iVar14 = cVar1 + -0x30 + iVar14 * 10;
    if (param_7 < iVar14) goto LAB_140033527;
    if ((ulonglong)plVar11[2] < (ulonglong)plVar11[3]) {
      plVar11[2] = plVar11[2] + 1;
    }
    else {
      (**(code **)(*plVar11 + 0x50))(plVar11);
    }
    uVar15 = uVar15 + 1;
    uVar12 = 0xffffffff;
  }
  if ((uVar15 != 0 && param_6 <= iVar14) && (iVar14 <= param_7)) {
    *param_5 = iVar14;
    goto LAB_140033532;
  }
LAB_140033527:
  *param_10 = *param_10 | 4;
LAB_140033532:
  param_1[1] = uVar3 & 0xffffffff00000000 | uVar12;
  *param_1 = plVar11;
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_weekday(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::__cxx11::time_get<>::do_get_weekday
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  longlong lVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_118;
  longlong local_110;
  longlong local_108;
  ulonglong local_100;
  longlong *local_f8;
  ulonglong local_f0;
  int local_e0;
  uint local_dc;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  
  lVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_dc = 0;
    uStack_a0 = *(undefined8 *)(lVar5 + 0x58);
    local_98 = *(undefined8 *)(lVar5 + 0x60);
    uStack_90 = *(undefined8 *)(lVar5 + 0x68);
    local_88 = *(undefined8 *)(lVar5 + 0x70);
    uStack_80 = *(undefined8 *)(lVar5 + 0x78);
    local_78 = *(undefined8 *)(lVar5 + 0x80);
    uStack_70 = *(undefined8 *)(lVar5 + 0x88);
    local_d8 = *(undefined8 *)(lVar5 + 0x90);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x98);
    local_c8 = *(undefined8 *)(lVar5 + 0xa0);
    uStack_c0 = *(undefined8 *)(lVar5 + 0xa8);
    local_b8 = *(undefined8 *)(lVar5 + 0xb0);
    uStack_b0 = *(undefined8 *)(lVar5 + 0xb8);
    local_a8 = *(undefined8 *)(lVar5 + 0xc0);
    local_118 = plVar3;
    local_110 = lVar4;
    local_108 = lVar1;
    local_100 = uVar2;
    _M_extract_wday_or_month
              (&local_f8,param_2,&local_108,&local_118,&local_e0,(longlong)&local_d8,7,param_5,
               &local_dc);
    if (local_dc == 0) {
      *(int *)(param_7 + 0x18) = local_e0;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (int)local_f0 == -1;
    plVar8 = local_f8;
    if ((local_f8 != (longlong *)0x0 && bVar9) &&
       (bVar9 = false, (ulonglong)local_f8[3] <= (ulonglong)local_f8[2])) {
      iVar6 = (**(code **)(*local_f8 + 0x48))(local_f8);
      plVar8 = (longlong *)0x0;
      bVar9 = iVar6 == -1;
      if (!bVar9) {
        plVar8 = local_f8;
      }
    }
    bVar10 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar10)) &&
       (bVar10 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar10 = iVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_f0 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_name(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, int&, char const**, unsigned long long,
// std::ios_base&, std::_Ios_Iostate&) const

longlong *
std::__cxx11::time_get<>::_M_extract_name
          (longlong *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          undefined4 *param_5,longlong param_6,ulonglong param_7,longlong param_8,uint *param_9)

{
  ulonglong *puVar1;
  longlong lVar2;
  longlong *plVar3;
  code *pcVar4;
  ulonglong *puVar5;
  char cVar6;
  undefined1 uVar7;
  char cVar8;
  uint uVar9;
  longlong lVar10;
  size_t sVar11;
  ulonglong *puVar12;
  longlong *plVar13;
  byte bVar14;
  int iVar15;
  byte bVar16;
  ulonglong uVar17;
  bool bVar18;
  byte bVar19;
  ulonglong *puVar20;
  ulonglong uVar21;
  ulonglong uVar22;
  char *pcVar23;
  ulonglong uVar24;
  bool bVar25;
  bool bVar26;
  undefined8 auStack_d0 [5];
  ulonglong auStack_a8 [4];
  ulonglong *local_88;
  longlong *local_80;
  longlong *local_78;
  longlong *local_70;
  byte local_65;
  uint local_64;
  ulonglong *local_60;
  ulonglong *local_58;
  longlong *local_50;
  
  auStack_a8[2] = param_3[1];
  plVar13 = (longlong *)*param_4;
  local_58 = (ulonglong *)*param_3;
  lVar2 = param_4[1];
  iVar15 = (int)auStack_a8[2];
  local_50 = (longlong *)CONCAT44(local_50._4_4_,iVar15);
  auStack_d0[0] = 0x140033a7f;
  local_80 = plVar13;
  lVar10 = locale::id::_M_id((id *)&ctype<char>::id);
  puVar20 = local_58;
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar10 * 8);
  if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    auStack_d0[0] = 0x1400345d5;
    __throw_bad_cast();
  }
  auStack_d0[0] = 0x140033aad;
  bVar25 = iVar15 == -1;
  bVar26 = bVar25;
  uVar9 = (uint)local_50;
  if (local_58 != (ulonglong *)0x0 && bVar25) {
    if (local_58[2] < local_58[3]) {
      bVar26 = false;
    }
    else {
      lVar10 = *local_58;
      local_58 = (ulonglong *)CONCAT44(local_58._4_4_,(uint)local_50);
      local_50 = (longlong *)puVar20;
      pcVar4 = *(code **)(lVar10 + 0x48);
      auStack_d0[param_7 * -2] = 0x1400344fe;
      iVar15 = (*pcVar4)(puVar20);
      bVar26 = iVar15 == -1;
      puVar20 = (ulonglong *)local_50;
      uVar9 = (uint)local_58;
      if (bVar26) {
        puVar20 = (ulonglong *)(longlong *)0x0;
      }
    }
  }
  local_65 = (int)lVar2 == -1;
  bVar18 = (bool)local_65;
  if (plVar13 != (longlong *)0x0 && (bool)local_65) {
    if ((ulonglong)plVar13[2] < (ulonglong)plVar13[3]) {
      bVar18 = false;
    }
    else {
      local_50 = (longlong *)CONCAT44(local_50._4_4_,uVar9);
      pcVar4 = *(code **)(*plVar13 + 0x48);
      local_58 = puVar20;
      auStack_d0[param_7 * -2] = 0x1400344c8;
      iVar15 = (*pcVar4)(plVar13);
      uVar9 = (uint)local_50;
      local_80 = (longlong *)0x0;
      if (iVar15 != -1) {
        local_80 = plVar13;
      }
      puVar20 = local_58;
      bVar18 = iVar15 == -1;
    }
  }
  if (bVar26 != bVar18) {
    if ((puVar20 == (ulonglong *)0x0) || (!bVar25)) {
      cVar8 = (char)uVar9;
      local_58 = puVar20;
    }
    else if ((char *)puVar20[2] < (char *)puVar20[3]) {
      cVar8 = *(char *)puVar20[2];
      local_58 = puVar20;
    }
    else {
      local_58 = (ulonglong *)CONCAT44(local_58._4_4_,uVar9);
      pcVar4 = *(code **)(*puVar20 + 0x48);
      local_50 = (longlong *)puVar20;
      auStack_d0[param_7 * -2] = 0x140034583;
      iVar15 = (*pcVar4)(puVar20);
      uVar9 = (uint)local_58;
      cVar8 = (char)iVar15;
      local_58 = (ulonglong *)local_50;
      if (iVar15 == -1) {
        cVar8 = -1;
        local_58 = (ulonglong *)0x0;
      }
    }
    local_50 = (longlong *)CONCAT44(local_50._4_4_,uVar9);
    pcVar4 = *(code **)(*plVar3 + 0x20);
    auStack_d0[param_7 * -2] = 0x140033b60;
    cVar6 = (*pcVar4)(plVar3,(int)cVar8);
    pcVar4 = *(code **)(*plVar3 + 0x10);
    auStack_d0[param_7 * -2] = 0x140033b6d;
    uVar7 = (*pcVar4)(plVar3,(int)cVar8);
    local_64 = (uint)local_50;
    puVar20 = local_58;
    uVar9 = (uint)local_50;
    if (param_7 != 0) {
      local_60 = auStack_a8 + param_7 * -2 + param_7;
      local_50 = (longlong *)CONCAT71(local_50._1_7_,uVar7);
      local_70 = (longlong *)local_58;
      uVar17 = 0;
      uVar21 = 0;
      local_58 = auStack_a8 + param_7 * -2;
      do {
        while( true ) {
          uVar22 = uVar17;
          cVar8 = **(char **)(param_6 + uVar22 * 8);
          pcVar4 = *(code **)(*plVar3 + 0x20);
          auStack_d0[param_7 * -2] = 0x140033be0;
          cVar8 = (*pcVar4)(plVar3,(int)cVar8);
          if (cVar6 != cVar8) break;
LAB_140033be5:
          pcVar23 = *(char **)(param_6 + uVar22 * 8);
          auStack_d0[param_7 * -2] = 0x140033bf6;
          sVar11 = strlen(pcVar23);
          local_60[uVar21] = sVar11;
          uVar24 = uVar21 + 1;
          local_58[uVar21] = uVar22;
          uVar17 = uVar22 + 1;
          uVar21 = uVar24;
          if (param_7 == uVar22 + 1) goto LAB_140033c13;
        }
        cVar8 = **(char **)(param_6 + uVar22 * 8);
        pcVar4 = *(code **)(*plVar3 + 0x10);
        auStack_d0[param_7 * -2] = 0x140033bc1;
        cVar8 = (*pcVar4)(plVar3,(int)cVar8);
        if ((char)local_50 == cVar8) goto LAB_140033be5;
        uVar17 = uVar22 + 1;
      } while (param_7 != uVar22 + 1);
LAB_140033c13:
      puVar5 = local_58;
      puVar20 = (ulonglong *)local_70;
      if (1 < uVar21) {
        local_50 = (longlong *)0x0;
        uVar17 = *local_60;
        local_88 = local_60 + 1;
        auStack_a8[3] = uVar22 + 1;
        local_70 = (longlong *)(uVar21 * 8);
LAB_140033c60:
        puVar12 = local_88;
        uVar22 = uVar17;
        if (((int)(ulonglong *)((longlong)local_70 + (longlong)local_60) - (int)local_88 & 8U) == 0)
        goto LAB_140033ca0;
        uVar22 = *local_88;
        puVar12 = local_60;
        if (uVar17 <= *local_88) {
          uVar22 = uVar17;
        }
        while (puVar12 = puVar12 + 2,
              (ulonglong *)((longlong)local_70 + (longlong)local_60) != puVar12) {
LAB_140033ca0:
          if (*puVar12 < uVar22) {
            uVar22 = *puVar12;
          }
          if (puVar12[1] < uVar22) {
            uVar22 = puVar12[1];
          }
        }
        local_50 = (longlong *)((longlong)local_50 + 1);
        if (puVar20[2] < puVar20[3]) {
          puVar20[2] = puVar20[2] + 1;
        }
        else {
          pcVar4 = *(code **)(*puVar20 + 0x50);
          auStack_d0[param_7 * -2] = 0x140033ff9;
          (*pcVar4)(puVar20);
        }
        if (local_50 == (longlong *)uVar22) {
          if (puVar20[2] < puVar20[3]) {
LAB_140034011:
            bVar19 = 0;
          }
          else {
            pcVar4 = *(code **)(*puVar20 + 0x48);
            auStack_d0[param_7 * -2] = 0x14003455c;
            iVar15 = (*pcVar4)(puVar20);
            if (iVar15 != -1) goto LAB_140034011;
            bVar19 = 1;
            puVar20 = (ulonglong *)0x0;
          }
          plVar13 = local_80;
          bVar14 = local_80 != (longlong *)0x0 & local_65;
          local_80 = plVar13;
          bVar16 = local_65;
          if (bVar14 != 0) {
            if ((ulonglong)local_80[2] < (ulonglong)local_80[3]) {
              bVar16 = 0;
            }
            else {
              local_64 = CONCAT31(local_64._1_3_,bVar19);
              local_58 = (ulonglong *)CONCAT71(local_58._1_7_,bVar14);
              pcVar4 = *(code **)(*local_80 + 0x48);
              auStack_d0[param_7 * -2] = 0x14003452d;
              iVar15 = (*pcVar4)(plVar13);
              local_80 = (longlong *)0x0;
              bVar16 = (byte)local_58;
              bVar19 = (byte)local_64;
              if (iVar15 != -1) {
                bVar16 = 0;
                local_80 = plVar13;
              }
            }
          }
          bVar26 = false;
          if (bVar16 == bVar19) goto LAB_1400340f9;
          if (puVar20 == (ulonglong *)0x0) {
LAB_1400342c9:
            puVar20 = (ulonglong *)0x0;
            pcVar4 = *(code **)(*plVar3 + 0x20);
            auStack_d0[param_7 * -2] = 0x1400342da;
            uVar7 = (*pcVar4)(plVar3,0xffffffff);
            iVar15 = -1;
            local_64 = CONCAT31(local_64._1_3_,uVar7);
          }
          else {
            if ((byte *)puVar20[2] < (byte *)puVar20[3]) {
              uVar9 = (uint)*(byte *)puVar20[2];
            }
            else {
              pcVar4 = *(code **)(*puVar20 + 0x48);
              auStack_d0[param_7 * -2] = 0x1400342c0;
              uVar9 = (*pcVar4)(puVar20);
              if (uVar9 == 0xffffffff) goto LAB_1400342c9;
            }
            pcVar4 = *(code **)(*plVar3 + 0x20);
            auStack_d0[param_7 * -2] = 0x14003405d;
            uVar7 = (*pcVar4)(plVar3,(int)(char)uVar9);
            local_64 = CONCAT31(local_64._1_3_,uVar7);
            if ((char *)puVar20[2] < (char *)puVar20[3]) {
              iVar15 = (int)*(char *)puVar20[2];
            }
            else {
              pcVar4 = *(code **)(*puVar20 + 0x48);
              auStack_d0[param_7 * -2] = 0x1400344a4;
              iVar15 = (*pcVar4)(puVar20);
              if (iVar15 == -1) {
                puVar20 = (ulonglong *)0x0;
                iVar15 = -1;
              }
              else {
                iVar15 = (int)(char)iVar15;
              }
            }
          }
          uVar22 = 0;
          pcVar4 = *(code **)(*plVar3 + 0x10);
          auStack_d0[param_7 * -2] = 0x14003407e;
          uVar7 = (*pcVar4)(plVar3,iVar15);
          plVar13 = local_50;
          puVar12 = local_60;
          local_58 = (ulonglong *)CONCAT71(local_58._1_7_,uVar7);
          auStack_a8[1] = uVar17;
          local_78 = (longlong *)puVar20;
          do {
            if (plVar13 < puVar12[uVar22]) {
              pcVar23 = (char *)(*(longlong *)(param_6 + puVar5[uVar22] * 8) + (longlong)plVar13);
              cVar8 = *pcVar23;
              pcVar4 = *(code **)(*plVar3 + 0x20);
              auStack_d0[param_7 * -2] = 0x1400340c3;
              cVar8 = (*pcVar4)(plVar3,(int)cVar8);
              if (cVar8 != (byte)local_64) {
                cVar8 = *pcVar23;
                pcVar4 = *(code **)(*plVar3 + 0x10);
                auStack_d0[param_7 * -2] = 0x1400340d9;
                cVar8 = (*pcVar4)(plVar3,(int)cVar8);
                if ((byte)local_58 != cVar8) goto LAB_1400340e2;
              }
              bVar26 = true;
              uVar17 = auStack_a8[1];
              puVar20 = (ulonglong *)local_78;
              goto LAB_1400340f9;
            }
LAB_1400340e2:
            uVar22 = uVar22 + 1;
          } while (uVar22 != uVar21);
          bVar26 = false;
          uVar17 = auStack_a8[1];
          puVar20 = (ulonglong *)local_78;
LAB_1400340f9:
          puVar12 = local_60;
          uVar22 = 0;
          plVar13 = local_70;
          do {
            if ((local_50 == (longlong *)uVar17) == bVar26) {
              uVar21 = uVar21 - 1;
              plVar13 = (longlong *)(uVar21 * 8);
              puVar5[uVar22] = puVar5[uVar21];
              local_60[uVar22] = local_60[uVar21];
              if (uVar21 <= uVar22) goto LAB_140034149;
            }
            else {
              uVar22 = uVar22 + 1;
              if (uVar21 <= uVar22) goto LAB_140034149;
            }
            uVar17 = local_60[uVar22];
          } while( true );
        }
        if (local_50 < uVar22) {
          if (puVar20[3] <= puVar20[2]) goto LAB_1400341d7;
          goto LAB_140033cfa;
        }
        goto LAB_140034203;
      }
      plVar13 = (longlong *)0x0;
      uVar9 = local_64;
      goto LAB_140033e9d;
    }
  }
LAB_140033afb:
  *param_9 = *param_9 | 4;
LAB_140033b05:
  param_1[1] = auStack_a8[2] & 0xffffffff00000000 | (ulonglong)uVar9;
  *param_1 = (longlong)puVar20;
  return param_1;
LAB_140034149:
  local_70 = plVar13;
  if (bVar26 == false) {
    if (uVar21 != 2) {
      if (uVar21 == 1) goto LAB_140033ec1;
      goto LAB_140034203;
    }
    if ((auStack_a8[3] & 1) != 0) goto LAB_140034203;
    uVar17 = *puVar5;
    uVar21 = auStack_a8[3] >> 1;
    if (uVar17 < uVar21) {
      if (uVar21 + uVar17 == puVar5[1]) goto LAB_140033ec5;
      goto LAB_140034203;
    }
    uVar9 = 0xffffffff;
    if (uVar17 - uVar21 != puVar5[1]) goto LAB_140033afb;
    *puVar5 = uVar17 - uVar21;
    *puVar12 = puVar12[1];
    uVar17 = *puVar5;
    goto LAB_140033ec5;
  }
  uVar17 = *local_60;
  if (1 < uVar21) {
    puVar1 = (ulonglong *)((longlong)local_60 + (longlong)plVar13);
    puVar12 = local_88;
    if (((int)puVar1 - (int)local_88 & 8U) != 0) {
      if (*local_88 < uVar17) {
        uVar17 = *local_88;
      }
      puVar12 = local_60 + 2;
      if (puVar12 == puVar1) goto LAB_1400341b6;
    }
    do {
      if (*puVar12 < uVar17) {
        uVar17 = *puVar12;
      }
      if (puVar12[1] < uVar17) {
        uVar17 = puVar12[1];
      }
      puVar12 = puVar12 + 2;
    } while (puVar12 != puVar1);
  }
LAB_1400341b6:
  if (uVar17 <= local_50) goto LAB_140033e8d;
  if (puVar20 != (ulonglong *)0x0) {
    if (puVar20[3] <= puVar20[2]) {
LAB_1400341d7:
      pcVar4 = *(code **)(*puVar20 + 0x48);
      auStack_d0[param_7 * -2] = 0x1400341e0;
      iVar15 = (*pcVar4)(puVar20);
      if (iVar15 == -1) {
        bVar26 = true;
        puVar20 = (ulonglong *)0x0;
        goto LAB_140033cfd;
      }
    }
LAB_140033cfa:
    bVar26 = false;
  }
LAB_140033cfd:
  plVar13 = local_80;
  bVar16 = local_80 != (longlong *)0x0 & local_65;
  local_80 = plVar13;
  bVar19 = local_65;
  if (bVar16 == 0) {
LAB_140033d12:
    if ((bool)bVar19 == bVar26) goto LAB_140033e8d;
  }
  else {
    if ((ulonglong)local_80[3] <= (ulonglong)local_80[2]) {
      pcVar4 = *(code **)(*local_80 + 0x48);
      auStack_d0[param_7 * -2] = 0x1400342f3;
      iVar15 = (*pcVar4)(plVar13);
      local_80 = (longlong *)0x0;
      bVar19 = bVar16;
      if (iVar15 != -1) {
        local_80 = plVar13;
        bVar19 = 0;
      }
      goto LAB_140033d12;
    }
    if (bVar26 == false) goto LAB_140033e8d;
  }
  if (puVar20 == (ulonglong *)0x0) {
LAB_140033e30:
    puVar20 = (ulonglong *)0x0;
    pcVar4 = *(code **)(*plVar3 + 0x20);
    auStack_d0[param_7 * -2] = 0x140033e41;
    uVar7 = (*pcVar4)(plVar3,0xffffffff);
    local_58 = (ulonglong *)CONCAT71(local_58._1_7_,uVar7);
    pcVar4 = *(code **)(*plVar3 + 0x10);
    auStack_d0[param_7 * -2] = 0x140033e53;
    uVar7 = (*pcVar4)(plVar3,0xffffffff);
  }
  else {
    if ((char *)puVar20[2] < (char *)puVar20[3]) {
      cVar8 = *(char *)puVar20[2];
    }
    else {
      pcVar4 = *(code **)(*puVar20 + 0x48);
      auStack_d0[param_7 * -2] = 0x140033e1b;
      iVar15 = (*pcVar4)(puVar20);
      cVar8 = (char)iVar15;
      if (iVar15 == -1) goto LAB_140033e30;
    }
    pcVar4 = *(code **)(*plVar3 + 0x20);
    auStack_d0[param_7 * -2] = 0x140033d42;
    uVar7 = (*pcVar4)(plVar3,(int)cVar8);
    local_58 = (ulonglong *)CONCAT71(local_58._1_7_,uVar7);
    if ((char *)puVar20[2] < (char *)puVar20[3]) {
      iVar15 = (int)*(char *)puVar20[2];
    }
    else {
      pcVar4 = *(code **)(*puVar20 + 0x48);
      auStack_d0[param_7 * -2] = 0x140034319;
      iVar15 = (*pcVar4)(puVar20);
      if (iVar15 == -1) {
        puVar20 = (ulonglong *)0x0;
        iVar15 = -1;
      }
      else {
        iVar15 = (int)(char)iVar15;
      }
    }
    pcVar4 = *(code **)(*plVar3 + 0x10);
    auStack_d0[param_7 * -2] = 0x140033d60;
    uVar7 = (*pcVar4)(plVar3,iVar15);
  }
  if (uVar21 == 0) {
    uVar9 = 0xffffffff;
    goto LAB_140033afb;
  }
  uVar17 = 0;
  local_64._1_3_ = (undefined3)(local_64 >> 8);
  local_64 = CONCAT31(local_64._1_3_,uVar7);
  local_78 = (longlong *)puVar20;
  do {
    while( true ) {
      pcVar23 = (char *)((longlong)local_50 + *(longlong *)(param_6 + puVar5[uVar17] * 8));
      cVar8 = *pcVar23;
      pcVar4 = *(code **)(*plVar3 + 0x20);
      auStack_d0[param_7 * -2] = 0x140033de4;
      cVar8 = (*pcVar4)(plVar3,(int)cVar8);
      if ((byte)local_58 != cVar8) break;
LAB_140033de9:
      uVar17 = uVar17 + 1;
      if (uVar21 <= uVar17) goto LAB_140033df2;
    }
    cVar8 = *pcVar23;
    pcVar4 = *(code **)(*plVar3 + 0x10);
    auStack_d0[param_7 * -2] = 0x140033d8e;
    cVar8 = (*pcVar4)(plVar3,(int)cVar8);
    if ((byte)local_64 == cVar8) goto LAB_140033de9;
    uVar21 = uVar21 - 1;
    puVar5[uVar17] = puVar5[uVar21];
    local_60[uVar17] = local_60[uVar21];
    local_70 = (longlong *)(uVar21 * 8);
  } while (uVar17 < uVar21);
LAB_140033df2:
  puVar20 = (ulonglong *)local_78;
  if (uVar21 < 2) goto LAB_140033e8d;
  uVar17 = *local_60;
  goto LAB_140033c60;
LAB_140033e8d:
  plVar13 = local_50;
  uVar9 = 0xffffffff;
LAB_140033e9d:
  if (uVar21 == 1) {
    if (puVar20[2] < puVar20[3]) {
      puVar20[2] = puVar20[2] + 1;
    }
    else {
      pcVar4 = *(code **)(*puVar20 + 0x50);
      local_50 = (longlong *)puVar20;
      auStack_d0[param_7 * -2] = 0x140034392;
      (*pcVar4)(puVar20);
      puVar20 = (ulonglong *)local_50;
    }
    local_50 = (longlong *)((longlong)plVar13 + 1);
LAB_140033ec1:
    uVar17 = *puVar5;
LAB_140033ec5:
    lVar2 = *(longlong *)(param_6 + uVar17 * 8);
    uVar21 = *local_60;
    uVar22 = (ulonglong)local_50;
    if (local_50 < uVar21) {
      if (puVar20 != (ulonglong *)0x0) goto LAB_140033f91;
LAB_140033eec:
      bVar14 = 1;
      bVar16 = local_80 != (longlong *)0x0 & local_65;
      uVar22 = (ulonglong)local_50;
      local_50 = (longlong *)puVar20;
      bVar19 = local_65;
      if (bVar16 != 0) goto LAB_140033fb5;
LAB_140033f03:
      puVar20 = (ulonglong *)local_50;
      if (bVar14 != bVar19) {
        do {
          cVar8 = *(char *)(lVar2 + uVar22);
          pcVar4 = *(code **)(*plVar3 + 0x20);
          auStack_d0[param_7 * -2] = 0x140033f1e;
          cVar8 = (*pcVar4)(plVar3,(int)cVar8);
          plVar13 = local_50;
          if (local_50 == (longlong *)0x0) {
LAB_140033f2d:
            pcVar4 = *(code **)(*plVar3 + 0x20);
            auStack_d0[param_7 * -2] = 0x140033f3b;
            cVar6 = (*pcVar4)(plVar3,0xffffffff);
            if (cVar8 != cVar6) {
              cVar8 = *(char *)(lVar2 + uVar22);
              pcVar4 = *(code **)(*plVar3 + 0x10);
              auStack_d0[param_7 * -2] = 0x140033f52;
              cVar8 = (*pcVar4)(plVar3,(int)cVar8);
              iVar15 = -1;
              local_50 = (longlong *)0x0;
LAB_140033f5c:
              pcVar4 = *(code **)(*plVar3 + 0x10);
              auStack_d0[param_7 * -2] = 0x140033f69;
              cVar6 = (*pcVar4)(plVar3,iVar15);
              puVar20 = (ulonglong *)local_50;
              if (cVar8 == cVar6) goto LAB_140033f72;
              break;
            }
            puVar20 = (ulonglong *)0x0;
            uVar24 = _DAT_00000010;
            if (uRam0000000000000018 <= _DAT_00000010) goto LAB_14003421f;
LAB_140033f80:
            puVar20[2] = uVar24 + 1;
          }
          else {
            if ((char *)local_50[2] < (char *)local_50[3]) {
              cVar6 = *(char *)local_50[2];
            }
            else {
              pcVar4 = *(code **)(*local_50 + 0x48);
              auStack_d0[param_7 * -2] = 0x140034405;
              iVar15 = (*pcVar4)(plVar13);
              if (iVar15 == -1) goto LAB_140033f2d;
              cVar6 = (char)iVar15;
            }
            pcVar4 = *(code **)(*plVar3 + 0x20);
            auStack_d0[param_7 * -2] = 0x140034266;
            cVar6 = (*pcVar4)(plVar3,(int)cVar6);
            if (cVar6 != cVar8) {
              cVar8 = *(char *)(lVar2 + uVar22);
              pcVar4 = *(code **)(*plVar3 + 0x10);
              auStack_d0[param_7 * -2] = 0x140034285;
              cVar8 = (*pcVar4)(plVar3,(int)cVar8);
              plVar13 = local_50;
              if ((char *)local_50[2] < (char *)local_50[3]) {
                iVar15 = (int)*(char *)local_50[2];
              }
              else {
                pcVar4 = *(code **)(*local_50 + 0x48);
                auStack_d0[param_7 * -2] = 0x14003444a;
                iVar15 = (*pcVar4)(plVar13);
                if (iVar15 == -1) {
                  local_50 = (longlong *)0x0;
                  iVar15 = -1;
                }
                else {
                  iVar15 = (int)(char)iVar15;
                }
              }
              goto LAB_140033f5c;
            }
LAB_140033f72:
            uVar24 = local_50[2];
            puVar20 = (ulonglong *)local_50;
            if ((ulonglong)local_50[2] < (ulonglong)local_50[3]) goto LAB_140033f80;
LAB_14003421f:
            pcVar4 = *(code **)(*puVar20 + 0x50);
            local_50 = (longlong *)puVar20;
            auStack_d0[param_7 * -2] = 0x140034230;
            (*pcVar4)(puVar20);
            puVar20 = (ulonglong *)local_50;
          }
          uVar22 = uVar22 + 1;
          if (uVar21 == uVar22) goto LAB_140033fdb;
LAB_140033f91:
          local_50 = (longlong *)puVar20;
          if (puVar20[3] <= puVar20[2]) {
            pcVar4 = *(code **)(*puVar20 + 0x48);
            auStack_d0[param_7 * -2] = 0x1400343da;
            iVar15 = (*pcVar4)(puVar20);
            if (iVar15 == -1) {
              puVar20 = (ulonglong *)0x0;
              local_50 = (longlong *)uVar22;
              goto LAB_140033eec;
            }
          }
          bVar14 = 0;
          bVar16 = local_80 != (longlong *)0x0 & local_65;
          bVar19 = local_65;
          if (bVar16 == 0) goto LAB_140033f03;
LAB_140033fb5:
          plVar13 = local_80;
          if ((ulonglong)local_80[3] <= (ulonglong)local_80[2]) goto LAB_14003439b;
          puVar20 = (ulonglong *)local_50;
          if (bVar14 == 0) break;
        } while( true );
      }
    }
    if (uVar21 == uVar22) {
LAB_140033fdb:
      uVar9 = 0xffffffff;
      *param_5 = (int)uVar17;
      goto LAB_140033b05;
    }
LAB_140034203:
    uVar9 = 0xffffffff;
  }
  goto LAB_140033afb;
LAB_14003439b:
  pcVar4 = *(code **)(*local_80 + 0x48);
  auStack_d0[param_7 * -2] = 0x1400343ab;
  iVar15 = (*pcVar4)(plVar13);
  plVar13 = (longlong *)0x0;
  if (iVar15 != -1) {
    plVar13 = local_80;
  }
  bVar19 = bVar16;
  local_80 = plVar13;
  if (iVar15 != -1) {
    bVar19 = 0;
  }
  goto LAB_140033f03;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_monthname(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::__cxx11::time_get<>::do_get_monthname
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  longlong lVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_1a8;
  longlong local_1a0;
  longlong local_198;
  ulonglong local_190;
  longlong *local_188;
  ulonglong local_180;
  int local_170;
  uint local_16c;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  lVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_16c = 0;
    local_108 = *(undefined8 *)(lVar5 + 200);
    uStack_100 = *(undefined8 *)(lVar5 + 0xd0);
    local_f8 = *(undefined8 *)(lVar5 + 0xd8);
    uStack_f0 = *(undefined8 *)(lVar5 + 0xe0);
    local_e8 = *(undefined8 *)(lVar5 + 0xe8);
    uStack_e0 = *(undefined8 *)(lVar5 + 0xf0);
    local_d8 = *(undefined8 *)(lVar5 + 0xf8);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x100);
    local_c8 = *(undefined8 *)(lVar5 + 0x108);
    uStack_c0 = *(undefined8 *)(lVar5 + 0x110);
    local_b8 = *(undefined8 *)(lVar5 + 0x118);
    uStack_b0 = *(undefined8 *)(lVar5 + 0x120);
    local_128 = *(undefined8 *)(lVar5 + 0x168);
    uStack_120 = *(undefined8 *)(lVar5 + 0x170);
    local_118 = *(undefined8 *)(lVar5 + 0x178);
    uStack_110 = *(undefined8 *)(lVar5 + 0x180);
    local_158 = *(undefined8 *)(lVar5 + 0x138);
    uStack_150 = *(undefined8 *)(lVar5 + 0x140);
    local_148 = *(undefined8 *)(lVar5 + 0x148);
    uStack_140 = *(undefined8 *)(lVar5 + 0x150);
    local_138 = *(undefined8 *)(lVar5 + 0x158);
    uStack_130 = *(undefined8 *)(lVar5 + 0x160);
    local_168 = *(undefined8 *)(lVar5 + 0x128);
    uStack_160 = *(undefined8 *)(lVar5 + 0x130);
    local_1a8 = plVar3;
    local_1a0 = lVar4;
    local_198 = lVar1;
    local_190 = uVar2;
    _M_extract_wday_or_month
              (&local_188,param_2,&local_198,&local_1a8,&local_170,(longlong)&local_168,0xc,param_5,
               &local_16c);
    if (local_16c == 0) {
      *(int *)(param_7 + 0x10) = local_170;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (int)local_180 == -1;
    plVar8 = local_188;
    if ((local_188 != (longlong *)0x0 && bVar9) &&
       (bVar9 = false, (ulonglong)local_188[3] <= (ulonglong)local_188[2])) {
      iVar6 = (**(code **)(*local_188 + 0x48))(local_188);
      plVar8 = (longlong *)0x0;
      bVar9 = iVar6 == -1;
      if (!bVar9) {
        plVar8 = local_188;
      }
    }
    bVar10 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar10)) &&
       (bVar10 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar10 = iVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_180 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_via_format(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*,
// char const*) const

undefined8 *
std::__cxx11::time_get<>::_M_extract_via_format
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,char *param_8)

{
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 local_20;
  uint local_14 [3];
  
  local_28 = *param_3;
  local_20 = param_3[1];
  local_38 = *param_4;
  uStack_30 = param_4[1];
  local_14[0] = 0;
  local_14[1] = 0;
  local_14[2] = 0;
  _M_extract_via_format
            (param_1,param_2,&local_28,&local_38,param_5,param_6,param_7,param_8,local_14);
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_via_format(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*,
// char const*, std::__time_get_state&) const

undefined8 *
std::__cxx11::time_get<>::_M_extract_via_format
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,char *param_8,uint *param_9)

{
  ctype<char> *this;
  bool bVar1;
  char cVar2;
  char cVar3;
  char cVar4;
  ctype<char> cVar5;
  ctype<char> cVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  longlong *plVar10;
  longlong lVar11;
  size_t sVar12;
  byte *pbVar13;
  uint uVar14;
  longlong *plVar15;
  bool bVar16;
  ulonglong uVar17;
  bool bVar18;
  bool bVar19;
  ctype<char> *pcVar20;
  longlong *plVar21;
  bool bVar22;
  bool bVar23;
  bool bVar24;
  char **ppcVar25;
  uint local_1e8;
  int local_1e4;
  longlong *local_1c8;
  undefined8 uStack_1c0;
  longlong *local_1b8;
  undefined8 uStack_1b0;
  longlong *local_1a8;
  uint local_1a0;
  longlong *local_198;
  undefined8 uStack_190;
  longlong *local_188;
  undefined8 uStack_180;
  uint local_170;
  uint local_16c;
  char *local_168;
  char *pcStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  local_188 = (longlong *)*param_3;
  uStack_180 = param_3[1];
  local_198 = (longlong *)*param_4;
  uStack_190 = param_4[1];
  uVar9 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar9 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar10 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar9 * 8),
      plVar10 != (longlong *)0x0)) &&
     (plVar10 = __dynamic_cast(plVar10,&locale::facet::typeinfo,
                               (type_info *)&__timepunct<char>::typeinfo,0),
     plVar10 != (longlong *)0x0)) {
    lVar11 = locale::id::_M_id((id *)&ctype<char>::id);
    this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar11 * 8);
    if (this != (ctype<char> *)0x0) {
      uVar9 = 0;
      sVar12 = strlen(param_8);
      local_170 = 0;
      local_1e8 = 0;
      local_1e4 = (int)uStack_190;
      plVar15 = local_188;
      plVar21 = local_198;
      uVar14 = (uint)uStack_180;
      while( true ) {
        bVar22 = uVar14 == 0xffffffff;
        bVar16 = bVar22;
        if (plVar15 != (longlong *)0x0 && bVar22) {
          if (((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) ||
             (iVar7 = (**(code **)(*plVar15 + 0x48))(plVar15), iVar7 != -1)) {
            bVar16 = false;
          }
          else {
            local_188 = (longlong *)0x0;
            bVar16 = true;
          }
        }
        bVar23 = local_1e4 == -1;
        if ((plVar21 == (longlong *)0x0) || (!bVar23)) {
          bVar16 = (bool)(bVar16 ^ bVar23);
        }
        else if (((ulonglong)plVar21[3] <= (ulonglong)plVar21[2]) &&
                (iVar7 = (**(code **)(*plVar21 + 0x48))(plVar21), iVar7 == -1)) {
          local_198 = (longlong *)0x0;
          bVar16 = (bool)(bVar16 ^ 1);
        }
        bVar16 = (bool)(uVar9 < sVar12 & bVar16);
        if (bVar16 == false) break;
        if (local_1e8 != 0) goto LAB_140034f02;
        pcVar20 = (ctype<char> *)(param_8 + uVar9);
        cVar6 = *pcVar20;
        cVar5 = this[(ulonglong)(byte)cVar6 + 0x139];
        if (cVar5 == (ctype<char>)0x0) {
          cVar5 = cVar6;
          if (*(code **)(*(longlong *)this + 0x40) != ctype<char>::do_narrow) {
            cVar5 = (ctype<char>)(**(code **)(*(longlong *)this + 0x40))(this,(int)(char)cVar6,0);
          }
          if (cVar5 != (ctype<char>)0x0) {
            this[(ulonglong)(byte)cVar6 + 0x139] = cVar5;
            goto LAB_140034be4;
          }
LAB_140034bec:
          plVar15 = local_188;
          uVar17 = uVar9;
          if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)(byte)*pcVar20 * 2) & 0x20) != 0) {
            plVar21 = local_198;
            if (local_188 != (longlong *)0x0 && bVar22) goto LAB_140034d36;
LAB_140034cec:
            bVar24 = plVar21 != (longlong *)0x0;
            bVar18 = true;
            plVar15 = local_188;
            bVar1 = false;
            do {
              bVar19 = bVar23;
              if (bVar24 && bVar23) {
                if (((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) ||
                   (iVar7 = (**(code **)(*plVar21 + 0x48))(plVar21), iVar7 != -1)) {
                  bVar19 = false;
                }
                else {
                  local_198 = (longlong *)0x0;
                  plVar21 = (longlong *)0x0;
                  bVar19 = bVar18;
                }
              }
              if (bVar22 == bVar19) goto LAB_140034c97;
              uVar9 = (ulonglong)uVar14;
              if (bVar1 == false) {
LAB_140034d08:
                if ((*(byte *)(*(longlong *)(this + 0x30) + (uVar9 & 0xff) * 2) & 0x20) == 0)
                goto LAB_140034c97;
                pbVar13 = (byte *)plVar15[2];
                if (pbVar13 < (byte *)plVar15[3]) goto LAB_140034d23;
                (**(code **)(*plVar15 + 0x50))(plVar15);
                uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
                if ((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) goto LAB_140034e52;
              }
              else {
                pbVar13 = (byte *)plVar15[2];
                if ((byte *)plVar15[3] <= pbVar13) {
                  uVar9 = (**(code **)(*plVar15 + 0x48))(plVar15);
                  if ((int)uVar9 == -1) {
                    local_188 = (longlong *)0x0;
                    plVar15 = (longlong *)0x0;
                  }
                  goto LAB_140034d08;
                }
                if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)*pbVar13 * 2) & 0x20) == 0)
                goto LAB_140034c97;
LAB_140034d23:
                uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
                plVar15[2] = (longlong)(pbVar13 + 1);
LAB_140034d36:
                if ((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) {
LAB_140034e52:
                  iVar7 = (**(code **)(*plVar15 + 0x48))(plVar15);
                  if (iVar7 == -1) goto code_r0x000140034e67;
                }
              }
              bVar22 = false;
              bVar24 = plVar21 != (longlong *)0x0;
              uVar14 = 0xffffffff;
              bVar18 = bVar24 && bVar23;
              bVar1 = bVar16;
            } while( true );
          }
          bVar16 = local_188 != (longlong *)0x0;
          cVar2 = (**(code **)(*(longlong *)this + 0x20))(this,(int)(char)*pcVar20);
          cVar4 = (char)uVar14;
          cVar3 = cVar4;
          if (bVar22 && bVar16) {
            bVar16 = true;
            if ((char *)plVar15[2] < (char *)plVar15[3]) {
              cVar3 = *(char *)plVar15[2];
            }
            else {
              iVar7 = (**(code **)(*plVar15 + 0x48))(plVar15);
              cVar3 = (char)iVar7;
              if (iVar7 == -1) {
                local_188 = (longlong *)0x0;
                bVar16 = false;
                plVar15 = (longlong *)0x0;
                cVar3 = -1;
              }
            }
          }
          cVar3 = (**(code **)(*(longlong *)this + 0x20))(this,(int)cVar3);
          if (cVar2 != cVar3) {
            cVar3 = (**(code **)(*(longlong *)this + 0x10))(this,(int)(char)*pcVar20);
            if ((bVar22) && (bVar16)) {
              if ((char *)plVar15[2] < (char *)plVar15[3]) {
                cVar4 = *(char *)plVar15[2];
              }
              else {
                iVar7 = (**(code **)(*plVar15 + 0x48))(plVar15);
                cVar4 = (char)iVar7;
                if (iVar7 == -1) {
                  local_188 = (longlong *)0x0;
                }
              }
            }
            cVar4 = (**(code **)(*(longlong *)this + 0x10))(this,(int)cVar4);
            plVar15 = local_188;
            if (cVar3 != cVar4) goto switchD_140034e26_caseD_1;
          }
          if ((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) {
            plVar15[2] = plVar15[2] + 1;
          }
          else {
            (**(code **)(*plVar15 + 0x50))(plVar15);
          }
          uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
          plVar21 = local_198;
          uVar14 = 0xffffffff;
          goto LAB_140034c97;
        }
LAB_140034be4:
        if (cVar5 != (ctype<char>)0x25) goto LAB_140034bec;
        uVar17 = uVar9 + 1;
        cVar6 = *(ctype<char> *)(param_8 + uVar9 + 1);
        cVar5 = this[(ulonglong)(byte)cVar6 + 0x139];
        if (cVar5 == (ctype<char>)0x0) {
          cVar5 = cVar6;
          if (*(code **)(*(longlong *)this + 0x40) != ctype<char>::do_narrow) {
            cVar5 = (ctype<char>)(**(code **)(*(longlong *)this + 0x40))(this,(int)(char)cVar6,0);
          }
          if (cVar5 != (ctype<char>)0x0) {
            this[(ulonglong)(byte)cVar6 + 0x139] = cVar5;
            goto LAB_140034dea;
          }
switchD_140034e26_caseD_1:
          local_1e8 = 4;
          local_170 = 4;
          plVar15 = local_188;
          plVar21 = local_198;
          goto LAB_140034c97;
        }
LAB_140034dea:
        local_16c = 0;
        if ((cVar5 == (ctype<char>)0x45) || (cVar5 == (ctype<char>)0x4f)) {
          uVar17 = uVar9 + 2;
          cVar6 = *(ctype<char> *)(param_8 + uVar17);
          cVar5 = this[(ulonglong)(byte)cVar6 + 0x139];
          if (cVar5 == (ctype<char>)0x0) {
            cVar5 = cVar6;
            if (*(code **)(*(longlong *)this + 0x40) != ctype<char>::do_narrow) {
              cVar5 = (ctype<char>)(**(code **)(*(longlong *)this + 0x40))(this,(int)(char)cVar6,0);
            }
            if (cVar5 == (ctype<char>)0x0) goto switchD_140034e26_caseD_1;
            this[(ulonglong)(byte)cVar6 + 0x139] = cVar5;
          }
        }
        plVar15 = local_188;
        plVar21 = local_198;
        switch((char)cVar5 - 0x25) {
        case 0:
          uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          if (this[0x38] == (ctype<char>)0x0) {
            ctype<char>::_M_widen_init(this);
            if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
              cVar5 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
            }
          }
          else {
            cVar5 = this[0x5e];
          }
          plVar15 = local_188;
          if (SUB81(uVar9,0) == cVar5) {
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
            plVar21 = local_198;
            uVar14 = 0xffffffff;
          }
          else {
            local_1e8 = 4;
            local_170 = 4;
            plVar21 = local_198;
            uVar14 = (uint)uStack_180;
          }
          break;
        default:
          goto switchD_140034e26_caseD_1;
        case 0x1c:
        case 0x3c:
          lVar11 = plVar10[2];
          local_138 = *(undefined8 *)(lVar11 + 0x88);
          uStack_130 = *(undefined8 *)(lVar11 + 0x90);
          local_128 = *(undefined8 *)(lVar11 + 0x98);
          uStack_120 = *(undefined8 *)(lVar11 + 0xa0);
          local_158 = *(undefined8 *)(lVar11 + 0x68);
          uStack_150 = *(undefined8 *)(lVar11 + 0x70);
          local_148 = *(undefined8 *)(lVar11 + 0x78);
          uStack_140 = *(undefined8 *)(lVar11 + 0x80);
          local_118 = *(undefined8 *)(lVar11 + 0xa8);
          uStack_110 = *(undefined8 *)(lVar11 + 0xb0);
          local_108 = *(undefined8 *)(lVar11 + 0xb8);
          uStack_100 = *(undefined8 *)(lVar11 + 0xc0);
          local_168 = *(char **)(lVar11 + 0x58);
          pcStack_160 = *(char **)(lVar11 + 0x60);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name((longlong *)&local_1a8,param_2,&local_1b8,(longlong *)&local_1c8,
                          &local_16c,(longlong)&local_168,0xe,param_5,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[6] = (int)local_16c % 7;
            *(byte *)param_9 = (byte)*param_9 | 2;
            plVar15 = local_1a8;
          }
          break;
        case 0x1d:
        case 0x3d:
        case 0x43:
          lVar11 = plVar10[2];
          local_108 = *(undefined8 *)(lVar11 + 0x128);
          uStack_100 = *(undefined8 *)(lVar11 + 0x130);
          local_f8 = *(undefined8 *)(lVar11 + 0x138);
          uStack_f0 = *(undefined8 *)(lVar11 + 0x140);
          local_e8 = *(undefined8 *)(lVar11 + 0x148);
          uStack_e0 = *(undefined8 *)(lVar11 + 0x150);
          local_d8 = *(undefined8 *)(lVar11 + 0x158);
          uStack_d0 = *(undefined8 *)(lVar11 + 0x160);
          local_c8 = *(undefined8 *)(lVar11 + 0x168);
          uStack_c0 = *(undefined8 *)(lVar11 + 0x170);
          local_b8 = *(undefined8 *)(lVar11 + 0x178);
          uStack_b0 = *(undefined8 *)(lVar11 + 0x180);
          local_128 = *(undefined8 *)(lVar11 + 0x108);
          uStack_120 = *(undefined8 *)(lVar11 + 0x110);
          local_118 = *(undefined8 *)(lVar11 + 0x118);
          uStack_110 = *(undefined8 *)(lVar11 + 0x120);
          local_158 = *(undefined8 *)(lVar11 + 0xd8);
          uStack_150 = *(undefined8 *)(lVar11 + 0xe0);
          local_148 = *(undefined8 *)(lVar11 + 0xe8);
          uStack_140 = *(undefined8 *)(lVar11 + 0xf0);
          local_138 = *(undefined8 *)(lVar11 + 0xf8);
          uStack_130 = *(undefined8 *)(lVar11 + 0x100);
          local_168 = *(char **)(lVar11 + 200);
          pcStack_160 = *(char **)(lVar11 + 0xd0);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name((longlong *)&local_1a8,param_2,&local_1b8,(longlong *)&local_1c8,
                          &local_16c,(longlong)&local_168,0x18,param_5,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[4] = (int)local_16c % 0xc;
            *(ushort *)param_9 = (ushort)*param_9 | 0x408;
            plVar15 = local_1a8;
          }
          break;
        case 0x1e:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,99,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            *(ushort *)param_9 = (ushort)*param_9 | 0x480;
            param_9[1] = local_16c;
            plVar15 = local_1a8;
          }
          break;
        case 0x1f:
          if (this[0x38] == (ctype<char>)0x1) {
LAB_140036206:
            pcStack_160 = (char *)((ulonglong)pcStack_160 & 0xffffffffffffff00);
            local_168 = (char *)0x79252f64252f6d25;
          }
          else {
            if (this[0x38] == (ctype<char>)0x0) {
              ctype<char>::_M_widen_init(this);
            }
            if (*(code **)(*(longlong *)this + 0x38) == ctype<char>::do_widen) goto LAB_140036206;
            (**(code **)(*(longlong *)this + 0x38))(this,"%m/%d/%y","%H:%M",&local_168);
          }
          ppcVar25 = &local_168;
          goto LAB_1400358b6;
        case 0x23:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x17,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[2] = local_16c;
            *(byte *)param_9 = (byte)*param_9 & 0xfe;
            plVar15 = local_1a8;
          }
          break;
        case 0x24:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0xc,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[2] = (int)local_16c % 0xc;
            *(byte *)param_9 = (byte)*param_9 | 1;
            plVar15 = local_1a8;
          }
          break;
        case 0x28:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x3b,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[1] = local_16c;
            plVar15 = local_1a8;
          }
          break;
        case 0x2d:
          if (this[0x38] != (ctype<char>)0x1) {
            if (this[0x38] == (ctype<char>)0x0) {
              ctype<char>::_M_widen_init(this);
            }
            if (*(code **)(*(longlong *)this + 0x38) != ctype<char>::do_widen) {
              (**(code **)(*(longlong *)this + 0x38))(this,"%H:%M","%H:%M:%S",&local_168);
              goto LAB_140035cab;
            }
          }
          local_168 = (char *)CONCAT26(local_168._6_2_,0x4d253a4825);
          goto LAB_140035cab;
        case 0x2e:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x3c,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            *param_7 = local_16c;
            plVar15 = local_1a8;
          }
          break;
        case 0x2f:
          if (this[0x38] != (ctype<char>)0x1) {
            if (this[0x38] == (ctype<char>)0x0) {
              ctype<char>::_M_widen_init(this);
            }
            if (*(code **)(*(longlong *)this + 0x38) != ctype<char>::do_widen) {
              (**(code **)(*(longlong *)this + 0x38))
                        (this,"%H:%M:%S",&switchD_140034e26::switchdataD_1400c552c,&local_168);
              goto LAB_140035cab;
            }
          }
          pcStack_160 = (char *)((ulonglong)pcStack_160 & 0xffffffffffffff00);
          local_168 = (char *)0x53253a4d253a4825;
LAB_140035cab:
          ppcVar25 = &local_168;
          goto LAB_140035cbd;
        case 0x30:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x35,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            *param_9 = (local_16c & 0x3f) << 0x10 | 0x20 | *param_9 & 0xffc0ffdf;
            plVar15 = local_1a8;
          }
          break;
        case 0x32:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x35,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            *param_9 = (local_16c & 0x3f) << 0x10 | 0x40 | *param_9 & 0xffc0ffbf;
            plVar15 = local_1a8;
          }
          break;
        case 0x33:
          ppcVar25 = *(char ***)(plVar10[2] + 0x20);
          goto LAB_140035cbd;
        case 0x34:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,9999,4,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[5] = local_16c - 0x76c;
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) & 0xf9 | 4;
            plVar15 = local_1a8;
          }
          break;
        case 0x35:
          uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          if ((*(byte *)(*(longlong *)(this + 0x30) + (uVar9 & 0xff) * 2) & 1) == 0) {
            local_1e8 = 4;
            local_170 = 4;
            plVar15 = local_188;
            plVar21 = local_198;
            uVar14 = (uint)uStack_180;
          }
          else {
            local_1b8 = local_188;
            uStack_1b0 = uStack_180;
            local_1c8 = local_198;
            uStack_1c0 = uStack_190;
            _M_extract_name((longlong *)&local_1a8,param_2,&local_1b8,(longlong *)&local_1c8,
                            (undefined4 *)&local_168,
                            (longlong)&__timepunct_cache<char>::_S_timezones,0xe,param_5,&local_170)
            ;
            local_188 = local_1a8;
            uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
            uVar9 = istreambuf_iterator<>::equal
                              ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
            local_1e8 = local_170;
            if (((char)uVar9 == '\0') && (local_170 == 0 && (int)local_168 == 0)) {
              uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
              if (this[0x38] == (ctype<char>)0x0) {
                ctype<char>::_M_widen_init(this);
                cVar6 = (ctype<char>)0x2d;
                if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
                  cVar6 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x2d);
                }
              }
              else {
                cVar6 = this[0x66];
              }
              local_1e4._0_1_ = SUB81(uVar9,0);
              if (local_1e4._0_1_ != cVar6) {
                uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
                if (this[0x38] == (ctype<char>)0x0) {
                  ctype<char>::_M_widen_init(this);
                  cVar6 = (ctype<char>)0x2b;
                  if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
                    cVar6 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x2b);
                  }
                }
                else {
                  cVar6 = this[100];
                }
                if (SUB81(uVar9,0) != cVar6) goto LAB_14003686a;
              }
              local_1b8 = local_188;
              uStack_1b0 = uStack_180;
              local_1c8 = local_198;
              uStack_1c0 = uStack_190;
              _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_168,0,0x17,2,
                             param_5,&local_170);
              local_188 = local_1a8;
              uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
              local_1b8 = local_1a8;
              uStack_1b0 = uStack_180;
              local_1c8 = local_198;
              uStack_1c0 = uStack_190;
              _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_168,0,0x3b,2,
                             param_5,&local_170);
              local_188 = local_1a8;
              uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
              local_1e8 = local_170;
            }
LAB_14003686a:
            local_1e4 = (int)uStack_190;
            plVar15 = local_188;
            plVar21 = local_198;
            uVar14 = (uint)uStack_180;
          }
          break;
        case 0x3e:
          ppcVar25 = *(char ***)(plVar10[2] + 0x30);
LAB_1400358b6:
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (char *)ppcVar25,param_9);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 4;
            plVar15 = local_1a8;
          }
          break;
        case 0x3f:
        case 0x40:
          if ((local_188 != (longlong *)0x0) && (bVar22)) {
            if ((byte *)local_188[2] < (byte *)local_188[3]) {
              uVar14 = (uint)*(byte *)local_188[2];
            }
            else {
              uVar14 = (**(code **)(*local_188 + 0x48))();
              if (uVar14 == 0xffffffff) {
                local_188 = (longlong *)0x0;
              }
            }
          }
          if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)(uVar14 & 0xff) * 2) & 0x20) != 0)
          {
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
          }
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0x1f,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[3] = local_16c;
            *(ushort *)param_9 = (ushort)*param_9 | 0x410;
            plVar15 = local_1a8;
          }
          break;
        case 0x45:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0x16e,3,
                         param_5,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[7] = local_16c - 1;
            *(byte *)param_9 = (byte)*param_9 | 4;
            plVar15 = local_1a8;
          }
          break;
        case 0x48:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0xc,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[4] = local_16c - 1;
            *(byte *)param_9 = (byte)*param_9 | 8;
            plVar15 = local_1a8;
          }
          break;
        case 0x49:
        case 0x4f:
          if (local_188 != (longlong *)0x0 && bVar22) goto LAB_1400355e7;
LAB_140035591:
          bVar24 = plVar21 != (longlong *)0x0;
          bVar18 = true;
          plVar15 = local_188;
          bVar1 = false;
          do {
            bVar19 = bVar23;
            if (bVar24 && bVar23) {
              if (((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) ||
                 (iVar7 = (**(code **)(*plVar21 + 0x48))(plVar21), iVar7 != -1)) {
                bVar19 = false;
              }
              else {
                local_198 = (longlong *)0x0;
                plVar21 = (longlong *)0x0;
                bVar19 = bVar18;
              }
            }
            if (bVar22 == bVar19) break;
            uVar9 = (ulonglong)uVar14;
            if (bVar1 == false) {
LAB_1400355b5:
              if ((*(byte *)(*(longlong *)(this + 0x30) + (uVar9 & 0xff) * 2) & 0x20) == 0) break;
              pbVar13 = (byte *)plVar15[2];
              if (pbVar13 < (byte *)plVar15[3]) goto LAB_1400355d4;
              (**(code **)(*plVar15 + 0x50))(plVar15);
              uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
            }
            else {
              pbVar13 = (byte *)plVar15[2];
              if ((byte *)plVar15[3] <= pbVar13) {
                uVar9 = (**(code **)(*plVar15 + 0x48))(plVar15);
                if ((int)uVar9 == -1) {
                  plVar15 = (longlong *)0x0;
                  local_188 = (longlong *)0x0;
                }
                goto LAB_1400355b5;
              }
              if ((*(byte *)(*(longlong *)(this + 0x30) + (ulonglong)*pbVar13 * 2) & 0x20) == 0)
              break;
LAB_1400355d4:
              uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
              plVar15[2] = (longlong)(pbVar13 + 1);
            }
LAB_1400355e7:
            if (((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) &&
               (iVar7 = (**(code **)(*plVar15 + 0x48))(plVar15), iVar7 == -1))
            goto code_r0x000140036ad0;
            bVar22 = false;
            bVar24 = plVar21 != (longlong *)0x0;
            uVar14 = 0xffffffff;
            bVar18 = bVar24 && bVar23;
            bVar1 = bVar16;
          } while( true );
        case 0x4b:
          local_168 = *(char **)(plVar10[2] + 0x40);
          pcStack_160 = *(char **)(plVar10[2] + 0x48);
          if ((*local_168 != '\0') && (*pcStack_160 != '\0')) {
            local_1b8 = local_188;
            uStack_1b0 = uStack_180;
            local_1c8 = local_198;
            uStack_1c0 = uStack_190;
            _M_extract_name((longlong *)&local_1a8,param_2,&local_1b8,(longlong *)&local_1c8,
                            &local_16c,(longlong)&local_168,2,param_5,&local_170);
            local_188 = local_1a8;
            uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
            local_1e8 = local_170;
            plVar15 = local_1a8;
            plVar21 = local_198;
            uVar14 = local_1a0;
            if ((local_170 == 0) && (plVar15 = local_1a8, local_16c != 0)) {
              *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 1;
              plVar15 = local_1a8;
            }
          }
          break;
        case 0x4d:
          ppcVar25 = *(char ***)(plVar10[2] + 0x50);
          goto LAB_140035cbd;
        case 0x52:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,6,1,param_5,
                         &local_170);
          local_188 = local_1a8;
          local_1e8 = local_170;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            param_7[6] = local_16c;
            *(byte *)param_9 = (byte)*param_9 | 2;
            plVar15 = local_1a8;
          }
          break;
        case 0x53:
          ppcVar25 = *(char ***)(plVar10[2] + 0x10);
LAB_140035cbd:
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (char *)ppcVar25,param_9);
          local_188 = local_1a8;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          local_1e8 = local_170;
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          break;
        case 0x54:
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,99,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          local_1e8 = local_170;
          uStack_180 = CONCAT44(uStack_180._4_4_,local_1a0);
          plVar15 = local_1a8;
          plVar21 = local_198;
          uVar14 = local_1a0;
          if (local_170 == 0) {
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 6;
            uVar9 = istreambuf_iterator<>::equal
                              ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
            uVar14 = local_16c;
            if ((char)uVar9 == '\0') {
              uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
              uVar8 = ctype<char>::narrow(this,(ulonglong)(uint)(int)(char)uVar9,(ctype<char>)0x2a);
              if (9 < (byte)((char)uVar8 - 0x30U)) goto LAB_140036364;
              _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_188);
              uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
              uVar14 = (char)uVar8 + -0x30 + uVar14 * 10;
              local_16c = uVar14;
              uVar9 = istreambuf_iterator<>::equal
                                ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
              if ((char)uVar9 == '\0') {
                uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
                uVar8 = ctype<char>::narrow(this,(ulonglong)(uint)(int)(char)uVar9,(ctype<char>)0x2a
                                           );
                if ((byte)((char)uVar8 - 0x30U) < 10) {
                  _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_188);
                  uStack_180 = CONCAT44(uStack_180._4_4_,0xffffffff);
                  uVar14 = uVar14 * 10 + -0x30 + (int)(char)uVar8;
                }
              }
              uVar14 = uVar14 - 0x76c;
              *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) & 0xfd;
            }
            else {
LAB_140036364:
              if ((int)uVar14 < 0x45) {
                uVar14 = uVar14 + 100;
              }
            }
            param_7[5] = uVar14;
            local_1e4 = (int)uStack_190;
            plVar15 = local_188;
            plVar21 = local_198;
            uVar14 = (uint)uStack_180;
          }
        }
LAB_140034c97:
        uVar9 = uVar17 + 1;
      }
      if ((uVar9 == sVar12) && (local_1e8 == 0)) goto LAB_140034f06;
LAB_140034f02:
      *param_6 = *param_6 | 4;
LAB_140034f06:
      *param_1 = local_188;
      param_1[1] = uStack_180;
      return param_1;
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
code_r0x000140034e67:
  local_188 = (longlong *)0x0;
  uVar14 = 0xffffffff;
  bVar22 = bVar16;
  goto LAB_140034cec;
code_r0x000140036ad0:
  local_188 = (longlong *)0x0;
  uVar14 = 0xffffffff;
  bVar22 = bVar16;
  goto LAB_140035591;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_wday_or_month(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, int&, char const**, unsigned long long,
// std::ios_base&, std::_Ios_Iostate&) const

undefined8 *
std::__cxx11::time_get<>::_M_extract_wday_or_month
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,undefined8 *param_4,int *param_5
          ,longlong param_6,longlong param_7,longlong param_8,uint *param_9)

{
  int *piVar1;
  undefined8 uVar2;
  code *pcVar3;
  char *_Str;
  longlong lVar4;
  bool bVar5;
  bool bVar6;
  byte bVar7;
  int iVar8;
  uint uVar9;
  uint uVar10;
  longlong lVar11;
  longlong *plVar12;
  size_t sVar13;
  byte bVar14;
  bool bVar15;
  longlong *plVar16;
  undefined1 *puVar17;
  ulonglong uVar18;
  int *piVar19;
  size_t *psVar20;
  longlong lVar21;
  longlong *plVar22;
  ulonglong uVar23;
  byte bVar24;
  size_t *psVar25;
  byte bVar26;
  char cVar27;
  undefined *puStack_a0;
  undefined1 auStack_98 [32];
  undefined8 uStack_78;
  longlong *local_70;
  size_t *local_68;
  longlong *local_60;
  ulonglong local_58;
  longlong *local_50;
  
  local_58 = param_3[1];
  local_60 = (longlong *)*param_4;
  psVar25 = (size_t *)*param_3;
  uVar2 = param_4[1];
  iVar8 = (int)local_58;
  local_68 = (size_t *)CONCAT44(local_68._4_4_,iVar8);
  puStack_a0 = (undefined *)0x140036e16;
  local_50 = local_60;
  lVar11 = locale::id::_M_id((id *)&ctype<char>::id);
  psVar20 = *(size_t **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar11 * 8);
  if (psVar20 == (size_t *)0x0) {
                    // WARNING: Subroutine does not return
    puStack_a0 = &UNK_140037367;
    __throw_bad_cast();
  }
  puStack_a0 = (undefined *)0x140036e50;
  uVar23 = (ulonglong)local_68 & 0xffffffff;
  lVar11 = -(param_7 * 8 + 0xfU & 0xfffffffffffffff0);
  puVar17 = auStack_98 + lVar11;
  piVar1 = (int *)((longlong)&uStack_78 + lVar11);
  bVar5 = psVar25 != (size_t *)0x0 && iVar8 == -1;
  plVar16 = local_60;
  bVar6 = iVar8 == -1;
  if (bVar5) {
    bVar6 = false;
    if (psVar25[3] <= psVar25[2]) {
      local_70 = local_60;
      local_60 = (longlong *)CONCAT44(local_60._4_4_,local_68._0_4_);
      pcVar3 = *(code **)(*psVar25 + 0x48);
      local_68 = psVar20;
      *(undefined8 *)(auStack_98 + lVar11 + -8) = 0x1400371cf;
      iVar8 = (*pcVar3)(psVar25);
      uVar23 = (ulonglong)local_60 & 0xffffffff;
      plVar16 = local_70;
      psVar20 = local_68;
      bVar6 = false;
      if (iVar8 == -1) {
        psVar25 = (size_t *)0x0;
        bVar5 = false;
        bVar6 = true;
      }
    }
  }
  bVar26 = (int)uVar2 == -1;
  bVar15 = (bool)bVar26;
  if (plVar16 != (longlong *)0x0 && (bool)bVar26) {
    if ((ulonglong)plVar16[2] < (ulonglong)plVar16[3]) {
      bVar15 = false;
    }
    else {
      local_60 = (longlong *)CONCAT44(local_60._4_4_,(int)uVar23);
      pcVar3 = *(code **)(*plVar16 + 0x48);
      local_68 = psVar20;
      local_50 = plVar16;
      *(undefined8 *)(auStack_98 + lVar11 + -8) = 0x1400372e2;
      iVar8 = (*pcVar3)(plVar16);
      uVar23 = (ulonglong)local_60 & 0xffffffff;
      plVar16 = (longlong *)0x0;
      if (iVar8 != -1) {
        plVar16 = local_50;
      }
      local_50 = plVar16;
      psVar20 = local_68;
      bVar15 = iVar8 == -1;
    }
  }
  if (bVar15 != bVar6) {
    uVar18 = uVar23;
    if (bVar5) {
      if ((byte *)psVar25[2] < (byte *)psVar25[3]) {
        uVar18 = (ulonglong)*(byte *)psVar25[2];
      }
      else {
        local_60 = (longlong *)CONCAT44(local_60._4_4_,(int)uVar23);
        pcVar3 = *(code **)(*psVar25 + 0x48);
        local_68 = psVar20;
        *(undefined8 *)(auStack_98 + lVar11 + -8) = 0x140037320;
        uVar9 = (*pcVar3)(psVar25);
        uVar23 = (ulonglong)local_60 & 0xffffffff;
        uVar10 = 0xffffffff;
        if (uVar9 != 0xffffffff) {
          uVar10 = uVar9;
        }
        uVar18 = (ulonglong)uVar10;
        psVar20 = local_68;
        if (uVar9 == 0xffffffff) {
          psVar25 = (size_t *)0x0;
        }
      }
    }
    lVar4 = param_7 * 2;
    if (lVar4 != 0) {
      local_68 = psVar25;
      lVar21 = 0;
      plVar16 = (longlong *)0x0;
      local_70 = (longlong *)CONCAT71(local_70._1_7_,bVar26);
      local_60 = (longlong *)CONCAT44(local_60._4_4_,(int)uVar23);
      do {
        while (**(char **)(param_6 + lVar21 * 8) == (char)uVar18) {
LAB_1400370f3:
          piVar1[(longlong)plVar16] = (int)lVar21;
          lVar21 = lVar21 + 1;
          plVar16 = (longlong *)((longlong)plVar16 + 1);
          if (lVar21 == lVar4) goto LAB_140037104;
        }
        pcVar3 = *(code **)(*psVar20 + 0x10);
        *(undefined8 *)(auStack_98 + lVar11 + -8) = 0x1400370d9;
        cVar27 = (*pcVar3)(psVar20);
        if (cVar27 == (char)uVar18) goto LAB_1400370f3;
        lVar21 = lVar21 + 1;
      } while (lVar21 != lVar4);
LAB_140037104:
      psVar25 = local_68;
      uVar23 = (ulonglong)local_60 & 0xffffffff;
      bVar26 = (byte)local_70;
      if (plVar16 != (longlong *)0x0) {
        if (local_68[2] < local_68[3]) {
          local_68[2] = local_68[2] + 1;
        }
        else {
          pcVar3 = *(code **)(*local_68 + 0x50);
          *(undefined8 *)(auStack_98 + lVar11 + -8) = 0x140037359;
          (*pcVar3)(psVar25);
        }
        *(undefined8 *)(auStack_98 + lVar11 + -8) = 0x140037148;
        lVar4 = -((longlong)plVar16 * 8 + 0xfU & 0xfffffffffffffff0);
        puVar17 = auStack_98 + lVar4 + lVar11;
        local_68 = (size_t *)((longlong)&uStack_78 + lVar4 + lVar11);
        local_60 = plVar16;
        piVar19 = piVar1;
        psVar20 = local_68;
        do {
          iVar8 = *piVar19;
          piVar19 = piVar19 + 1;
          _Str = *(char **)(param_6 + (longlong)iVar8 * 8);
          *(undefined8 *)(auStack_98 + lVar4 + lVar11 + -8) = 0x140037184;
          sVar13 = strlen(_Str);
          *psVar20 = sVar13;
          psVar20 = psVar20 + 1;
        } while (piVar19 != piVar1 + (longlong)plVar16);
        uVar23 = 0xffffffff;
        uVar18 = 1;
        plVar16 = local_60;
        psVar20 = local_68;
        goto LAB_140036eb0;
      }
    }
  }
  uVar18 = 0;
  plVar16 = (longlong *)0x0;
  psVar20 = (size_t *)0x0;
LAB_140036eb0:
  do {
    cVar27 = (int)uVar23 == -1;
    bVar14 = cVar27;
    if (psVar25 != (size_t *)0x0 && (bool)cVar27) {
      if (psVar25[2] < psVar25[3]) {
        bVar14 = 0;
      }
      else {
        local_70 = (longlong *)CONCAT44(local_70._4_4_,(int)uVar23);
        local_68 = (size_t *)CONCAT71(local_68._1_7_,cVar27);
        local_60 = (longlong *)CONCAT71(local_60._1_7_,1);
        pcVar3 = *(code **)(*psVar25 + 0x48);
        *(undefined8 *)(puVar17 + -8) = 0x14003726b;
        iVar8 = (*pcVar3)(psVar25);
        uVar23 = (ulonglong)local_70 & 0xffffffff;
        cVar27 = (char)local_68;
        if (iVar8 == -1) {
          psVar25 = (size_t *)0x0;
          bVar14 = (byte)local_60;
        }
        else {
          bVar14 = 0;
        }
      }
    }
    plVar12 = local_50;
    bVar7 = local_50 != (longlong *)0x0 & bVar26;
    bVar24 = bVar26;
    if (bVar7 == 0) {
LAB_140036ee1:
      if (bVar14 == bVar24) break;
    }
    else {
      if ((ulonglong)local_50[3] <= (ulonglong)local_50[2]) {
        uStack_78._4_4_ = (uint)uVar23;
        local_70 = (longlong *)CONCAT71(local_70._1_7_,bVar7);
        local_68 = (size_t *)CONCAT71(local_68._1_7_,cVar27);
        local_60 = (longlong *)CONCAT71(local_60._1_7_,bVar14);
        pcVar3 = *(code **)(*local_50 + 0x48);
        *(undefined8 *)(puVar17 + -8) = 0x140037225;
        iVar8 = (*pcVar3)(plVar12);
        plVar12 = (longlong *)0x0;
        if (iVar8 != -1) {
          plVar12 = local_50;
        }
        uVar23 = (ulonglong)uStack_78._4_4_;
        local_50 = plVar12;
        bVar24 = (byte)local_70;
        bVar14 = (byte)local_60;
        cVar27 = (char)local_68;
        if (iVar8 != -1) {
          bVar24 = 0;
        }
        goto LAB_140036ee1;
      }
      if (bVar14 == 0) break;
    }
    if ((psVar25 == (size_t *)0x0) || (cVar27 == '\0')) {
      cVar27 = (char)uVar23;
    }
    else if ((char *)psVar25[2] < (char *)psVar25[3]) {
      cVar27 = *(char *)psVar25[2];
    }
    else {
      local_60 = (longlong *)CONCAT44(local_60._4_4_,(int)uVar23);
      pcVar3 = *(code **)(*psVar25 + 0x48);
      *(undefined8 *)(puVar17 + -8) = 0x14003729a;
      iVar8 = (*pcVar3)(psVar25);
      uVar23 = (ulonglong)local_60 & 0xffffffff;
      cVar27 = (char)iVar8;
      if (iVar8 == -1) {
        cVar27 = -1;
        psVar25 = (size_t *)0x0;
      }
    }
    if (plVar16 == (longlong *)0x0) goto LAB_140036fd8;
    plVar12 = (longlong *)0x0;
    plVar22 = (longlong *)0x0;
    do {
      while (psVar20[(longlong)plVar12] <= uVar18) {
        plVar22 = (longlong *)((longlong)plVar22 + 1);
LAB_140036f18:
        plVar12 = (longlong *)((longlong)plVar12 + 1);
        if (plVar16 <= plVar12) goto LAB_140036f4e;
      }
      if (*(char *)(*(longlong *)(param_6 + (longlong)piVar1[(longlong)plVar12] * 8) + uVar18) ==
          cVar27) goto LAB_140036f18;
      plVar16 = (longlong *)((longlong)plVar16 + -1);
      piVar1[(longlong)plVar12] = piVar1[(longlong)plVar16];
      psVar20[(longlong)plVar12] = psVar20[(longlong)plVar16];
    } while (plVar12 < plVar16);
LAB_140036f4e:
    if (plVar16 == plVar22) break;
    if (psVar25[2] < psVar25[3]) {
      psVar25[2] = psVar25[2] + 1;
    }
    else {
      pcVar3 = *(code **)(*psVar25 + 0x50);
      *(undefined8 *)(puVar17 + -8) = 0x14003705a;
      (*pcVar3)(psVar25);
    }
    uVar18 = uVar18 + 1;
    uVar23 = 0xffffffff;
  } while( true );
  if (plVar16 == (longlong *)0x1) {
    sVar13 = *psVar20;
joined_r0x000140037062:
    if (sVar13 == uVar18) {
LAB_140037068:
      iVar8 = *piVar1;
      if ((int)param_7 <= iVar8) {
        iVar8 = iVar8 - (int)param_7;
      }
      *param_5 = iVar8;
      goto LAB_140036fe2;
    }
  }
  else if (plVar16 == (longlong *)0x2) {
    if (*psVar20 != uVar18) {
      sVar13 = psVar20[1];
      goto joined_r0x000140037062;
    }
    goto LAB_140037068;
  }
LAB_140036fd8:
  *param_9 = *param_9 | 4;
LAB_140036fe2:
  param_1[1] = local_58 & 0xffffffff00000000 | uVar23;
  *param_1 = psVar25;
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char const*, char const*)
// const

undefined8 *
std::__cxx11::time_get<>::get
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,byte *param_8,byte *param_9)

{
  ulonglong uVar1;
  longlong *plVar2;
  code *pcVar3;
  ctype<char> *this;
  char cVar4;
  char cVar5;
  char cVar6;
  byte bVar7;
  ctype<char> cVar8;
  byte bVar9;
  byte bVar10;
  longlong lVar11;
  byte *pbVar12;
  ulonglong uVar13;
  int iVar14;
  longlong *plVar15;
  int iVar16;
  longlong *plVar17;
  bool bVar18;
  bool bVar19;
  ulonglong uVar20;
  bool bVar21;
  bool bVar22;
  bool bVar23;
  bool bVar24;
  ulonglong local_d8;
  ulonglong local_d0;
  longlong *local_98;
  ulonglong local_90;
  longlong *local_88;
  ulonglong local_80;
  longlong *local_78;
  ulonglong local_70;
  ctype<char> local_64;
  byte local_63;
  byte local_62;
  undefined1 local_61;
  undefined8 local_60;
  undefined4 local_58;
  undefined8 local_54;
  undefined4 local_4c;
  
  local_d8 = param_3[1];
  plVar15 = (longlong *)*param_3;
  plVar17 = (longlong *)*param_4;
  uVar20 = local_d8 & 0xffffffff;
  uVar1 = param_4[1];
  lVar11 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar11 * 8);
  if (plVar2 == (longlong *)0x0) {
LAB_140038049:
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_60 = 0;
  local_58 = 0;
  *param_6 = 0;
  pcVar3 = *(code **)(*param_2 + 0x40);
  local_d0 = uVar1;
  if (param_8 == param_9) {
joined_r0x000140037ba6:
    if (pcVar3 == do_get) {
      __time_get_state::_M_finalize_state((__time_get_state *)&local_60,(longlong)param_7);
    }
    *param_1 = plVar15;
    param_1[1] = local_d8 & 0xffffffff00000000 | uVar20;
    return param_1;
  }
  do {
    bVar21 = (int)uVar20 == -1;
    bVar19 = bVar21;
    if (plVar15 != (longlong *)0x0 && bVar21) {
      if ((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) {
        bVar19 = false;
      }
      else {
        iVar16 = (**(code **)(*plVar15 + 0x48))(plVar15);
        bVar19 = iVar16 == -1;
        if (bVar19) {
          plVar15 = (longlong *)0x0;
        }
      }
    }
    bVar22 = (int)uVar1 == -1;
    bVar24 = bVar22;
    if (plVar17 != (longlong *)0x0 && bVar22) {
      if ((ulonglong)plVar17[3] <= (ulonglong)plVar17[2]) {
        iVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
        bVar24 = iVar16 == -1;
        if (bVar24) {
          plVar17 = (longlong *)0x0;
        }
        goto LAB_140037490;
      }
      if (bVar19 == false) goto LAB_140037b83;
    }
    else {
LAB_140037490:
      if (bVar24 == bVar19) {
LAB_140037b83:
        *param_6 = 6;
        goto joined_r0x000140037ba6;
      }
    }
    bVar9 = *param_8;
    bVar7 = *(byte *)((longlong)plVar2 + (ulonglong)bVar9 + 0x139);
    if (bVar7 == 0) {
      bVar7 = bVar9;
      if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
        bVar7 = (**(code **)(*plVar2 + 0x40))(plVar2);
      }
      if (bVar7 != 0) {
        *(byte *)((longlong)plVar2 + (ulonglong)bVar9 + 0x139) = bVar7;
        goto LAB_1400374d7;
      }
LAB_140037750:
      if ((*(byte *)(plVar2[6] + (ulonglong)*param_8 * 2) & 0x20) != 0) {
        do {
          param_8 = param_8 + 1;
          if (param_9 == param_8) break;
        } while ((*(byte *)(plVar2[6] + (ulonglong)*param_8 * 2) & 0x20) != 0);
        if ((plVar15 != (longlong *)0x0) && (bVar21)) goto LAB_140037876;
LAB_140037837:
        bVar23 = plVar17 != (longlong *)0x0;
        bVar19 = true;
        bVar24 = bVar21;
        do {
          bVar18 = bVar22;
          if (bVar23 && bVar22) {
            if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
              bVar18 = false;
            }
            else {
              iVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
              if (iVar16 == -1) {
                plVar17 = (longlong *)0x0;
                bVar18 = bVar19;
              }
              else {
                bVar18 = false;
              }
            }
          }
          if (bVar24 == bVar18) goto joined_r0x0001400376f4;
          uVar13 = uVar20;
          if ((plVar15 == (longlong *)0x0) || (bVar21 == false)) {
LAB_140037857:
            if ((*(byte *)(plVar2[6] + (uVar13 & 0xff) * 2) & 0x20) == 0)
            goto joined_r0x0001400376f4;
            pbVar12 = (byte *)plVar15[2];
            if (pbVar12 < (byte *)plVar15[3]) goto LAB_14003786e;
            (**(code **)(*plVar15 + 0x50))(plVar15);
            if ((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) goto LAB_1400378f3;
          }
          else {
            pbVar12 = (byte *)plVar15[2];
            if ((byte *)plVar15[3] <= pbVar12) {
              uVar13 = (**(code **)(*plVar15 + 0x48))(plVar15);
              if ((int)uVar13 == -1) {
                plVar15 = (longlong *)0x0;
              }
              goto LAB_140037857;
            }
            if ((*(byte *)(plVar2[6] + (ulonglong)*pbVar12 * 2) & 0x20) == 0)
            goto joined_r0x0001400376f4;
LAB_14003786e:
            plVar15[2] = (longlong)(pbVar12 + 1);
LAB_140037876:
            if ((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) {
LAB_1400378f3:
              iVar16 = (**(code **)(*plVar15 + 0x48))(plVar15);
              if (iVar16 == -1) goto code_r0x000140037909;
            }
          }
          bVar24 = false;
          bVar23 = plVar17 != (longlong *)0x0;
          uVar20 = 0xffffffff;
          bVar21 = true;
          bVar19 = bVar23 && bVar22;
        } while( true );
      }
      cVar6 = (char)uVar20;
      cVar4 = cVar6;
      if ((plVar15 != (longlong *)0x0) && (bVar21)) {
        if ((char *)plVar15[2] < (char *)plVar15[3]) {
          cVar4 = *(char *)plVar15[2];
        }
        else {
          iVar16 = (**(code **)(*plVar15 + 0x48))(plVar15);
          cVar4 = (char)iVar16;
          if (iVar16 == -1) {
            cVar4 = -1;
            plVar15 = (longlong *)0x0;
          }
        }
      }
      cVar4 = (**(code **)(*plVar2 + 0x20))(plVar2,(int)cVar4);
      cVar5 = (**(code **)(*plVar2 + 0x20))(plVar2,(int)(char)*param_8);
      if (cVar4 != cVar5) {
        if ((plVar15 != (longlong *)0x0) && (bVar21)) {
          if ((char *)plVar15[2] < (char *)plVar15[3]) {
            cVar6 = *(char *)plVar15[2];
          }
          else {
            iVar16 = (**(code **)(*plVar15 + 0x48))(plVar15);
            cVar6 = (char)iVar16;
            if (iVar16 == -1) {
              cVar6 = -1;
              plVar15 = (longlong *)0x0;
            }
          }
        }
        cVar6 = (**(code **)(*plVar2 + 0x10))(plVar2,(int)cVar6);
        cVar4 = (**(code **)(*plVar2 + 0x10))(plVar2,(int)(char)*param_8);
        if (cVar6 != cVar4) {
LAB_140037f7a:
          *param_6 = 4;
          goto joined_r0x000140037ba6;
        }
      }
      if ((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) {
        plVar15[2] = plVar15[2] + 1;
      }
      else {
        (**(code **)(*plVar15 + 0x50))(plVar15);
      }
      param_8 = param_8 + 1;
      uVar20 = 0xffffffff;
    }
    else {
LAB_1400374d7:
      if (bVar7 != 0x25) goto LAB_140037750;
      pbVar12 = param_8 + 1;
      if (param_9 == pbVar12) goto LAB_140037f7a;
      bVar9 = param_8[1];
      uVar13 = (ulonglong)bVar9;
      bVar7 = *(byte *)((longlong)plVar2 + uVar13 + 0x139);
      if (bVar7 == 0) {
        if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
          bVar9 = (**(code **)(*plVar2 + 0x40))(plVar2);
        }
        if (bVar9 != 0) {
          *(byte *)((longlong)plVar2 + uVar13 + 0x139) = bVar9;
          bVar7 = bVar9;
          goto LAB_14003752e;
        }
        iVar16 = 0;
LAB_140037923:
        iVar14 = 0;
        bVar7 = 0;
        if (pcVar3 != do_get) goto LAB_14003795b;
        local_54 = CONCAT62(local_54._2_6_,*(undefined2 *)param_8);
        bVar9 = 0;
LAB_1400375ae:
        local_54._0_3_ = CONCAT12(bVar9,(undefined2)local_54);
        local_d8 = local_d8 & 0xffffffff00000000;
        local_80 = local_d8 | uVar20;
        local_d0 = local_d0 & 0xffffffff00000000 | uVar1 & 0xffffffff;
        local_98 = plVar17;
        local_90 = local_d0;
        local_88 = plVar15;
        _M_extract_via_format
                  (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,(char *)&local_54,
                   (uint *)&local_60);
        plVar15 = local_78;
        bVar21 = (int)local_70 == -1;
        uVar20 = local_70 & 0xffffffff;
        if ((local_78 != (longlong *)0x0 && bVar21) &&
           (bVar21 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
          iVar16 = (**(code **)(*local_78 + 0x48))(local_78);
          bVar21 = iVar16 == -1;
          if (bVar21) {
            plVar15 = (longlong *)0x0;
          }
        }
        if ((plVar17 != (longlong *)0x0 && bVar22) &&
           (bVar22 = false, (ulonglong)plVar17[3] <= (ulonglong)plVar17[2])) {
          iVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
          bVar22 = iVar16 == -1;
          if (bVar22) {
            plVar17 = (longlong *)0x0;
          }
        }
        if (bVar22 == bVar21) goto LAB_1400376e2;
      }
      else {
LAB_14003752e:
        iVar16 = (int)(char)bVar7;
        if ((bVar7 != 0x45) && (bVar7 != 0x4f)) goto LAB_140037923;
        pbVar12 = param_8 + 2;
        if (param_9 == pbVar12) goto LAB_140037f7a;
        bVar9 = param_8[2];
        bVar10 = *(byte *)((longlong)plVar2 + (ulonglong)bVar9 + 0x139);
        if (bVar10 == 0) {
          bVar10 = bVar9;
          if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
            bVar10 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar9,0);
          }
          if (bVar10 != 0) {
            *(byte *)((longlong)plVar2 + (ulonglong)bVar9 + 0x139) = bVar10;
          }
        }
        if (pcVar3 == do_get) {
          local_54 = CONCAT62((int6)(local_54 >> 0x10),*(undefined2 *)param_8) & 0xffffffff0000ffff;
          bVar9 = param_8[2];
          goto LAB_1400375ae;
        }
        iVar14 = (int)(char)bVar7;
        iVar16 = (int)(char)bVar10;
LAB_14003795b:
        if (*(code **)(*param_2 + 0x40) == do_get) {
          local_d8 = local_d8 & 0xffffffff00000000 | uVar20;
          local_d0 = local_d0 & 0xffffffff00000000 | uVar1 & 0xffffffff;
          lVar11 = locale::id::_M_id((id *)&ctype<char>::id);
          this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar11 * 8);
          if (this == (ctype<char> *)0x0) goto LAB_140038049;
          *param_6 = 0;
          if (this[0x38] == (ctype<char>)0x0) {
            ctype<char>::_M_widen_init(this);
            cVar8 = (ctype<char>)0x25;
            if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
              cVar8 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
            }
          }
          else {
            cVar8 = this[0x5e];
          }
          local_62 = 0;
          local_63 = (byte)iVar16;
          if (bVar7 != 0) {
            local_61 = 0;
            local_62 = (byte)iVar16;
            local_63 = bVar7;
          }
          local_54 = 0;
          local_4c = 0;
          local_98 = plVar17;
          local_90 = local_d0;
          local_88 = plVar15;
          local_80 = local_d8;
          local_64 = cVar8;
          _M_extract_via_format
                    (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,(char *)&local_64
                     ,(uint *)&local_54);
          uVar13 = local_70;
          plVar15 = local_78;
          uVar20 = local_70 & 0xffffffff;
          __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
          bVar21 = (int)uVar13 == -1;
          if ((plVar15 != (longlong *)0x0 && bVar21) &&
             (bVar21 = false, (ulonglong)plVar15[3] <= (ulonglong)plVar15[2])) {
            iVar16 = (**(code **)(*plVar15 + 0x48))(plVar15);
            bVar21 = iVar16 == -1;
            if (bVar21) {
              plVar15 = (longlong *)0x0;
            }
          }
          if (((plVar17 != (longlong *)0x0) && (bVar22)) &&
             (bVar22 = false, (ulonglong)plVar17[3] <= (ulonglong)plVar17[2])) {
            iVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
            bVar22 = iVar16 == -1;
          }
          if (bVar21 == bVar22) {
LAB_1400376e2:
            *param_6 = *param_6 | 2;
          }
        }
        else {
          local_d8 = local_d8 & 0xffffffff00000000 | uVar20;
          local_d0 = local_d0 & 0xffffffff00000000 | uVar1 & 0xffffffff;
          local_98 = plVar17;
          local_90 = local_d0;
          local_88 = plVar15;
          local_80 = local_d8;
          (**(code **)(*param_2 + 0x40))
                    (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,iVar16,iVar14);
          uVar20 = local_70 & 0xffffffff;
          plVar15 = local_78;
        }
      }
      param_8 = pbVar12 + 1;
    }
joined_r0x0001400376f4:
    if ((param_8 == param_9) || (*param_6 != 0)) goto joined_r0x000140037ba6;
  } while( true );
code_r0x000140037909:
  bVar21 = true;
  plVar15 = (longlong *)0x0;
  uVar20 = 0xffffffff;
  goto LAB_140037837;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::__cxx11::time_get<>::get
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7,char param_8,char param_9)

{
  ulonglong uVar1;
  longlong *plVar2;
  longlong lVar3;
  ctype<char> *this;
  int iVar4;
  longlong lVar5;
  longlong *plVar6;
  bool bVar7;
  bool bVar8;
  char local_92;
  char local_91;
  longlong *local_88;
  longlong local_80;
  longlong *local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ctype<char> local_58;
  char local_57;
  char local_56;
  undefined1 local_55;
  undefined8 local_54;
  undefined4 local_4c;
  
  plVar6 = (longlong *)*param_3;
  uVar1 = param_3[1];
  plVar2 = (longlong *)*param_4;
  lVar3 = param_4[1];
  if (*(code **)(*param_2 + 0x40) == do_get) {
    lVar5 = locale::id::_M_id((id *)&ctype<char>::id);
    this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar5 * 8);
    if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    *param_6 = 0;
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      local_58 = (ctype<char>)0x25;
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        local_58 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
      }
    }
    else {
      local_58 = this[0x5e];
    }
    local_91 = param_9;
    local_92 = param_8;
    if (param_9 != '\0') {
      local_55 = 0;
      local_92 = param_9;
      local_91 = param_8;
    }
    local_56 = local_91;
    local_57 = local_92;
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar2;
    local_80 = lVar3;
    local_78 = plVar6;
    local_70 = uVar1;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,(char *)&local_58,
               (uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar7 = (int)local_60 == -1;
    plVar6 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar7) &&
       (bVar7 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar4 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar7 = iVar4 == -1;
      if (bVar7) {
        plVar6 = (longlong *)0x0;
      }
    }
    bVar8 = (int)lVar3 == -1;
    if (((plVar2 != (longlong *)0x0) && (bVar8)) &&
       (bVar8 = false, (ulonglong)plVar2[3] <= (ulonglong)plVar2[2])) {
      iVar4 = (**(code **)(*plVar2 + 0x48))(plVar2);
      bVar8 = iVar4 == -1;
    }
    if (bVar7 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar6;
    param_1[1] = uVar1 & 0xffffffff00000000 | local_60 & 0xffffffff;
  }
  else {
    local_78 = plVar2;
    local_70 = lVar3;
    local_68 = plVar6;
    local_60 = uVar1;
    (**(code **)(*param_2 + 0x40))
              (param_1,param_2,&local_68,&local_78,param_5,param_6,param_7,(int)param_8,(int)param_9
              );
  }
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::__cxx11::time_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7,char param_8,char param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  ctype<char> *this;
  int iVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ctype<char> local_58;
  char local_57;
  char local_56;
  undefined1 local_55;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
  if (this != (ctype<char> *)0x0) {
    *param_6 = 0;
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      local_58 = (ctype<char>)0x25;
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        local_58 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
      }
    }
    else {
      local_58 = this[0x5e];
    }
    local_57 = param_8;
    local_56 = '\0';
    if (param_9 != '\0') {
      local_55 = 0;
      local_57 = param_9;
      local_56 = param_8;
    }
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,(char *)&local_58,
               (uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_date(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::__cxx11::time_get<>::get_date
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x20))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_time(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::__cxx11::time_get<>::get_time
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_year(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::__cxx11::time_get<>::get_year
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x38))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::date_order() const

undefined8 __thiscall std::__cxx11::time_get<>::date_order(time_get<> *this)

{
  undefined8 uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_date_order) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140038760. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_date(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::__cxx11::time_get<>::do_get_date
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(wchar_t **)(plVar7[2] + 0x10),(uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (short)local_60 == -1;
    plVar7 = local_68;
    if (local_68 != (longlong *)0x0 && bVar8) {
      if ((short *)local_68[2] < (short *)local_68[3]) {
        sVar5 = *(short *)local_68[2];
      }
      else {
        sVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      }
      plVar7 = (longlong *)0x0;
      bVar8 = sVar5 == -1;
      if (!bVar8) {
        plVar7 = local_68;
      }
    }
    bVar9 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar9)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar5 = *(short *)plVar3[2];
      }
      else {
        sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar9 = sVar5 == -1;
    }
    if (bVar8 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_60 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_time(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::__cxx11::time_get<>::do_get_time
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_4c = 0;
    local_54 = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(wchar_t **)(plVar7[2] + 0x20),(uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (short)local_60 == -1;
    plVar7 = local_68;
    if (local_68 != (longlong *)0x0 && bVar8) {
      if ((short *)local_68[2] < (short *)local_68[3]) {
        sVar5 = *(short *)local_68[2];
      }
      else {
        sVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      }
      plVar7 = (longlong *)0x0;
      bVar8 = sVar5 == -1;
      if (!bVar8) {
        plVar7 = local_68;
      }
    }
    bVar9 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar9)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar5 = *(short *)plVar3[2];
      }
      else {
        sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar9 = sVar5 == -1;
    }
    if (bVar8 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_60 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_year(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::__cxx11::time_get<>::do_get_year
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  int iVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong *plVar5;
  char cVar6;
  bool bVar7;
  short sVar8;
  short sVar9;
  int iVar10;
  uint uVar11;
  longlong lVar12;
  short *psVar13;
  ulonglong uVar14;
  longlong *plVar15;
  bool bVar16;
  bool bVar17;
  short *psVar18;
  bool bVar19;
  longlong *plVar20;
  bool bVar21;
  bool bVar22;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  undefined8 local_70;
  longlong *local_68;
  ulonglong local_60;
  int local_50;
  uint local_4c [3];
  
  plVar20 = (longlong *)*param_4;
  uVar2 = *param_3;
  uVar3 = param_3[1];
  lVar4 = param_4[1];
  local_4c[0] = 0;
  lVar12 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar5 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar12 * 8);
  if (plVar5 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_88 = plVar20;
  local_80 = lVar4;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_num(&local_68,param_2,&local_78,&local_88,&local_50,0,99,2,param_5,local_4c);
  bVar21 = (short)lVar4 == -1;
  sVar9 = (short)local_60;
  bVar19 = plVar20 != (longlong *)0x0 && bVar21;
  plVar15 = local_68;
  if (local_4c[0] == 0) {
    bVar22 = sVar9 == -1;
    bVar16 = local_68 != (longlong *)0x0 && bVar22;
    bVar17 = bVar22;
    if (bVar16) {
      if ((short *)local_68[2] < (short *)local_68[3]) {
        sVar9 = *(short *)local_68[2];
      }
      else {
        sVar9 = (**(code **)(*local_68 + 0x48))(local_68);
      }
      bVar17 = false;
      if (sVar9 == -1) {
        plVar15 = (longlong *)0x0;
        bVar16 = false;
        bVar17 = true;
      }
    }
    bVar7 = bVar21;
    if (bVar19) {
      if ((short *)plVar20[2] < (short *)plVar20[3]) {
        sVar9 = *(short *)plVar20[2];
      }
      else {
        sVar9 = (**(code **)(*plVar20 + 0x48))();
      }
      if (sVar9 == -1) {
        plVar20 = (longlong *)0x0;
        bVar19 = false;
        bVar7 = true;
      }
      else {
        bVar7 = false;
      }
    }
    if (bVar7 == bVar17) {
LAB_140038d23:
      sVar9 = (short)local_60;
      iVar10 = local_50 + 100;
      if (0x44 < local_50) {
        iVar10 = local_50;
      }
    }
    else {
      uVar14 = local_60;
      if (bVar16 != false) {
        if ((ushort *)plVar15[2] < (ushort *)plVar15[3]) {
          uVar14 = (ulonglong)*(ushort *)plVar15[2];
        }
        else {
          uVar11 = (**(code **)(*plVar15 + 0x48))(plVar15,local_60);
          uVar14 = (ulonglong)uVar11;
        }
        if ((short)uVar14 == -1) {
          plVar15 = (longlong *)0x0;
        }
      }
      cVar6 = (**(code **)(*plVar5 + 0x60))(plVar5,uVar14 & 0xffff,0x2a);
      local_60 = local_60 & 0xffffffff;
      if (9 < (byte)(cVar6 - 0x30U)) {
        bVar16 = plVar15 != (longlong *)0x0 && bVar22;
        goto LAB_140038d23;
      }
      psVar18 = (short *)plVar15[3];
      iVar1 = cVar6 + -0x30 + local_50 * 10;
      if ((short *)plVar15[2] < psVar18) {
        psVar13 = (short *)plVar15[2] + 1;
        plVar15[2] = (longlong)psVar13;
      }
      else {
        (**(code **)(*plVar15 + 0x50))(plVar15);
        psVar13 = (short *)plVar15[2];
        psVar18 = (short *)plVar15[3];
      }
      local_50 = iVar1;
      if (psVar13 < psVar18) {
        sVar9 = *psVar13;
      }
      else {
        sVar9 = (**(code **)(*plVar15 + 0x48))(plVar15);
      }
      if (sVar9 == -1) {
        plVar15 = (longlong *)0x0;
      }
      bVar16 = bVar21;
      if (bVar19 != false) {
        if ((short *)plVar20[2] < (short *)plVar20[3]) {
          sVar8 = *(short *)plVar20[2];
        }
        else {
          sVar8 = (**(code **)(*plVar20 + 0x48))(plVar20);
        }
        if (sVar8 == -1) {
          plVar20 = (longlong *)0x0;
          bVar16 = bVar19;
          bVar19 = false;
        }
        else {
          bVar16 = false;
        }
      }
      if ((sVar9 == -1) == bVar16) {
        bVar16 = plVar15 != (longlong *)0x0;
        iVar10 = local_50;
      }
      else {
        if (plVar15 == (longlong *)0x0) {
LAB_140039028:
          bVar16 = false;
          sVar9 = -1;
          plVar15 = (longlong *)0x0;
        }
        else {
          if ((short *)plVar15[2] < (short *)plVar15[3]) {
            sVar9 = *(short *)plVar15[2];
          }
          else {
            sVar9 = (**(code **)(*plVar15 + 0x48))(plVar15);
          }
          if (sVar9 == -1) goto LAB_140039028;
          bVar16 = true;
        }
        cVar6 = (**(code **)(*plVar5 + 0x60))(plVar5,sVar9,0x2a);
        iVar10 = local_50;
        if ((byte)(cVar6 - 0x30U) < 10) {
          if ((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) {
            plVar15[2] = plVar15[2] + 2;
          }
          else {
            (**(code **)(*plVar15 + 0x50))(plVar15);
          }
          iVar10 = cVar6 + -0x30 + iVar1 * 10;
        }
      }
      iVar10 = iVar10 + -0x76c;
      bVar22 = true;
      sVar9 = -1;
    }
    *(int *)(param_7 + 0x14) = iVar10;
    if (bVar16 == false) goto joined_r0x000140038cb1;
  }
  else {
    *param_6 = *param_6 | 4;
    bVar22 = sVar9 == -1;
    bVar16 = local_68 != (longlong *)0x0 && bVar22;
    if (local_68 == (longlong *)0x0 || !bVar22) goto joined_r0x000140038cb1;
  }
  if ((short *)plVar15[2] < (short *)plVar15[3]) {
    sVar8 = *(short *)plVar15[2];
  }
  else {
    sVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
  }
  bVar22 = false;
  if (sVar8 == -1) {
    plVar15 = (longlong *)0x0;
    bVar22 = bVar16;
  }
joined_r0x000140038cb1:
  if (bVar19 != false) {
    if ((short *)plVar20[2] < (short *)plVar20[3]) {
      sVar8 = *(short *)plVar20[2];
    }
    else {
      sVar8 = (**(code **)(*plVar20 + 0x48))(plVar20);
    }
    bVar21 = sVar8 == -1;
  }
  if (bVar22 == bVar21) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar15;
  param_1[1] = CONCAT62((int6)((ulonglong)uVar3 >> 0x10),sVar9);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_weekday(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::__cxx11::time_get<>::get_weekday
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x28))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_date_order() const

undefined8 std::__cxx11::time_get<>::do_date_order(void)

{
  return 0;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_monthname(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::__cxx11::time_get<>::get_monthname
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x30))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_num(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, int&, int, int, unsigned long
// long, std::ios_base&, std::_Ios_Iostate&) const

void std::__cxx11::time_get<>::_M_extract_num
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
               int *param_5,int param_6,int param_7,ulonglong param_8,longlong param_9,
               uint *param_10)

{
  ulonglong uVar1;
  undefined8 uVar2;
  longlong *plVar3;
  char cVar4;
  short sVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  int iVar9;
  longlong *plVar10;
  longlong *plVar11;
  ulonglong uVar12;
  bool bVar13;
  bool bVar14;
  bool bVar15;
  bool bVar16;
  
  uVar1 = param_3[1];
  uVar2 = param_4[1];
  plVar10 = (longlong *)*param_3;
  plVar11 = (longlong *)*param_4;
  lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_9 + 0xd0) + 8) + lVar6 * 8);
  if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  bVar13 = (short)uVar2 == -1;
  uVar8 = 0;
  iVar9 = 0;
  uVar12 = uVar1 & 0xffffffff;
  while( true ) {
    bVar14 = (short)uVar12 == -1;
    bVar15 = plVar10 != (longlong *)0x0;
    if (bVar15 && bVar14) break;
    bVar15 = bVar14;
    if (plVar11 == (longlong *)0x0 || !bVar13) goto LAB_1400392c2;
LAB_140039390:
    bVar16 = plVar11 != (longlong *)0x0;
    if ((short *)plVar11[2] < (short *)plVar11[3]) {
      sVar5 = *(short *)plVar11[2];
    }
    else {
      sVar5 = (**(code **)(*plVar11 + 0x48))(plVar11);
    }
    if (sVar5 == -1) {
      plVar11 = (longlong *)0x0;
    }
    if (bVar15 == (sVar5 == -1 && (bVar16 && bVar13))) goto LAB_1400393c0;
LAB_1400392ce:
    if (param_8 <= uVar8) goto LAB_1400393c0;
    if ((plVar10 == (longlong *)0x0) || (!bVar14)) {
      uVar7 = uVar12 & 0xffff;
    }
    else {
      if ((ushort *)plVar10[2] < (ushort *)plVar10[3]) {
        uVar7 = (ulonglong)*(ushort *)plVar10[2];
      }
      else {
        uVar7 = (**(code **)(*plVar10 + 0x48))(plVar10);
        uVar7 = uVar7 & 0xffff;
      }
      if ((short)uVar7 == -1) {
        plVar10 = (longlong *)0x0;
      }
    }
    cVar4 = (**(code **)(*plVar3 + 0x60))(plVar3,uVar7,0x2a);
    if (9 < (byte)(cVar4 - 0x30U)) goto LAB_1400393c0;
    iVar9 = cVar4 + -0x30 + iVar9 * 10;
    if (param_7 < iVar9) goto LAB_1400393ea;
    if ((ulonglong)plVar10[2] < (ulonglong)plVar10[3]) {
      plVar10[2] = plVar10[2] + 2;
    }
    else {
      (**(code **)(*plVar10 + 0x50))(plVar10);
    }
    uVar8 = uVar8 + 1;
    uVar12 = 0xffffffff;
  }
  if ((short *)plVar10[2] < (short *)plVar10[3]) {
    sVar5 = *(short *)plVar10[2];
  }
  else {
    sVar5 = (**(code **)(*plVar10 + 0x48))(plVar10);
  }
  if (sVar5 == -1) {
    plVar10 = (longlong *)0x0;
  }
  bVar15 = sVar5 == -1 && (bVar15 && bVar14);
  if (plVar11 != (longlong *)0x0 && bVar13) goto LAB_140039390;
LAB_1400392c2:
  if (bVar15 != bVar13) goto LAB_1400392ce;
LAB_1400393c0:
  if ((uVar8 != 0 && param_6 <= iVar9) && (iVar9 <= param_7)) {
    *param_5 = iVar9;
    goto LAB_1400393f5;
  }
LAB_1400393ea:
  *param_10 = *param_10 | 4;
LAB_1400393f5:
  *param_1 = plVar10;
  param_1[1] = CONCAT62((int6)(uVar1 >> 0x10),(short)uVar12);
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_weekday(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::__cxx11::time_get<>::do_get_weekday
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  longlong lVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  short sVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_118;
  longlong local_110;
  longlong local_108;
  ulonglong local_100;
  longlong *local_f8;
  ulonglong local_f0;
  int local_e0;
  uint local_dc;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  
  lVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_dc = 0;
    uStack_a0 = *(undefined8 *)(lVar5 + 0x58);
    local_98 = *(undefined8 *)(lVar5 + 0x60);
    uStack_90 = *(undefined8 *)(lVar5 + 0x68);
    local_88 = *(undefined8 *)(lVar5 + 0x70);
    uStack_80 = *(undefined8 *)(lVar5 + 0x78);
    local_78 = *(undefined8 *)(lVar5 + 0x80);
    uStack_70 = *(undefined8 *)(lVar5 + 0x88);
    local_d8 = *(undefined8 *)(lVar5 + 0x90);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x98);
    local_c8 = *(undefined8 *)(lVar5 + 0xa0);
    uStack_c0 = *(undefined8 *)(lVar5 + 0xa8);
    local_b8 = *(undefined8 *)(lVar5 + 0xb0);
    uStack_b0 = *(undefined8 *)(lVar5 + 0xb8);
    local_a8 = *(undefined8 *)(lVar5 + 0xc0);
    local_118 = plVar3;
    local_110 = lVar4;
    local_108 = lVar1;
    local_100 = uVar2;
    _M_extract_wday_or_month
              (&local_f8,param_2,&local_108,(ulonglong *)&local_118,&local_e0,(longlong)&local_d8,7,
               param_5,&local_dc);
    if (local_dc == 0) {
      *(int *)(param_7 + 0x18) = local_e0;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (short)local_f0 == -1;
    plVar8 = local_f8;
    if (local_f8 != (longlong *)0x0 && bVar9) {
      if ((short *)local_f8[2] < (short *)local_f8[3]) {
        sVar6 = *(short *)local_f8[2];
      }
      else {
        sVar6 = (**(code **)(*local_f8 + 0x48))(local_f8);
      }
      plVar8 = (longlong *)0x0;
      bVar9 = sVar6 == -1;
      if (!bVar9) {
        plVar8 = local_f8;
      }
    }
    bVar10 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar10)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar6 = *(short *)plVar3[2];
      }
      else {
        sVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar10 = sVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_f0 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_name(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, int&, wchar_t const**, unsigned
// long long, std::ios_base&, std::_Ios_Iostate&) const

longlong *
std::__cxx11::time_get<>::_M_extract_name
          (longlong *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          undefined4 *param_5,longlong param_6,ulonglong param_7,longlong param_8,uint *param_9)

{
  longlong lVar1;
  longlong *plVar2;
  code *pcVar3;
  wchar_t *_Str;
  byte bVar4;
  byte bVar5;
  short sVar6;
  undefined2 uVar7;
  short sVar8;
  ushort uVar9;
  longlong lVar10;
  size_t sVar11;
  ulonglong *puVar12;
  short *psVar13;
  longlong *plVar14;
  longlong lVar15;
  ulonglong *puVar16;
  ulonglong *puVar17;
  ulonglong uVar18;
  ulonglong *puVar19;
  undefined4 uVar20;
  undefined2 *puVar21;
  ulonglong uVar22;
  ulonglong uVar23;
  ulonglong uVar24;
  bool bVar25;
  bool bVar26;
  bool bVar27;
  byte bVar28;
  undefined *apuStack_d0 [5];
  ulonglong local_a8 [3];
  ulonglong *local_90;
  longlong *local_88;
  longlong *local_80;
  longlong *local_78;
  byte local_6b;
  ushort local_6a;
  ulonglong *local_68;
  ulonglong *local_60;
  longlong *local_58;
  ulonglong *local_50;
  
  lVar15 = param_3[1];
  plVar14 = (longlong *)*param_3;
  local_80 = (longlong *)*param_4;
  lVar1 = param_4[1];
  local_58 = (longlong *)CONCAT44(local_58._4_4_,(int)lVar15);
  apuStack_d0[0] = (undefined *)0x140039807;
  local_a8[1] = lVar15;
  local_60 = (ulonglong *)plVar14;
  local_50 = (ulonglong *)local_80;
  lVar10 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar10 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    apuStack_d0[0] = &UNK_14003a3c4;
    __throw_bad_cast();
  }
  apuStack_d0[0] = (undefined *)0x140039835;
  uVar20 = local_58._0_4_;
  uVar18 = (ulonglong)local_58 & 0xffffffff;
  bVar25 = (short)lVar15 == -1;
  puVar17 = local_50;
  puVar19 = local_60;
  bVar27 = bVar25;
  if (local_60 != (ulonglong *)0x0 && bVar25) {
    if ((short *)plVar14[2] < (short *)plVar14[3]) {
      sVar6 = *(short *)plVar14[2];
    }
    else {
      local_58 = (longlong *)local_50;
      local_50 = (ulonglong *)CONCAT44(local_50._4_4_,uVar20);
      pcVar3 = *(code **)(*plVar14 + 0x48);
      apuStack_d0[param_7 * -2] = (undefined *)0x14003a2f4;
      sVar6 = (*pcVar3)(plVar14);
      uVar18 = (ulonglong)local_50 & 0xffffffff;
      puVar17 = (ulonglong *)local_58;
    }
    bVar27 = sVar6 == -1;
    puVar19 = (ulonglong *)(longlong *)0x0;
    if (!bVar27) {
      puVar19 = (ulonglong *)plVar14;
    }
  }
  bVar26 = (short)lVar1 == -1;
  local_6b = bVar26;
  if (puVar17 != (ulonglong *)0x0 && bVar26) {
    if ((short *)puVar17[2] < (short *)puVar17[3]) {
      sVar6 = *(short *)puVar17[2];
    }
    else {
      local_58 = (longlong *)CONCAT44(local_58._4_4_,(int)uVar18);
      pcVar3 = *(code **)(*puVar17 + 0x48);
      local_60 = puVar19;
      local_50 = puVar17;
      apuStack_d0[param_7 * -2] = (undefined *)0x14003a32c;
      sVar6 = (*pcVar3)(puVar17);
      uVar18 = (ulonglong)local_58 & 0xffffffff;
      puVar17 = local_50;
      puVar19 = local_60;
    }
    bVar26 = sVar6 == -1;
    local_80 = (longlong *)0x0;
    if (sVar6 != -1) {
      local_80 = (longlong *)puVar17;
    }
  }
  uVar20 = (undefined4)uVar18;
  if (bVar26 != bVar27) {
    if ((puVar19 == (ulonglong *)0x0) || (!bVar25)) {
      uVar18 = uVar18 & 0xffff;
      local_58 = (longlong *)puVar19;
    }
    else {
      if ((ushort *)puVar19[2] < (ushort *)puVar19[3]) {
        uVar18 = (ulonglong)*(ushort *)puVar19[2];
      }
      else {
        local_58 = (longlong *)CONCAT44(local_58._4_4_,uVar20);
        pcVar3 = *(code **)(*puVar19 + 0x48);
        local_50 = puVar19;
        apuStack_d0[param_7 * -2] = (undefined *)0x14003a3ae;
        uVar18 = (*pcVar3)(puVar19);
        uVar20 = SUB84(local_58,0);
        uVar18 = uVar18 & 0xffff;
        puVar19 = local_50;
      }
      local_58 = (longlong *)puVar19;
      if ((short)uVar18 == -1) {
        local_58 = (longlong *)0x0;
      }
    }
    local_50 = (ulonglong *)CONCAT44(local_50._4_4_,uVar20);
    pcVar3 = *(code **)(*plVar2 + 0x40);
    apuStack_d0[param_7 * -2] = (undefined *)0x1400398e0;
    sVar6 = (*pcVar3)(plVar2,uVar18);
    pcVar3 = *(code **)(*plVar2 + 0x30);
    apuStack_d0[param_7 * -2] = (undefined *)0x1400398ee;
    uVar7 = (*pcVar3)(plVar2,uVar18);
    uVar18 = (ulonglong)local_50 & 0xffffffff;
    puVar19 = (ulonglong *)local_58;
    if (param_7 != 0) {
      local_68 = local_a8 + param_7 * -2 + param_7;
      local_6a = (ushort)local_50;
      local_78 = local_58;
      local_58 = (longlong *)CONCAT62(local_58._2_6_,uVar7);
      uVar18 = 0;
      uVar24 = 0;
      local_60 = local_a8 + param_7 * -2;
      do {
        while( true ) {
          uVar22 = uVar18;
          uVar7 = **(undefined2 **)(param_6 + uVar22 * 8);
          pcVar3 = *(code **)(*plVar2 + 0x40);
          apuStack_d0[param_7 * -2] = (undefined *)0x14003994a;
          sVar8 = (*pcVar3)(plVar2,uVar7);
          if (sVar6 != sVar8) break;
LAB_140039966:
          _Str = *(wchar_t **)(param_6 + uVar22 * 8);
          uVar23 = uVar24 + 1;
          local_50 = local_68 + uVar24;
          apuStack_d0[param_7 * -2] = (undefined *)0x140039988;
          sVar11 = wcslen(_Str);
          *local_50 = sVar11;
          local_60[uVar24] = uVar22;
          uVar18 = uVar22 + 1;
          uVar24 = uVar23;
          if (param_7 == uVar22 + 1) goto LAB_1400399a0;
        }
        uVar7 = **(undefined2 **)(param_6 + uVar22 * 8);
        pcVar3 = *(code **)(*plVar2 + 0x30);
        apuStack_d0[param_7 * -2] = (undefined *)0x140039960;
        sVar8 = (*pcVar3)(plVar2,uVar7);
        if ((short)local_58 == sVar8) goto LAB_140039966;
        uVar18 = uVar22 + 1;
      } while (param_7 != uVar22 + 1);
LAB_1400399a0:
      puVar17 = local_60;
      uVar18 = (ulonglong)local_6a;
      puVar19 = (ulonglong *)local_78;
      if (1 < uVar24) {
        local_60 = (ulonglong *)0x0;
        uVar18 = *local_68;
        local_90 = local_68 + 1;
        local_a8[2] = uVar22 + 1;
        local_78 = (longlong *)(uVar24 * 8);
LAB_1400399f0:
        puVar12 = local_90;
        uVar22 = uVar18;
        if (((int)(ulonglong *)((longlong)local_68 + (longlong)local_78) - (int)local_90 & 8U) == 0)
        goto LAB_140039a30;
        uVar22 = *local_90;
        puVar12 = local_68;
        if (uVar18 <= *local_90) {
          uVar22 = uVar18;
        }
        while (puVar12 = puVar12 + 2,
              (ulonglong *)((longlong)local_68 + (longlong)local_78) != puVar12) {
LAB_140039a30:
          if (*puVar12 < uVar22) {
            uVar22 = *puVar12;
          }
          if (puVar12[1] < uVar22) {
            uVar22 = puVar12[1];
          }
        }
        local_60 = (ulonglong *)((longlong)local_60 + 1);
        if (puVar19[2] < puVar19[3]) {
          puVar19[2] = puVar19[2] + 2;
        }
        else {
          pcVar3 = *(code **)(*puVar19 + 0x50);
          apuStack_d0[param_7 * -2] = (undefined *)0x140039df9;
          (*pcVar3)(puVar19);
        }
        if (local_60 == (ulonglong *)uVar22) {
          if ((short *)puVar19[2] < (short *)puVar19[3]) {
            sVar6 = *(short *)puVar19[2];
          }
          else {
            pcVar3 = *(code **)(*puVar19 + 0x48);
            apuStack_d0[param_7 * -2] = (undefined *)0x14003a2bf;
            sVar6 = (*pcVar3)(puVar19);
          }
          bVar28 = sVar6 == -1;
          if ((bool)bVar28) {
            puVar19 = (ulonglong *)0x0;
          }
          bVar5 = local_80 != (longlong *)0x0 & local_6b;
          bVar4 = local_6b;
          plVar14 = local_80;
          if (bVar5 != 0) {
            if ((short *)local_80[2] < (short *)local_80[3]) {
              sVar6 = *(short *)local_80[2];
            }
            else {
              local_50 = (ulonglong *)CONCAT71(local_50._1_7_,bVar28);
              pcVar3 = *(code **)(*local_80 + 0x48);
              apuStack_d0[param_7 * -2] = (undefined *)0x14003a30e;
              sVar6 = (*pcVar3)();
              bVar28 = (byte)local_50;
            }
            if (sVar6 != -1) {
              bVar5 = 0;
            }
            bVar4 = bVar5;
            plVar14 = (longlong *)0x0;
            if (sVar6 != -1) {
              plVar14 = local_80;
            }
          }
          local_80 = plVar14;
          bVar27 = false;
          if (bVar28 == bVar4) goto LAB_140039f4a;
          if (puVar19 == (ulonglong *)0x0) {
            lVar15 = *plVar2;
LAB_14003a120:
            puVar19 = (ulonglong *)0x0;
            pcVar3 = *(code **)(lVar15 + 0x40);
            apuStack_d0[param_7 * -2] = (undefined *)0x14003a12d;
            local_6a = (*pcVar3)(plVar2,0xffff);
            sVar6 = -1;
          }
          else {
            if ((short *)puVar19[2] < (short *)puVar19[3]) {
              sVar6 = *(short *)puVar19[2];
            }
            else {
              pcVar3 = *(code **)(*puVar19 + 0x48);
              apuStack_d0[param_7 * -2] = (undefined *)0x14003a2db;
              sVar6 = (*pcVar3)(puVar19);
            }
            lVar15 = *plVar2;
            pcVar3 = *(code **)(lVar15 + 0x40);
            if (sVar6 == -1) goto LAB_14003a120;
            apuStack_d0[param_7 * -2] = (undefined *)0x140039e7a;
            local_6a = (*pcVar3)(plVar2);
            if ((short *)puVar19[2] < (short *)puVar19[3]) {
              sVar6 = *(short *)puVar19[2];
            }
            else {
              pcVar3 = *(code **)(*puVar19 + 0x48);
              apuStack_d0[param_7 * -2] = (undefined *)0x14003a2cd;
              sVar6 = (*pcVar3)(puVar19);
            }
            if (sVar6 == -1) {
              sVar6 = -1;
              puVar19 = (ulonglong *)0x0;
            }
          }
          uVar22 = 0;
          pcVar3 = *(code **)(*plVar2 + 0x30);
          apuStack_d0[param_7 * -2] = (undefined *)0x140039eb3;
          uVar7 = (*pcVar3)(plVar2,sVar6);
          puVar12 = local_68;
          local_58 = (longlong *)CONCAT62(local_58._2_6_,uVar7);
          local_50 = (ulonglong *)((longlong)local_60 * 2);
          local_a8[0] = uVar18;
          local_88 = (longlong *)puVar19;
          do {
            if (local_60 < puVar12[uVar22]) {
              puVar21 = (undefined2 *)
                        ((longlong)local_50 + *(longlong *)(param_6 + puVar17[uVar22] * 8));
              uVar7 = *puVar21;
              pcVar3 = *(code **)(*plVar2 + 0x40);
              apuStack_d0[param_7 * -2] = (undefined *)0x140039f0e;
              uVar9 = (*pcVar3)(plVar2,uVar7);
              if (uVar9 != local_6a) {
                uVar7 = *puVar21;
                pcVar3 = *(code **)(*plVar2 + 0x30);
                apuStack_d0[param_7 * -2] = (undefined *)0x140039f24;
                sVar6 = (*pcVar3)(plVar2,uVar7);
                if ((short)local_58 != sVar6) goto LAB_140039f2e;
              }
              bVar27 = true;
              puVar19 = (ulonglong *)local_88;
              uVar18 = local_a8[0];
              goto LAB_140039f4a;
            }
LAB_140039f2e:
            uVar22 = uVar22 + 1;
          } while (uVar22 != uVar24);
          bVar27 = false;
          puVar19 = (ulonglong *)local_88;
          uVar18 = local_a8[0];
LAB_140039f4a:
          puVar12 = local_68;
          uVar22 = 0;
          plVar14 = local_78;
          do {
            if ((local_60 == (ulonglong *)uVar18) == bVar27) {
              uVar24 = uVar24 - 1;
              plVar14 = (longlong *)(uVar24 * 8);
              puVar17[uVar22] = puVar17[uVar24];
              local_68[uVar22] = local_68[uVar24];
              if (uVar24 <= uVar22) goto LAB_140039f98;
            }
            else {
              uVar22 = uVar22 + 1;
              if (uVar24 <= uVar22) goto LAB_140039f98;
            }
            uVar18 = local_68[uVar22];
          } while( true );
        }
        if (local_60 < uVar22) {
          psVar13 = (short *)puVar19[2];
          if ((short *)puVar19[3] <= psVar13) goto LAB_14003a027;
          goto LAB_140039a8a;
        }
        goto LAB_14003a038;
      }
      local_60 = (ulonglong *)0x0;
      goto LAB_140039c45;
    }
  }
LAB_140039889:
  uVar7 = (undefined2)uVar18;
  *param_9 = *param_9 | 4;
LAB_140039893:
  *param_1 = (longlong)puVar19;
  param_1[1] = CONCAT62((int6)(local_a8[1] >> 0x10),uVar7);
  return param_1;
LAB_140039f98:
  local_78 = plVar14;
  if (bVar27 == false) {
    if (uVar24 != 2) {
      uVar18 = 0xffffffff;
      if (uVar24 != 1) goto LAB_140039889;
      goto LAB_140039c6a;
    }
    if ((local_a8[2] & 1) != 0) goto LAB_14003a038;
    uVar24 = *puVar17;
    uVar22 = local_a8[2] >> 1;
    if (uVar24 < uVar22) {
      if (uVar22 + uVar24 != puVar17[1]) goto LAB_14003a038;
    }
    else {
      uVar18 = 0xffffffff;
      if (uVar24 - uVar22 != puVar17[1]) goto LAB_140039889;
      *puVar17 = uVar24 - uVar22;
      *puVar12 = puVar12[1];
      uVar24 = *puVar17;
    }
    goto LAB_140039c6d;
  }
  uVar18 = *local_68;
  if (1 < uVar24) {
    puVar12 = (ulonglong *)((longlong)local_68 + (longlong)plVar14);
    puVar16 = local_90;
    if (((int)puVar12 - (int)local_90 & 8U) != 0) {
      if (*local_90 < uVar18) {
        uVar18 = *local_90;
      }
      puVar16 = local_68 + 2;
      if (puVar16 == puVar12) goto LAB_14003a006;
    }
    do {
      if (*puVar16 < uVar18) {
        uVar18 = *puVar16;
      }
      if (puVar16[1] < uVar18) {
        uVar18 = puVar16[1];
      }
      puVar16 = puVar16 + 2;
    } while (puVar16 != puVar12);
  }
LAB_14003a006:
  if (uVar18 <= local_60) goto LAB_140039c39;
  if (puVar19 != (ulonglong *)0x0) {
    psVar13 = (short *)puVar19[2];
    if (psVar13 < (short *)puVar19[3]) {
LAB_140039a8a:
      sVar6 = *psVar13;
    }
    else {
LAB_14003a027:
      pcVar3 = *(code **)(*puVar19 + 0x48);
      apuStack_d0[param_7 * -2] = (undefined *)0x14003a030;
      sVar6 = (*pcVar3)(puVar19);
    }
    bVar27 = sVar6 == -1;
    if (bVar27) {
      puVar19 = (ulonglong *)0x0;
    }
  }
  bVar4 = local_80 != (longlong *)0x0 & local_6b;
  plVar14 = local_80;
  bVar28 = local_6b;
  if (bVar4 != 0) {
    if ((short *)local_80[2] < (short *)local_80[3]) {
      sVar6 = *(short *)local_80[2];
    }
    else {
      pcVar3 = *(code **)(*local_80 + 0x48);
      apuStack_d0[param_7 * -2] = (undefined *)0x14003a145;
      sVar6 = (*pcVar3)();
    }
    if (sVar6 != -1) {
      bVar4 = 0;
    }
    plVar14 = (longlong *)0x0;
    bVar28 = bVar4;
    if (sVar6 != -1) {
      plVar14 = local_80;
    }
  }
  local_80 = plVar14;
  if (bVar27 == (bool)bVar28) goto LAB_140039c39;
  if (puVar19 == (ulonglong *)0x0) {
    lVar15 = *plVar2;
  }
  else {
    if ((short *)puVar19[2] < (short *)puVar19[3]) {
      sVar6 = *(short *)puVar19[2];
    }
    else {
      pcVar3 = *(code **)(*puVar19 + 0x48);
      apuStack_d0[param_7 * -2] = (undefined *)0x14003a161;
      sVar6 = (*pcVar3)(puVar19);
    }
    lVar15 = *plVar2;
    pcVar3 = *(code **)(lVar15 + 0x40);
    if (sVar6 != -1) {
      apuStack_d0[param_7 * -2] = (undefined *)0x140039af1;
      uVar7 = (*pcVar3)(plVar2);
      local_58 = (longlong *)CONCAT62(local_58._2_6_,uVar7);
      if ((short *)puVar19[2] < (short *)puVar19[3]) {
        sVar6 = *(short *)puVar19[2];
      }
      else {
        pcVar3 = *(code **)(*puVar19 + 0x48);
        apuStack_d0[param_7 * -2] = (undefined *)0x14003a153;
        sVar6 = (*pcVar3)(puVar19);
      }
      if (sVar6 == -1) {
        sVar6 = -1;
        puVar19 = (ulonglong *)0x0;
      }
      goto LAB_140039b1e;
    }
  }
  puVar19 = (ulonglong *)0x0;
  pcVar3 = *(code **)(lVar15 + 0x40);
  apuStack_d0[param_7 * -2] = (undefined *)0x140039bf1;
  uVar7 = (*pcVar3)(plVar2,0xffff);
  sVar6 = -1;
  local_58 = (longlong *)CONCAT62(local_58._2_6_,uVar7);
LAB_140039b1e:
  pcVar3 = *(code **)(*plVar2 + 0x30);
  apuStack_d0[param_7 * -2] = (undefined *)0x140039b28;
  local_6a = (*pcVar3)(plVar2,sVar6);
  if (uVar24 == 0) {
    uVar18 = 0xffffffff;
    goto LAB_140039889;
  }
  uVar18 = 0;
  local_50 = (ulonglong *)((longlong)local_60 * 2);
  local_88 = (longlong *)puVar19;
  do {
    while( true ) {
      puVar21 = (undefined2 *)((longlong)local_50 + *(longlong *)(param_6 + puVar17[uVar18] * 8));
      uVar7 = *puVar21;
      pcVar3 = *(code **)(*plVar2 + 0x40);
      apuStack_d0[param_7 * -2] = (undefined *)0x140039bb7;
      sVar6 = (*pcVar3)(plVar2,uVar7);
      if ((short)local_58 != sVar6) break;
LAB_140039bbd:
      uVar18 = uVar18 + 1;
      if (uVar24 <= uVar18) goto LAB_140039bc6;
    }
    uVar7 = *puVar21;
    pcVar3 = *(code **)(*plVar2 + 0x30);
    apuStack_d0[param_7 * -2] = (undefined *)0x140039b5e;
    uVar9 = (*pcVar3)(plVar2,uVar7);
    if (local_6a == uVar9) goto LAB_140039bbd;
    uVar24 = uVar24 - 1;
    puVar17[uVar18] = puVar17[uVar24];
    local_68[uVar18] = local_68[uVar24];
    local_78 = (longlong *)(uVar24 * 8);
  } while (uVar18 < uVar24);
LAB_140039bc6:
  puVar19 = (ulonglong *)local_88;
  if (uVar24 < 2) goto LAB_140039c39;
  uVar18 = *local_68;
  goto LAB_1400399f0;
LAB_140039c39:
  uVar18 = 0xffffffff;
LAB_140039c45:
  if (uVar24 == 1) {
    if (puVar19[2] < puVar19[3]) {
      puVar19[2] = puVar19[2] + 2;
    }
    else {
      pcVar3 = *(code **)(*puVar19 + 0x50);
      local_50 = puVar19;
      apuStack_d0[param_7 * -2] = (undefined *)0x14003a22b;
      (*pcVar3)(puVar19);
      puVar19 = local_50;
    }
    local_60 = (ulonglong *)((longlong)local_60 + 1);
LAB_140039c6a:
    uVar24 = *puVar17;
LAB_140039c6d:
    lVar15 = *(longlong *)(param_6 + uVar24 * 8);
    uVar18 = *local_68;
    if (local_60 < uVar18) {
      if (puVar19 != (ulonglong *)0x0) goto LAB_140039d49;
      bVar25 = true;
      bVar27 = (bool)(local_80 != (longlong *)0x0 & local_6b);
      if (bVar27 != false) goto LAB_140039d7e;
LAB_140039ca8:
      local_50 = puVar19;
      if ((bool)local_6b != bVar25) {
        do {
          uVar7 = *(undefined2 *)(lVar15 + (longlong)local_60 * 2);
          pcVar3 = *(code **)(*plVar2 + 0x40);
          apuStack_d0[param_7 * -2] = (undefined *)0x140039cca;
          sVar6 = (*pcVar3)(plVar2,uVar7);
          puVar19 = local_50;
          if (local_50 == (ulonglong *)0x0) {
LAB_140039cd9:
            pcVar3 = *(code **)(*plVar2 + 0x40);
            apuStack_d0[param_7 * -2] = (undefined *)0x140039ce7;
            sVar8 = (*pcVar3)(plVar2,0xffff);
            if (sVar8 != sVar6) {
              uVar7 = *(undefined2 *)(lVar15 + (longlong)local_60 * 2);
              pcVar3 = *(code **)(*plVar2 + 0x30);
              apuStack_d0[param_7 * -2] = (undefined *)0x140039d01;
              sVar6 = (*pcVar3)(plVar2,uVar7);
              sVar8 = -1;
              local_50 = (ulonglong *)0x0;
LAB_140039d0b:
              pcVar3 = *(code **)(*plVar2 + 0x30);
              apuStack_d0[param_7 * -2] = (undefined *)0x140039d18;
              sVar8 = (*pcVar3)(plVar2,sVar8);
              puVar19 = local_50;
              if (sVar8 == sVar6) goto LAB_140039d25;
              break;
            }
            puVar19 = (ulonglong *)0x0;
            uVar22 = _DAT_00000010;
            if (uRam0000000000000018 <= _DAT_00000010) goto LAB_14003a054;
LAB_140039d33:
            puVar19[2] = uVar22 + 2;
          }
          else {
            if ((short *)local_50[2] < (short *)local_50[3]) {
              sVar8 = *(short *)local_50[2];
            }
            else {
              pcVar3 = *(code **)(*local_50 + 0x48);
              apuStack_d0[param_7 * -2] = (undefined *)0x14003a241;
              sVar8 = (*pcVar3)(puVar19);
            }
            if (sVar8 == -1) goto LAB_140039cd9;
            pcVar3 = *(code **)(*plVar2 + 0x40);
            apuStack_d0[param_7 * -2] = (undefined *)0x14003a0ab;
            sVar8 = (*pcVar3)(plVar2,sVar8);
            if (sVar6 != sVar8) {
              uVar7 = *(undefined2 *)(lVar15 + (longlong)local_60 * 2);
              pcVar3 = *(code **)(*plVar2 + 0x30);
              apuStack_d0[param_7 * -2] = (undefined *)0x14003a0cd;
              sVar6 = (*pcVar3)(plVar2,uVar7);
              puVar19 = local_50;
              if ((short *)local_50[2] < (short *)local_50[3]) {
                sVar8 = *(short *)local_50[2];
              }
              else {
                pcVar3 = *(code **)(*local_50 + 0x48);
                apuStack_d0[param_7 * -2] = (undefined *)0x14003a284;
                sVar8 = (*pcVar3)(puVar19);
              }
              if (sVar8 == -1) {
                sVar8 = -1;
                local_50 = (ulonglong *)0x0;
              }
              goto LAB_140039d0b;
            }
LAB_140039d25:
            uVar22 = local_50[2];
            puVar19 = local_50;
            if (local_50[2] < local_50[3]) goto LAB_140039d33;
LAB_14003a054:
            pcVar3 = *(code **)(*puVar19 + 0x50);
            local_50 = puVar19;
            apuStack_d0[param_7 * -2] = (undefined *)0x14003a061;
            (*pcVar3)(puVar19);
            puVar19 = local_50;
          }
          local_60 = (ulonglong *)((longlong)local_60 + 1);
          if (local_60 == (ulonglong *)uVar18) goto LAB_140039dc3;
LAB_140039d49:
          if ((short *)puVar19[2] < (short *)puVar19[3]) {
            sVar6 = *(short *)puVar19[2];
          }
          else {
            pcVar3 = *(code **)(*puVar19 + 0x48);
            local_50 = puVar19;
            apuStack_d0[param_7 * -2] = (undefined *)0x14003a26e;
            sVar6 = (*pcVar3)(puVar19);
            puVar19 = local_50;
          }
          bVar25 = sVar6 == -1;
          if (bVar25) {
            puVar19 = (ulonglong *)0x0;
          }
          bVar27 = (bool)(local_80 != (longlong *)0x0 & local_6b);
          if (bVar27 == false) goto LAB_140039ca8;
LAB_140039d7e:
          local_50 = puVar19;
          if ((short *)local_80[2] < (short *)local_80[3]) {
            sVar6 = *(short *)local_80[2];
          }
          else {
            pcVar3 = *(code **)(*local_80 + 0x48);
            apuStack_d0[param_7 * -2] = (undefined *)0x14003a258;
            sVar6 = (*pcVar3)();
          }
          if (sVar6 != -1) {
            bVar27 = false;
          }
          plVar14 = (longlong *)0x0;
          if (sVar6 != -1) {
            plVar14 = local_80;
          }
          puVar19 = local_50;
          local_80 = plVar14;
          if (bVar27 == bVar25) break;
        } while( true );
      }
    }
    if ((ulonglong *)uVar18 == local_60) {
LAB_140039dc3:
      uVar7 = 0xffff;
      *param_5 = (int)uVar24;
      goto LAB_140039893;
    }
LAB_14003a038:
    uVar18 = 0xffffffff;
  }
  goto LAB_140039889;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_monthname(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::__cxx11::time_get<>::do_get_monthname
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  longlong lVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  short sVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_1a8;
  longlong local_1a0;
  longlong local_198;
  ulonglong local_190;
  longlong *local_188;
  ulonglong local_180;
  int local_170;
  uint local_16c;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  lVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_16c = 0;
    local_108 = *(undefined8 *)(lVar5 + 200);
    uStack_100 = *(undefined8 *)(lVar5 + 0xd0);
    local_f8 = *(undefined8 *)(lVar5 + 0xd8);
    uStack_f0 = *(undefined8 *)(lVar5 + 0xe0);
    local_e8 = *(undefined8 *)(lVar5 + 0xe8);
    uStack_e0 = *(undefined8 *)(lVar5 + 0xf0);
    local_d8 = *(undefined8 *)(lVar5 + 0xf8);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x100);
    local_c8 = *(undefined8 *)(lVar5 + 0x108);
    uStack_c0 = *(undefined8 *)(lVar5 + 0x110);
    local_b8 = *(undefined8 *)(lVar5 + 0x118);
    uStack_b0 = *(undefined8 *)(lVar5 + 0x120);
    local_128 = *(undefined8 *)(lVar5 + 0x168);
    uStack_120 = *(undefined8 *)(lVar5 + 0x170);
    local_118 = *(undefined8 *)(lVar5 + 0x178);
    uStack_110 = *(undefined8 *)(lVar5 + 0x180);
    local_158 = *(undefined8 *)(lVar5 + 0x138);
    uStack_150 = *(undefined8 *)(lVar5 + 0x140);
    local_148 = *(undefined8 *)(lVar5 + 0x148);
    uStack_140 = *(undefined8 *)(lVar5 + 0x150);
    local_138 = *(undefined8 *)(lVar5 + 0x158);
    uStack_130 = *(undefined8 *)(lVar5 + 0x160);
    local_168 = *(undefined8 *)(lVar5 + 0x128);
    uStack_160 = *(undefined8 *)(lVar5 + 0x130);
    local_1a8 = plVar3;
    local_1a0 = lVar4;
    local_198 = lVar1;
    local_190 = uVar2;
    _M_extract_wday_or_month
              (&local_188,param_2,&local_198,(ulonglong *)&local_1a8,&local_170,(longlong)&local_168
               ,0xc,param_5,&local_16c);
    if (local_16c == 0) {
      *(int *)(param_7 + 0x10) = local_170;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (short)local_180 == -1;
    plVar8 = local_188;
    if (local_188 != (longlong *)0x0 && bVar9) {
      if ((short *)local_188[2] < (short *)local_188[3]) {
        sVar6 = *(short *)local_188[2];
      }
      else {
        sVar6 = (**(code **)(*local_188 + 0x48))(local_188);
      }
      plVar8 = (longlong *)0x0;
      bVar9 = sVar6 == -1;
      if (!bVar9) {
        plVar8 = local_188;
      }
    }
    bVar10 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar10)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar6 = *(short *)plVar3[2];
      }
      else {
        sVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar10 = sVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_180 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_via_format(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, wchar_t const*) const

undefined8 *
std::__cxx11::time_get<>::_M_extract_via_format
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,wchar_t *param_8)

{
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 local_20;
  uint local_14 [3];
  
  local_28 = *param_3;
  local_20 = param_3[1];
  local_38 = *param_4;
  uStack_30 = param_4[1];
  local_14[0] = 0;
  local_14[1] = 0;
  local_14[2] = 0;
  _M_extract_via_format
            (param_1,param_2,&local_28,&local_38,param_5,param_6,param_7,param_8,local_14);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_via_format(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, wchar_t const*, std::__time_get_state&) const

undefined8 *
std::__cxx11::time_get<>::_M_extract_via_format
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,wchar_t *param_8,uint *param_9)

{
  longlong *plVar1;
  char cVar2;
  char cVar3;
  short sVar4;
  short sVar5;
  ushort uVar6;
  undefined2 uVar7;
  ulonglong uVar8;
  longlong *plVar9;
  longlong lVar10;
  size_t sVar11;
  uint uVar12;
  bool bVar13;
  bool bVar14;
  bool bVar15;
  wchar_t *pwVar16;
  longlong *plVar17;
  longlong *plVar18;
  ulonglong uVar19;
  ulonglong uVar20;
  char cVar21;
  bool bVar22;
  bool bVar23;
  bool bVar24;
  short **ppsVar25;
  uint local_1e4;
  short local_1cc;
  longlong *local_1c8;
  undefined8 uStack_1c0;
  longlong *local_1b8;
  ulonglong uStack_1b0;
  longlong *local_1a8;
  ushort local_1a0;
  longlong *local_198;
  undefined8 uStack_190;
  longlong *local_188;
  ulonglong uStack_180;
  uint local_170;
  uint local_16c;
  short *local_168;
  short *psStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  local_188 = (longlong *)*param_3;
  uStack_180 = param_3[1];
  local_198 = (longlong *)*param_4;
  uStack_190 = param_4[1];
  uVar8 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar8 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar9 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar8 * 8),
      plVar9 != (longlong *)0x0)) &&
     (plVar9 = __dynamic_cast(plVar9,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar9 != (longlong *)0x0)) {
    lVar10 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar10 * 8);
    if (plVar1 != (longlong *)0x0) {
      uVar19 = 0;
      sVar11 = wcslen(param_8);
      local_1e4 = 0;
      uVar8 = uStack_180 & 0xffff;
      local_170 = 0;
      local_1cc = (short)uStack_190;
      plVar17 = local_198;
      plVar18 = local_188;
      while( true ) {
        cVar21 = (short)uVar8 == -1;
        bVar15 = (bool)cVar21;
        if ((plVar18 != (longlong *)0x0) && ((bool)cVar21)) {
          if ((short *)plVar18[2] < (short *)plVar18[3]) {
            sVar4 = *(short *)plVar18[2];
          }
          else {
            sVar4 = (**(code **)(*plVar18 + 0x48))(plVar18);
          }
          if (sVar4 == -1) {
            local_188 = (longlong *)0x0;
          }
          bVar15 = sVar4 == -1;
        }
        bVar22 = local_1cc == -1;
        bVar23 = bVar22;
        if ((plVar17 != (longlong *)0x0) && (bVar22)) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar4 = *(short *)plVar17[2];
          }
          else {
            sVar4 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          if (sVar4 == -1) {
            local_198 = (longlong *)0x0;
          }
          bVar23 = sVar4 == -1;
        }
        bVar15 = (bool)(uVar19 < sVar11 & (bVar23 ^ bVar15));
        if (bVar15 == false) break;
        if (local_1e4 != 0) goto LAB_14003ac92;
        pwVar16 = param_8 + uVar19;
        cVar3 = (**(code **)(*plVar1 + 0x60))(plVar1,*pwVar16,0);
        if (cVar3 != '%') {
          cVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20,*pwVar16);
          plVar18 = local_188;
          uVar20 = uVar19;
          if (cVar3 != '\0') {
            plVar17 = local_198;
            if (local_188 != (longlong *)0x0 && (bool)cVar21) goto LAB_14003aba0;
            do {
              bVar23 = plVar17 != (longlong *)0x0;
              bVar15 = true;
              plVar18 = local_188;
              cVar2 = '\0';
              while( true ) {
                bVar13 = bVar22;
                if (bVar23 && bVar22) {
                  if ((short *)plVar17[2] < (short *)plVar17[3]) {
                    sVar4 = *(short *)plVar17[2];
                  }
                  else {
                    sVar4 = (**(code **)(*plVar17 + 0x48))(plVar17);
                  }
                  if (sVar4 == -1) {
                    local_198 = (longlong *)0x0;
                    plVar17 = (longlong *)0x0;
                    bVar13 = bVar15;
                  }
                  else {
                    bVar13 = false;
                  }
                }
                if ((bool)cVar21 == bVar13) goto LAB_14003aa56;
                if (cVar2 != '\0') {
                  if ((short *)plVar18[2] < (short *)plVar18[3]) {
                    sVar4 = *(short *)plVar18[2];
                  }
                  else {
                    sVar4 = (**(code **)(*plVar18 + 0x48))(plVar18);
                  }
                  if (sVar4 == -1) {
                    local_188 = (longlong *)0x0;
                    plVar18 = (longlong *)0x0;
                  }
                }
                cVar21 = (**(code **)(*plVar1 + 0x10))(plVar1);
                if (cVar21 == '\0') goto LAB_14003aa56;
                if ((ulonglong)plVar18[2] < (ulonglong)plVar18[3]) {
                  plVar18[2] = plVar18[2] + 2;
                  uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
                }
                else {
                  (**(code **)(*plVar18 + 0x50))(plVar18);
                  uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
                }
LAB_14003aba0:
                if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
                  uVar8 = (ulonglong)*(ushort *)plVar18[2];
                }
                else {
                  uVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
                  uVar8 = uVar8 & 0xffffffff;
                }
                if ((short)uVar8 == -1) break;
                cVar21 = '\0';
                bVar23 = plVar17 != (longlong *)0x0;
                uVar8 = 0xffffffff;
                bVar15 = bVar23 && bVar22;
                cVar2 = cVar3;
              }
              local_188 = (longlong *)0x0;
              cVar21 = cVar3;
            } while( true );
          }
          bVar15 = local_188 != (longlong *)0x0;
          sVar4 = (**(code **)(*plVar1 + 0x40))(plVar1,*pwVar16);
          if ((bool)cVar21 && bVar15) {
            if ((short *)plVar18[2] < (short *)plVar18[3]) {
              sVar5 = *(short *)plVar18[2];
            }
            else {
              sVar5 = (**(code **)(*plVar18 + 0x48))(plVar18,uVar8 & 0xffff);
            }
            bVar15 = true;
            if (sVar5 == -1) {
              local_188 = (longlong *)0x0;
              bVar15 = false;
              plVar18 = (longlong *)0x0;
            }
          }
          sVar5 = (**(code **)(*plVar1 + 0x40))(plVar1);
          if (sVar4 != sVar5) {
            sVar4 = (**(code **)(*plVar1 + 0x30))(plVar1,*pwVar16);
            if (((bool)cVar21) && (bVar15)) {
              if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
                uVar6 = *(ushort *)plVar18[2];
              }
              else {
                uVar6 = (**(code **)(*plVar18 + 0x48))(plVar18);
              }
              uVar19 = (ulonglong)uVar6;
              if (uVar6 == 0xffff) {
                local_188 = (longlong *)0x0;
              }
            }
            else {
              uVar19 = uVar8 & 0xffff;
            }
            sVar5 = (**(code **)(*plVar1 + 0x30))(plVar1,uVar19);
            plVar18 = local_188;
            if (sVar4 != sVar5) goto switchD_14003aae5_caseD_1;
          }
          if ((ulonglong)plVar18[2] < (ulonglong)plVar18[3]) {
            plVar18[2] = plVar18[2] + 2;
          }
          else {
            (**(code **)(*plVar18 + 0x50))(plVar18);
          }
          uVar8 = 0xffffffff;
          uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
          plVar17 = local_198;
          goto LAB_14003aa56;
        }
        cVar3 = (**(code **)(*plVar1 + 0x60))(plVar1,param_8[uVar19 + 1]);
        local_16c = 0;
        if ((cVar3 == 'E') || (cVar3 == 'O')) {
          uVar20 = uVar19 + 2;
          cVar3 = (**(code **)(*plVar1 + 0x60))(plVar1,param_8[uVar19 + 2]);
        }
        else {
          uVar20 = uVar19 + 1;
        }
        plVar18 = local_188;
        plVar17 = local_198;
        switch(cVar3 + -0x25) {
        case '\0':
          sVar4 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          sVar5 = (**(code **)(*plVar1 + 0x50))(plVar1,0x25);
          plVar18 = local_188;
          if (sVar4 == sVar5) {
            uVar8 = 0xffffffff;
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
            plVar17 = local_198;
          }
          else {
LAB_14003bce8:
            local_1e4 = 4;
            uVar8 = uStack_180 & 0xffff;
            local_170 = 4;
            plVar17 = local_198;
            plVar18 = local_188;
          }
          break;
        default:
switchD_14003aae5_caseD_1:
          local_1e4 = 4;
          local_170 = 4;
          plVar17 = local_198;
          plVar18 = local_188;
          break;
        case '\x1c':
        case '<':
          lVar10 = plVar9[2];
          local_138 = *(undefined8 *)(lVar10 + 0x88);
          uStack_130 = *(undefined8 *)(lVar10 + 0x90);
          local_128 = *(undefined8 *)(lVar10 + 0x98);
          uStack_120 = *(undefined8 *)(lVar10 + 0xa0);
          local_158 = *(undefined8 *)(lVar10 + 0x68);
          uStack_150 = *(undefined8 *)(lVar10 + 0x70);
          local_148 = *(undefined8 *)(lVar10 + 0x78);
          uStack_140 = *(undefined8 *)(lVar10 + 0x80);
          local_118 = *(undefined8 *)(lVar10 + 0xa8);
          uStack_110 = *(undefined8 *)(lVar10 + 0xb0);
          local_108 = *(undefined8 *)(lVar10 + 0xb8);
          uStack_100 = *(undefined8 *)(lVar10 + 0xc0);
          local_168 = *(short **)(lVar10 + 0x58);
          psStack_160 = *(short **)(lVar10 + 0x60);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name((longlong *)&local_1a8,param_2,(longlong *)&local_1b8,
                          (longlong *)&local_1c8,&local_16c,(longlong)&local_168,0xe,param_5,
                          &local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[6] = (int)local_16c % 7;
            *(byte *)param_9 = (byte)*param_9 | 2;
            plVar18 = local_1a8;
          }
          break;
        case '\x1d':
        case '=':
        case 'C':
          lVar10 = plVar9[2];
          local_108 = *(undefined8 *)(lVar10 + 0x128);
          uStack_100 = *(undefined8 *)(lVar10 + 0x130);
          local_f8 = *(undefined8 *)(lVar10 + 0x138);
          uStack_f0 = *(undefined8 *)(lVar10 + 0x140);
          local_e8 = *(undefined8 *)(lVar10 + 0x148);
          uStack_e0 = *(undefined8 *)(lVar10 + 0x150);
          local_d8 = *(undefined8 *)(lVar10 + 0x158);
          uStack_d0 = *(undefined8 *)(lVar10 + 0x160);
          local_c8 = *(undefined8 *)(lVar10 + 0x168);
          uStack_c0 = *(undefined8 *)(lVar10 + 0x170);
          local_b8 = *(undefined8 *)(lVar10 + 0x178);
          uStack_b0 = *(undefined8 *)(lVar10 + 0x180);
          local_128 = *(undefined8 *)(lVar10 + 0x108);
          uStack_120 = *(undefined8 *)(lVar10 + 0x110);
          local_118 = *(undefined8 *)(lVar10 + 0x118);
          uStack_110 = *(undefined8 *)(lVar10 + 0x120);
          local_158 = *(undefined8 *)(lVar10 + 0xd8);
          uStack_150 = *(undefined8 *)(lVar10 + 0xe0);
          local_148 = *(undefined8 *)(lVar10 + 0xe8);
          uStack_140 = *(undefined8 *)(lVar10 + 0xf0);
          local_138 = *(undefined8 *)(lVar10 + 0xf8);
          uStack_130 = *(undefined8 *)(lVar10 + 0x100);
          local_168 = *(short **)(lVar10 + 200);
          psStack_160 = *(short **)(lVar10 + 0xd0);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name((longlong *)&local_1a8,param_2,(longlong *)&local_1b8,
                          (longlong *)&local_1c8,&local_16c,(longlong)&local_168,0x18,param_5,
                          &local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[4] = (int)local_16c % 0xc;
            *(ushort *)param_9 = (ushort)*param_9 | 0x408;
            plVar18 = local_1a8;
          }
          break;
        case '\x1e':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,99,2,param_5,
                         &local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            *(ushort *)param_9 = (ushort)*param_9 | 0x480;
            param_9[1] = local_16c;
            plVar18 = local_1a8;
          }
          break;
        case '\x1f':
          ppsVar25 = &local_168;
          (**(code **)(*plVar1 + 0x58))(plVar1,"%m/%d/%y","%H:%M",ppsVar25);
          goto LAB_14003b821;
        case '#':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x17,2,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[2] = local_16c;
            *(byte *)param_9 = (byte)*param_9 & 0xfe;
            plVar18 = local_1a8;
          }
          break;
        case '$':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0xc,2,param_5,
                         &local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[2] = (int)local_16c % 0xc;
            *(byte *)param_9 = (byte)*param_9 | 1;
            plVar18 = local_1a8;
          }
          break;
        case '(':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x3b,2,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[1] = local_16c;
            plVar18 = local_1a8;
          }
          break;
        case '-':
          ppsVar25 = &local_168;
          (**(code **)(*plVar1 + 0x58))(plVar1,"%H:%M","%H:%M:%S",ppsVar25);
          goto LAB_14003bc3e;
        case '.':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x3c,2,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            *param_7 = local_16c;
            plVar18 = local_1a8;
          }
          break;
        case '/':
          (**(code **)(*plVar1 + 0x58))
                    (plVar1,"%H:%M:%S",&switchD_14003aae5::switchdataD_1400c58bc,&local_168);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (wchar_t *)&local_168,param_9);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          break;
        case '0':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x35,2,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            *param_9 = (local_16c & 0x3f) << 0x10 | 0x20 | *param_9 & 0xffc0ffdf;
            plVar18 = local_1a8;
          }
          break;
        case '2':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x35,2,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            *param_9 = (local_16c & 0x3f) << 0x10 | 0x40 | *param_9 & 0xffc0ffbf;
            plVar18 = local_1a8;
          }
          break;
        case '3':
          ppsVar25 = *(short ***)(plVar9[2] + 0x20);
          goto LAB_14003bc3e;
        case '4':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,9999,4,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[5] = local_16c - 0x76c;
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) & 0xf9 | 4;
            plVar18 = local_1a8;
          }
          break;
        case '5':
          istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          cVar21 = (**(code **)(*plVar1 + 0x10))(plVar1,1);
          if (cVar21 == '\0') goto LAB_14003bce8;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name((longlong *)&local_1a8,param_2,(longlong *)&local_1b8,
                          (longlong *)&local_1c8,(undefined4 *)&local_168,
                          (longlong)&__timepunct_cache<wchar_t>::_S_timezones,0xe,param_5,&local_170
                         );
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          bVar15 = istreambuf_iterator<>::equal
                             ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
          local_1e4 = local_170;
          if ((!bVar15) && (local_170 == 0 && (int)local_168 == 0)) {
            sVar4 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
            sVar5 = (**(code **)(*plVar1 + 0x50))(plVar1,0x2d);
            if (sVar4 != sVar5) {
              sVar4 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
              sVar5 = (**(code **)(*plVar1 + 0x50))(plVar1,0x2b);
              if (sVar4 != sVar5) goto LAB_14003bf45;
            }
            local_1b8 = local_188;
            uStack_1b0 = uStack_180;
            local_1c8 = local_198;
            uStack_1c0 = uStack_190;
            _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_168,0,0x17,2,
                           param_5,&local_170);
            local_188 = local_1a8;
            uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
            local_1b8 = local_1a8;
            uStack_1b0 = uStack_180;
            local_1c8 = local_198;
            uStack_1c0 = uStack_190;
            _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_168,0,0x3b,2,
                           param_5,&local_170);
            local_188 = local_1a8;
            uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
            local_1e4 = local_170;
          }
LAB_14003bf45:
          local_1cc = (short)uStack_190;
          uVar8 = uStack_180 & 0xffff;
          plVar17 = local_198;
          plVar18 = local_188;
          break;
        case '>':
          ppsVar25 = *(short ***)(plVar9[2] + 0x30);
LAB_14003b821:
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (wchar_t *)ppsVar25,param_9);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 4;
            plVar18 = local_1a8;
          }
          break;
        case '?':
        case '@':
          uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          cVar21 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20,uVar7);
          if (cVar21 != '\0') {
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
          }
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0x1f,2,param_5
                         ,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[3] = local_16c;
            *(ushort *)param_9 = (ushort)*param_9 | 0x410;
            plVar18 = local_1a8;
          }
          break;
        case 'E':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0x16e,3,
                         param_5,&local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[7] = local_16c - 1;
            *(byte *)param_9 = (byte)*param_9 | 4;
            plVar18 = local_1a8;
          }
          break;
        case 'H':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0xc,2,param_5,
                         &local_170);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[4] = local_16c - 1;
            *(byte *)param_9 = (byte)*param_9 | 8;
            plVar18 = local_1a8;
          }
          break;
        case 'I':
        case 'O':
          if (local_188 != (longlong *)0x0 && (bool)cVar21) goto LAB_14003b392;
          do {
            bVar24 = plVar17 != (longlong *)0x0;
            bVar23 = true;
            plVar18 = local_188;
            bVar13 = false;
            while( true ) {
              bVar14 = bVar22;
              if (bVar24 && bVar22) {
                if ((short *)plVar17[2] < (short *)plVar17[3]) {
                  sVar4 = *(short *)plVar17[2];
                }
                else {
                  sVar4 = (**(code **)(*plVar17 + 0x48))(plVar17);
                }
                if (sVar4 == -1) {
                  local_198 = (longlong *)0x0;
                  plVar17 = (longlong *)0x0;
                  bVar14 = bVar23;
                }
                else {
                  bVar14 = false;
                }
              }
              if ((bool)cVar21 == bVar14) goto LAB_14003aa56;
              if (bVar13 != false) {
                if ((short *)plVar18[2] < (short *)plVar18[3]) {
                  sVar4 = *(short *)plVar18[2];
                }
                else {
                  sVar4 = (**(code **)(*plVar18 + 0x48))(plVar18);
                }
                if (sVar4 == -1) {
                  local_188 = (longlong *)0x0;
                  plVar18 = (longlong *)0x0;
                }
              }
              cVar21 = (**(code **)(*plVar1 + 0x10))(plVar1);
              if (cVar21 == '\0') goto LAB_14003aa56;
              if ((ulonglong)plVar18[2] < (ulonglong)plVar18[3]) {
                plVar18[2] = plVar18[2] + 2;
                uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
              }
              else {
                (**(code **)(*plVar18 + 0x50))(plVar18);
                uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
              }
LAB_14003b392:
              if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
                uVar8 = (ulonglong)*(ushort *)plVar18[2];
              }
              else {
                uVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
                uVar8 = uVar8 & 0xffffffff;
              }
              if ((short)uVar8 == -1) break;
              cVar21 = false;
              bVar24 = plVar17 != (longlong *)0x0;
              uVar8 = 0xffffffff;
              bVar23 = bVar24 && bVar22;
              bVar13 = bVar15;
            }
            local_188 = (longlong *)0x0;
            cVar21 = bVar15;
          } while( true );
        case 'K':
          local_168 = *(short **)(plVar9[2] + 0x40);
          psStack_160 = *(short **)(plVar9[2] + 0x48);
          if ((*local_168 != 0) && (*psStack_160 != 0)) {
            local_1b8 = local_188;
            uStack_1b0 = uStack_180;
            local_1c8 = local_198;
            uStack_1c0 = uStack_190;
            _M_extract_name((longlong *)&local_1a8,param_2,(longlong *)&local_1b8,
                            (longlong *)&local_1c8,&local_16c,(longlong)&local_168,2,param_5,
                            &local_170);
            uVar8 = (ulonglong)local_1a0;
            local_188 = local_1a8;
            uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
            local_1e4 = local_170;
            plVar17 = local_198;
            plVar18 = local_1a8;
            if ((local_170 == 0) && (local_16c != 0)) {
              *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 1;
              plVar18 = local_1a8;
            }
          }
          break;
        case 'M':
          ppsVar25 = *(short ***)(plVar9[2] + 0x50);
          goto LAB_14003bc3e;
        case 'R':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,6,1,param_5,
                         &local_170);
          local_188 = local_1a8;
          uVar8 = (ulonglong)local_1a0;
          local_1e4 = local_170;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            param_7[6] = local_16c;
            *(byte *)param_9 = (byte)*param_9 | 2;
            plVar18 = local_1a8;
          }
          break;
        case 'S':
          ppsVar25 = *(short ***)(plVar9[2] + 0x10);
LAB_14003bc3e:
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (wchar_t *)ppsVar25,param_9);
          uVar8 = (ulonglong)local_1a0;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1e4 = local_170;
          plVar17 = local_198;
          plVar18 = local_1a8;
          break;
        case 'T':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,99,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uVar8 = (ulonglong)local_1a0;
          local_1e4 = local_170;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          plVar17 = local_198;
          plVar18 = local_1a8;
          if (local_170 == 0) {
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 6;
            bVar15 = istreambuf_iterator<>::equal
                               ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
            uVar12 = local_16c;
            if (bVar15) {
LAB_14003c148:
              if ((int)uVar12 < 0x45) {
                uVar12 = uVar12 + 100;
              }
            }
            else {
              uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
              cVar21 = (**(code **)(*plVar1 + 0x60))(plVar1,uVar7);
              if (9 < (byte)(cVar21 - 0x30U)) goto LAB_14003c148;
              _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
              uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
              uVar12 = cVar21 + -0x30 + uVar12 * 10;
              local_16c = uVar12;
              bVar15 = istreambuf_iterator<>::equal
                                 ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
              if (!bVar15) {
                uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
                cVar21 = (**(code **)(*plVar1 + 0x60))(plVar1,uVar7);
                if ((byte)(cVar21 - 0x30U) < 10) {
                  _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
                  uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
                  uVar12 = uVar12 * 10 + -0x30 + (int)cVar21;
                }
              }
              uVar12 = uVar12 - 0x76c;
              *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) & 0xfd;
            }
            param_7[5] = uVar12;
            goto LAB_14003bf45;
          }
        }
LAB_14003aa56:
        uVar19 = uVar20 + 1;
      }
      if ((uVar19 == sVar11) && (local_1e4 == 0)) goto LAB_14003ac95;
LAB_14003ac92:
      *param_6 = *param_6 | 4;
LAB_14003ac95:
      *param_1 = local_188;
      param_1[1] = uStack_180;
      return param_1;
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_wday_or_month(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, int&, wchar_t const**, unsigned
// long long, std::ios_base&, std::_Ios_Iostate&) const

void std::__cxx11::time_get<>::_M_extract_wday_or_month
               (undefined8 *param_1,undefined8 param_2,longlong *param_3,ulonglong *param_4,
               int *param_5,longlong param_6,longlong param_7,longlong param_8,uint *param_9)

{
  int *piVar1;
  int iVar2;
  code *pcVar3;
  wchar_t *_Str;
  longlong lVar4;
  short sVar5;
  short sVar6;
  longlong lVar7;
  longlong *plVar8;
  size_t sVar9;
  byte bVar10;
  bool bVar11;
  longlong *plVar12;
  undefined1 *puVar13;
  bool bVar14;
  ulonglong uVar15;
  longlong lVar16;
  ulonglong *puVar17;
  byte bVar18;
  longlong *plVar19;
  longlong *plVar20;
  longlong *plVar21;
  ulonglong uVar22;
  char cVar23;
  byte bVar24;
  undefined *puStack_a0;
  undefined1 auStack_98 [32];
  undefined8 uStack_78;
  longlong *local_70;
  longlong *local_68;
  longlong *local_60;
  longlong *local_58;
  longlong *local_50;
  
  plVar8 = (longlong *)param_3[1];
  local_58 = (longlong *)*param_4;
  uVar15 = param_4[1];
  plVar21 = (longlong *)*param_3;
  uVar22 = (ulonglong)plVar8 & 0xffffffff;
  puStack_a0 = (undefined *)0x14003c986;
  local_60 = plVar8;
  local_50 = local_58;
  lVar7 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar12 = local_60;
  plVar19 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar7 * 8);
  if (plVar19 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    puStack_a0 = &UNK_14003cec6;
    __throw_bad_cast();
  }
  puStack_a0 = (undefined *)0x14003c9c0;
  lVar7 = -(param_7 * 8 + 0xfU & 0xfffffffffffffff0);
  puVar13 = auStack_98 + lVar7;
  cVar23 = (short)local_60 == -1;
  piVar1 = (int *)((longlong)&uStack_78 + lVar7);
  bVar14 = plVar21 != (longlong *)0x0 && (bool)cVar23;
  plVar20 = local_50;
  if (bVar14) {
    if ((short *)plVar21[2] < (short *)plVar21[3]) {
      sVar6 = *(short *)plVar21[2];
    }
    else {
      local_60 = local_50;
      local_50 = plVar12;
      pcVar3 = *(code **)(*plVar21 + 0x48);
      *(undefined8 *)(auStack_98 + lVar7 + -8) = 0x14003ce3f;
      sVar6 = (*pcVar3)(plVar21);
      plVar20 = local_60;
      plVar12 = local_50;
    }
    cVar23 = false;
    if (sVar6 == -1) {
      plVar21 = (longlong *)0x0;
      bVar14 = false;
      cVar23 = true;
    }
  }
  bVar24 = (short)uVar15 == -1;
  bVar11 = (bool)bVar24;
  if (plVar20 != (longlong *)0x0 && (bool)bVar24) {
    if ((short *)plVar20[2] < (short *)plVar20[3]) {
      sVar6 = *(short *)plVar20[2];
      local_60._0_1_ = bVar24;
    }
    else {
      local_60 = (longlong *)CONCAT71(local_60._1_7_,bVar24);
      local_58 = (longlong *)CONCAT71(local_58._1_7_,cVar23);
      pcVar3 = *(code **)(*plVar20 + 0x48);
      local_68 = plVar12;
      local_50 = plVar20;
      *(undefined8 *)(auStack_98 + lVar7 + -8) = 0x14003ce64;
      sVar6 = (*pcVar3)(plVar20);
      plVar20 = local_50;
      plVar12 = local_68;
      cVar23 = (char)local_58;
    }
    local_58 = (longlong *)0x0;
    if (sVar6 != -1) {
      local_58 = plVar20;
    }
    bVar24 = (byte)local_60;
    bVar11 = sVar6 == -1;
  }
  local_60 = plVar12;
  plVar12 = local_60;
  if (bVar11 != (bool)cVar23) {
    sVar6 = (short)plVar8;
    if (bVar14) {
      if ((short *)plVar21[2] < (short *)plVar21[3]) {
        sVar6 = *(short *)plVar21[2];
      }
      else {
        local_50 = (longlong *)CONCAT71(local_50._1_7_,bVar24);
        pcVar3 = *(code **)(*plVar21 + 0x48);
        *(undefined8 *)(auStack_98 + lVar7 + -8) = 0x14003ce8c;
        sVar6 = (*pcVar3)(plVar21);
        bVar24 = (byte)local_50;
      }
      if (sVar6 == -1) {
        plVar21 = (longlong *)0x0;
      }
    }
    lVar4 = param_7 * 2;
    plVar12 = local_60;
    if (lVar4 != 0) {
      plVar8 = (longlong *)0x0;
      local_50 = (longlong *)CONCAT62(local_50._2_6_,(short)uVar22);
      lVar16 = 0;
      local_68 = (longlong *)CONCAT71(local_68._1_7_,bVar24);
      local_70 = local_60;
      local_60 = plVar21;
LAB_14003cc91:
      do {
        if (**(short **)(param_6 + lVar16 * 8) != sVar6) {
          pcVar3 = *(code **)(*plVar19 + 0x30);
          *(undefined8 *)(auStack_98 + lVar7 + -8) = 0x14003cc82;
          sVar5 = (*pcVar3)(plVar19);
          if (sVar5 != sVar6) {
            lVar16 = lVar16 + 1;
            if (lVar16 == lVar4) break;
            goto LAB_14003cc91;
          }
        }
        piVar1[(longlong)plVar8] = (int)lVar16;
        lVar16 = lVar16 + 1;
        plVar8 = (longlong *)((longlong)plVar8 + 1);
      } while (lVar16 != lVar4);
      plVar21 = local_60;
      bVar24 = (byte)local_68;
      uVar22 = (ulonglong)local_50 & 0xffff;
      plVar12 = local_70;
      if (plVar8 != (longlong *)0x0) {
        if ((ulonglong)local_60[2] < (ulonglong)local_60[3]) {
          local_60[2] = local_60[2] + 2;
          plVar19 = local_70;
          local_60._0_1_ = (byte)local_68;
        }
        else {
          lVar4 = *local_60;
          local_68 = local_70;
          local_60 = (longlong *)CONCAT71(local_60._1_7_,bVar24);
          pcVar3 = *(code **)(lVar4 + 0x50);
          local_50 = plVar8;
          *(undefined8 *)(auStack_98 + lVar7 + -8) = 0x14003ceaf;
          (*pcVar3)(plVar21);
          plVar8 = local_50;
          plVar19 = local_68;
        }
        *(undefined8 *)(auStack_98 + lVar7 + -8) = 0x14003ccf7;
        plVar12 = (longlong *)0x0;
        lVar4 = -((longlong)plVar8 * 8 + 0xfU & 0xfffffffffffffff0);
        puVar13 = auStack_98 + lVar4 + lVar7;
        local_50 = (longlong *)CONCAT71(local_50._1_7_,(byte)local_60);
        local_60 = plVar19;
        puVar17 = (ulonglong *)((longlong)&uStack_78 + lVar4 + lVar7);
        do {
          _Str = *(wchar_t **)(param_6 + (longlong)piVar1[(longlong)plVar12] * 8);
          *(undefined8 *)(auStack_98 + lVar4 + lVar7 + -8) = 0x14003cd1d;
          sVar9 = wcslen(_Str);
          puVar17[(longlong)plVar12] = sVar9;
          plVar12 = (longlong *)((longlong)plVar12 + 1);
        } while (plVar8 != plVar12);
        uVar22 = 0xffffffff;
        uVar15 = 1;
        bVar24 = (byte)local_50;
        goto LAB_14003ca10;
      }
    }
  }
  local_60 = plVar12;
  plVar12 = (longlong *)0x0;
  uVar15 = 0;
  puVar17 = (ulonglong *)0x0;
LAB_14003ca10:
  do {
    sVar6 = (short)uVar22;
    cVar23 = sVar6 == -1;
    bVar18 = cVar23;
    if (plVar21 != (longlong *)0x0 && (bool)cVar23) {
      if ((short *)plVar21[2] < (short *)plVar21[3]) {
        sVar5 = *(short *)plVar21[2];
        bVar18 = 1;
      }
      else {
        local_70 = (longlong *)CONCAT71(local_70._1_7_,bVar24);
        local_68 = (longlong *)CONCAT71(local_68._1_7_,cVar23);
        local_50 = (longlong *)CONCAT71(local_50._1_7_,1);
        pcVar3 = *(code **)(*plVar21 + 0x48);
        *(undefined8 *)(puVar13 + -8) = 0x14003cde2;
        sVar5 = (*pcVar3)(plVar21);
        bVar24 = (byte)local_70;
        cVar23 = (byte)local_68;
        bVar18 = (byte)local_50;
      }
      if (sVar5 == -1) {
        plVar21 = (longlong *)0x0;
      }
      else {
        bVar18 = 0;
      }
    }
    bVar10 = local_58 != (longlong *)0x0 & bVar24;
    if (bVar10 == 0) {
      if (bVar18 == bVar24) break;
    }
    else {
      if ((short *)local_58[2] < (short *)local_58[3]) {
        sVar5 = *(short *)local_58[2];
      }
      else {
        local_70 = (longlong *)CONCAT71(local_70._1_7_,bVar10);
        local_68 = (longlong *)CONCAT71(local_68._1_7_,cVar23);
        local_50 = (longlong *)CONCAT71(local_50._1_7_,bVar18);
        pcVar3 = *(code **)(*local_58 + 0x48);
        uStack_78._7_1_ = bVar24;
        *(undefined8 *)(puVar13 + -8) = 0x14003cdb4;
        sVar5 = (*pcVar3)();
        cVar23 = (byte)local_68;
        bVar24 = uStack_78._7_1_;
        bVar18 = (byte)local_50;
        bVar10 = (byte)local_70;
      }
      if (sVar5 != -1) {
        bVar10 = 0;
      }
      plVar8 = (longlong *)0x0;
      if (sVar5 != -1) {
        plVar8 = local_58;
      }
      local_58 = plVar8;
      if (bVar18 == bVar10) break;
    }
    sVar5 = sVar6;
    if ((plVar21 != (longlong *)0x0) && (cVar23 != '\0')) {
      if ((short *)plVar21[2] < (short *)plVar21[3]) {
        sVar5 = *(short *)plVar21[2];
      }
      else {
        local_50 = (longlong *)CONCAT71(local_50._1_7_,bVar24);
        pcVar3 = *(code **)(*plVar21 + 0x48);
        *(undefined8 *)(puVar13 + -8) = 0x14003ce04;
        sVar5 = (*pcVar3)(plVar21);
        bVar24 = (byte)local_50;
      }
      if (sVar5 == -1) {
        plVar21 = (longlong *)0x0;
      }
    }
    if (plVar12 == (longlong *)0x0) goto LAB_14003cbe4;
    local_50._2_6_ = (undefined6)((ulonglong)local_50 >> 0x10);
    local_50 = (longlong *)CONCAT62(local_50._2_6_,sVar6);
    plVar8 = (longlong *)0x0;
    plVar19 = (longlong *)0x0;
LAB_14003ca8d:
    do {
      if (uVar15 < puVar17[(longlong)plVar8]) {
        if (*(short *)(*(longlong *)(param_6 + (longlong)piVar1[(longlong)plVar8] * 8) + uVar15 * 2)
            != sVar5) {
          plVar12 = (longlong *)((longlong)plVar12 + -1);
          piVar1[(longlong)plVar8] = piVar1[(longlong)plVar12];
          puVar17[(longlong)plVar8] = puVar17[(longlong)plVar12];
          if (plVar12 <= plVar8) break;
          goto LAB_14003ca8d;
        }
      }
      else {
        plVar19 = (longlong *)((longlong)plVar19 + 1);
      }
      plVar8 = (longlong *)((longlong)plVar8 + 1);
    } while (plVar8 < plVar12);
    sVar6 = (short)local_50;
    if (plVar12 == plVar19) break;
    if ((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) {
      plVar21[2] = plVar21[2] + 2;
    }
    else {
      local_50 = (longlong *)CONCAT71(local_50._1_7_,bVar24);
      pcVar3 = *(code **)(*plVar21 + 0x50);
      *(undefined8 *)(puVar13 + -8) = 0x14003cc1e;
      (*pcVar3)(plVar21);
      bVar24 = (byte)local_50;
    }
    uVar15 = uVar15 + 1;
    uVar22 = 0xffffffff;
  } while( true );
  if (plVar12 == (longlong *)0x1) {
    uVar22 = *puVar17;
joined_r0x00014003cc2b:
    if (uVar22 != uVar15) {
LAB_14003cbe4:
      *param_9 = *param_9 | 4;
      goto LAB_14003cbee;
    }
  }
  else {
    if (plVar12 != (longlong *)0x2) goto LAB_14003cbe4;
    if (*puVar17 != uVar15) {
      uVar22 = puVar17[1];
      goto joined_r0x00014003cc2b;
    }
  }
  iVar2 = *piVar1;
  if ((int)param_7 <= iVar2) {
    iVar2 = iVar2 - (int)param_7;
  }
  *param_5 = iVar2;
LAB_14003cbee:
  *param_1 = plVar21;
  param_1[1] = CONCAT62((int6)((ulonglong)local_60 >> 0x10),sVar6);
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, wchar_t const*, wchar_t const*) const

undefined8 *
std::__cxx11::time_get<>::get
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,uint *param_8,uint *param_9)

{
  longlong *plVar1;
  code *pcVar2;
  longlong *plVar3;
  char cVar4;
  char cVar5;
  short sVar6;
  short sVar7;
  short sVar8;
  undefined2 uVar9;
  short sVar10;
  uint uVar11;
  longlong lVar12;
  undefined6 uVar15;
  ushort *puVar13;
  ulonglong uVar14;
  bool bVar16;
  int iVar17;
  longlong *plVar18;
  undefined6 uVar19;
  ushort uVar20;
  ulonglong uVar21;
  uint *puVar22;
  longlong *plVar23;
  char cVar24;
  bool bVar25;
  bool bVar26;
  bool bVar27;
  wchar_t *in_stack_ffffffffffffff10;
  undefined4 uVar28;
  __time_get_state *in_stack_ffffffffffffff18;
  undefined4 uVar29;
  ulonglong local_c8;
  undefined8 local_c0;
  longlong *local_98;
  undefined8 local_90;
  longlong *local_88;
  ulonglong local_80;
  longlong *local_78;
  ulonglong local_70;
  wchar_t local_68;
  short local_66;
  short local_64;
  undefined2 local_62;
  undefined8 local_60;
  undefined4 local_58;
  undefined8 local_54;
  undefined4 local_4c;
  
  local_c8 = param_3[1];
  local_c0 = param_4[1];
  plVar23 = (longlong *)*param_3;
  plVar18 = (longlong *)*param_4;
  uVar21 = local_c8 & 0xffffffff;
  sVar10 = (short)uVar21;
  sVar6 = (short)local_c0;
  lVar12 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar12 * 8);
  if (plVar1 == (longlong *)0x0) {
LAB_14003d9ce:
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_60 = 0;
  local_58 = 0;
  *param_6 = 0;
  pcVar2 = *(code **)(*param_2 + 0x40);
  if (param_8 != param_9) {
    while( true ) {
      sVar10 = (short)uVar21;
      cVar24 = sVar10 == -1;
      bVar26 = (bool)cVar24;
      if (plVar23 != (longlong *)0x0 && (bool)cVar24) {
        if ((short *)plVar23[2] < (short *)plVar23[3]) {
          sVar7 = *(short *)plVar23[2];
        }
        else {
          sVar7 = (**(code **)(*plVar23 + 0x48))(plVar23);
        }
        bVar26 = sVar7 == -1;
        if (bVar26) {
          plVar23 = (longlong *)0x0;
        }
      }
      bVar25 = sVar6 == -1;
      bVar27 = bVar25;
      if (plVar18 != (longlong *)0x0 && bVar25) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar7 = *(short *)plVar18[2];
        }
        else {
          sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        bVar27 = sVar7 == -1;
        if (bVar27) {
          plVar18 = (longlong *)0x0;
        }
      }
      if (bVar26 == bVar27) break;
      cVar4 = (**(code **)(*plVar1 + 0x60))(plVar1,(short)*param_8);
      uVar28 = (undefined4)((ulonglong)in_stack_ffffffffffffff10 >> 0x20);
      uVar29 = (undefined4)((ulonglong)in_stack_ffffffffffffff18 >> 0x20);
      if (cVar4 == '%') {
        puVar22 = (uint *)((longlong)param_8 + 2);
        if (param_9 == puVar22) {
LAB_14003d905:
          *param_6 = 4;
          goto joined_r0x00014003d69b;
        }
        cVar24 = (**(code **)(*plVar1 + 0x60))(plVar1);
        uVar19 = (undefined6)(local_c8 >> 0x10);
        uVar15 = (undefined6)((ulonglong)local_c0 >> 0x10);
        if ((cVar24 == 'E') || (cVar24 == 'O')) {
          puVar22 = param_8 + 1;
          if (param_9 == puVar22) goto LAB_14003d905;
          cVar4 = (**(code **)(*plVar1 + 0x60))(plVar1,(short)param_8[1]);
          if (pcVar2 != do_get) {
            iVar17 = (int)cVar24;
            cVar5 = cVar24;
            goto LAB_14003d126;
          }
          local_54 = (ulonglong)*param_8;
          uVar9 = (undefined2)param_8[1];
LAB_14003d531:
          local_54._0_6_ = CONCAT24(uVar9,(undefined4)local_54);
          local_90 = CONCAT62(uVar15,sVar6);
          local_80 = CONCAT62(uVar19,sVar10);
          in_stack_ffffffffffffff18 = (__time_get_state *)&local_60;
          in_stack_ffffffffffffff10 = (wchar_t *)&local_54;
          local_98 = plVar18;
          local_88 = plVar23;
          _M_extract_via_format
                    (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,
                     in_stack_ffffffffffffff10,(uint *)in_stack_ffffffffffffff18);
          plVar23 = local_78;
          local_c8 = CONCAT62(uVar19,(short)local_70);
          bVar26 = (short)local_70 == -1;
          uVar21 = local_70 & 0xffffffff;
          if (local_78 != (longlong *)0x0 && bVar26) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar10 = *(short *)local_78[2];
            }
            else {
              sVar10 = (**(code **)(*local_78 + 0x48))(local_78);
            }
            bVar26 = sVar10 == -1;
            if (bVar26) {
              plVar23 = (longlong *)0x0;
            }
          }
          if (plVar18 != (longlong *)0x0 && bVar25) {
            if ((short *)plVar18[2] < (short *)plVar18[3]) {
              sVar10 = *(short *)plVar18[2];
            }
            else {
              sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
            }
            bVar25 = sVar10 == -1;
            if (bVar25) {
              plVar18 = (longlong *)0x0;
            }
          }
          if (bVar26 == bVar25) {
LAB_14003d2eb:
            *param_6 = *param_6 | 2;
          }
        }
        else {
          if (pcVar2 == do_get) {
            local_54 = CONCAT44(local_54._4_4_,*param_8);
            uVar9 = 0;
            goto LAB_14003d531;
          }
          iVar17 = 0;
          cVar5 = '\0';
          cVar4 = cVar24;
LAB_14003d126:
          if (*(code **)(*param_2 + 0x40) == do_get) {
            local_c8 = CONCAT62(uVar19,sVar10);
            lVar12 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
            plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar12 * 8);
            if (plVar3 != (longlong *)0x0) {
              *param_6 = 0;
              local_68 = (**(code **)(*plVar3 + 0x50))(plVar3,0x25);
              local_66 = (short)cVar4;
              local_64 = 0;
              if (cVar5 != '\0') {
                local_66 = (short)cVar5;
                local_62 = 0;
                local_64 = (short)cVar4;
              }
              in_stack_ffffffffffffff10 = &local_68;
              local_54 = 0;
              local_4c = 0;
              in_stack_ffffffffffffff18 = (__time_get_state *)&local_54;
              local_98 = plVar18;
              local_90 = CONCAT62(uVar15,sVar6);
              local_88 = plVar23;
              local_80 = local_c8;
              _M_extract_via_format
                        (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,
                         in_stack_ffffffffffffff10,(uint *)&local_54);
              uVar14 = local_70;
              plVar23 = local_78;
              uVar21 = local_70 & 0xffffffff;
              __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
              bVar26 = (short)uVar14 == -1;
              if (plVar23 != (longlong *)0x0 && bVar26) {
                if ((short *)plVar23[2] < (short *)plVar23[3]) {
                  sVar10 = *(short *)plVar23[2];
                }
                else {
                  sVar10 = (**(code **)(*plVar23 + 0x48))(plVar23);
                }
                bVar26 = sVar10 == -1;
                if (bVar26) {
                  plVar23 = (longlong *)0x0;
                }
              }
              if ((plVar18 != (longlong *)0x0) && (bVar25)) {
                if ((short *)plVar18[2] < (short *)plVar18[3]) {
                  sVar10 = *(short *)plVar18[2];
                }
                else {
                  sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
                }
                bVar25 = sVar10 == -1;
              }
              if (bVar25 != bVar26) goto LAB_14003d2f6;
              goto LAB_14003d2eb;
            }
            goto LAB_14003d9ce;
          }
          in_stack_ffffffffffffff18 = (__time_get_state *)CONCAT44(uVar29,iVar17);
          local_90 = CONCAT62(uVar15,sVar6);
          local_c8 = CONCAT62(uVar19,sVar10);
          in_stack_ffffffffffffff10 = (wchar_t *)CONCAT44(uVar28,(int)cVar4);
          local_98 = plVar18;
          local_88 = plVar23;
          local_80 = local_c8;
          (**(code **)(*param_2 + 0x40))
                    (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,
                     in_stack_ffffffffffffff10,in_stack_ffffffffffffff18);
          uVar21 = local_70 & 0xffff;
          plVar23 = local_78;
        }
LAB_14003d2f6:
        local_c0 = CONCAT62(uVar15,sVar6);
        sVar10 = (short)uVar21;
        param_8 = (uint *)((longlong)puVar22 + 2);
      }
      else {
        cVar4 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20);
        if (cVar4 != '\0') {
          do {
            param_8 = (uint *)((longlong)param_8 + 2);
            if (param_9 == param_8) break;
            cVar5 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20,*(undefined2 *)param_8);
          } while (cVar5 != '\0');
          if ((plVar23 != (longlong *)0x0) && ((bool)cVar24)) goto LAB_14003d40c;
LAB_14003d3b4:
          bVar27 = plVar18 != (longlong *)0x0;
          bVar26 = true;
          cVar5 = cVar24;
          do {
            bVar16 = bVar25;
            if (bVar27 && bVar25) {
              if ((short *)plVar18[2] < (short *)plVar18[3]) {
                sVar10 = *(short *)plVar18[2];
              }
              else {
                sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
              }
              if (sVar10 == -1) {
                plVar18 = (longlong *)0x0;
                bVar16 = bVar26;
              }
              else {
                bVar16 = false;
              }
            }
            if ((bool)cVar24 == bVar16) goto LAB_14003d05d;
            if ((plVar23 != (longlong *)0x0) && (cVar5 != '\0')) {
              if ((short *)plVar23[2] < (short *)plVar23[3]) {
                sVar10 = *(short *)plVar23[2];
              }
              else {
                sVar10 = (**(code **)(*plVar23 + 0x48))(plVar23);
              }
              if (sVar10 == -1) {
                plVar23 = (longlong *)0x0;
              }
            }
            cVar24 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20);
            if (cVar24 == '\0') goto LAB_14003d05d;
            if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
              plVar23[2] = plVar23[2] + 2;
LAB_14003d40c:
              puVar13 = (ushort *)plVar23[2];
              if ((ushort *)plVar23[3] <= puVar13) goto LAB_14003d4af;
LAB_14003d41a:
              uVar20 = *puVar13;
              uVar21 = (ulonglong)uVar20;
            }
            else {
              (**(code **)(*plVar23 + 0x50))(plVar23);
              puVar13 = (ushort *)plVar23[2];
              if (puVar13 < (ushort *)plVar23[3]) goto LAB_14003d41a;
LAB_14003d4af:
              uVar11 = (**(code **)(*plVar23 + 0x48))(plVar23);
              uVar21 = (ulonglong)uVar11;
              uVar20 = (ushort)uVar11;
            }
            if (uVar20 == 0xffff) goto LAB_14003d4d0;
            cVar24 = '\0';
            bVar27 = plVar18 != (longlong *)0x0;
            uVar21 = 0xffffffff;
            bVar26 = bVar27 && bVar25;
            cVar5 = cVar4;
          } while( true );
        }
        if ((plVar23 == (longlong *)0x0) || (!(bool)cVar24)) {
          uVar14 = uVar21 & 0xffff;
        }
        else {
          if ((ushort *)plVar23[2] < (ushort *)plVar23[3]) {
            uVar14 = (ulonglong)*(ushort *)plVar23[2];
          }
          else {
            uVar14 = (**(code **)(*plVar23 + 0x48))(plVar23);
            uVar14 = uVar14 & 0xffff;
          }
          if ((short)uVar14 == -1) {
            plVar23 = (longlong *)0x0;
          }
        }
        sVar7 = (**(code **)(*plVar1 + 0x40))(plVar1,uVar14);
        sVar8 = (**(code **)(*plVar1 + 0x40))(plVar1,(short)*param_8);
        if (sVar7 != sVar8) {
          if ((plVar23 == (longlong *)0x0) || (!(bool)cVar24)) {
            uVar21 = uVar21 & 0xffff;
          }
          else {
            if ((ushort *)plVar23[2] < (ushort *)plVar23[3]) {
              uVar21 = (ulonglong)*(ushort *)plVar23[2];
            }
            else {
              uVar21 = (**(code **)(*plVar23 + 0x48))(plVar23);
              uVar21 = uVar21 & 0xffff;
            }
            if ((short)uVar21 == -1) {
              plVar23 = (longlong *)0x0;
            }
          }
          sVar7 = (**(code **)(*plVar1 + 0x30))(plVar1,uVar21);
          sVar8 = (**(code **)(*plVar1 + 0x30))(plVar1,(short)*param_8);
          if (sVar7 != sVar8) goto LAB_14003d905;
        }
        if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
          plVar23[2] = plVar23[2] + 2;
        }
        else {
          (**(code **)(*plVar23 + 0x50))(plVar23);
        }
        param_8 = (uint *)((longlong)param_8 + 2);
        uVar21 = 0xffffffff;
LAB_14003d05d:
        sVar10 = (short)uVar21;
      }
      if ((param_8 == param_9) || (sVar10 = (short)uVar21, *param_6 != 0))
      goto joined_r0x00014003d69b;
    }
    *param_6 = 6;
  }
joined_r0x00014003d69b:
  if (pcVar2 == do_get) {
    __time_get_state::_M_finalize_state((__time_get_state *)&local_60,(longlong)param_7);
  }
  *param_1 = plVar23;
  param_1[1] = CONCAT62((int6)(local_c8 >> 0x10),sVar10);
  return param_1;
LAB_14003d4d0:
  plVar23 = (longlong *)0x0;
  cVar24 = cVar4;
  goto LAB_14003d3b4;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::__cxx11::time_get<>::get
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7,char param_8,char param_9)

{
  ulonglong uVar1;
  longlong *plVar2;
  longlong lVar3;
  longlong *plVar4;
  short sVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_98;
  longlong local_90;
  longlong *local_88;
  ulonglong local_80;
  longlong *local_78;
  ulonglong local_70;
  wchar_t local_5c;
  short local_5a;
  short local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined4 local_4c;
  
  plVar7 = (longlong *)*param_3;
  uVar1 = param_3[1];
  plVar2 = (longlong *)*param_4;
  lVar3 = param_4[1];
  if (*(code **)(*param_2 + 0x40) == do_get) {
    lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
    if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    *param_6 = 0;
    local_5c = (**(code **)(*plVar4 + 0x50))(plVar4,0x25);
    local_58 = 0;
    local_5a = (short)param_8;
    if (param_9 != '\0') {
      local_5a = (short)param_9;
      local_56 = 0;
      local_58 = (short)param_8;
    }
    local_54 = 0;
    local_4c = 0;
    local_98 = plVar2;
    local_90 = lVar3;
    local_88 = plVar7;
    local_80 = uVar1;
    _M_extract_via_format
              (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,&local_5c,
               (uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (short)local_70 == -1;
    plVar7 = local_78;
    if (local_78 != (longlong *)0x0 && bVar8) {
      if ((short *)local_78[2] < (short *)local_78[3]) {
        sVar5 = *(short *)local_78[2];
      }
      else {
        sVar5 = (**(code **)(*local_78 + 0x48))(local_78);
      }
      plVar7 = (longlong *)0x0;
      bVar8 = sVar5 == -1;
      if (!bVar8) {
        plVar7 = local_78;
      }
    }
    bVar9 = (short)lVar3 == -1;
    if ((plVar2 != (longlong *)0x0) && (bVar9)) {
      if ((short *)plVar2[2] < (short *)plVar2[3]) {
        sVar5 = *(short *)plVar2[2];
      }
      else {
        sVar5 = (**(code **)(*plVar2 + 0x48))(plVar2);
      }
      bVar9 = sVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar1 & 0xffffffffffff0000 | local_70 & 0xffff;
  }
  else {
    local_88 = plVar2;
    local_80 = lVar3;
    local_78 = plVar7;
    local_70 = uVar1;
    (**(code **)(*param_2 + 0x40))
              (param_1,param_2,&local_78,&local_88,param_5,param_6,param_7,(int)param_8,(int)param_9
              );
  }
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::__cxx11::time_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7,char param_8,char param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_98;
  longlong local_90;
  undefined8 local_88;
  ulonglong local_80;
  longlong *local_78;
  ulonglong local_70;
  wchar_t local_5c;
  short local_5a;
  short local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
  if (plVar7 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  *param_6 = 0;
  local_5c = (**(code **)(*plVar7 + 0x50))();
  local_5a = (short)param_8;
  local_58 = 0;
  if (param_9 != '\0') {
    local_5a = (short)param_9;
    local_56 = 0;
    local_58 = (short)param_8;
  }
  local_54 = 0;
  local_4c = 0;
  local_98 = plVar3;
  local_90 = lVar4;
  local_88 = uVar1;
  local_80 = uVar2;
  _M_extract_via_format
            (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,&local_5c,
             (uint *)&local_54);
  __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
  bVar8 = (short)local_70 == -1;
  plVar7 = local_78;
  if (local_78 != (longlong *)0x0 && bVar8) {
    if ((short *)local_78[2] < (short *)local_78[3]) {
      sVar5 = *(short *)local_78[2];
    }
    else {
      sVar5 = (**(code **)(*local_78 + 0x48))(local_78);
    }
    plVar7 = (longlong *)0x0;
    bVar8 = sVar5 == -1;
    if (!bVar8) {
      plVar7 = local_78;
    }
  }
  bVar9 = (short)lVar4 == -1;
  if ((plVar3 != (longlong *)0x0) && (bVar9)) {
    if ((short *)plVar3[2] < (short *)plVar3[3]) {
      sVar5 = *(short *)plVar3[2];
    }
    else {
      sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
    }
    bVar9 = sVar5 == -1;
  }
  if (bVar9 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar7;
  param_1[1] = uVar2 & 0xffffffffffff0000 | local_70 & 0xffff;
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_date(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::__cxx11::time_get<>::get_date
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x20))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_time(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::__cxx11::time_get<>::get_time
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_year(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::__cxx11::time_get<>::get_year
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x38))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::__cxx11::money_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract<false>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// std::__cxx11::string&) const

undefined8 *
std::__cxx11::money_get<>::_M_extract<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,string *param_7)

{
  longlong *plVar1;
  ulonglong uVar2;
  bool bVar3;
  byte bVar4;
  bool bVar5;
  char cVar6;
  int iVar7;
  uint uVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  longlong lVar12;
  longlong lVar13;
  void *pvVar14;
  byte *pbVar15;
  char *pcVar16;
  __moneypunct_cache<char,false> *this;
  ulonglong uVar17;
  ulonglong uVar18;
  longlong *plVar19;
  ulonglong uVar20;
  ulonglong uVar21;
  byte bVar22;
  longlong *plVar23;
  longlong lVar24;
  int iVar25;
  bool bVar26;
  bool bVar27;
  bool bVar28;
  longlong local_110;
  longlong local_100;
  ulonglong local_e8;
  byte local_bd;
  int local_a0;
  undefined4 local_8c;
  undefined1 *local_88;
  ulonglong local_80;
  undefined1 local_78;
  undefined7 uStack_77;
  char *local_68;
  ulonglong local_60;
  char local_58;
  undefined7 uStack_57;
  
  uVar2 = param_3[1];
  plVar19 = (longlong *)*param_3;
  plVar23 = (longlong *)*param_4;
  uVar20 = uVar2 & 0xffffffff;
  iVar9 = (int)param_4[1];
  lVar12 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar12 = *(longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar12 * 8);
  if (lVar12 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar13 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar13 * 8);
  lVar24 = *plVar1;
  if (lVar24 == 0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined2 *)(this + 0x21) = 0;
    this[0x20] = (__moneypunct_cache<char,false>)0x0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,false>)0x0;
    __moneypunct_cache<char,false>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar13);
    lVar24 = *plVar1;
  }
  if (*(longlong *)(lVar24 + 0x40) == 0) {
    bVar5 = false;
  }
  else {
    bVar5 = *(longlong *)(lVar24 + 0x50) != 0;
  }
  local_80 = 0;
  local_78 = 0;
  local_88 = &local_78;
  if (*(char *)(lVar24 + 0x20) != '\0') {
    __cxx11::string::reserve((string *)&local_88,0x20);
  }
  local_60 = 0;
  local_58 = '\0';
  local_68 = &local_58;
  __cxx11::string::reserve((string *)&local_68,0x20);
  iVar7 = 0;
  local_100 = 0;
  local_8c = *(undefined4 *)(lVar24 + 0x60);
  local_bd = 0;
  local_a0 = 0;
  local_e8 = 0;
  bVar3 = false;
LAB_14003e207:
  iVar10 = (int)local_100;
  if (4 < *(byte *)((longlong)&local_8c + local_100)) goto LAB_14003ebd5;
  iVar25 = (int)uVar20;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(*(undefined1 *)((longlong)&local_8c + local_100)) {
  case 0:
    bVar4 = 1;
    goto LAB_14003e345;
  case 1:
    bVar26 = iVar25 == -1;
    bVar28 = bVar26;
    if (plVar19 != (longlong *)0x0 && bVar26) {
      if ((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) {
        bVar28 = false;
      }
      else {
        iVar25 = (**(code **)(*plVar19 + 0x48))(plVar19);
        bVar28 = iVar25 == -1;
        if (bVar28) {
          plVar19 = (longlong *)0x0;
        }
      }
    }
    bVar27 = iVar9 == -1;
    if ((plVar23 != (longlong *)0x0 && bVar27) &&
       (bVar27 = false, (ulonglong)plVar23[3] <= (ulonglong)plVar23[2])) {
      iVar25 = (**(code **)(*plVar23 + 0x48))(plVar23);
      bVar27 = iVar25 == -1;
      if (bVar27) {
        plVar23 = (longlong *)0x0;
      }
    }
    bVar22 = 0;
    bVar4 = 0;
    if (bVar28 != bVar27) {
      uVar21 = uVar20;
      if ((plVar19 == (longlong *)0x0) || (!bVar26)) {
LAB_14003e475:
        bVar4 = 0;
        if ((*(byte *)(*(longlong *)(lVar12 + 0x30) + (uVar21 & 0xff) * 2) & 0x20) == 0)
        goto LAB_14003e345;
        pbVar15 = (byte *)plVar19[2];
        if (pbVar15 < (byte *)plVar19[3]) goto LAB_14003e49b;
        (**(code **)(*plVar19 + 0x50))(plVar19);
      }
      else {
        pbVar15 = (byte *)plVar19[2];
        if ((byte *)plVar19[3] <= pbVar15) {
          uVar21 = (**(code **)(*plVar19 + 0x48))(plVar19);
          if ((int)uVar21 == -1) {
            plVar19 = (longlong *)0x0;
          }
          goto LAB_14003e475;
        }
        if ((*(byte *)(*(longlong *)(lVar12 + 0x30) + (ulonglong)*pbVar15 * 2) & 0x20) == 0) {
          if (local_100 != 3) goto LAB_14003e9b7;
          uVar20 = 0xffffffff;
          goto LAB_14003e351;
        }
LAB_14003e49b:
        plVar19[2] = (longlong)(pbVar15 + 1);
      }
      uVar20 = 0xffffffff;
      bVar4 = 1;
    }
LAB_14003e345:
    bVar22 = bVar4;
    if (local_100 != 3) {
      bVar26 = (int)uVar20 == -1;
      bVar28 = bVar26;
      if ((plVar19 != (longlong *)0x0) && (bVar4 = bVar22, bVar26)) goto LAB_14003e9b7;
      while( true ) {
        bVar27 = iVar9 == -1;
        if ((plVar23 != (longlong *)0x0 && bVar27) &&
           (bVar27 = false, (ulonglong)plVar23[3] <= (ulonglong)plVar23[2])) {
          iVar25 = (**(code **)(*plVar23 + 0x48))(plVar23);
          bVar27 = iVar25 == -1;
          if (bVar27) {
            plVar23 = (longlong *)0x0;
          }
        }
        if (bVar27 == bVar26) break;
        uVar21 = uVar20;
        bVar4 = bVar22;
        if ((plVar19 == (longlong *)0x0) || (!bVar28)) {
LAB_14003e98b:
          if ((*(byte *)(*(longlong *)(lVar12 + 0x30) + (uVar21 & 0xff) * 2) & 0x20) == 0) break;
          pbVar15 = (byte *)plVar19[2];
          if (pbVar15 < (byte *)plVar19[3]) goto LAB_14003e9af;
          (**(code **)(*plVar19 + 0x50))(plVar19);
        }
        else {
          pbVar15 = (byte *)plVar19[2];
          if ((byte *)plVar19[3] <= pbVar15) {
            uVar21 = (**(code **)(*plVar19 + 0x48))(plVar19);
            if ((int)uVar21 == -1) {
              plVar19 = (longlong *)0x0;
            }
            goto LAB_14003e98b;
          }
          if ((*(byte *)(*(longlong *)(lVar12 + 0x30) + (ulonglong)*pbVar15 * 2) & 0x20) == 0)
          break;
LAB_14003e9af:
          plVar19[2] = (longlong)(pbVar15 + 1);
        }
LAB_14003e9b7:
        bVar22 = bVar4;
        if (((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) ||
           (iVar25 = (**(code **)(*plVar19 + 0x48))(plVar19), iVar25 != -1)) {
          uVar20 = 0xffffffff;
          bVar26 = false;
          bVar28 = true;
        }
        else {
          bVar26 = true;
          plVar19 = (longlong *)0x0;
          uVar20 = 0xffffffff;
          bVar28 = true;
        }
      }
      break;
    }
    goto LAB_14003e351;
  case 2:
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_e8 < 2)) && (iVar10 != 0)) {
      if (local_100 == 1) {
        if ((bVar5) || (((char)local_8c == '\x03' || (local_8c._2_1_ == '\x01'))))
        goto LAB_14003ea80;
      }
      else {
        if (local_100 != 2) goto joined_r0x00014003ebb4;
        if ((local_8c._3_1_ == '\x04') || ((local_8c._3_1_ == '\x03' && (bVar5))))
        goto LAB_14003ea80;
      }
LAB_14003ebd5:
      bVar22 = 1;
    }
    else {
LAB_14003ea80:
      bVar28 = iVar25 == -1;
      uVar21 = *(ulonglong *)(lVar24 + 0x30);
      if ((plVar19 != (longlong *)0x0) && (bVar28)) {
        uVar17 = 0;
        goto LAB_14003eaff;
      }
      uVar17 = 0;
      bVar26 = bVar28;
      while( true ) {
        if ((plVar23 == (longlong *)0x0) || (iVar9 != -1)) {
          bVar28 = (bool)(bVar28 ^ iVar9 == -1);
        }
        else if (((ulonglong)plVar23[3] <= (ulonglong)plVar23[2]) &&
                (iVar25 = (**(code **)(*plVar23 + 0x48))(plVar23), iVar25 == -1)) {
          bVar28 = (bool)(bVar28 ^ 1);
          plVar23 = (longlong *)0x0;
        }
        if ((uVar21 <= uVar17) || (!bVar28)) break;
        uVar18 = uVar20;
        if ((plVar19 == (longlong *)0x0) || (!bVar26)) {
LAB_14003ead8:
          if (*(char *)(*(longlong *)(lVar24 + 0x28) + uVar17) != (char)uVar18) goto LAB_14003eb70;
          pcVar16 = (char *)plVar19[2];
          if (pcVar16 < (char *)plVar19[3]) goto LAB_14003eaf3;
          (**(code **)(*plVar19 + 0x50))(plVar19);
        }
        else {
          pcVar16 = (char *)plVar19[2];
          if ((char *)plVar19[3] <= pcVar16) {
            uVar18 = (**(code **)(*plVar19 + 0x48))(plVar19);
            if ((int)uVar18 == -1) {
              plVar19 = (longlong *)0x0;
            }
            goto LAB_14003ead8;
          }
          if (*pcVar16 != *(char *)(*(longlong *)(lVar24 + 0x28) + uVar17)) goto LAB_14003eb70;
LAB_14003eaf3:
          plVar19[2] = (longlong)(pcVar16 + 1);
        }
        uVar17 = uVar17 + 1;
LAB_14003eaff:
        if (((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) ||
           (iVar25 = (**(code **)(*plVar19 + 0x48))(plVar19), iVar25 != -1)) {
          bVar26 = true;
          uVar20 = 0xffffffff;
          bVar28 = false;
        }
        else {
          bVar26 = true;
          bVar28 = true;
          plVar19 = (longlong *)0x0;
          uVar20 = 0xffffffff;
        }
      }
      if (uVar21 == uVar17) goto LAB_14003ebd5;
LAB_14003eb70:
      if (uVar17 != 0) goto LAB_14003e91f;
      bVar22 = ((byte)(*(uint *)(param_5 + 0x18) >> 9) ^ 1) & 1;
    }
    break;
  case 3:
    if (*(longlong *)(lVar24 + 0x40) == 0) {
      if (*(longlong *)(lVar24 + 0x50) != 0) {
LAB_14003ec50:
        bVar26 = iVar25 == -1;
        bVar28 = bVar26;
        if (plVar19 != (longlong *)0x0 && bVar26) {
          if ((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) {
            bVar28 = false;
          }
          else {
            iVar25 = (**(code **)(*plVar19 + 0x48))(plVar19);
            bVar28 = iVar25 == -1;
            if (bVar28) {
              plVar19 = (longlong *)0x0;
            }
          }
        }
        bVar27 = iVar9 == -1;
        if ((plVar23 != (longlong *)0x0 && bVar27) &&
           (bVar27 = false, (ulonglong)plVar23[3] <= (ulonglong)plVar23[2])) {
          iVar25 = (**(code **)(*plVar23 + 0x48))(plVar23);
          bVar27 = iVar25 == -1;
          if (bVar27) {
            plVar23 = (longlong *)0x0;
          }
        }
        if (bVar27 != bVar28) {
          if ((plVar19 == (longlong *)0x0) || (!bVar26)) {
            cVar6 = (char)uVar20;
          }
          else if ((char *)plVar19[2] < (char *)plVar19[3]) {
            cVar6 = *(char *)plVar19[2];
          }
          else {
            iVar25 = (**(code **)(*plVar19 + 0x48))(plVar19);
            cVar6 = (char)iVar25;
            if (iVar25 == -1) {
              cVar6 = -1;
              plVar19 = (longlong *)0x0;
            }
          }
          if (**(char **)(lVar24 + 0x48) == cVar6) {
            local_e8 = *(ulonglong *)(lVar24 + 0x50);
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar19);
            bVar3 = true;
            uVar20 = 0xffffffff;
            bVar22 = 1;
            break;
          }
        }
        if ((*(longlong *)(lVar24 + 0x40) != 0) && (*(longlong *)(lVar24 + 0x50) == 0))
        goto LAB_14003ec3e;
      }
LAB_14003e4ce:
      bVar22 = bVar5 ^ 1;
    }
    else {
      bVar26 = iVar25 == -1;
      bVar28 = bVar26;
      if (plVar19 != (longlong *)0x0 && bVar26) {
        if ((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) {
          bVar28 = false;
        }
        else {
          iVar11 = (**(code **)(*plVar19 + 0x48))(plVar19);
          bVar28 = iVar11 == -1;
          if (bVar28) {
            plVar19 = (longlong *)0x0;
          }
        }
      }
      bVar27 = iVar9 == -1;
      if ((plVar23 != (longlong *)0x0 && bVar27) &&
         (bVar27 = false, (ulonglong)plVar23[3] <= (ulonglong)plVar23[2])) {
        iVar11 = (**(code **)(*plVar23 + 0x48))(plVar23);
        bVar27 = iVar11 == -1;
        if (bVar27) {
          plVar23 = (longlong *)0x0;
        }
      }
      if (bVar27 != bVar28) {
        uVar21 = uVar20;
        if ((plVar19 != (longlong *)0x0) && (bVar26)) {
          if ((byte *)plVar19[2] < (byte *)plVar19[3]) {
            uVar21 = (ulonglong)*(byte *)plVar19[2];
          }
          else {
            uVar8 = (**(code **)(*plVar19 + 0x48))(plVar19);
            uVar21 = (ulonglong)uVar8;
            if (uVar8 == 0xffffffff) {
              uVar21 = 0xffffffff;
              plVar19 = (longlong *)0x0;
            }
          }
        }
        if (**(char **)(lVar24 + 0x38) == (char)uVar21) {
          local_e8 = *(ulonglong *)(lVar24 + 0x40);
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar19);
          uVar20 = 0xffffffff;
          goto LAB_14003ebd5;
        }
      }
      if (*(longlong *)(lVar24 + 0x50) != 0) goto LAB_14003ec50;
      if (*(longlong *)(lVar24 + 0x40) == 0) goto LAB_14003e4ce;
LAB_14003ec3e:
      bVar3 = true;
      bVar22 = 1;
    }
    break;
  case 4:
    do {
      bVar26 = (int)uVar20 == -1;
      bVar28 = bVar26;
      if (plVar19 != (longlong *)0x0 && bVar26) {
        if ((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) {
          bVar28 = false;
        }
        else {
          iVar25 = (**(code **)(*plVar19 + 0x48))(plVar19);
          bVar28 = iVar25 == -1;
          if (bVar28) {
            plVar19 = (longlong *)0x0;
          }
        }
      }
      bVar27 = iVar9 == -1;
      if ((plVar23 != (longlong *)0x0 && bVar27) &&
         (bVar27 = false, (ulonglong)plVar23[3] <= (ulonglong)plVar23[2])) {
        iVar25 = (**(code **)(*plVar23 + 0x48))(plVar23);
        bVar27 = iVar25 == -1;
        if (bVar27) {
          plVar23 = (longlong *)0x0;
        }
      }
      if (bVar28 == bVar27) goto LAB_14003e8a0;
      uVar21 = uVar20;
      if ((plVar19 != (longlong *)0x0) && (bVar26)) {
        if ((byte *)plVar19[2] < (byte *)plVar19[3]) {
          uVar21 = (ulonglong)*(byte *)plVar19[2];
        }
        else {
          uVar8 = (**(code **)(*plVar19 + 0x48))(plVar19);
          if (uVar8 == 0xffffffff) {
            plVar19 = (longlong *)0x0;
            uVar8 = 0xffffffff;
          }
          uVar21 = (ulonglong)uVar8;
        }
      }
      cVar6 = (char)uVar21;
      pvVar14 = memchr((void *)(lVar24 + 0x65),(int)cVar6,10);
      uVar17 = local_60;
      uVar21 = local_80;
      if (pvVar14 == (void *)0x0) {
        if (*(char *)(lVar24 + 0x21) == cVar6) {
          bVar22 = local_bd;
          if (local_bd != 0) goto LAB_14003e910;
          if (0 < *(int *)(lVar24 + 0x58)) {
            iVar25 = 0;
            local_bd = 1;
            local_a0 = iVar7;
            goto LAB_14003e2bd;
          }
          goto LAB_14003e8a0;
        }
        if (*(byte *)(lVar24 + 0x20) == 0) goto LAB_14003e8a0;
        bVar22 = *(byte *)(lVar24 + 0x20);
        if ((*(char *)(lVar24 + 0x22) != cVar6) || (bVar22 = local_bd, local_bd != 0))
        goto LAB_14003e910;
        if (iVar7 == 0) {
          bVar22 = 0;
          goto LAB_14003e910;
        }
        uVar20 = local_80 + 1;
        if (local_88 == &local_78) {
          uVar17 = 0xf;
        }
        else {
          uVar17 = CONCAT71(uStack_77,local_78);
        }
        if (uVar17 < uVar20) {
          __cxx11::string::_M_mutate((string *)&local_88,local_80,0,(undefined1 *)0x0,1);
        }
        local_88[uVar21] = (char)iVar7;
        iVar25 = 0;
        local_88[uVar21 + 1] = 0;
        uVar21 = plVar19[2];
        local_80 = uVar20;
        if (uVar21 < (ulonglong)plVar19[3]) goto LAB_14003e2cb;
LAB_14003e7e6:
        (**(code **)(*plVar19 + 0x50))(plVar19);
      }
      else {
        uVar20 = local_60 + 1;
        cVar6 = money_base::_S_atoms[(longlong)pvVar14 - (lVar24 + 100)];
        if (local_68 == &local_58) {
          uVar21 = 0xf;
        }
        else {
          uVar21 = CONCAT71(uStack_57,local_58);
        }
        if (uVar21 < uVar20) {
          __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
        }
        local_68[uVar17] = cVar6;
        iVar25 = iVar7 + 1;
        local_68[uVar17 + 1] = '\0';
        local_60 = uVar20;
LAB_14003e2bd:
        uVar21 = plVar19[2];
        if ((ulonglong)plVar19[3] <= uVar21) goto LAB_14003e7e6;
LAB_14003e2cb:
        plVar19[2] = uVar21 + 1;
      }
      uVar20 = 0xffffffff;
      iVar7 = iVar25;
    } while( true );
  }
LAB_14003e4d9:
  local_100 = local_100 + 1;
  if ((iVar10 + 1 < 4 & bVar22) == 0) goto LAB_14003e351;
  goto LAB_14003e207;
LAB_14003e8a0:
  bVar22 = 1;
LAB_14003e910:
  if (local_60 == 0) goto LAB_14003e91f;
  goto LAB_14003e4d9;
LAB_14003e351:
  bVar5 = (bool)(1 < local_e8 & bVar22);
  if (bVar5 == false) {
    if (bVar22 == 0) {
LAB_14003e91f:
      bVar28 = (int)uVar20 == -1;
      goto LAB_14003e630;
    }
joined_r0x00014003ebb4:
    if ((1 < local_60) &&
       (uVar21 = __cxx11::string::find_first_not_of((string *)&local_68,'0',0), uVar21 != 0)) {
      if (uVar21 == 0xffffffffffffffff) {
        uVar21 = local_60 - 1;
        if (local_60 == 0) {
          *local_68 = '\0';
        }
        else if (uVar21 != 0) goto LAB_14003ecd8;
      }
      else {
LAB_14003ecd8:
        uVar17 = local_60;
        if (uVar21 <= local_60) {
          uVar17 = uVar21;
        }
        __cxx11::string::_M_erase((string *)&local_68,0,uVar17);
      }
    }
    if ((bVar3) && (*local_68 != '0')) {
      __cxx11::string::_M_replace_aux((string *)&local_68,0,0,1,(string)0x2d);
    }
    uVar21 = local_80;
    if (local_80 != 0) {
      uVar17 = local_80 + 1;
      if (local_bd == 0) {
        local_a0._0_1_ = (undefined1)iVar7;
      }
      if (local_88 == &local_78) {
        uVar18 = 0xf;
      }
      else {
        uVar18 = CONCAT71(uStack_77,local_78);
      }
      if (uVar18 < uVar17) {
        __cxx11::string::_M_mutate((string *)&local_88,local_80,0,(undefined1 *)0x0,1);
      }
      local_88[uVar21] = (undefined1)local_a0;
      local_88[uVar21 + 1] = 0;
      local_80 = uVar17;
      cVar6 = __verify_grouping(*(longlong *)(lVar24 + 0x10),*(longlong *)(lVar24 + 0x18),
                                (undefined8 *)&local_88);
      if (cVar6 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    bVar28 = (int)uVar20 == -1;
    if ((local_bd != 0) && (*(int *)(lVar24 + 0x58) != iVar7)) goto LAB_14003e630;
    __cxx11::string::swap(param_7,(string *)&local_68);
    bVar5 = plVar19 != (longlong *)0x0 && bVar28;
    if (plVar19 == (longlong *)0x0 || !bVar28) goto LAB_14003e64b;
  }
  else {
    if (bVar3) {
      local_110 = *(longlong *)(lVar24 + 0x48);
    }
    else {
      local_110 = *(longlong *)(lVar24 + 0x38);
    }
    bVar28 = (int)uVar20 == -1;
    uVar21 = 1;
    bVar26 = bVar28;
    if ((plVar19 != (longlong *)0x0) && (bVar28)) goto LAB_14003e401;
    while( true ) {
      if ((plVar23 == (longlong *)0x0) || (iVar9 != -1)) {
        bVar26 = (bool)(bVar26 ^ iVar9 == -1);
      }
      else if (((ulonglong)plVar23[3] <= (ulonglong)plVar23[2]) &&
              (iVar10 = (**(code **)(*plVar23 + 0x48))(plVar23), iVar10 == -1)) {
        bVar26 = (bool)(bVar26 ^ 1);
        plVar23 = (longlong *)0x0;
      }
      if ((local_e8 <= uVar21) || (bVar26 == false)) break;
      uVar17 = uVar20;
      if ((plVar19 == (longlong *)0x0) || (bVar28 == false)) {
LAB_14003e3d9:
        if (*(char *)(local_110 + uVar21) != (char)uVar17) goto LAB_14003e630;
        pcVar16 = (char *)plVar19[2];
        if (pcVar16 < (char *)plVar19[3]) goto LAB_14003e3f5;
        (**(code **)(*plVar19 + 0x50))(plVar19);
      }
      else {
        pcVar16 = (char *)plVar19[2];
        if ((char *)plVar19[3] <= pcVar16) {
          uVar17 = (**(code **)(*plVar19 + 0x48))(plVar19);
          if ((int)uVar17 == -1) {
            plVar19 = (longlong *)0x0;
          }
          goto LAB_14003e3d9;
        }
        if (*pcVar16 != *(char *)(local_110 + uVar21)) goto LAB_14003e630;
LAB_14003e3f5:
        plVar19[2] = (longlong)(pcVar16 + 1);
      }
      uVar21 = uVar21 + 1;
LAB_14003e401:
      bVar28 = bVar5;
      if (((ulonglong)plVar19[2] < (ulonglong)plVar19[3]) ||
         (iVar10 = (**(code **)(*plVar19 + 0x48))(plVar19), iVar10 != -1)) {
        uVar20 = 0xffffffff;
        bVar26 = false;
      }
      else {
        plVar19 = (longlong *)0x0;
        uVar20 = 0xffffffff;
        bVar26 = bVar5;
      }
    }
    if (local_e8 == uVar21) goto joined_r0x00014003ebb4;
LAB_14003e630:
    *param_6 = *param_6 | 4;
    bVar5 = (bool)(plVar19 != (longlong *)0x0 & bVar28);
    if (bVar5 == false) goto LAB_14003e64b;
  }
  bVar28 = false;
  if (((ulonglong)plVar19[3] <= (ulonglong)plVar19[2]) &&
     (iVar7 = (**(code **)(*plVar19 + 0x48))(plVar19), iVar7 == -1)) {
    plVar19 = (longlong *)0x0;
    bVar28 = bVar5;
  }
LAB_14003e64b:
  bVar5 = iVar9 == -1;
  if (((plVar23 != (longlong *)0x0) && (bVar5)) &&
     (bVar5 = false, (ulonglong)plVar23[3] <= (ulonglong)plVar23[2])) {
    iVar9 = (**(code **)(*plVar23 + 0x48))(plVar23);
    bVar5 = iVar9 == -1;
  }
  if (bVar5 == bVar28) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar19;
  param_1[1] = uVar2 & 0xffffffff00000000 | uVar20;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
  return param_1;
}



// WARNING: Instruction at (ram,0x00014003e2c5) overlaps instruction at (ram,0x00014003e2c4)
// 
// WARNING: Control flow encountered bad instruction data
// std::istreambuf_iterator<char, std::char_traits<char> > std::__cxx11::money_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract<true>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// std::__cxx11::string&) const

undefined8 *
std::__cxx11::money_get<>::_M_extract<true>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,string *param_7)

{
  int *piVar1;
  longlong *plVar2;
  ulonglong uVar3;
  longlong lVar4;
  byte bVar5;
  char cVar6;
  __moneypunct_cache<char,true> _Var7;
  uint uVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  int iVar12;
  int iVar13;
  void *pvVar14;
  byte *pbVar15;
  char *pcVar16;
  longlong lVar17;
  __moneypunct_cache<char,true> *p_Var18;
  ulonglong uVar19;
  __moneypunct_cache<char,true> *p_Var20;
  __moneypunct_cache<char,true> *p_Var21;
  longlong lVar22;
  __moneypunct_cache<char,true> *p_Var23;
  longlong *plVar24;
  __moneypunct_cache<char,true> *p_Var25;
  bool bVar26;
  ulonglong uVar27;
  uint *puVar28;
  __moneypunct_cache<char,true> *unaff_R12;
  undefined7 uVar29;
  longlong *plVar30;
  longlong lVar31;
  bool bVar32;
  bool bVar33;
  byte bVar34;
  bool bVar35;
  longlong local_110;
  void *local_108;
  longlong local_100;
  __moneypunct_cache<char,true> *local_e8;
  byte local_bd;
  int local_a0;
  bool local_99;
  undefined4 local_8c;
  undefined1 *local_88;
  __moneypunct_cache<char,true> *local_80;
  undefined1 local_78;
  undefined7 uStack_77;
  char *local_68;
  __moneypunct_cache<char,true> *local_60;
  char local_58;
  undefined7 uStack_57;
  
  uVar3 = param_3[1];
  plVar24 = (longlong *)*param_3;
  plVar30 = (longlong *)*param_4;
  p_Var25 = (__moneypunct_cache<char,true> *)(uVar3 & 0xffffffff);
  iVar11 = (int)param_4[1];
  local_110 = CONCAT44(local_110._4_4_,iVar11);
  lVar17 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar17 = *(longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar17 * 8);
  if (lVar17 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  p_Var18 = (__moneypunct_cache<char,true> *)locale::id::_M_id((id *)&moneypunct<char,true>::id);
  plVar2 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + (longlong)p_Var18 * 8)
  ;
  lVar31 = *plVar2;
  if (lVar31 == 0) {
    unaff_R12 = operator_new(0x70);
    *(undefined4 *)(unaff_R12 + 8) = 0;
    *(undefined2 *)(unaff_R12 + 0x21) = 0;
    unaff_R12[0x20] = (__moneypunct_cache<char,true>)0x0;
    *(undefined ***)unaff_R12 = &PTR____moneypunct_cache_1400dddf0;
    *(undefined8 *)(unaff_R12 + 0x10) = 0;
    *(undefined8 *)(unaff_R12 + 0x18) = 0;
    *(undefined8 *)(unaff_R12 + 0x28) = 0;
    *(undefined8 *)(unaff_R12 + 0x30) = 0;
    *(undefined8 *)(unaff_R12 + 0x38) = 0;
    *(undefined8 *)(unaff_R12 + 0x40) = 0;
    *(undefined8 *)(unaff_R12 + 0x48) = 0;
    *(undefined8 *)(unaff_R12 + 0x50) = 0;
    *(undefined4 *)(unaff_R12 + 0x58) = 0;
    *(undefined8 *)(unaff_R12 + 0x5c) = 0;
    unaff_R12[0x6f] = (__moneypunct_cache<char,true>)0x0;
    __moneypunct_cache<char,true>::_M_cache(unaff_R12,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache
              (*(_Impl **)(param_5 + 0xd0),(longlong *)unaff_R12,(longlong)p_Var18);
    lVar31 = *plVar2;
  }
  if (*(longlong *)(lVar31 + 0x40) == 0) {
    local_99 = false;
  }
  else {
    local_99 = *(longlong *)(lVar31 + 0x50) != 0;
  }
  local_80 = (__moneypunct_cache<char,true> *)0x0;
  local_78 = 0;
  local_88 = &local_78;
  if (*(char *)(lVar31 + 0x20) != '\0') {
    __cxx11::string::reserve((string *)&local_88,0x20);
  }
  p_Var21 = (__moneypunct_cache<char,true> *)0x0;
  local_60 = (__moneypunct_cache<char,true> *)0x0;
  local_58 = '\0';
  local_68 = &local_58;
  __cxx11::string::reserve((string *)&local_68,0x20);
  local_108 = (void *)(lVar31 + 0x65);
  iVar10 = 0;
  local_100 = 0;
  local_8c = *(undefined4 *)(lVar31 + 0x60);
  local_bd = 0;
  local_a0 = 0;
  local_e8 = (__moneypunct_cache<char,true> *)0x0;
  bVar26 = false;
LAB_14003f497:
  iVar12 = (int)local_100;
  p_Var23 = p_Var18;
  if (4 < *(byte *)((longlong)&local_8c + local_100)) goto LAB_14003fe65;
  puVar28 = &switchD_14003f4c0::switchdataD_1400c546c;
  uVar19 = (ulonglong)
           (int)(&switchD_14003f4c0::switchdataD_1400c546c)
                [*(byte *)((longlong)&local_8c + local_100)];
  bVar32 = 0xfffffffebff3ab93 < uVar19;
  p_Var20 = (__moneypunct_cache<char,true> *)
            ((longlong)&switchD_14003f4c0::switchdataD_1400c546c + uVar19);
  iVar9 = (int)p_Var25;
  uVar29 = (undefined7)((ulonglong)unaff_R12 >> 8);
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(*(byte *)((longlong)&local_8c + local_100)) {
  case 0:
    bVar5 = 1;
    goto LAB_14003f5d5;
  case 1:
    bVar35 = iVar9 == -1;
    unaff_R12 = (__moneypunct_cache<char,true> *)CONCAT71(uVar29,bVar35);
    bVar32 = plVar24 != (longlong *)0x0 && bVar35;
    if (bVar32) {
      if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
        p_Var18 = (__moneypunct_cache<char,true> *)0x0;
      }
      else {
        iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24);
        p_Var18 = (__moneypunct_cache<char,true> *)
                  (CONCAT71((int7)((ulonglong)p_Var18 >> 8),bVar32) & 0xffffffff);
        if (iVar9 == -1) {
          plVar24 = (longlong *)0x0;
        }
        else {
          p_Var18 = (__moneypunct_cache<char,true> *)0x0;
        }
      }
    }
    else {
      p_Var18 = (__moneypunct_cache<char,true> *)((ulonglong)unaff_R12 & 0xffffffff);
    }
    bVar32 = iVar11 == -1;
    if ((plVar30 != (longlong *)0x0 && bVar32) &&
       (bVar32 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
      iVar9 = (**(code **)(*plVar30 + 0x48))(plVar30);
      bVar32 = iVar9 == -1;
      p_Var21 = (__moneypunct_cache<char,true> *)0x0;
      if (bVar32) {
        plVar30 = (longlong *)0x0;
      }
    }
    bVar34 = 0;
    bVar5 = 0;
    if (SUB81(p_Var18,0) != bVar32) {
      p_Var23 = p_Var25;
      if ((plVar24 == (longlong *)0x0) || (!bVar35)) {
LAB_14003f705:
        p_Var21 = *(__moneypunct_cache<char,true> **)(lVar17 + 0x30);
        bVar5 = 0;
        if (((byte)p_Var21[((ulonglong)p_Var23 & 0xff) * 2] & 0x20) == 0) goto LAB_14003f5d5;
        pbVar15 = (byte *)plVar24[2];
        if (pbVar15 < (byte *)plVar24[3]) goto LAB_14003f72b;
        (**(code **)(*plVar24 + 0x50))(plVar24);
      }
      else {
        pbVar15 = (byte *)plVar24[2];
        if ((byte *)plVar24[3] <= pbVar15) {
          p_Var23 = (__moneypunct_cache<char,true> *)(**(code **)(*plVar24 + 0x48))(plVar24);
          if ((int)p_Var23 == -1) {
            plVar24 = (longlong *)0x0;
          }
          goto LAB_14003f705;
        }
        p_Var21 = *(__moneypunct_cache<char,true> **)(lVar17 + 0x30);
        if (((byte)p_Var21[(ulonglong)*pbVar15 * 2] & 0x20) == 0) {
          if (local_100 != 3) goto LAB_14003fc47;
          p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
          goto LAB_14003f5e1;
        }
LAB_14003f72b:
        plVar24[2] = (longlong)(pbVar15 + 1);
      }
      p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
      bVar5 = 1;
    }
LAB_14003f5d5:
    bVar34 = bVar5;
    if (local_100 != 3) {
      bVar32 = (int)p_Var25 == -1;
      unaff_R12 = (__moneypunct_cache<char,true> *)
                  CONCAT71((int7)((ulonglong)unaff_R12 >> 8),bVar32);
      if ((plVar24 != (longlong *)0x0) && (bVar5 = bVar34, bVar32)) goto LAB_14003fc47;
      while( true ) {
        bVar35 = iVar11 == -1;
        bVar33 = plVar30 != (longlong *)0x0 && bVar35;
        p_Var23 = (__moneypunct_cache<char,true> *)CONCAT71((int7)((ulonglong)p_Var18 >> 8),bVar33);
        if (bVar33) {
          p_Var21 = (__moneypunct_cache<char,true> *)plVar30[3];
          bVar35 = false;
          if (p_Var21 <= (__moneypunct_cache<char,true> *)plVar30[2]) {
            iVar9 = (**(code **)(*plVar30 + 0x48))(plVar30);
            bVar35 = iVar9 == -1;
            p_Var21 = (__moneypunct_cache<char,true> *)0x0;
            if (bVar35) {
              plVar30 = (longlong *)0x0;
            }
          }
        }
        if (bVar35 == SUB81(unaff_R12,0)) break;
        p_Var20 = p_Var25;
        p_Var18 = p_Var23;
        bVar5 = bVar34;
        if ((plVar24 == (longlong *)0x0) || (!bVar32)) {
LAB_14003fc1b:
          p_Var21 = *(__moneypunct_cache<char,true> **)(lVar17 + 0x30);
          if (((byte)p_Var21[((ulonglong)p_Var20 & 0xff) * 2] & 0x20) == 0) break;
          pbVar15 = (byte *)plVar24[2];
          if (pbVar15 < (byte *)plVar24[3]) goto LAB_14003fc3f;
          (**(code **)(*plVar24 + 0x50))(plVar24);
        }
        else {
          pbVar15 = (byte *)plVar24[2];
          if ((byte *)plVar24[3] <= pbVar15) {
            p_Var20 = (__moneypunct_cache<char,true> *)(**(code **)(*plVar24 + 0x48))(plVar24);
            if ((int)p_Var20 == -1) {
              plVar24 = (longlong *)0x0;
            }
            goto LAB_14003fc1b;
          }
          p_Var21 = *(__moneypunct_cache<char,true> **)(lVar17 + 0x30);
          if (((byte)p_Var21[(ulonglong)*pbVar15 * 2] & 0x20) == 0) break;
LAB_14003fc3f:
          plVar24[2] = (longlong)(pbVar15 + 1);
        }
LAB_14003fc47:
        bVar34 = bVar5;
        if (((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) ||
           (iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar9 != -1)) {
          bVar32 = true;
          p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
          unaff_R12 = (__moneypunct_cache<char,true> *)0x0;
        }
        else {
          bVar32 = true;
          unaff_R12 = (__moneypunct_cache<char,true> *)0x1;
          plVar24 = (longlong *)0x0;
          p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
        }
      }
      break;
    }
    goto LAB_14003f5e1;
  case 2:
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_e8 < (__moneypunct_cache<char,true> *)0x2)
        ) && (iVar12 != 0)) {
      if (local_100 == 1) {
        if ((local_99 != false) || (((char)local_8c == '\x03' || (local_8c._2_1_ == '\x01'))))
        goto LAB_14003fd10;
      }
      else {
        if (local_100 != 2) goto joined_r0x00014003fe44;
        if ((local_8c._3_1_ == '\x04') || ((local_8c._3_1_ == '\x03' && (local_99 != false))))
        goto LAB_14003fd10;
      }
LAB_14003fe65:
      bVar34 = 1;
    }
    else {
LAB_14003fd10:
      bVar32 = iVar9 == -1;
      unaff_R12 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x30);
      if ((plVar24 != (longlong *)0x0) && (bVar32)) {
        p_Var23 = (__moneypunct_cache<char,true> *)0x0;
        goto LAB_14003fd8f;
      }
      p_Var23 = (__moneypunct_cache<char,true> *)0x0;
      bVar35 = bVar32;
      while( true ) {
        if ((plVar30 == (longlong *)0x0) || (iVar11 != -1)) {
          bVar32 = (bool)(bVar32 ^ iVar11 == -1);
        }
        else if (((ulonglong)plVar30[3] <= (ulonglong)plVar30[2]) &&
                (iVar9 = (**(code **)(*plVar30 + 0x48))(plVar30), iVar9 == -1)) {
          bVar32 = (bool)(bVar32 ^ 1);
          plVar30 = (longlong *)0x0;
        }
        if ((unaff_R12 <= p_Var23) || (!bVar32)) break;
        p_Var18 = p_Var25;
        if ((plVar24 == (longlong *)0x0) || (!bVar35)) {
LAB_14003fd68:
          p_Var21 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x28);
          if (p_Var21[(longlong)p_Var23] != SUB81(p_Var18,0)) goto LAB_14003fe00;
          p_Var18 = (__moneypunct_cache<char,true> *)plVar24[2];
          if (p_Var18 < (__moneypunct_cache<char,true> *)plVar24[3]) goto LAB_14003fd83;
          (**(code **)(*plVar24 + 0x50))(plVar24);
        }
        else {
          p_Var18 = (__moneypunct_cache<char,true> *)plVar24[2];
          if ((__moneypunct_cache<char,true> *)plVar24[3] <= p_Var18) {
            p_Var18 = (__moneypunct_cache<char,true> *)(**(code **)(*plVar24 + 0x48))(plVar24);
            if ((int)p_Var18 == -1) {
              plVar24 = (longlong *)0x0;
            }
            goto LAB_14003fd68;
          }
          p_Var21 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x28);
          if (*p_Var18 != p_Var21[(longlong)p_Var23]) goto LAB_14003fe00;
LAB_14003fd83:
          plVar24[2] = (longlong)(p_Var18 + 1);
        }
        p_Var23 = p_Var23 + 1;
LAB_14003fd8f:
        if (((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) ||
           (iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar9 != -1)) {
          bVar35 = true;
          p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
          bVar32 = false;
        }
        else {
          bVar35 = true;
          bVar32 = true;
          plVar24 = (longlong *)0x0;
          p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
        }
      }
      if (unaff_R12 == p_Var23) goto LAB_14003fe65;
LAB_14003fe00:
      if (p_Var23 != (__moneypunct_cache<char,true> *)0x0) goto LAB_14003fbaf;
      bVar34 = ((byte)(*(uint *)(param_5 + 0x18) >> 9) ^ 1) & 1;
    }
    break;
  case 3:
    if (*(longlong *)(lVar31 + 0x40) == 0) {
      if (*(longlong *)(lVar31 + 0x50) != 0) {
LAB_14003fee0:
        bVar35 = iVar9 == -1;
        unaff_R12 = (__moneypunct_cache<char,true> *)
                    CONCAT71((int7)((ulonglong)unaff_R12 >> 8),bVar35);
        bVar32 = plVar24 != (longlong *)0x0 && bVar35;
        p_Var23 = (__moneypunct_cache<char,true> *)
                  (CONCAT71((int7)((ulonglong)p_Var20 >> 8),bVar32) & 0xffffffff);
        if (bVar32) {
          if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
            p_Var23 = (__moneypunct_cache<char,true> *)0x0;
          }
          else {
            iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24);
            if (iVar9 == -1) {
              plVar24 = (longlong *)0x0;
            }
            else {
              p_Var23 = (__moneypunct_cache<char,true> *)0x0;
            }
          }
        }
        else {
          p_Var23 = (__moneypunct_cache<char,true> *)((ulonglong)unaff_R12 & 0xffffffff);
        }
        bVar32 = iVar11 == -1;
        p_Var21 = (__moneypunct_cache<char,true> *)
                  CONCAT71((int7)((ulonglong)p_Var21 >> 8),plVar30 != (longlong *)0x0);
        if (plVar30 != (longlong *)0x0 && bVar32) {
          p_Var21 = (__moneypunct_cache<char,true> *)plVar30[3];
          bVar32 = false;
          if (p_Var21 <= (__moneypunct_cache<char,true> *)plVar30[2]) {
            iVar9 = (**(code **)(*plVar30 + 0x48))(plVar30);
            bVar32 = iVar9 == -1;
            p_Var21 = (__moneypunct_cache<char,true> *)0x0;
            if (bVar32) {
              plVar30 = (longlong *)0x0;
            }
          }
        }
        if (bVar32 != SUB81(p_Var23,0)) {
          if ((plVar24 == (longlong *)0x0) || (!bVar35)) {
            _Var7 = SUB81(p_Var25,0);
          }
          else if ((__moneypunct_cache<char,true> *)plVar24[2] <
                   (__moneypunct_cache<char,true> *)plVar24[3]) {
            _Var7 = *(__moneypunct_cache<char,true> *)plVar24[2];
          }
          else {
            iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24);
            _Var7 = SUB41(iVar9,0);
            if (iVar9 == -1) {
              _Var7 = (__moneypunct_cache<char,true>)0xff;
              plVar24 = (longlong *)0x0;
            }
          }
          p_Var21 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x48);
          if (*p_Var21 == _Var7) {
            local_e8 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x50);
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar24);
            bVar26 = true;
            p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
            bVar34 = 1;
            break;
          }
        }
        if ((*(longlong *)(lVar31 + 0x40) != 0) && (*(longlong *)(lVar31 + 0x50) == 0))
        goto LAB_14003fece;
      }
LAB_14003f75e:
      bVar34 = local_99 ^ 1;
    }
    else {
      bVar35 = iVar9 == -1;
      unaff_R12 = (__moneypunct_cache<char,true> *)CONCAT71(uVar29,bVar35);
      bVar32 = plVar24 != (longlong *)0x0 && bVar35;
      uVar19 = CONCAT71((int7)((ulonglong)p_Var20 >> 8),bVar32);
      p_Var23 = (__moneypunct_cache<char,true> *)(uVar19 & 0xffffffff);
      if (bVar32) {
        uVar19 = plVar24[3];
        if ((ulonglong)plVar24[2] < uVar19) {
          p_Var23 = (__moneypunct_cache<char,true> *)0x0;
        }
        else {
          iVar13 = (**(code **)(*plVar24 + 0x48))(plVar24);
          if (iVar13 != -1) {
            p_Var23 = (__moneypunct_cache<char,true> *)0x0;
          }
          uVar19 = 0;
          if (iVar13 == -1) {
            plVar24 = (longlong *)0x0;
          }
        }
      }
      else {
        p_Var23 = (__moneypunct_cache<char,true> *)((ulonglong)unaff_R12 & 0xffffffff);
      }
      bVar32 = plVar30 != (longlong *)0x0 && iVar11 == -1;
      p_Var21 = (__moneypunct_cache<char,true> *)CONCAT71((int7)((ulonglong)p_Var21 >> 8),bVar32);
      p_Var18 = (__moneypunct_cache<char,true> *)((ulonglong)p_Var21 & 0xffffffff);
      p_Var20 = (__moneypunct_cache<char,true> *)CONCAT71((int7)(uVar19 >> 8),iVar11 == -1);
      if (bVar32) {
        p_Var21 = (__moneypunct_cache<char,true> *)plVar30[3];
        p_Var20 = (__moneypunct_cache<char,true> *)0x0;
        if (p_Var21 <= (__moneypunct_cache<char,true> *)plVar30[2]) {
          iVar13 = (**(code **)(*plVar30 + 0x48))(plVar30);
          p_Var21 = (__moneypunct_cache<char,true> *)0x0;
          p_Var20 = (__moneypunct_cache<char,true> *)0x0;
          if (iVar13 == -1) {
            plVar30 = (longlong *)0x0;
            p_Var20 = p_Var18;
          }
        }
      }
      if ((char)p_Var20 != (char)p_Var23) {
        p_Var20 = p_Var25;
        if ((plVar24 != (longlong *)0x0) && (bVar35)) {
          if ((byte *)plVar24[2] < (byte *)plVar24[3]) {
            p_Var20 = (__moneypunct_cache<char,true> *)(ulonglong)*(byte *)plVar24[2];
          }
          else {
            uVar8 = (**(code **)(*plVar24 + 0x48))(plVar24);
            p_Var20 = (__moneypunct_cache<char,true> *)(ulonglong)uVar8;
            if (uVar8 == 0xffffffff) {
              p_Var20 = (__moneypunct_cache<char,true> *)0xffffffff;
              plVar24 = (longlong *)0x0;
            }
          }
        }
        p_Var21 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x38);
        if (*p_Var21 == SUB81(p_Var20,0)) {
          local_e8 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x40);
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar24);
          p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
          goto LAB_14003fe65;
        }
      }
      if (*(longlong *)(lVar31 + 0x50) != 0) goto LAB_14003fee0;
      if (*(longlong *)(lVar31 + 0x40) == 0) goto LAB_14003f75e;
LAB_14003fece:
      bVar26 = true;
      bVar34 = 1;
    }
    break;
  case 4:
    do {
      bVar35 = (int)p_Var25 == -1;
      puVar28 = (uint *)CONCAT71((int7)((ulonglong)puVar28 >> 8),bVar35);
      bVar32 = plVar24 != (longlong *)0x0 && bVar35;
      if (bVar32) {
        if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
          p_Var23 = (__moneypunct_cache<char,true> *)0x0;
        }
        else {
          iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24);
          p_Var23 = (__moneypunct_cache<char,true> *)
                    (CONCAT71((int7)((ulonglong)p_Var18 >> 8),bVar32) & 0xffffffff);
          if (iVar9 == -1) {
            plVar24 = (longlong *)0x0;
          }
          else {
            p_Var23 = (__moneypunct_cache<char,true> *)0x0;
          }
        }
      }
      else {
        p_Var23 = (__moneypunct_cache<char,true> *)((ulonglong)puVar28 & 0xffffffff);
      }
      bVar32 = iVar11 == -1;
      unaff_R12 = (__moneypunct_cache<char,true> *)
                  CONCAT71((int7)((ulonglong)unaff_R12 >> 8),plVar30 != (longlong *)0x0 && bVar32);
      if (plVar30 != (longlong *)0x0 && bVar32) {
        p_Var21 = (__moneypunct_cache<char,true> *)plVar30[3];
        bVar32 = false;
        if (p_Var21 <= (__moneypunct_cache<char,true> *)plVar30[2]) {
          iVar9 = (**(code **)(*plVar30 + 0x48))(plVar30);
          bVar32 = iVar9 == -1;
          p_Var21 = (__moneypunct_cache<char,true> *)0x0;
          if (bVar32) {
            plVar30 = (longlong *)0x0;
          }
        }
      }
      if (SUB81(p_Var23,0) == bVar32) goto LAB_14003fb30;
      p_Var23 = p_Var25;
      if ((plVar24 != (longlong *)0x0) && (bVar35)) {
        if ((byte *)plVar24[2] < (byte *)plVar24[3]) {
          p_Var23 = (__moneypunct_cache<char,true> *)(ulonglong)*(byte *)plVar24[2];
        }
        else {
          uVar8 = (**(code **)(*plVar24 + 0x48))(plVar24);
          if (uVar8 == 0xffffffff) {
            plVar24 = (longlong *)0x0;
            uVar8 = 0xffffffff;
          }
          p_Var23 = (__moneypunct_cache<char,true> *)(ulonglong)uVar8;
        }
      }
      cVar6 = (char)p_Var23;
      p_Var21 = (__moneypunct_cache<char,true> *)(ulonglong)(uint)(int)cVar6;
      pvVar14 = memchr(local_108,(int)cVar6,10);
      p_Var20 = local_60;
      p_Var18 = local_80;
      if (pvVar14 == (void *)0x0) {
        if (*(char *)(lVar31 + 0x21) == cVar6) {
          bVar34 = local_bd;
          if (local_bd != 0) goto LAB_14003fba0;
          if (0 < *(int *)(lVar31 + 0x58)) {
            local_bd = 1;
            p_Var18 = p_Var23;
            iVar9 = 0;
            local_a0 = iVar10;
            goto LAB_14003f54d;
          }
          goto LAB_14003fb30;
        }
        if (*(byte *)(lVar31 + 0x20) == 0) goto LAB_14003fb30;
        bVar34 = *(byte *)(lVar31 + 0x20);
        if ((*(char *)(lVar31 + 0x22) != cVar6) || (bVar34 = local_bd, local_bd != 0))
        goto LAB_14003fba0;
        if (iVar10 == 0) {
          bVar34 = 0;
          goto LAB_14003fba0;
        }
        puVar28 = (uint *)(local_80 + 1);
        if (local_88 == &local_78) {
          p_Var21 = (__moneypunct_cache<char,true> *)0xf;
        }
        else {
          p_Var21 = (__moneypunct_cache<char,true> *)CONCAT71(uStack_77,local_78);
        }
        if (p_Var21 < puVar28) {
          __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
          p_Var21 = local_80;
        }
        local_88[(longlong)p_Var18] = (char)iVar10;
        iVar10 = 0;
        (local_88 + 1)[(longlong)p_Var18] = 0;
        uVar19 = plVar24[2];
        local_80 = (__moneypunct_cache<char,true> *)puVar28;
        if (uVar19 < (ulonglong)plVar24[3]) goto LAB_14003f55b;
LAB_14003fa76:
        (**(code **)(*plVar24 + 0x50))(plVar24);
      }
      else {
        puVar28 = (uint *)(local_60 + 1);
        cVar6 = money_base::_S_atoms[(longlong)pvVar14 - (lVar31 + 100)];
        if (local_68 == &local_58) {
          p_Var21 = (__moneypunct_cache<char,true> *)0xf;
        }
        else {
          p_Var21 = (__moneypunct_cache<char,true> *)CONCAT71(uStack_57,local_58);
        }
        if (p_Var21 < puVar28) {
          __cxx11::string::_M_mutate((string *)&local_68,(size_t)local_60,0,(undefined1 *)0x0,1);
          p_Var21 = local_60;
        }
        local_68[(longlong)p_Var20] = cVar6;
        (local_68 + 1)[(longlong)p_Var20] = '\0';
        p_Var18 = p_Var20;
        iVar9 = iVar10 + 1;
        local_60 = (__moneypunct_cache<char,true> *)puVar28;
LAB_14003f54d:
        iVar10 = iVar9;
        uVar19 = plVar24[2];
        if ((ulonglong)plVar24[3] <= uVar19) goto LAB_14003fa76;
LAB_14003f55b:
        plVar24[2] = uVar19 + 1;
      }
      p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
    } while( true );
  case 5:
    goto switchD_14003f4c0_caseD_5;
  case 6:
    goto code_r0x00014003e41a;
  case 7:
    piVar1 = (int *)((longlong)&UINT_1400c53f4 + uVar19 + 1);
    *piVar1 = *piVar1 + iVar12;
    goto LAB_14003e4d9;
  case 8:
                    // WARNING: Bad instruction - Truncating control flow here
    halt_baddata();
  case 9:
                    // WARNING (jumptable): Read-only address (ram,0x0001400c546c) is written
                    // WARNING: Read-only address (ram,0x0001400c546c) is written
    bVar34 = 100 - (byte)local_100;
    switchD_14003f4c0::switchdataD_1400c546c._0_1_ = bVar34 - bVar32;
    *(uint *)plVar24 = ((int)*plVar24 + -5) - (uint)(100 < (byte)local_100 || bVar34 < bVar32);
    *p_Var20 = (__moneypunct_cache<char,true>)((char)*p_Var20 + (char)p_Var20);
    goto LAB_14003e2cb;
  }
LAB_14003f769:
  local_100 = local_100 + 1;
  p_Var18 = p_Var23;
  if ((iVar12 + 1 < 4 & bVar34) == 0) goto LAB_14003f5e1;
  goto LAB_14003f497;
switchD_14003f4c0_caseD_5:
  do {
    iVar12 = iVar10;
    if (bVar32) {
      p_Var18 = (__moneypunct_cache<char,true> *)(ulonglong)(byte)*p_Var20;
    }
    else {
      uVar8 = (**(code **)(*plVar24 + 0x48))(plVar24);
      if (uVar8 == 0xffffffff) {
        plVar24 = (longlong *)0x0;
        uVar8 = 0xffffffff;
      }
      p_Var18 = (__moneypunct_cache<char,true> *)(ulonglong)uVar8;
    }
    do {
      cVar6 = (char)p_Var18;
      pvVar14 = memchr(local_108,(int)cVar6,10);
      p_Var21 = local_60;
      p_Var18 = local_80;
      if (pvVar14 == (void *)0x0) {
        if (*(char *)(lVar31 + 0x21) == cVar6) {
          if (local_bd != 0) goto LAB_14003e908;
          if (*(int *)(lVar31 + 0x58) < 1) goto LAB_14003e8a0;
          iVar10 = 0;
          local_bd = 1;
          local_a0 = iVar12;
          goto LAB_14003e2bd;
        }
        puVar28 = (uint *)(ulonglong)*(byte *)(lVar31 + 0x20);
        if (*(byte *)(lVar31 + 0x20) == 0) goto LAB_14003e8a0;
        if (*(char *)(lVar31 + 0x22) != cVar6) goto LAB_14003e910;
        if (local_bd != 0) {
LAB_14003e908:
          puVar28 = (uint *)(ulonglong)local_bd;
          goto LAB_14003e910;
        }
        if (iVar12 == 0) {
          puVar28 = (uint *)0x0;
          goto LAB_14003e910;
        }
        p_Var25 = local_80 + 1;
        if (local_88 == &local_78) {
          p_Var21 = (__moneypunct_cache<char,true> *)0xf;
        }
        else {
          p_Var21 = (__moneypunct_cache<char,true> *)CONCAT71(uStack_77,local_78);
        }
        if (p_Var21 < p_Var25) {
          __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
        }
        local_88[(longlong)p_Var18] = (char)iVar12;
        iVar10 = 0;
        (local_88 + 1)[(longlong)p_Var18] = 0;
        p_Var20 = (__moneypunct_cache<char,true> *)plVar24[2];
        local_80 = p_Var25;
        if (p_Var20 < (__moneypunct_cache<char,true> *)plVar24[3]) goto LAB_14003e2cb;
LAB_14003e7e6:
        (**(code **)(*plVar24 + 0x50))(plVar24);
      }
      else {
        p_Var25 = local_60 + 1;
        cVar6 = money_base::_S_atoms[(longlong)pvVar14 - (lVar31 + 100)];
        if (local_68 == &local_58) {
          p_Var18 = (__moneypunct_cache<char,true> *)0xf;
        }
        else {
          p_Var18 = (__moneypunct_cache<char,true> *)CONCAT71(uStack_57,local_58);
        }
        if (p_Var18 < p_Var25) {
          __cxx11::string::_M_mutate((string *)&local_68,(size_t)local_60,0,(undefined1 *)0x0,1);
        }
        local_68[(longlong)p_Var21] = cVar6;
        iVar10 = iVar12 + 1;
        (local_68 + 1)[(longlong)p_Var21] = '\0';
        local_60 = p_Var25;
LAB_14003e2bd:
        p_Var20 = (__moneypunct_cache<char,true> *)plVar24[2];
        if ((__moneypunct_cache<char,true> *)plVar24[3] <= p_Var20) goto LAB_14003e7e6;
LAB_14003e2cb:
        plVar24[2] = (longlong)(p_Var20 + 1);
      }
      p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
switchD_14003e230_caseD_4:
      bVar35 = (int)p_Var25 == -1;
      bVar32 = bVar35;
      if (plVar24 != (longlong *)0x0 && bVar35) {
        if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
          bVar32 = false;
        }
        else {
          iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24);
          bVar32 = iVar12 == -1;
          if (bVar32) {
            plVar24 = (longlong *)0x0;
          }
        }
      }
      bVar33 = iVar11 == -1;
      if ((plVar30 != (longlong *)0x0 && bVar33) &&
         (bVar33 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
        iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30);
        bVar33 = iVar12 == -1;
        if (bVar33) {
          plVar30 = (longlong *)0x0;
        }
      }
      iVar12 = iVar10;
      if (bVar32 == bVar33) {
LAB_14003e8a0:
        puVar28 = (uint *)0x1;
LAB_14003e910:
        iVar10 = iVar12;
        if (local_60 != (__moneypunct_cache<char,true> *)0x0) {
LAB_14003e4d9:
          bVar34 = (byte)puVar28;
          lVar22 = local_100 + 1;
          if (((int)local_100 + 1 < 4 & bVar34) != 0) {
            if (4 < *(byte *)((longlong)&local_8c + local_100 + 1)) goto LAB_14003ebd5;
            lVar4 = local_100 + 1;
            iVar12 = (int)p_Var25;
            local_100 = lVar22;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
            switch(*(undefined1 *)((longlong)&local_8c + lVar4)) {
            case 0:
              puVar28 = (uint *)0x1;
              break;
            case 1:
              bVar35 = iVar12 == -1;
              bVar32 = bVar35;
              if (plVar24 != (longlong *)0x0 && bVar35) {
                if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
                  bVar32 = false;
                }
                else {
                  iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24);
                  bVar32 = iVar12 == -1;
                  if (bVar32) {
                    plVar24 = (longlong *)0x0;
                  }
                }
              }
              bVar33 = iVar11 == -1;
              if ((plVar30 != (longlong *)0x0 && bVar33) &&
                 (bVar33 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
                iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30);
                bVar33 = iVar12 == -1;
                if (bVar33) {
                  plVar30 = (longlong *)0x0;
                }
              }
              puVar28 = (uint *)0x0;
              bVar34 = 0;
              if (bVar32 != bVar33) {
                p_Var18 = p_Var25;
                if ((plVar24 == (longlong *)0x0) || (!bVar35)) {
LAB_14003e475:
                  puVar28 = (uint *)0x0;
                  if ((*(byte *)(*(longlong *)(lVar17 + 0x30) + ((ulonglong)p_Var18 & 0xff) * 2) &
                      0x20) == 0) break;
                  pbVar15 = (byte *)plVar24[2];
                  if (pbVar15 < (byte *)plVar24[3]) goto LAB_14003e49b;
                  (**(code **)(*plVar24 + 0x50))(plVar24);
                }
                else {
                  pbVar15 = (byte *)plVar24[2];
                  if ((byte *)plVar24[3] <= pbVar15) {
                    p_Var18 = (__moneypunct_cache<char,true> *)
                              (**(code **)(*plVar24 + 0x48))(plVar24);
                    if ((int)p_Var18 == -1) {
                      plVar24 = (longlong *)0x0;
                    }
                    goto LAB_14003e475;
                  }
                  if ((*(byte *)(*(longlong *)(lVar17 + 0x30) + (ulonglong)*pbVar15 * 2) & 0x20) ==
                      0) {
                    if (lVar22 != 3) goto LAB_14003e9b7;
                    p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                    goto LAB_14003e351;
                  }
LAB_14003e49b:
                  plVar24[2] = (longlong)(pbVar15 + 1);
                }
                p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                puVar28 = (uint *)0x1;
              }
              break;
            case 2:
              if ((((*(byte *)(param_5 + 0x19) & 2) == 0) &&
                  (local_e8 < (__moneypunct_cache<char,true> *)0x2)) && ((int)lVar22 != 0)) {
                if (lVar22 != 1) {
                  if (lVar22 == 2) {
                    if ((local_8c._3_1_ == '\x04') ||
                       ((local_8c._3_1_ == '\x03' && (local_99 != false)))) goto LAB_14003ea80;
                    goto LAB_14003ebd5;
                  }
                  goto LAB_14003e541;
                }
                if ((local_99 != false) ||
                   (((char)local_8c == '\x03' || (local_8c._2_1_ == '\x01')))) goto LAB_14003ea80;
LAB_14003ebd5:
                puVar28 = (uint *)0x1;
                local_100 = lVar22;
              }
              else {
LAB_14003ea80:
                bVar32 = iVar12 == -1;
                uVar19 = *(ulonglong *)(lVar31 + 0x30);
                if ((plVar24 != (longlong *)0x0) && (bVar32)) {
                  uVar27 = 0;
                  goto LAB_14003eaff;
                }
                uVar27 = 0;
                bVar35 = bVar32;
                while( true ) {
                  if ((plVar30 == (longlong *)0x0) || (iVar11 != -1)) {
                    bVar32 = (bool)(bVar32 ^ iVar11 == -1);
                  }
                  else if (((ulonglong)plVar30[3] <= (ulonglong)plVar30[2]) &&
                          (iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30), iVar12 == -1)) {
                    bVar32 = (bool)(bVar32 ^ 1);
                    plVar30 = (longlong *)0x0;
                  }
                  if ((uVar19 <= uVar27) || (!bVar32)) break;
                  p_Var18 = p_Var25;
                  if ((plVar24 == (longlong *)0x0) || (!bVar35)) {
LAB_14003ead8:
                    if (*(char *)(*(longlong *)(lVar31 + 0x28) + uVar27) != (char)p_Var18)
                    goto LAB_14003eb70;
                    pcVar16 = (char *)plVar24[2];
                    if (pcVar16 < (char *)plVar24[3]) goto LAB_14003eaf3;
                    (**(code **)(*plVar24 + 0x50))(plVar24);
                  }
                  else {
                    pcVar16 = (char *)plVar24[2];
                    if ((char *)plVar24[3] <= pcVar16) {
                      p_Var18 = (__moneypunct_cache<char,true> *)
                                (**(code **)(*plVar24 + 0x48))(plVar24);
                      if ((int)p_Var18 == -1) {
                        plVar24 = (longlong *)0x0;
                      }
                      goto LAB_14003ead8;
                    }
                    if (*pcVar16 != *(char *)(*(longlong *)(lVar31 + 0x28) + uVar27))
                    goto LAB_14003eb70;
LAB_14003eaf3:
                    plVar24[2] = (longlong)(pcVar16 + 1);
                  }
                  uVar27 = uVar27 + 1;
LAB_14003eaff:
                  if (((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) ||
                     (iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar12 != -1)) {
                    bVar35 = true;
                    p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                    bVar32 = false;
                  }
                  else {
                    bVar35 = true;
                    bVar32 = true;
                    plVar24 = (longlong *)0x0;
                    p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                  }
                }
                if (uVar19 == uVar27) goto LAB_14003ebd5;
LAB_14003eb70:
                if (uVar27 != 0) goto LAB_14003e91f;
                puVar28 = (uint *)(ulonglong)((*(uint *)(param_5 + 0x18) >> 9 ^ 1) & 1);
              }
              goto LAB_14003e4d9;
            case 3:
              if (*(longlong *)(lVar31 + 0x40) == 0) {
                if (*(longlong *)(lVar31 + 0x50) != 0) goto LAB_14003ec50;
LAB_14003e4ce:
                puVar28 = (uint *)(ulonglong)(local_99 ^ 1);
              }
              else {
                bVar35 = iVar12 == -1;
                bVar32 = bVar35;
                if (plVar24 != (longlong *)0x0 && bVar35) {
                  if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
                    bVar32 = false;
                  }
                  else {
                    iVar9 = (**(code **)(*plVar24 + 0x48))(plVar24);
                    bVar32 = iVar9 == -1;
                    if (bVar32) {
                      plVar24 = (longlong *)0x0;
                    }
                  }
                }
                bVar33 = iVar11 == -1;
                if ((plVar30 != (longlong *)0x0 && bVar33) &&
                   (bVar33 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
                  iVar9 = (**(code **)(*plVar30 + 0x48))(plVar30);
                  bVar33 = iVar9 == -1;
                  if (bVar33) {
                    plVar30 = (longlong *)0x0;
                  }
                }
                if (bVar33 != bVar32) {
                  p_Var18 = p_Var25;
                  if ((plVar24 != (longlong *)0x0) && (bVar35)) {
                    if ((byte *)plVar24[2] < (byte *)plVar24[3]) {
                      p_Var18 = (__moneypunct_cache<char,true> *)(ulonglong)*(byte *)plVar24[2];
                    }
                    else {
                      uVar8 = (**(code **)(*plVar24 + 0x48))(plVar24);
                      p_Var18 = (__moneypunct_cache<char,true> *)(ulonglong)uVar8;
                      if (uVar8 == 0xffffffff) {
                        p_Var18 = (__moneypunct_cache<char,true> *)0xffffffff;
                        plVar24 = (longlong *)0x0;
                      }
                    }
                  }
                  if (**(char **)(lVar31 + 0x38) == (char)p_Var18) {
                    local_e8 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x40);
                    _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar24);
                    p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                    goto LAB_14003ebd5;
                  }
                }
                if (*(longlong *)(lVar31 + 0x50) == 0) {
                  if (*(longlong *)(lVar31 + 0x40) == 0) goto LAB_14003e4ce;
LAB_14003ec3e:
                  bVar26 = true;
                  puVar28 = (uint *)0x1;
                }
                else {
LAB_14003ec50:
                  bVar35 = iVar12 == -1;
                  bVar32 = bVar35;
                  if (plVar24 != (longlong *)0x0 && bVar35) {
                    if ((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) {
                      bVar32 = false;
                    }
                    else {
                      iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24);
                      bVar32 = iVar12 == -1;
                      if (bVar32) {
                        plVar24 = (longlong *)0x0;
                      }
                    }
                  }
                  bVar33 = iVar11 == -1;
                  if ((plVar30 != (longlong *)0x0 && bVar33) &&
                     (bVar33 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
                    iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30);
                    bVar33 = iVar12 == -1;
                    if (bVar33) {
                      plVar30 = (longlong *)0x0;
                    }
                  }
                  if (bVar33 == bVar32) {
LAB_14003ec8d:
                    if ((*(longlong *)(lVar31 + 0x40) == 0) || (*(longlong *)(lVar31 + 0x50) != 0))
                    goto LAB_14003e4ce;
                    goto LAB_14003ec3e;
                  }
                  if ((plVar24 == (longlong *)0x0) || (!bVar35)) {
                    cVar6 = (char)p_Var25;
                  }
                  else if ((char *)plVar24[2] < (char *)plVar24[3]) {
                    cVar6 = *(char *)plVar24[2];
                  }
                  else {
                    iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24);
                    cVar6 = (char)iVar12;
                    if (iVar12 == -1) {
                      cVar6 = -1;
                      plVar24 = (longlong *)0x0;
                    }
                  }
                  if (**(char **)(lVar31 + 0x48) != cVar6) goto LAB_14003ec8d;
                  local_e8 = *(__moneypunct_cache<char,true> **)(lVar31 + 0x50);
                  _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar24);
                  bVar26 = true;
                  p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                  puVar28 = (uint *)0x1;
                }
              }
              goto LAB_14003e4d9;
            case 4:
              goto switchD_14003e230_caseD_4;
            }
            bVar34 = (byte)puVar28;
            if (lVar22 != 3) {
              bVar35 = (int)p_Var25 == -1;
              bVar32 = bVar35;
              if ((plVar24 != (longlong *)0x0) && (bVar35)) goto LAB_14003e9b7;
              while( true ) {
                bVar33 = iVar11 == -1;
                if ((plVar30 != (longlong *)0x0 && bVar33) &&
                   (bVar33 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
                  iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30);
                  bVar33 = iVar12 == -1;
                  if (bVar33) {
                    plVar30 = (longlong *)0x0;
                  }
                }
                if (bVar33 == bVar35) break;
                p_Var18 = p_Var25;
                if ((plVar24 == (longlong *)0x0) || (!bVar32)) {
LAB_14003e98b:
                  if ((*(byte *)(*(longlong *)(lVar17 + 0x30) + ((ulonglong)p_Var18 & 0xff) * 2) &
                      0x20) == 0) break;
                  pbVar15 = (byte *)plVar24[2];
                  if (pbVar15 < (byte *)plVar24[3]) goto LAB_14003e9af;
                  (**(code **)(*plVar24 + 0x50))(plVar24);
                }
                else {
                  pbVar15 = (byte *)plVar24[2];
                  if ((byte *)plVar24[3] <= pbVar15) {
                    p_Var18 = (__moneypunct_cache<char,true> *)
                              (**(code **)(*plVar24 + 0x48))(plVar24);
                    if ((int)p_Var18 == -1) {
                      plVar24 = (longlong *)0x0;
                    }
                    goto LAB_14003e98b;
                  }
                  if ((*(byte *)(*(longlong *)(lVar17 + 0x30) + (ulonglong)*pbVar15 * 2) & 0x20) ==
                      0) break;
LAB_14003e9af:
                  plVar24[2] = (longlong)(pbVar15 + 1);
                }
LAB_14003e9b7:
                if (((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) ||
                   (iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar12 != -1)) {
                  p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                  bVar35 = false;
                  bVar32 = true;
                }
                else {
                  bVar35 = true;
                  plVar24 = (longlong *)0x0;
                  p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
                  bVar32 = true;
                }
              }
              goto LAB_14003e4d9;
            }
          }
LAB_14003e351:
          bVar5 = (__moneypunct_cache<char,true> *)0x1 < local_e8 & bVar34;
          local_108 = (void *)(ulonglong)bVar5;
          if (bVar5 == 0) {
            if (bVar34 == 0) goto LAB_14003e91f;
LAB_14003e541:
            if ((__moneypunct_cache<char,true> *)0x1 < local_60) goto LAB_14003eca8;
            goto LAB_14003e550;
          }
          if (bVar26) {
            local_110 = *(longlong *)(lVar31 + 0x48);
          }
          else {
            local_110 = *(longlong *)(lVar31 + 0x38);
          }
          bVar32 = (int)p_Var25 == -1;
          p_Var18 = (__moneypunct_cache<char,true> *)0x1;
          p_Var21 = (__moneypunct_cache<char,true> *)(ulonglong)bVar32;
          unaff_R12 = p_Var21;
          if ((plVar24 != (longlong *)0x0) && (bVar32)) goto LAB_14003e401;
          goto LAB_14003e39b;
        }
LAB_14003e91f:
        bVar34 = (int)p_Var25 == -1;
        goto LAB_14003e630;
      }
      p_Var18 = p_Var25;
    } while ((plVar24 == (longlong *)0x0) || (!bVar35));
    p_Var20 = (__moneypunct_cache<char,true> *)plVar24[2];
    bVar32 = p_Var20 < (__moneypunct_cache<char,true> *)plVar24[3];
  } while( true );
LAB_14003fb30:
  bVar34 = 1;
LAB_14003fba0:
  if (local_60 == (__moneypunct_cache<char,true> *)0x0) goto LAB_14003fbaf;
  goto LAB_14003f769;
LAB_14003e39b:
  bVar5 = (byte)p_Var21;
  bVar34 = (byte)unaff_R12;
  if ((plVar30 == (longlong *)0x0) || (iVar11 != -1)) {
    bVar5 = bVar5 ^ iVar11 == -1;
  }
  else if (((ulonglong)plVar30[3] <= (ulonglong)plVar30[2]) &&
          (iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30), iVar12 == -1)) {
    bVar5 = bVar5 ^ 1;
    plVar30 = (longlong *)0x0;
  }
  if ((p_Var18 < local_e8) && (bVar5 != 0)) {
    p_Var21 = p_Var25;
    if ((plVar24 == (longlong *)0x0) || (bVar34 == 0)) {
LAB_14003e3d9:
      if (p_Var18[local_110] != SUB81(p_Var21,0)) goto LAB_14003e630;
      p_Var21 = (__moneypunct_cache<char,true> *)plVar24[2];
      if (p_Var21 < (__moneypunct_cache<char,true> *)plVar24[3]) goto LAB_14003e3f5;
      (**(code **)(*plVar24 + 0x50))(plVar24);
    }
    else {
      p_Var21 = (__moneypunct_cache<char,true> *)plVar24[2];
      if ((__moneypunct_cache<char,true> *)plVar24[3] <= p_Var21) {
        p_Var21 = (__moneypunct_cache<char,true> *)(**(code **)(*plVar24 + 0x48))(plVar24);
        if ((int)p_Var21 == -1) {
          plVar24 = (longlong *)0x0;
        }
        goto LAB_14003e3d9;
      }
      if (*p_Var21 != p_Var18[local_110]) goto LAB_14003e630;
LAB_14003e3f5:
      plVar24[2] = (longlong)(p_Var21 + 1);
    }
    p_Var18 = p_Var18 + 1;
LAB_14003e401:
    if (((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) ||
       (iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar12 != -1)) {
      unaff_R12 = (__moneypunct_cache<char,true> *)((ulonglong)local_108 & 0xff);
code_r0x00014003e41a:
      p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
      p_Var21 = (__moneypunct_cache<char,true> *)0x0;
    }
    else {
      p_Var21 = (__moneypunct_cache<char,true> *)((ulonglong)local_108 & 0xff);
      plVar24 = (longlong *)0x0;
      unaff_R12 = (__moneypunct_cache<char,true> *)((ulonglong)local_108 & 0xff);
      p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
    }
    goto LAB_14003e39b;
  }
  if (local_e8 == p_Var18) {
    if (local_60 < (__moneypunct_cache<char,true> *)0x2) goto LAB_14003e550;
LAB_14003eca8:
    p_Var18 = (__moneypunct_cache<char,true> *)
              __cxx11::string::find_first_not_of((string *)&local_68,'0',0);
    if (p_Var18 != (__moneypunct_cache<char,true> *)0x0) {
      if (p_Var18 == (__moneypunct_cache<char,true> *)0xffffffffffffffff) {
        p_Var18 = local_60 + -1;
        if (local_60 == (__moneypunct_cache<char,true> *)0x0) {
          *local_68 = '\0';
        }
        else if (p_Var18 != (__moneypunct_cache<char,true> *)0x0) goto LAB_14003ecd8;
      }
      else {
LAB_14003ecd8:
        p_Var21 = local_60;
        if (p_Var18 <= local_60) {
          p_Var21 = p_Var18;
        }
        __cxx11::string::_M_erase((string *)&local_68,0,(longlong)p_Var21);
      }
    }
LAB_14003e550:
    if ((bVar26) && (*local_68 != '0')) {
      __cxx11::string::_M_replace_aux((string *)&local_68,0,0,1,(string)0x2d);
    }
    p_Var18 = local_80;
    if (local_80 != (__moneypunct_cache<char,true> *)0x0) {
      p_Var21 = local_80 + 1;
      if (local_bd == 0) {
        local_a0._0_1_ = (undefined1)iVar10;
      }
      if (local_88 == &local_78) {
        p_Var23 = (__moneypunct_cache<char,true> *)0xf;
      }
      else {
        p_Var23 = (__moneypunct_cache<char,true> *)CONCAT71(uStack_77,local_78);
      }
      if (p_Var23 < p_Var21) {
        __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
      }
      local_88[(longlong)p_Var18] = (undefined1)local_a0;
      (local_88 + 1)[(longlong)p_Var18] = 0;
      local_80 = p_Var21;
      cVar6 = __verify_grouping(*(longlong *)(lVar31 + 0x10),*(longlong *)(lVar31 + 0x18),
                                (undefined8 *)&local_88);
      if (cVar6 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    bVar34 = (int)p_Var25 == -1;
    if ((local_bd != 0) && (*(int *)(lVar31 + 0x58) != iVar10)) goto LAB_14003e630;
    __cxx11::string::swap(param_7,(string *)&local_68);
    bVar26 = plVar24 != (longlong *)0x0 && (bool)bVar34;
    if (plVar24 == (longlong *)0x0 || !(bool)bVar34) goto LAB_14003e64b;
  }
  else {
LAB_14003e630:
    *param_6 = *param_6 | 4;
    bVar26 = (bool)(plVar24 != (longlong *)0x0 & bVar34);
    if (bVar26 == false) goto LAB_14003e64b;
  }
  bVar34 = 0;
  if (((ulonglong)plVar24[3] <= (ulonglong)plVar24[2]) &&
     (iVar10 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar10 == -1)) {
    plVar24 = (longlong *)0x0;
    bVar34 = bVar26;
  }
LAB_14003e64b:
  bVar26 = iVar11 == -1;
  if (((plVar30 != (longlong *)0x0) && (bVar26)) &&
     (bVar26 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
    iVar11 = (**(code **)(*plVar30 + 0x48))(plVar30);
    bVar26 = iVar11 == -1;
  }
  if (bVar26 == (bool)bVar34) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar24;
  param_1[1] = uVar3 & 0xffffffff00000000 | (ulonglong)p_Var25;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
  return param_1;
LAB_14003f5e1:
  bVar32 = (bool)((__moneypunct_cache<char,true> *)0x1 < local_e8 & bVar34);
  if (bVar32 == false) {
    if (bVar34 == 0) {
LAB_14003fbaf:
      bVar35 = (int)p_Var25 == -1;
      goto LAB_14003f8c0;
    }
joined_r0x00014003fe44:
    if (((__moneypunct_cache<char,true> *)0x1 < local_60) &&
       (p_Var18 = (__moneypunct_cache<char,true> *)
                  __cxx11::string::find_first_not_of((string *)&local_68,'0',0),
       p_Var18 != (__moneypunct_cache<char,true> *)0x0)) {
      if (p_Var18 == (__moneypunct_cache<char,true> *)0xffffffffffffffff) {
        p_Var18 = local_60 + -1;
        if (local_60 == (__moneypunct_cache<char,true> *)0x0) {
          *local_68 = '\0';
        }
        else if (p_Var18 != (__moneypunct_cache<char,true> *)0x0) goto LAB_14003ff68;
      }
      else {
LAB_14003ff68:
        p_Var21 = local_60;
        if (p_Var18 <= local_60) {
          p_Var21 = p_Var18;
        }
        __cxx11::string::_M_erase((string *)&local_68,0,(longlong)p_Var21);
      }
    }
    if ((bVar26) && (*local_68 != '0')) {
      __cxx11::string::_M_replace_aux((string *)&local_68,0,0,1,(string)0x2d);
    }
    p_Var18 = local_80;
    if (local_80 != (__moneypunct_cache<char,true> *)0x0) {
      p_Var21 = local_80 + 1;
      if (local_bd == 0) {
        local_a0._0_1_ = (undefined1)iVar10;
      }
      if (local_88 == &local_78) {
        p_Var23 = (__moneypunct_cache<char,true> *)0xf;
      }
      else {
        p_Var23 = (__moneypunct_cache<char,true> *)CONCAT71(uStack_77,local_78);
      }
      if (p_Var23 < p_Var21) {
        __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
      }
      local_88[(longlong)p_Var18] = (undefined1)local_a0;
      (local_88 + 1)[(longlong)p_Var18] = 0;
      local_80 = p_Var21;
      cVar6 = __verify_grouping(*(longlong *)(lVar31 + 0x10),*(longlong *)(lVar31 + 0x18),
                                (undefined8 *)&local_88);
      if (cVar6 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    bVar35 = (int)p_Var25 == -1;
    if ((local_bd != 0) && (*(int *)(lVar31 + 0x58) != iVar10)) goto LAB_14003f8c0;
    __cxx11::string::swap(param_7,(string *)&local_68);
    bVar26 = plVar24 != (longlong *)0x0 && bVar35;
    if (plVar24 == (longlong *)0x0 || !bVar35) goto LAB_14003f8db;
  }
  else {
    if (bVar26) {
      local_110 = *(longlong *)(lVar31 + 0x48);
    }
    else {
      local_110 = *(longlong *)(lVar31 + 0x38);
    }
    bVar35 = (int)p_Var25 == -1;
    p_Var18 = (__moneypunct_cache<char,true> *)0x1;
    bVar33 = bVar35;
    if ((plVar24 != (longlong *)0x0) && (bVar35)) goto LAB_14003f691;
    while( true ) {
      if ((plVar30 == (longlong *)0x0) || (iVar11 != -1)) {
        bVar33 = (bool)(bVar33 ^ iVar11 == -1);
      }
      else if (((ulonglong)plVar30[3] <= (ulonglong)plVar30[2]) &&
              (iVar12 = (**(code **)(*plVar30 + 0x48))(plVar30), iVar12 == -1)) {
        bVar33 = (bool)(bVar33 ^ 1);
        plVar30 = (longlong *)0x0;
      }
      if ((local_e8 <= p_Var18) || (bVar33 == false)) break;
      p_Var21 = p_Var25;
      if ((plVar24 == (longlong *)0x0) || (bVar35 == false)) {
LAB_14003f669:
        if (p_Var18[local_110] != SUB81(p_Var21,0)) goto LAB_14003f8c0;
        p_Var21 = (__moneypunct_cache<char,true> *)plVar24[2];
        if (p_Var21 < (__moneypunct_cache<char,true> *)plVar24[3]) goto LAB_14003f685;
        (**(code **)(*plVar24 + 0x50))(plVar24);
      }
      else {
        p_Var21 = (__moneypunct_cache<char,true> *)plVar24[2];
        if ((__moneypunct_cache<char,true> *)plVar24[3] <= p_Var21) {
          p_Var21 = (__moneypunct_cache<char,true> *)(**(code **)(*plVar24 + 0x48))(plVar24);
          if ((int)p_Var21 == -1) {
            plVar24 = (longlong *)0x0;
          }
          goto LAB_14003f669;
        }
        if (*p_Var21 != p_Var18[local_110]) goto LAB_14003f8c0;
LAB_14003f685:
        plVar24[2] = (longlong)(p_Var21 + 1);
      }
      p_Var18 = p_Var18 + 1;
LAB_14003f691:
      bVar35 = bVar32;
      if (((ulonglong)plVar24[2] < (ulonglong)plVar24[3]) ||
         (iVar12 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar12 != -1)) {
        p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
        bVar33 = false;
      }
      else {
        plVar24 = (longlong *)0x0;
        p_Var25 = (__moneypunct_cache<char,true> *)0xffffffff;
        bVar33 = bVar32;
      }
    }
    if (local_e8 == p_Var18) goto joined_r0x00014003fe44;
LAB_14003f8c0:
    *param_6 = *param_6 | 4;
    bVar26 = (bool)(plVar24 != (longlong *)0x0 & bVar35);
    if (bVar26 == false) goto LAB_14003f8db;
  }
  bVar35 = false;
  if (((ulonglong)plVar24[3] <= (ulonglong)plVar24[2]) &&
     (iVar10 = (**(code **)(*plVar24 + 0x48))(plVar24), iVar10 == -1)) {
    plVar24 = (longlong *)0x0;
    bVar35 = bVar26;
  }
LAB_14003f8db:
  bVar26 = iVar11 == -1;
  if (((plVar30 != (longlong *)0x0) && (bVar26)) &&
     (bVar26 = false, (ulonglong)plVar30[3] <= (ulonglong)plVar30[2])) {
    iVar11 = (**(code **)(*plVar30 + 0x48))(plVar30);
    bVar26 = iVar11 == -1;
  }
  if (bVar26 == bVar35) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar24;
  param_1[1] = uVar3 & 0xffffffff00000000 | (ulonglong)p_Var25;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
  return param_1;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, std::__cxx11::string&) const

undefined8
std::__cxx11::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double&) const

undefined8
std::__cxx11::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x10))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, std::__cxx11::string&) const

undefined8 *
std::__cxx11::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,string *param_8)

{
  undefined1 *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ctype<char> *this;
  void *_Dst;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined1 *_Src;
  ulonglong _Size;
  longlong lVar6;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  ulonglong local_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined1 *local_78;
  ulonglong local_70;
  undefined1 local_68 [40];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  uVar4 = *param_4;
  uVar5 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_6 + 0xd0) + 8) + lVar6 * 8);
  if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_70 = 0;
  local_68[0] = 0;
  local_a8 = uVar4;
  uStack_a0 = uVar5;
  local_98 = uVar2;
  local_90 = uVar3;
  local_78 = local_68;
  if (param_5 == '\0') {
    _M_extract<false>(&local_88,param_2,&local_98,&local_a8,param_6,param_7,(string *)&local_78);
  }
  else {
    _M_extract<true>(&local_88,param_2,&local_98,&local_a8,param_6,param_7,(string *)&local_78);
  }
  _Size = local_70;
  if (local_70 != 0) {
    __cxx11::string::resize(param_8,local_70,(string)0x0);
    _Src = local_78;
    _Dst = *(void **)param_8;
    puVar1 = local_78 + _Size;
    if (this[0x38] != (ctype<char>)0x1) {
      if (this[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this);
      }
      if (*(code **)(*(longlong *)this + 0x38) != ctype<char>::do_widen) {
        (**(code **)(*(longlong *)this + 0x38))(this,_Src,puVar1,_Dst);
        goto LAB_140040821;
      }
    }
    if (puVar1 != _Src) {
      memcpy(_Dst,_Src,_Size);
    }
  }
LAB_140040821:
  *param_1 = local_88;
  param_1[1] = uVar3 & 0xffffffff00000000 | local_80 & 0xffffffff;
  if (local_78 != local_68) {
    operator_delete(local_78);
  }
  return param_1;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double&) const

undefined8 *
std::__cxx11::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,float10 *param_8)

{
  ulonglong uVar1;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong local_60;
  char *local_58;
  undefined8 local_50;
  char local_48 [16];
  
  local_88 = *param_3;
  uVar1 = param_3[1];
  local_98 = *param_4;
  local_90 = param_4[1];
  local_50 = 0;
  local_48[0] = '\0';
  local_80 = uVar1;
  local_58 = local_48;
  if (param_5 == '\0') {
    _M_extract<false>(&local_78,param_2,&local_88,&local_98,param_6,param_7,(string *)&local_58);
  }
  else {
    _M_extract<true>(&local_78,param_2,&local_88,&local_98,param_6,param_7,(string *)&local_58);
  }
  local_60 = locale::facet::_S_get_c_locale();
  __convert_to_v<>(local_58,param_8,param_7);
  *param_1 = local_78;
  param_1[1] = uVar1 & 0xffffffff00000000 | local_70 & 0xffffffff;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::__cxx11::money_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract<false>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, std::__cxx11::string&) const

undefined8 *
std::__cxx11::money_get<>::_M_extract<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,string *param_7)

{
  short *psVar1;
  longlong *plVar2;
  ulonglong uVar3;
  longlong *plVar4;
  char cVar5;
  short sVar6;
  short sVar7;
  short sVar8;
  int iVar9;
  uint uVar10;
  longlong lVar11;
  short *psVar12;
  __moneypunct_cache<> *this;
  ulonglong uVar13;
  longlong *plVar14;
  longlong *plVar15;
  bool bVar16;
  ulonglong uVar17;
  byte bVar18;
  ulonglong uVar19;
  bool bVar20;
  bool bVar21;
  bool bVar22;
  bool bVar23;
  longlong local_118;
  int local_10c;
  longlong local_100;
  ulonglong local_e8;
  int local_a0;
  byte local_9b;
  undefined4 local_8c;
  undefined1 *local_88;
  ulonglong local_80;
  undefined1 local_78;
  undefined7 uStack_77;
  char *local_68;
  ulonglong local_60;
  char local_58;
  undefined7 uStack_57;
  
  uVar3 = param_3[1];
  plVar14 = (longlong *)*param_3;
  plVar15 = (longlong *)*param_4;
  uVar17 = uVar3 & 0xffffffff;
  sVar7 = (short)param_4[1];
  lVar11 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar11 * 8);
  if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar11 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar2 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar11 * 8);
  local_118 = *plVar2;
  if (local_118 == 0) {
    this = operator_new(0x80);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
    this[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(this + 0x22) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar11);
    local_118 = *plVar2;
  }
  if (*(longlong *)(local_118 + 0x40) == 0) {
    bVar20 = false;
  }
  else {
    bVar20 = *(longlong *)(local_118 + 0x50) != 0;
  }
  local_78 = 0;
  local_80 = 0;
  local_88 = &local_78;
  if (*(char *)(local_118 + 0x20) != '\0') {
    __cxx11::string::reserve((string *)&local_88,0x20);
  }
  local_60 = 0;
  local_58 = '\0';
  local_68 = &local_58;
  __cxx11::string::reserve((string *)&local_68,0x20);
  local_9b = 0;
  local_100 = 0;
  psVar1 = (short *)(local_118 + 0x66);
  local_10c = 0;
  local_8c = *(undefined4 *)(local_118 + 0x60);
  local_a0 = 0;
  local_e8 = 0;
  bVar16 = false;
LAB_140040c24:
  sVar8 = (short)uVar17;
  iVar9 = (int)local_100;
  if (4 < *(byte *)((longlong)&local_8c + local_100)) goto LAB_14004167d;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(*(undefined1 *)((longlong)&local_8c + local_100)) {
  case 0:
    bVar18 = 1;
    goto LAB_140040c52;
  case 1:
    bVar21 = sVar8 == -1;
    bVar23 = bVar21;
    if (plVar14 != (longlong *)0x0 && bVar21) {
      if ((short *)plVar14[2] < (short *)plVar14[3]) {
        sVar8 = *(short *)plVar14[2];
      }
      else {
        sVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
      }
      bVar23 = sVar8 == -1;
      if (bVar23) {
        plVar14 = (longlong *)0x0;
      }
    }
    bVar22 = sVar7 == -1;
    if (plVar15 != (longlong *)0x0 && bVar22) {
      if ((short *)plVar15[2] < (short *)plVar15[3]) {
        sVar8 = *(short *)plVar15[2];
      }
      else {
        sVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
      }
      bVar22 = sVar8 == -1;
      if (bVar22) {
        plVar15 = (longlong *)0x0;
      }
    }
    bVar18 = 0;
    if (bVar23 != bVar22) {
      if ((plVar14 != (longlong *)0x0) && (bVar21)) {
        if ((short *)plVar14[2] < (short *)plVar14[3]) {
          sVar8 = *(short *)plVar14[2];
        }
        else {
          sVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
        }
        if (sVar8 == -1) {
          plVar14 = (longlong *)0x0;
        }
      }
      bVar18 = (**(code **)(*plVar4 + 0x10))();
      if (bVar18 != 0) {
        if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
          plVar14[2] = plVar14[2] + 2;
        }
        else {
          (**(code **)(*plVar14 + 0x50))(plVar14);
        }
        uVar17 = 0xffffffff;
      }
    }
LAB_140040c52:
    if (local_100 != 3) {
      bVar21 = (short)uVar17 == -1;
      bVar23 = bVar21;
      if ((plVar14 != (longlong *)0x0) && (bVar21)) goto LAB_140041449;
      while( true ) {
        bVar22 = sVar7 == -1;
        if (plVar15 != (longlong *)0x0 && bVar22) {
          if ((short *)plVar15[2] < (short *)plVar15[3]) {
            sVar8 = *(short *)plVar15[2];
          }
          else {
            sVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
          }
          bVar22 = sVar8 == -1;
          if (bVar22) {
            plVar15 = (longlong *)0x0;
          }
        }
        if (bVar21 == bVar22) break;
        if ((plVar14 != (longlong *)0x0) && (bVar23)) {
          if ((short *)plVar14[2] < (short *)plVar14[3]) {
            sVar8 = *(short *)plVar14[2];
          }
          else {
            sVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
          }
          if (sVar8 == -1) {
            plVar14 = (longlong *)0x0;
          }
        }
        cVar5 = (**(code **)(*plVar4 + 0x10))();
        if (cVar5 == '\0') break;
        if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
          plVar14[2] = plVar14[2] + 2;
        }
        else {
          (**(code **)(*plVar14 + 0x50))(plVar14);
        }
LAB_140041449:
        if ((ushort *)plVar14[2] < (ushort *)plVar14[3]) {
          uVar17 = (ulonglong)*(ushort *)plVar14[2];
        }
        else {
          uVar10 = (**(code **)(*plVar14 + 0x48))(plVar14);
          uVar17 = (ulonglong)uVar10;
        }
        bVar23 = true;
        if ((short)uVar17 == -1) {
          bVar21 = true;
          plVar14 = (longlong *)0x0;
        }
        else {
          uVar17 = 0xffffffff;
          bVar21 = false;
        }
      }
      break;
    }
    goto LAB_140040c5e;
  case 2:
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_e8 < 2)) && (iVar9 != 0)) {
      if (local_100 == 1) {
        if (((bVar20) || ((char)local_8c == '\x03')) || (local_8c._2_1_ == '\x01'))
        goto LAB_140041503;
      }
      else {
        if (local_100 != 2) goto joined_r0x000140040ee2;
        if ((local_8c._3_1_ == '\x04') || ((local_8c._3_1_ == '\x03' && (bVar20))))
        goto LAB_140041503;
      }
LAB_14004167d:
      bVar18 = 1;
    }
    else {
LAB_140041503:
      uVar13 = 0;
      uVar19 = *(ulonglong *)(local_118 + 0x30);
      while( true ) {
        sVar8 = (short)uVar17;
        bVar21 = sVar8 == -1;
        bVar23 = bVar21;
        if (plVar14 != (longlong *)0x0 && bVar21) {
          if ((short *)plVar14[2] < (short *)plVar14[3]) {
            sVar6 = *(short *)plVar14[2];
          }
          else {
            sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
          }
          bVar23 = sVar6 == -1;
          if (bVar23) {
            plVar14 = (longlong *)0x0;
          }
        }
        bVar22 = sVar7 == -1;
        if (plVar15 != (longlong *)0x0 && bVar22) break;
        if (uVar19 <= uVar13) goto LAB_14004166c;
LAB_140041565:
        if (bVar23 == bVar22) goto LAB_14004166c;
        if ((plVar14 == (longlong *)0x0) || (!bVar21)) {
          if (*(short *)(*(longlong *)(local_118 + 0x28) + uVar13 * 2) != sVar8) goto LAB_1400415d9;
        }
        else {
          if ((short *)plVar14[2] < (short *)plVar14[3]) {
            sVar6 = *(short *)plVar14[2];
          }
          else {
            sVar6 = (**(code **)(*plVar14 + 0x48))();
          }
          if (sVar6 == -1) {
            plVar14 = (longlong *)0x0;
          }
          if (*(short *)(*(longlong *)(local_118 + 0x28) + uVar13 * 2) != sVar6) goto LAB_1400415d9;
        }
        if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
          plVar14[2] = plVar14[2] + 2;
        }
        else {
          (**(code **)(*plVar14 + 0x50))(plVar14);
        }
        uVar13 = uVar13 + 1;
        uVar17 = 0xffffffff;
      }
      if ((short *)plVar15[2] < (short *)plVar15[3]) {
        sVar6 = *(short *)plVar15[2];
      }
      else {
        sVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
      }
      bVar22 = sVar6 == -1;
      if (bVar22) {
        plVar15 = (longlong *)0x0;
      }
      if (uVar13 < uVar19) goto LAB_140041565;
LAB_14004166c:
      if (uVar13 == uVar19) goto LAB_14004167d;
LAB_1400415d9:
      if (uVar13 != 0) goto LAB_140041342;
      bVar18 = ((byte)(*(uint *)(param_5 + 0x18) >> 9) ^ 1) & 1;
    }
    break;
  case 3:
    if (*(longlong *)(local_118 + 0x40) == 0) {
      if (*(longlong *)(local_118 + 0x50) != 0) {
LAB_14004169f:
        bVar21 = sVar8 == -1;
        bVar23 = bVar21;
        if (plVar14 != (longlong *)0x0 && bVar21) {
          if ((short *)plVar14[2] < (short *)plVar14[3]) {
            sVar6 = *(short *)plVar14[2];
          }
          else {
            sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
          }
          bVar23 = sVar6 == -1;
          if (bVar23) {
            plVar14 = (longlong *)0x0;
          }
        }
        bVar22 = sVar7 == -1;
        if (plVar15 != (longlong *)0x0 && bVar22) {
          if ((short *)plVar15[2] < (short *)plVar15[3]) {
            sVar6 = *(short *)plVar15[2];
          }
          else {
            sVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
          }
          bVar22 = sVar6 == -1;
          if (bVar22) {
            plVar15 = (longlong *)0x0;
          }
        }
        if (bVar23 != bVar22) {
          if ((plVar14 != (longlong *)0x0) && (bVar21)) {
            if ((short *)plVar14[2] < (short *)plVar14[3]) {
              sVar8 = *(short *)plVar14[2];
            }
            else {
              sVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
            }
            if (sVar8 == -1) {
              plVar14 = (longlong *)0x0;
            }
          }
          if (**(short **)(local_118 + 0x48) == sVar8) {
            local_e8 = *(ulonglong *)(local_118 + 0x50);
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar14);
            bVar16 = true;
            uVar17 = 0xffffffff;
            bVar18 = 1;
            break;
          }
        }
        if ((*(longlong *)(local_118 + 0x40) != 0) && (*(longlong *)(local_118 + 0x50) == 0))
        goto LAB_140041768;
      }
LAB_140040e60:
      bVar18 = bVar20 ^ 1;
    }
    else {
      bVar21 = sVar8 == -1;
      bVar23 = bVar21;
      if (plVar14 != (longlong *)0x0 && bVar21) {
        if ((short *)plVar14[2] < (short *)plVar14[3]) {
          sVar6 = *(short *)plVar14[2];
        }
        else {
          sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
        }
        bVar23 = sVar6 == -1;
        if (bVar23) {
          plVar14 = (longlong *)0x0;
        }
      }
      bVar22 = sVar7 == -1;
      if (plVar15 != (longlong *)0x0 && bVar22) {
        if ((short *)plVar15[2] < (short *)plVar15[3]) {
          sVar6 = *(short *)plVar15[2];
        }
        else {
          sVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
        }
        bVar22 = sVar6 == -1;
        if (bVar22) {
          plVar15 = (longlong *)0x0;
        }
      }
      if (bVar23 != bVar22) {
        sVar6 = sVar8;
        if ((plVar14 != (longlong *)0x0) && (bVar21)) {
          if ((short *)plVar14[2] < (short *)plVar14[3]) {
            sVar6 = *(short *)plVar14[2];
          }
          else {
            sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
          }
          if (sVar6 == -1) {
            plVar14 = (longlong *)0x0;
          }
        }
        if (**(short **)(local_118 + 0x38) == sVar6) {
          local_e8 = *(ulonglong *)(local_118 + 0x40);
          _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar14);
          uVar17 = 0xffffffff;
          goto LAB_14004167d;
        }
      }
      if (*(longlong *)(local_118 + 0x50) != 0) goto LAB_14004169f;
      if (*(longlong *)(local_118 + 0x40) == 0) goto LAB_140040e60;
LAB_140041768:
      bVar16 = true;
      bVar18 = 1;
    }
    break;
  case 4:
    do {
      sVar8 = (short)uVar17;
      bVar21 = sVar8 == -1;
      bVar23 = bVar21;
      if (plVar14 != (longlong *)0x0 && bVar21) {
        if ((short *)plVar14[2] < (short *)plVar14[3]) {
          sVar6 = *(short *)plVar14[2];
        }
        else {
          sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
        }
        bVar23 = sVar6 == -1;
        if (bVar23) {
          plVar14 = (longlong *)0x0;
        }
      }
      bVar22 = sVar7 == -1;
      if (plVar15 != (longlong *)0x0 && bVar22) {
        if ((short *)plVar15[2] < (short *)plVar15[3]) {
          sVar6 = *(short *)plVar15[2];
        }
        else {
          sVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
        }
        bVar22 = sVar6 == -1;
        if (bVar22) {
          plVar15 = (longlong *)0x0;
        }
      }
      if (bVar23 == bVar22) goto LAB_1400412b8;
      psVar12 = psVar1;
      sVar6 = sVar8;
      if ((plVar14 != (longlong *)0x0) && (bVar21)) {
        if ((short *)plVar14[2] < (short *)plVar14[3]) {
          sVar6 = *(short *)plVar14[2];
        }
        else {
          sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
        }
        if (sVar6 == -1) {
          plVar14 = (longlong *)0x0;
        }
      }
      do {
        uVar13 = local_60;
        uVar19 = local_80;
        if (sVar6 == *psVar12) {
          uVar17 = local_60 + 1;
          cVar5 = money_base::_S_atoms[(longlong)psVar12 - (local_118 + 100) >> 1];
          uVar19 = CONCAT71(uStack_57,local_58);
          if (local_68 == &local_58) {
            uVar19 = 0xf;
          }
          if (uVar19 < uVar17) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[uVar13] = cVar5;
          local_10c = local_10c + 1;
          local_68[uVar13 + 1] = '\0';
          local_60 = uVar17;
          goto LAB_140040df6;
        }
        psVar12 = psVar12 + 1;
      } while (psVar12 != (short *)(local_118 + 0x7a));
      if (*(short *)(local_118 + 0x22) == sVar6) {
        bVar18 = local_9b;
        if (local_9b != 0) goto LAB_140041333;
        if (*(int *)(local_118 + 0x58) < 1) goto LAB_1400412b8;
        local_a0 = local_10c;
        local_9b = 1;
        local_10c = 0;
LAB_140040df6:
        uVar17 = plVar14[2];
        if (uVar17 < (ulonglong)plVar14[3]) goto LAB_140040e04;
LAB_140041203:
        (**(code **)(*plVar14 + 0x50))(plVar14);
      }
      else {
        if (*(byte *)(local_118 + 0x20) == 0) goto LAB_1400412b8;
        bVar18 = *(byte *)(local_118 + 0x20);
        if ((*(short *)(local_118 + 0x24) != sVar6) || (bVar18 = local_9b, local_9b != 0))
        goto LAB_140041333;
        if (local_10c == 0) {
          bVar18 = 0;
          goto LAB_140041333;
        }
        uVar13 = local_80 + 1;
        if (local_88 == &local_78) {
          uVar17 = 0xf;
        }
        else {
          uVar17 = CONCAT71(uStack_77,local_78);
        }
        if (uVar17 < uVar13) {
          __cxx11::string::_M_mutate((string *)&local_88,local_80,0,(undefined1 *)0x0,1);
        }
        local_88[uVar19] = (char)local_10c;
        local_10c = 0;
        local_88[uVar19 + 1] = 0;
        uVar17 = plVar14[2];
        local_80 = uVar13;
        if ((ulonglong)plVar14[3] <= uVar17) goto LAB_140041203;
LAB_140040e04:
        plVar14[2] = uVar17 + 2;
      }
      uVar17 = 0xffffffff;
    } while( true );
  }
LAB_140040e6d:
  local_100 = local_100 + 1;
  if ((iVar9 + 1 < 4 & bVar18) == 0) goto LAB_140040c5e;
  goto LAB_140040c24;
LAB_1400412b8:
  bVar18 = 1;
LAB_140041333:
  if (local_60 == 0) goto LAB_140041342;
  goto LAB_140040e6d;
LAB_140040c5e:
  sVar8 = (short)uVar17;
  if ((1 < local_e8 & bVar18) == 0) {
    if (bVar18 == 0) {
LAB_140041342:
      bVar20 = sVar8 == -1;
      goto LAB_140040fe0;
    }
joined_r0x000140040ee2:
    if ((1 < local_60) &&
       (uVar17 = __cxx11::string::find_first_not_of((string *)&local_68,'0',0), uVar17 != 0)) {
      if (uVar17 == 0xffffffffffffffff) {
        uVar17 = local_60 - 1;
        if (local_60 == 0) {
          *local_68 = '\0';
        }
        else if (uVar17 != 0) goto LAB_1400417ab;
      }
      else {
LAB_1400417ab:
        uVar19 = local_60;
        if (uVar17 <= local_60) {
          uVar19 = uVar17;
        }
        __cxx11::string::_M_erase((string *)&local_68,0,uVar19);
      }
    }
    if ((bVar16) && (*local_68 != '0')) {
      __cxx11::string::_M_replace_aux((string *)&local_68,0,0,1,(string)0x2d);
    }
    uVar17 = local_80;
    if (local_80 != 0) {
      uVar19 = local_80 + 1;
      if (local_9b == 0) {
        local_a0._0_1_ = (undefined1)local_10c;
      }
      if (local_88 == &local_78) {
        uVar13 = 0xf;
      }
      else {
        uVar13 = CONCAT71(uStack_77,local_78);
      }
      if (uVar13 < uVar19) {
        __cxx11::string::_M_mutate((string *)&local_88,local_80,0,(undefined1 *)0x0,1);
      }
      local_88[uVar17] = (undefined1)local_a0;
      local_88[uVar17 + 1] = 0;
      local_80 = uVar19;
      cVar5 = __verify_grouping(*(longlong *)(local_118 + 0x10),*(longlong *)(local_118 + 0x18),
                                (undefined8 *)&local_88);
      if (cVar5 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    bVar20 = sVar8 == -1;
    if ((local_9b != 0) && (*(int *)(local_118 + 0x58) != local_10c)) goto LAB_140040fe0;
    __cxx11::string::swap(param_7,(string *)&local_68);
    bVar16 = plVar14 != (longlong *)0x0 && bVar20;
    if (plVar14 == (longlong *)0x0 || !bVar20) goto LAB_140040ffb;
  }
  else {
    if (bVar16) {
      lVar11 = *(longlong *)(local_118 + 0x48);
    }
    else {
      lVar11 = *(longlong *)(local_118 + 0x38);
    }
    uVar19 = 1;
    while( true ) {
      sVar8 = (short)uVar17;
      bVar20 = sVar8 == -1;
      bVar23 = bVar20;
      if (plVar14 != (longlong *)0x0 && bVar20) {
        if ((short *)plVar14[2] < (short *)plVar14[3]) {
          sVar6 = *(short *)plVar14[2];
        }
        else {
          sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
        }
        bVar23 = sVar6 == -1;
        if (bVar23) {
          plVar14 = (longlong *)0x0;
        }
      }
      if (plVar15 != (longlong *)0x0 && sVar7 == -1) break;
      if (bVar23 == (sVar7 == -1)) goto LAB_1400413b4;
LAB_140040ccd:
      if (local_e8 <= uVar19) goto LAB_1400413b4;
      sVar6 = sVar8;
      if ((plVar14 != (longlong *)0x0) && (bVar20)) {
        if ((short *)plVar14[2] < (short *)plVar14[3]) {
          sVar6 = *(short *)plVar14[2];
        }
        else {
          sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
        }
        if (sVar6 == -1) {
          plVar14 = (longlong *)0x0;
        }
      }
      if (*(short *)(lVar11 + uVar19 * 2) != sVar6) goto LAB_140040fe0;
      if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
        plVar14[2] = plVar14[2] + 2;
      }
      else {
        (**(code **)(*plVar14 + 0x50))(plVar14);
      }
      uVar19 = uVar19 + 1;
      uVar17 = 0xffffffff;
    }
    if ((short *)plVar15[2] < (short *)plVar15[3]) {
      sVar6 = *(short *)plVar15[2];
    }
    else {
      sVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
    }
    if (sVar6 == -1) {
      plVar15 = (longlong *)0x0;
    }
    if (bVar23 != (sVar6 == -1)) goto LAB_140040ccd;
LAB_1400413b4:
    if (uVar19 == local_e8) goto joined_r0x000140040ee2;
LAB_140040fe0:
    *param_6 = *param_6 | 4;
    bVar16 = (bool)(plVar14 != (longlong *)0x0 & bVar20);
    if (bVar16 == false) goto LAB_140040ffb;
  }
  if ((short *)plVar14[2] < (short *)plVar14[3]) {
    sVar6 = *(short *)plVar14[2];
  }
  else {
    sVar6 = (**(code **)(*plVar14 + 0x48))(plVar14);
  }
  bVar20 = false;
  if (sVar6 == -1) {
    plVar14 = (longlong *)0x0;
    bVar20 = bVar16;
  }
LAB_140040ffb:
  bVar16 = sVar7 == -1;
  if ((plVar15 != (longlong *)0x0) && (bVar16)) {
    if ((short *)plVar15[2] < (short *)plVar15[3]) {
      sVar7 = *(short *)plVar15[2];
    }
    else {
      sVar7 = (**(code **)(*plVar15 + 0x48))(plVar15);
    }
    bVar16 = sVar7 == -1;
  }
  if (bVar16 == bVar20) {
    *param_6 = *param_6 | 2;
  }
  param_1[1] = CONCAT62((int6)(uVar3 >> 0x10),sVar8);
  *param_1 = plVar14;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
  return param_1;
}



// WARNING: Instruction at (ram,0x000140040d08) overlaps instruction at (ram,0x000140040d06)
// 
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::__cxx11::money_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract<true>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, std::__cxx11::string&) const

short * std::__cxx11::money_get<>::_M_extract<true>
                  (short *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
                  longlong param_5,uint *param_6,string *param_7)

{
  longlong *plVar1;
  longlong *plVar2;
  undefined **ppuVar3;
  short *psVar4;
  short *psVar5;
  char cVar6;
  short sVar7;
  short sVar8;
  short sVar9;
  int iVar10;
  uint uVar11;
  longlong lVar12;
  short *psVar13;
  uint *puVar15;
  short *psVar16;
  longlong *plVar17;
  longlong *plVar18;
  bool bVar19;
  short *psVar20;
  short *psVar21;
  byte bVar22;
  __moneypunct_cache<> *unaff_R13;
  ulonglong unaff_R14;
  ulonglong uVar23;
  ulonglong uVar24;
  undefined **unaff_R15;
  bool bVar25;
  bool bVar26;
  bool bVar27;
  bool bVar28;
  longlong local_118;
  int local_10c;
  uint *local_100;
  ulonglong local_e8;
  int local_a0;
  byte local_9b;
  bool local_99;
  undefined4 local_8c;
  undefined1 *local_88;
  short *local_80;
  undefined1 local_78;
  undefined7 uStack_77;
  char *local_68;
  short *local_60;
  char local_58;
  undefined7 uStack_57;
  undefined6 uVar14;
  
  uVar23 = param_3[1];
  plVar17 = (longlong *)*param_3;
  plVar18 = (longlong *)*param_4;
  psVar20 = (short *)(uVar23 & 0xffffffff);
  sVar9 = (short)param_4[1];
  lVar12 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar12 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar12 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar12 * 8);
  local_118 = *plVar1;
  if (local_118 == 0) {
    unaff_R13 = operator_new(0x80);
    *(undefined4 *)(unaff_R13 + 8) = 0;
    *(undefined8 *)(unaff_R13 + 0x10) = 0;
    *(undefined8 *)(unaff_R13 + 0x18) = 0;
    *(undefined ***)unaff_R13 = &PTR____moneypunct_cache_1400dde30;
    unaff_R13[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(unaff_R13 + 0x22) = 0;
    *(undefined8 *)(unaff_R13 + 0x28) = 0;
    *(undefined8 *)(unaff_R13 + 0x30) = 0;
    *(undefined8 *)(unaff_R13 + 0x38) = 0;
    *(undefined8 *)(unaff_R13 + 0x40) = 0;
    *(undefined8 *)(unaff_R13 + 0x48) = 0;
    *(undefined8 *)(unaff_R13 + 0x50) = 0;
    *(undefined4 *)(unaff_R13 + 0x58) = 0;
    *(undefined8 *)(unaff_R13 + 0x5c) = 0;
    unaff_R13[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(unaff_R13,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)unaff_R13,lVar12);
    local_118 = *plVar1;
  }
  if (*(longlong *)(local_118 + 0x40) == 0) {
    local_99 = false;
  }
  else {
    local_99 = *(longlong *)(local_118 + 0x50) != 0;
  }
  local_78 = 0;
  local_80 = (short *)0x0;
  local_88 = &local_78;
  if (*(char *)(local_118 + 0x20) != '\0') {
    __cxx11::string::reserve((string *)&local_88,0x20);
  }
  psVar16 = (short *)0x20;
  local_60 = (short *)0x0;
  local_58 = '\0';
  local_68 = &local_58;
  __cxx11::string::reserve((string *)&local_68,0x20);
  local_9b = 0;
  local_100 = (uint *)0x0;
  psVar21 = (short *)(local_118 + 0x66);
  local_10c = 0;
  local_8c = *(undefined4 *)(local_118 + 0x60);
  local_a0 = 0;
  local_e8 = 0;
  bVar19 = false;
LAB_140041f24:
  uVar14 = (undefined6)(uVar23 >> 0x10);
  iVar10 = (int)local_100;
  if (4 < *(byte *)((longlong)&local_8c + (longlong)local_100)) goto LAB_14004297d;
  bVar22 = *(byte *)((longlong)&local_8c + (longlong)local_100);
  puVar15 = &switchD_140041f4a::switchdataD_1400c57fc;
  psVar13 = (short *)((longlong)&switchD_140041f4a::switchdataD_1400c57fc +
                     (longlong)(int)(&switchD_140041f4a::switchdataD_1400c57fc)[bVar22]);
  sVar7 = (short)psVar20;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(bVar22) {
  case 0:
    unaff_R13 = (__moneypunct_cache<> *)0x1;
    goto LAB_140041f52;
  case 1:
    bVar28 = sVar7 == -1;
    unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),bVar28);
    bVar26 = bVar28;
    if (plVar17 != (longlong *)0x0 && bVar28) {
      if ((short *)plVar17[2] < (short *)plVar17[3]) {
        sVar7 = *(short *)plVar17[2];
      }
      else {
        sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
      }
      bVar26 = sVar7 == -1;
      if (bVar26) {
        plVar17 = (longlong *)0x0;
      }
    }
    bVar25 = sVar9 == -1;
    bVar27 = plVar18 != (longlong *)0x0 && bVar25;
    psVar16 = (short *)CONCAT71((int7)((ulonglong)psVar16 >> 8),bVar27);
    if (bVar27) {
      if ((short *)plVar18[2] < (short *)plVar18[3]) {
        sVar7 = *(short *)plVar18[2];
      }
      else {
        sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
      }
      bVar25 = sVar7 == -1;
      psVar16 = (short *)0x0;
      if (bVar25) {
        plVar18 = (longlong *)0x0;
      }
    }
    unaff_R13 = (__moneypunct_cache<> *)0x0;
    if (bVar26 != bVar25) {
      if ((plVar17 != (longlong *)0x0) && (bVar28)) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar7 = *(short *)plVar17[2];
        }
        else {
          sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar7 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      psVar16 = (short *)0x20;
      uVar11 = (**(code **)(*plVar2 + 0x10))();
      unaff_R13 = (__moneypunct_cache<> *)(ulonglong)uVar11;
      if ((char)uVar11 != '\0') {
        if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
          plVar17[2] = plVar17[2] + 2;
        }
        else {
          (**(code **)(*plVar17 + 0x50))(plVar17);
        }
        psVar20 = (short *)0xffffffff;
      }
    }
LAB_140041f52:
    bVar22 = (byte)unaff_R13;
    if (local_100 != (uint *)0x3) {
      bVar26 = (short)psVar20 == -1;
      unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),bVar26);
      if ((plVar17 != (longlong *)0x0) && (bVar26)) goto LAB_140042749;
      unaff_R15 = (undefined **)(unaff_R14 & 0xffffffff);
      while( true ) {
        bVar26 = sVar9 == -1;
        if (plVar18 != (longlong *)0x0 && bVar26) {
          if ((short *)plVar18[2] < (short *)plVar18[3]) {
            sVar7 = *(short *)plVar18[2];
          }
          else {
            sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
          }
          bVar26 = sVar7 == -1;
          psVar16 = (short *)0x0;
          if (bVar26) {
            plVar18 = (longlong *)0x0;
          }
        }
        if (SUB81(unaff_R14,0) == bVar26) break;
        if ((plVar17 != (longlong *)0x0) && ((char)unaff_R15 != '\0')) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar7 = *(short *)plVar17[2];
          }
          else {
            sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          if (sVar7 == -1) {
            plVar17 = (longlong *)0x0;
          }
        }
        psVar16 = (short *)0x20;
        cVar6 = (**(code **)(*plVar2 + 0x10))();
        if (cVar6 == '\0') break;
        if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
          plVar17[2] = plVar17[2] + 2;
        }
        else {
          (**(code **)(*plVar17 + 0x50))(plVar17);
        }
LAB_140042749:
        if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
          psVar20 = (short *)(ulonglong)*(ushort *)plVar17[2];
        }
        else {
          uVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
          psVar20 = (short *)(ulonglong)uVar11;
        }
        unaff_R15 = (undefined **)0x1;
        if ((short)psVar20 == -1) {
          unaff_R14 = 1;
          plVar17 = (longlong *)0x0;
        }
        else {
          psVar20 = (short *)0xffffffff;
          unaff_R14 = 0;
        }
      }
      break;
    }
    goto LAB_140041f5e;
  case 2:
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_e8 < 2)) && (iVar10 != 0)) {
      if (local_100 == (uint *)0x1) {
        if (((local_99 != false) || ((char)local_8c == '\x03')) || (local_8c._2_1_ == '\x01'))
        goto LAB_140042803;
      }
      else {
        if (local_100 != (uint *)0x2) goto LAB_1400421d9;
        if ((local_8c._3_1_ == '\x04') || ((local_8c._3_1_ == '\x03' && (local_99 != false))))
        goto LAB_140042803;
      }
LAB_14004297d:
      unaff_R13 = (__moneypunct_cache<> *)0x1;
    }
    else {
LAB_140042803:
      unaff_R15 = (undefined **)0x0;
      ppuVar3 = *(undefined ***)(local_118 + 0x30);
      while( true ) {
        bVar28 = (short)psVar20 == -1;
        bVar26 = bVar28;
        if (plVar17 != (longlong *)0x0 && bVar28) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar7 = *(short *)plVar17[2];
          }
          else {
            sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          bVar26 = sVar7 == -1;
          if (bVar26) {
            plVar17 = (longlong *)0x0;
          }
        }
        bVar25 = sVar9 == -1;
        bVar27 = plVar18 != (longlong *)0x0 && bVar25;
        unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),bVar27);
        if (bVar27) break;
        if (ppuVar3 <= unaff_R15) goto LAB_14004296c;
LAB_140042865:
        if (bVar26 == bVar25) goto LAB_14004296c;
        if ((plVar17 == (longlong *)0x0) || (!bVar28)) {
          psVar16 = *(short **)(local_118 + 0x28);
          if (psVar16[(longlong)unaff_R15] != (short)psVar20) goto LAB_1400428d9;
        }
        else {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar7 = *(short *)plVar17[2];
          }
          else {
            sVar7 = (**(code **)(*plVar17 + 0x48))();
          }
          if (sVar7 == -1) {
            plVar17 = (longlong *)0x0;
          }
          psVar16 = *(short **)(local_118 + 0x28);
          if (psVar16[(longlong)unaff_R15] != sVar7) goto LAB_1400428d9;
        }
        if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
          plVar17[2] = plVar17[2] + 2;
        }
        else {
          (**(code **)(*plVar17 + 0x50))(plVar17);
        }
        unaff_R15 = (undefined **)((longlong)unaff_R15 + 1);
        psVar20 = (short *)0xffffffff;
      }
      if ((short *)plVar18[2] < (short *)plVar18[3]) {
        sVar7 = *(short *)plVar18[2];
      }
      else {
        sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
      }
      bVar25 = sVar7 == -1;
      if (bVar25) {
        plVar18 = (longlong *)0x0;
      }
      if (unaff_R15 < ppuVar3) goto LAB_140042865;
LAB_14004296c:
      if (unaff_R15 == ppuVar3) goto LAB_14004297d;
LAB_1400428d9:
      if (unaff_R15 != (undefined **)0x0) goto LAB_140042642;
      unaff_R13 = (__moneypunct_cache<> *)(ulonglong)((*(uint *)(param_5 + 0x18) >> 9 ^ 1) & 1);
    }
    break;
  case 3:
    if (*(longlong *)(local_118 + 0x40) == 0) {
      if (*(longlong *)(local_118 + 0x50) != 0) {
LAB_14004299f:
        bVar28 = sVar7 == -1;
        bVar26 = bVar28;
        if (plVar17 != (longlong *)0x0 && bVar28) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar8 = *(short *)plVar17[2];
          }
          else {
            sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          bVar26 = sVar8 == -1;
          if (bVar26) {
            plVar17 = (longlong *)0x0;
          }
        }
        bVar25 = sVar9 == -1;
        bVar27 = plVar18 != (longlong *)0x0 && bVar25;
        psVar16 = (short *)CONCAT71((int7)((ulonglong)psVar16 >> 8),bVar27);
        unaff_R14 = (ulonglong)psVar16 & 0xffffffff;
        if (bVar27) {
          if ((short *)plVar18[2] < (short *)plVar18[3]) {
            sVar8 = *(short *)plVar18[2];
          }
          else {
            sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
          }
          psVar16 = (short *)0x0;
          bVar25 = false;
          if (sVar8 == -1) {
            bVar25 = SUB81(unaff_R14,0);
            plVar18 = (longlong *)0x0;
          }
        }
        if (bVar26 != bVar25) {
          if ((plVar17 != (longlong *)0x0) && (bVar28)) {
            if ((short *)plVar17[2] < (short *)plVar17[3]) {
              sVar7 = *(short *)plVar17[2];
            }
            else {
              sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
            }
            if (sVar7 == -1) {
              plVar17 = (longlong *)0x0;
            }
          }
          psVar16 = *(short **)(local_118 + 0x48);
          if (*psVar16 == sVar7) {
            local_e8 = *(ulonglong *)(local_118 + 0x50);
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar17);
            bVar19 = true;
            psVar20 = (short *)0xffffffff;
            unaff_R13 = (__moneypunct_cache<> *)0x1;
            break;
          }
        }
        if ((*(longlong *)(local_118 + 0x40) != 0) && (*(longlong *)(local_118 + 0x50) == 0))
        goto LAB_140042a68;
      }
LAB_140042160:
      unaff_R13 = (__moneypunct_cache<> *)(ulonglong)(local_99 ^ 1);
    }
    else {
      bVar28 = sVar7 == -1;
      bVar26 = bVar28;
      if (plVar17 != (longlong *)0x0 && bVar28) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar26 = sVar8 == -1;
        if (bVar26) {
          plVar17 = (longlong *)0x0;
        }
      }
      bVar25 = sVar9 == -1;
      bVar27 = plVar18 != (longlong *)0x0 && bVar25;
      psVar16 = (short *)CONCAT71((int7)((ulonglong)psVar16 >> 8),bVar27);
      unaff_R14 = (ulonglong)psVar16 & 0xffffffff;
      if (bVar27) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar8 = *(short *)plVar18[2];
        }
        else {
          sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        psVar16 = (short *)0x0;
        bVar25 = false;
        if (sVar8 == -1) {
          bVar25 = SUB81(unaff_R14,0);
          plVar18 = (longlong *)0x0;
        }
      }
      if (bVar26 != bVar25) {
        sVar8 = sVar7;
        if ((plVar17 != (longlong *)0x0) && (bVar28)) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar8 = *(short *)plVar17[2];
          }
          else {
            sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          if (sVar8 == -1) {
            plVar17 = (longlong *)0x0;
          }
        }
        psVar16 = *(short **)(local_118 + 0x38);
        if (*psVar16 == sVar8) {
          local_e8 = *(ulonglong *)(local_118 + 0x40);
          _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar17);
          psVar20 = (short *)0xffffffff;
          goto LAB_14004297d;
        }
      }
      if (*(longlong *)(local_118 + 0x50) != 0) goto LAB_14004299f;
      if (*(longlong *)(local_118 + 0x40) == 0) goto LAB_140042160;
LAB_140042a68:
      bVar19 = true;
      unaff_R13 = (__moneypunct_cache<> *)0x1;
    }
    break;
  case 4:
    unaff_R15 = &money_base::_S_atoms;
    do {
      bVar28 = (short)psVar20 == -1;
      bVar26 = bVar28;
      if (plVar17 != (longlong *)0x0 && bVar28) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar7 = *(short *)plVar17[2];
        }
        else {
          sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar26 = sVar7 == -1;
        if (bVar26) {
          plVar17 = (longlong *)0x0;
        }
      }
      bVar27 = sVar9 == -1;
      bVar25 = plVar18 != (longlong *)0x0 && bVar27;
      unaff_R14 = CONCAT71((int7)(unaff_R14 >> 8),bVar25);
      if (bVar25) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar7 = *(short *)plVar18[2];
        }
        else {
          sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        bVar27 = sVar7 == -1;
        if (bVar27) {
          plVar18 = (longlong *)0x0;
        }
      }
      if (bVar26 == bVar27) goto LAB_1400425b8;
      psVar13 = psVar21;
      psVar16 = psVar20;
      if ((plVar17 != (longlong *)0x0) && (bVar28)) {
        if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
          psVar16 = (short *)(ulonglong)*(ushort *)plVar17[2];
        }
        else {
          uVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
          psVar16 = (short *)(ulonglong)uVar11;
        }
        if ((short)psVar16 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      do {
        psVar5 = local_60;
        psVar4 = local_80;
        sVar7 = (short)psVar16;
        if (sVar7 == *psVar13) {
          psVar20 = (short *)((longlong)local_60 + 1);
          cVar6 = money_base::_S_atoms[(longlong)psVar13 - (local_118 + 100) >> 1];
          psVar16 = (short *)CONCAT71(uStack_57,local_58);
          if (local_68 == &local_58) {
            psVar16 = (short *)0xf;
          }
          if (psVar16 < psVar20) {
            __cxx11::string::_M_mutate((string *)&local_68,(size_t)local_60,0,(undefined1 *)0x0,1);
            psVar16 = local_60;
          }
          local_68[(longlong)psVar5] = cVar6;
          local_10c = local_10c + 1;
          (local_68 + 1)[(longlong)psVar5] = '\0';
          local_60 = psVar20;
          goto LAB_1400420f6;
        }
        psVar13 = psVar13 + 1;
      } while (psVar13 != (short *)(local_118 + 0x7a));
      if (*(short *)(local_118 + 0x22) == sVar7) {
        if (local_9b != 0) goto LAB_14004262a;
        if (*(int *)(local_118 + 0x58) < 1) goto LAB_1400425b8;
        local_a0 = local_10c;
        local_9b = 1;
        local_10c = 0;
LAB_1400420f6:
        uVar24 = plVar17[2];
        if (uVar24 < (ulonglong)plVar17[3]) goto LAB_140042104;
LAB_140042503:
        (**(code **)(*plVar17 + 0x50))(plVar17);
      }
      else {
        unaff_R13 = (__moneypunct_cache<> *)(ulonglong)*(byte *)(local_118 + 0x20);
        if (*(byte *)(local_118 + 0x20) == 0) goto LAB_1400425b8;
        if (*(short *)(local_118 + 0x24) != sVar7) goto LAB_140042633;
        if (local_9b != 0) {
LAB_14004262a:
          unaff_R13 = (__moneypunct_cache<> *)(ulonglong)local_9b;
          goto LAB_140042633;
        }
        if (local_10c == 0) {
          unaff_R13 = (__moneypunct_cache<> *)0x0;
          goto LAB_140042633;
        }
        psVar20 = (short *)((longlong)local_80 + 1);
        if (local_88 == &local_78) {
          psVar16 = (short *)0xf;
        }
        else {
          psVar16 = (short *)CONCAT71(uStack_77,local_78);
        }
        if (psVar16 < psVar20) {
          __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
          psVar16 = local_80;
        }
        local_88[(longlong)psVar4] = (char)local_10c;
        local_10c = 0;
        (local_88 + 1)[(longlong)psVar4] = 0;
        uVar24 = plVar17[2];
        local_80 = psVar20;
        if ((ulonglong)plVar17[3] <= uVar24) goto LAB_140042503;
LAB_140042104:
        plVar17[2] = uVar24 + 2;
      }
      psVar20 = (short *)0xffffffff;
    } while( true );
  case 5:
    goto switchD_140041f4a_caseD_5;
  case 6:
    goto switchD_140041f4a_caseD_6;
  case 7:
    goto LAB_140040e6d;
  case 8:
    *(char *)psVar13 = (char)*psVar13 + (char)psVar13;
    goto code_r0x000140040e2e;
  case 9:
    *(char *)psVar16 = (char)*psVar16;
    *(int *)(plVar17 + 2) = (int)psVar13;
    goto LAB_140040d0c;
  }
LAB_14004216d:
  bVar22 = (byte)unaff_R13;
  local_100 = (uint *)((longlong)local_100 + 1);
  if ((iVar10 + 1 < 4 & bVar22) == 0) goto LAB_140041f5e;
  goto LAB_140041f24;
LAB_1400412b8:
  unaff_R13 = (__moneypunct_cache<> *)0x1;
LAB_140041333:
  sVar7 = (short)psVar20;
  if (local_60 != (short *)0x0) {
LAB_140040e6d:
    do {
      bVar22 = (byte)unaff_R13;
      puVar15 = (uint *)((longlong)local_100 + 1);
      if (((int)local_100 + 1 < 4 & bVar22) == 0) goto LAB_140040c5e;
      psVar13 = (short *)&local_8c;
      local_100 = puVar15;
      if (*(byte *)((longlong)&local_8c + (longlong)puVar15) < 5) goto switchD_140041f4a_caseD_5;
LAB_14004167d:
      unaff_R13 = (__moneypunct_cache<> *)0x1;
    } while( true );
  }
  goto LAB_140041342;
LAB_1400425b8:
  unaff_R13 = (__moneypunct_cache<> *)0x1;
LAB_140042633:
  if (local_60 == (short *)0x0) goto LAB_140042642;
  goto LAB_14004216d;
switchD_140041f4a_caseD_5:
  sVar7 = (short)psVar20;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(*(char *)((longlong)psVar13 + (longlong)puVar15)) {
  case '\0':
    unaff_R13 = (__moneypunct_cache<> *)0x1;
    break;
  case '\x01':
    bVar28 = sVar7 == -1;
    bVar26 = bVar28;
    if (plVar17 != (longlong *)0x0 && bVar28) {
      if ((short *)plVar17[2] < (short *)plVar17[3]) {
        sVar7 = *(short *)plVar17[2];
      }
      else {
        sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
      }
      bVar26 = sVar7 == -1;
      if (bVar26) {
        plVar17 = (longlong *)0x0;
      }
    }
    bVar25 = sVar9 == -1;
    if (plVar18 != (longlong *)0x0 && bVar25) {
      if ((short *)plVar18[2] < (short *)plVar18[3]) {
        sVar7 = *(short *)plVar18[2];
      }
      else {
        sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
      }
      bVar25 = sVar7 == -1;
      if (bVar25) {
        plVar18 = (longlong *)0x0;
      }
    }
    unaff_R13 = (__moneypunct_cache<> *)0x0;
    if (bVar26 != bVar25) {
      if ((plVar17 != (longlong *)0x0) && (bVar28)) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar7 = *(short *)plVar17[2];
        }
        else {
          sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar7 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      uVar11 = (**(code **)(*plVar2 + 0x10))();
      unaff_R13 = (__moneypunct_cache<> *)(ulonglong)uVar11;
      if ((char)uVar11 != '\0') {
        if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
          plVar17[2] = plVar17[2] + 2;
        }
        else {
          (**(code **)(*plVar17 + 0x50))(plVar17);
        }
        psVar20 = (short *)0xffffffff;
      }
    }
    break;
  case '\x02':
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_e8 < 2)) && ((int)local_100 != 0)) {
      if (local_100 == (uint *)0x1) {
        if (((local_99 == false) && ((char)local_8c != '\x03')) && (local_8c._2_1_ != '\x01'))
        goto LAB_14004167d;
      }
      else {
        if (local_100 != (uint *)0x2) goto joined_r0x000140040ee2;
        if (local_8c._3_1_ != '\x04') {
          if (local_8c._3_1_ != '\x03') goto LAB_14004167d;
          if (local_99 == false) goto LAB_14004167d;
        }
      }
    }
    uVar24 = 0;
    uVar23 = *(ulonglong *)(local_118 + 0x30);
    while( true ) {
      sVar7 = (short)psVar20;
      bVar28 = sVar7 == -1;
      bVar26 = bVar28;
      if (plVar17 != (longlong *)0x0 && bVar28) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar26 = sVar8 == -1;
        if (bVar26) {
          plVar17 = (longlong *)0x0;
        }
      }
      bVar25 = sVar9 == -1;
      if (plVar18 != (longlong *)0x0 && bVar25) break;
      if (uVar23 <= uVar24) goto LAB_14004166c;
LAB_140041565:
      if (bVar26 == bVar25) goto LAB_14004166c;
      if ((plVar17 == (longlong *)0x0) || (!bVar28)) {
        if (*(short *)(*(longlong *)(local_118 + 0x28) + uVar24 * 2) != sVar7) goto LAB_1400415d9;
      }
      else {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))();
        }
        if (sVar8 == -1) {
          plVar17 = (longlong *)0x0;
        }
        if (*(short *)(*(longlong *)(local_118 + 0x28) + uVar24 * 2) != sVar8) goto LAB_1400415d9;
      }
      if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
        plVar17[2] = plVar17[2] + 2;
      }
      else {
        (**(code **)(*plVar17 + 0x50))(plVar17);
      }
      uVar24 = uVar24 + 1;
      psVar20 = (short *)0xffffffff;
    }
    if ((short *)plVar18[2] < (short *)plVar18[3]) {
      sVar8 = *(short *)plVar18[2];
    }
    else {
      sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
    }
    bVar25 = sVar8 == -1;
    if (bVar25) {
      plVar18 = (longlong *)0x0;
    }
    if (uVar24 < uVar23) goto LAB_140041565;
LAB_14004166c:
    if (uVar24 == uVar23) goto LAB_14004167d;
LAB_1400415d9:
    if (uVar24 == 0) {
      unaff_R13 = (__moneypunct_cache<> *)(ulonglong)((*(uint *)(param_5 + 0x18) >> 9 ^ 1) & 1);
      goto LAB_140040e6d;
    }
    goto LAB_140041342;
  case '\x03':
    if (*(longlong *)(local_118 + 0x40) == 0) {
      if (*(longlong *)(local_118 + 0x50) != 0) {
LAB_14004169f:
        bVar28 = sVar7 == -1;
        bVar26 = bVar28;
        if (plVar17 != (longlong *)0x0 && bVar28) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar8 = *(short *)plVar17[2];
          }
          else {
            sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          bVar26 = sVar8 == -1;
          if (bVar26) {
            plVar17 = (longlong *)0x0;
          }
        }
        bVar25 = sVar9 == -1;
        if (plVar18 != (longlong *)0x0 && bVar25) {
          if ((short *)plVar18[2] < (short *)plVar18[3]) {
            sVar8 = *(short *)plVar18[2];
          }
          else {
            sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
          }
          bVar25 = sVar8 == -1;
          if (bVar25) {
            plVar18 = (longlong *)0x0;
          }
        }
        if (bVar26 != bVar25) {
          if ((plVar17 != (longlong *)0x0) && (bVar28)) {
            if ((short *)plVar17[2] < (short *)plVar17[3]) {
              sVar7 = *(short *)plVar17[2];
            }
            else {
              sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
            }
            if (sVar7 == -1) {
              plVar17 = (longlong *)0x0;
            }
          }
          if (**(short **)(local_118 + 0x48) == sVar7) {
            local_e8 = *(ulonglong *)(local_118 + 0x50);
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar17);
            bVar19 = true;
            psVar20 = (short *)0xffffffff;
            unaff_R13 = (__moneypunct_cache<> *)0x1;
            goto LAB_140040e6d;
          }
        }
        if ((*(longlong *)(local_118 + 0x40) != 0) && (*(longlong *)(local_118 + 0x50) == 0))
        goto LAB_140041768;
      }
LAB_140040e60:
      unaff_R13 = (__moneypunct_cache<> *)(ulonglong)(local_99 ^ 1);
    }
    else {
      bVar28 = sVar7 == -1;
      bVar26 = bVar28;
      if (plVar17 != (longlong *)0x0 && bVar28) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar26 = sVar8 == -1;
        if (bVar26) {
          plVar17 = (longlong *)0x0;
        }
      }
      bVar25 = sVar9 == -1;
      if (plVar18 != (longlong *)0x0 && bVar25) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar8 = *(short *)plVar18[2];
        }
        else {
          sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        bVar25 = sVar8 == -1;
        if (bVar25) {
          plVar18 = (longlong *)0x0;
        }
      }
      if (bVar26 != bVar25) {
        sVar8 = sVar7;
        if ((plVar17 != (longlong *)0x0) && (bVar28)) {
          if ((short *)plVar17[2] < (short *)plVar17[3]) {
            sVar8 = *(short *)plVar17[2];
          }
          else {
            sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
          }
          if (sVar8 == -1) {
            plVar17 = (longlong *)0x0;
          }
        }
        if (**(short **)(local_118 + 0x38) == sVar8) {
          local_e8 = *(ulonglong *)(local_118 + 0x40);
          _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar17);
          psVar20 = (short *)0xffffffff;
          goto LAB_14004167d;
        }
      }
      if (*(longlong *)(local_118 + 0x50) != 0) goto LAB_14004169f;
      if (*(longlong *)(local_118 + 0x40) == 0) goto LAB_140040e60;
LAB_140041768:
      bVar19 = true;
      unaff_R13 = (__moneypunct_cache<> *)0x1;
    }
    goto LAB_140040e6d;
  case '\x04':
    unaff_R15 = &money_base::_S_atoms;
    do {
      sVar7 = (short)psVar20;
      bVar28 = sVar7 == -1;
      bVar26 = bVar28;
      if (plVar17 != (longlong *)0x0 && bVar28) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar26 = sVar8 == -1;
        if (bVar26) {
          plVar17 = (longlong *)0x0;
        }
      }
      bVar25 = sVar9 == -1;
      if (plVar18 != (longlong *)0x0 && bVar25) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar8 = *(short *)plVar18[2];
        }
        else {
          sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        bVar25 = sVar8 == -1;
        if (bVar25) {
          plVar18 = (longlong *)0x0;
        }
      }
      if (bVar26 == bVar25) goto LAB_1400412b8;
      psVar16 = psVar21;
      if ((plVar17 != (longlong *)0x0) && (bVar28)) {
        psVar13 = (short *)plVar17[2];
        if (psVar13 < (short *)plVar17[3]) {
code_r0x000140040e2e:
          sVar7 = *psVar13;
        }
        else {
          sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        psVar16 = psVar21;
        if (sVar7 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      do {
        psVar4 = local_60;
        psVar13 = local_80;
        if (sVar7 == *psVar16) {
          psVar20 = (short *)((longlong)local_60 + 1);
          cVar6 = (*unaff_R15)[(longlong)psVar16 - (local_118 + 100) >> 1];
          psVar16 = (short *)CONCAT71(uStack_57,local_58);
          if (local_68 == &local_58) {
            psVar16 = (short *)0xf;
          }
          if (psVar16 < psVar20) {
            __cxx11::string::_M_mutate((string *)&local_68,(size_t)local_60,0,(undefined1 *)0x0,1);
          }
          local_68[(longlong)psVar4] = cVar6;
          local_10c = local_10c + 1;
          (local_68 + 1)[(longlong)psVar4] = '\0';
          local_60 = psVar20;
          goto LAB_140040df6;
        }
        psVar16 = psVar16 + 1;
      } while (psVar16 != (short *)(local_118 + 0x7a));
      if (*(short *)(local_118 + 0x22) == sVar7) {
        if (local_9b != 0) goto LAB_14004132a;
        if (*(int *)(local_118 + 0x58) < 1) goto LAB_1400412b8;
        local_a0 = local_10c;
        local_9b = 1;
        local_10c = 0;
LAB_140040df6:
        uVar23 = plVar17[2];
        if (uVar23 < (ulonglong)plVar17[3]) goto LAB_140040e04;
LAB_140041203:
        (**(code **)(*plVar17 + 0x50))(plVar17);
      }
      else {
        unaff_R13 = (__moneypunct_cache<> *)(ulonglong)*(byte *)(local_118 + 0x20);
        if (*(byte *)(local_118 + 0x20) == 0) goto LAB_1400412b8;
        if (*(short *)(local_118 + 0x24) != sVar7) goto LAB_140041333;
        if (local_9b != 0) {
LAB_14004132a:
          unaff_R13 = (__moneypunct_cache<> *)(ulonglong)local_9b;
          goto LAB_140041333;
        }
        if (local_10c == 0) {
          unaff_R13 = (__moneypunct_cache<> *)0x0;
          goto LAB_140041333;
        }
        psVar20 = (short *)((longlong)local_80 + 1);
        if (local_88 == &local_78) {
          psVar16 = (short *)0xf;
        }
        else {
          psVar16 = (short *)CONCAT71(uStack_77,local_78);
        }
        if (psVar16 < psVar20) {
          __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
        }
        local_88[(longlong)psVar13] = (char)local_10c;
        local_10c = 0;
        (local_88 + 1)[(longlong)psVar13] = 0;
        uVar23 = plVar17[2];
        local_80 = psVar20;
        if ((ulonglong)plVar17[3] <= uVar23) goto LAB_140041203;
LAB_140040e04:
        plVar17[2] = uVar23 + 2;
      }
      psVar20 = (short *)0xffffffff;
    } while( true );
  }
  bVar22 = (byte)unaff_R13;
  if (local_100 != (uint *)0x3) {
    bVar28 = (short)psVar20 == -1;
    bVar26 = bVar28;
    if ((plVar17 != (longlong *)0x0) && (bVar28)) goto LAB_140041449;
    while( true ) {
      bVar25 = sVar9 == -1;
      if (plVar18 != (longlong *)0x0 && bVar25) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar7 = *(short *)plVar18[2];
        }
        else {
          sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        bVar25 = sVar7 == -1;
        if (bVar25) {
          plVar18 = (longlong *)0x0;
        }
      }
      if (bVar28 == bVar25) break;
      if ((plVar17 != (longlong *)0x0) && (bVar26)) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar7 = *(short *)plVar17[2];
        }
        else {
          sVar7 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar7 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      cVar6 = (**(code **)(*plVar2 + 0x10))();
      if (cVar6 == '\0') break;
      if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
        plVar17[2] = plVar17[2] + 2;
      }
      else {
        (**(code **)(*plVar17 + 0x50))(plVar17);
      }
LAB_140041449:
      if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
        psVar20 = (short *)(ulonglong)*(ushort *)plVar17[2];
      }
      else {
        uVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
        psVar20 = (short *)(ulonglong)uVar11;
      }
      bVar26 = true;
      if ((short)psVar20 == -1) {
        bVar28 = true;
        plVar17 = (longlong *)0x0;
      }
      else {
        psVar20 = (short *)0xffffffff;
        bVar28 = false;
      }
    }
    goto LAB_140040e6d;
  }
LAB_140040c5e:
  sVar7 = (short)psVar20;
  if ((1 < local_e8 & bVar22) == 0) {
    if (bVar22 == 0) {
LAB_140041342:
      bVar26 = sVar7 == -1;
      goto LAB_140040fe0;
    }
joined_r0x000140040ee2:
    if (((short *)0x1 < local_60) &&
       (psVar20 = (short *)__cxx11::string::find_first_not_of((string *)&local_68,'0',0),
       psVar20 != (short *)0x0)) {
      if (psVar20 == (short *)0xffffffffffffffff) {
        psVar20 = (short *)((longlong)local_60 + -1);
        if (local_60 == (short *)0x0) {
          *local_68 = '\0';
        }
        else if (psVar20 != (short *)0x0) goto LAB_1400417ab;
      }
      else {
LAB_1400417ab:
        psVar21 = local_60;
        if (psVar20 <= local_60) {
          psVar21 = psVar20;
        }
        __cxx11::string::_M_erase((string *)&local_68,0,(longlong)psVar21);
      }
    }
    if ((bVar19) && (*local_68 != '0')) {
      __cxx11::string::_M_replace_aux((string *)&local_68,0,0,1,(string)0x2d);
    }
    psVar20 = local_80;
    if (local_80 != (short *)0x0) {
      psVar21 = (short *)((longlong)local_80 + 1);
      if (local_9b == 0) {
        local_a0._0_1_ = (undefined1)local_10c;
      }
      if (local_88 == &local_78) {
        psVar16 = (short *)0xf;
      }
      else {
        psVar16 = (short *)CONCAT71(uStack_77,local_78);
      }
      if (psVar16 < psVar21) {
        __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
      }
      local_88[(longlong)psVar20] = (undefined1)local_a0;
      (local_88 + 1)[(longlong)psVar20] = 0;
      local_80 = psVar21;
      cVar6 = __verify_grouping(*(longlong *)(local_118 + 0x10),*(longlong *)(local_118 + 0x18),
                                (undefined8 *)&local_88);
      if (cVar6 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    bVar26 = sVar7 == -1;
    if ((local_9b != 0) && (*(int *)(local_118 + 0x58) != local_10c)) goto LAB_140040fe0;
    __cxx11::string::swap(param_7,(string *)&local_68);
    bVar19 = plVar17 != (longlong *)0x0 && bVar26;
    if (plVar17 == (longlong *)0x0 || !bVar26) goto LAB_140040ffb;
  }
  else {
    if (bVar19) {
      unaff_R15 = *(undefined ***)(local_118 + 0x48);
    }
    else {
      unaff_R15 = *(undefined ***)(local_118 + 0x38);
    }
    unaff_R14 = 1;
    while( true ) {
      sVar7 = (short)psVar20;
      bVar26 = sVar7 == -1;
      bVar28 = bVar26;
      if (plVar17 != (longlong *)0x0 && bVar26) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar28 = sVar8 == -1;
        if (bVar28) {
          plVar17 = (longlong *)0x0;
        }
      }
      if (plVar18 != (longlong *)0x0 && sVar9 == -1) break;
      if (bVar28 == (sVar9 == -1)) goto LAB_1400413b4;
LAB_140040ccd:
      if (local_e8 <= unaff_R14) goto LAB_1400413b4;
      sVar8 = sVar7;
      if ((plVar17 != (longlong *)0x0) && (bVar26)) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar8 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      if (*(short *)((longlong)unaff_R15 + unaff_R14 * 2) != sVar8) goto LAB_140040fe0;
      if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
        plVar17[2] = plVar17[2] + 2;
      }
      else {
        (**(code **)(*plVar17 + 0x50))(plVar17);
      }
LAB_140040d0c:
      unaff_R14 = unaff_R14 + 1;
      psVar20 = (short *)0xffffffff;
    }
    if ((short *)plVar18[2] < (short *)plVar18[3]) {
      sVar8 = *(short *)plVar18[2];
    }
    else {
      sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
    }
    if (sVar8 == -1) {
      plVar18 = (longlong *)0x0;
    }
    if (bVar28 != (sVar8 == -1)) goto LAB_140040ccd;
LAB_1400413b4:
    if (unaff_R14 == local_e8) goto joined_r0x000140040ee2;
LAB_140040fe0:
    *param_6 = *param_6 | 4;
    bVar19 = (bool)(plVar17 != (longlong *)0x0 & bVar26);
    if (bVar19 == false) goto LAB_140040ffb;
  }
  if ((short *)plVar17[2] < (short *)plVar17[3]) {
    sVar8 = *(short *)plVar17[2];
  }
  else {
    sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
  }
  bVar26 = false;
  if (sVar8 == -1) {
    plVar17 = (longlong *)0x0;
    bVar26 = bVar19;
  }
LAB_140040ffb:
  bVar19 = sVar9 == -1;
  if ((plVar18 != (longlong *)0x0) && (bVar19)) {
    if ((short *)plVar18[2] < (short *)plVar18[3]) {
      sVar9 = *(short *)plVar18[2];
    }
    else {
      sVar9 = (**(code **)(*plVar18 + 0x48))(plVar18);
    }
    bVar19 = sVar9 == -1;
  }
  if (bVar19 == bVar26) {
    *param_6 = *param_6 | 2;
  }
  *(ulonglong *)(param_1 + 4) = CONCAT62(uVar14,sVar7);
  *(longlong **)param_1 = plVar17;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  psVar13 = param_1;
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
switchD_140041f4a_caseD_6:
  return psVar13;
LAB_140041f5e:
  if ((1 < local_e8 & bVar22) == 0) {
    if (bVar22 == 0) {
LAB_140042642:
      sVar7 = (short)psVar20;
      bVar26 = sVar7 == -1;
      goto LAB_1400422e0;
    }
LAB_1400421d9:
    sVar7 = (short)psVar20;
joined_r0x0001400421e2:
    if (((short *)0x1 < local_60) &&
       (psVar20 = (short *)__cxx11::string::find_first_not_of((string *)&local_68,'0',0),
       psVar20 != (short *)0x0)) {
      if (psVar20 == (short *)0xffffffffffffffff) {
        psVar20 = (short *)((longlong)local_60 + -1);
        if (local_60 == (short *)0x0) {
          *local_68 = '\0';
        }
        else if (psVar20 != (short *)0x0) goto LAB_140042aab;
      }
      else {
LAB_140042aab:
        psVar21 = local_60;
        if (psVar20 <= local_60) {
          psVar21 = psVar20;
        }
        __cxx11::string::_M_erase((string *)&local_68,0,(longlong)psVar21);
      }
    }
    if ((bVar19) && (*local_68 != '0')) {
      __cxx11::string::_M_replace_aux((string *)&local_68,0,0,1,(string)0x2d);
    }
    psVar20 = local_80;
    if (local_80 != (short *)0x0) {
      psVar21 = (short *)((longlong)local_80 + 1);
      if (local_9b == 0) {
        local_a0._0_1_ = (undefined1)local_10c;
      }
      if (local_88 == &local_78) {
        psVar16 = (short *)0xf;
      }
      else {
        psVar16 = (short *)CONCAT71(uStack_77,local_78);
      }
      if (psVar16 < psVar21) {
        __cxx11::string::_M_mutate((string *)&local_88,(size_t)local_80,0,(undefined1 *)0x0,1);
      }
      local_88[(longlong)psVar20] = (undefined1)local_a0;
      (local_88 + 1)[(longlong)psVar20] = 0;
      local_80 = psVar21;
      cVar6 = __verify_grouping(*(longlong *)(local_118 + 0x10),*(longlong *)(local_118 + 0x18),
                                (undefined8 *)&local_88);
      if (cVar6 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    bVar26 = sVar7 == -1;
    if ((local_9b != 0) && (*(int *)(local_118 + 0x58) != local_10c)) goto LAB_1400422e0;
    __cxx11::string::swap(param_7,(string *)&local_68);
    bVar19 = plVar17 != (longlong *)0x0 && bVar26;
    if (plVar17 == (longlong *)0x0 || !bVar26) goto LAB_1400422fb;
  }
  else {
    if (bVar19) {
      lVar12 = *(longlong *)(local_118 + 0x48);
    }
    else {
      lVar12 = *(longlong *)(local_118 + 0x38);
    }
    uVar23 = 1;
    while( true ) {
      sVar7 = (short)psVar20;
      bVar26 = sVar7 == -1;
      bVar28 = bVar26;
      if (plVar17 != (longlong *)0x0 && bVar26) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        bVar28 = sVar8 == -1;
        if (bVar28) {
          plVar17 = (longlong *)0x0;
        }
      }
      if (plVar18 != (longlong *)0x0 && sVar9 == -1) break;
      if (bVar28 == (sVar9 == -1)) goto LAB_1400426b4;
LAB_140041fcd:
      if (local_e8 <= uVar23) goto LAB_1400426b4;
      sVar8 = sVar7;
      if ((plVar17 != (longlong *)0x0) && (bVar26)) {
        if ((short *)plVar17[2] < (short *)plVar17[3]) {
          sVar8 = *(short *)plVar17[2];
        }
        else {
          sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar8 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      if (*(short *)(lVar12 + uVar23 * 2) != sVar8) goto LAB_1400422e0;
      if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
        plVar17[2] = plVar17[2] + 2;
      }
      else {
        (**(code **)(*plVar17 + 0x50))(plVar17);
      }
      uVar23 = uVar23 + 1;
      psVar20 = (short *)0xffffffff;
    }
    if ((short *)plVar18[2] < (short *)plVar18[3]) {
      sVar8 = *(short *)plVar18[2];
    }
    else {
      sVar8 = (**(code **)(*plVar18 + 0x48))(plVar18);
    }
    if (sVar8 == -1) {
      plVar18 = (longlong *)0x0;
    }
    if (bVar28 != (sVar8 == -1)) goto LAB_140041fcd;
LAB_1400426b4:
    if (uVar23 == local_e8) goto joined_r0x0001400421e2;
LAB_1400422e0:
    *param_6 = *param_6 | 4;
    bVar19 = (bool)(plVar17 != (longlong *)0x0 & bVar26);
    if (bVar19 == false) goto LAB_1400422fb;
  }
  if ((short *)plVar17[2] < (short *)plVar17[3]) {
    sVar8 = *(short *)plVar17[2];
  }
  else {
    sVar8 = (**(code **)(*plVar17 + 0x48))(plVar17);
  }
  bVar26 = false;
  if (sVar8 == -1) {
    plVar17 = (longlong *)0x0;
    bVar26 = bVar19;
  }
LAB_1400422fb:
  bVar19 = sVar9 == -1;
  if ((plVar18 != (longlong *)0x0) && (bVar19)) {
    if ((short *)plVar18[2] < (short *)plVar18[3]) {
      sVar9 = *(short *)plVar18[2];
    }
    else {
      sVar9 = (**(code **)(*plVar18 + 0x48))(plVar18);
    }
    bVar19 = sVar9 == -1;
  }
  if (bVar19 == bVar26) {
    *param_6 = *param_6 | 2;
  }
  *(ulonglong *)(param_1 + 4) = CONCAT62(uVar14,sVar7);
  *(longlong **)param_1 = plVar17;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
  return param_1;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, std::__cxx11::wstring&) const

undefined8
std::__cxx11::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, long double&) const

undefined8
std::__cxx11::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x10))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, std::__cxx11::wstring&) const

undefined8 *
std::__cxx11::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,wstring *param_8)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  ulonglong uVar6;
  longlong lVar7;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  ulonglong local_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined1 *local_78;
  ulonglong local_70;
  undefined1 local_68 [40];
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  uVar4 = *param_4;
  uVar5 = param_4[1];
  lVar7 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_6 + 0xd0) + 8) + lVar7 * 8);
  if (plVar3 != (longlong *)0x0) {
    local_70 = 0;
    local_68[0] = 0;
    local_a8 = uVar4;
    uStack_a0 = uVar5;
    local_98 = uVar1;
    local_90 = uVar2;
    local_78 = local_68;
    if (param_5 == '\0') {
      _M_extract<false>(&local_88,param_2,&local_98,&local_a8,param_6,param_7,(string *)&local_78);
    }
    else {
      _M_extract<true>((short *)&local_88,param_2,&local_98,&local_a8,param_6,param_7,
                       (string *)&local_78);
    }
    uVar6 = local_70;
    if (local_70 != 0) {
      __cxx11::wstring::resize(param_8,local_70,0);
      (**(code **)(*plVar3 + 0x58))(plVar3,local_78,local_78 + uVar6,*(undefined8 *)param_8);
    }
    *param_1 = local_88;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_80 & 0xffff;
    if (local_78 != local_68) {
      operator_delete(local_78);
    }
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, long double&) const

undefined8 *
std::__cxx11::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,float10 *param_8)

{
  ulonglong uVar1;
  undefined8 local_98;
  undefined8 local_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong local_60;
  char *local_58;
  undefined8 local_50;
  char local_48 [24];
  
  local_88 = *param_3;
  uVar1 = param_3[1];
  local_98 = *param_4;
  local_90 = param_4[1];
  local_50 = 0;
  local_48[0] = '\0';
  local_80 = uVar1;
  local_58 = local_48;
  if (param_5 == '\0') {
    _M_extract<false>(&local_78,param_2,&local_88,&local_98,param_6,param_7,(string *)&local_58);
  }
  else {
    _M_extract<true>((short *)&local_78,param_2,&local_88,&local_98,param_6,param_7,
                     (string *)&local_58);
  }
  local_60 = locale::facet::_S_get_c_locale();
  __convert_to_v<>(local_58,param_8,param_7);
  *param_1 = local_78;
  param_1[1] = uVar1 & 0xffffffffffff0000 | local_70 & 0xffff;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  return param_1;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char,
// std::__cxx11::string const&) const

undefined8 *
std::__cxx11::money_put<>::put
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,char param_4,longlong param_5,
          string param_6,undefined8 *param_7)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x18) != do_put) {
    (**(code **)(*param_2 + 0x18))
              (param_1,param_2,&local_28,param_4,param_5,(int)(char)param_6,param_7);
    return param_1;
  }
  if (param_4 == '\0') {
    _M_insert<false>(param_1,param_2,&local_28,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<true>(param_1,param_2,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char, long
// double) const

undefined8
std::__cxx11::money_put<>::put
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,char param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,param_4,param_5,(int)param_6,local_28);
  return param_1;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char,
// std::__cxx11::string const&) const

undefined8 *
std::__cxx11::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,char param_4,longlong param_5,
          string param_6,undefined8 *param_7)

{
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  if (param_4 != '\0') {
    _M_insert<true>(param_1,param_2,&local_18,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<false>(param_1,param_2,&local_18,param_5,param_6,param_7);
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char,
// long double) const

undefined8 *
std::__cxx11::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined4 param_4,
          longlong param_5,undefined4 param_6,undefined1 (*param_7) [10])

{
  ctype<char> *this;
  code *pcVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined1 *puVar5;
  int iVar6;
  longlong lVar7;
  ulonglong _Size;
  undefined1 *puVar8;
  char *_Src;
  bool bVar9;
  undefined8 uStack_140;
  undefined1 auStack_138 [32];
  undefined4 local_118 [2];
  undefined1 (*local_110) [10];
  char local_108 [8];
  undefined *puStack_100;
  undefined4 local_c0;
  undefined4 local_bc;
  undefined1 local_b8 [10];
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined1 local_98 [2] [10];
  longlong local_80;
  undefined1 *local_78 [2];
  undefined1 local_68 [40];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  local_c0 = param_6;
  local_b8 = *param_7;
  puStack_100 = (undefined *)0x14004364f;
  local_bc = param_4;
  locale::locale((locale *)&local_80,(undefined8 *)(param_5 + 0xd0));
  puStack_100 = (undefined *)0x14004365b;
  lVar7 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(local_80 + 8) + lVar7 * 8);
  if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    puStack_100 = &UNK_140043811;
    __throw_bad_cast();
  }
  puVar8 = auStack_138;
  _Src = local_108;
  uStack_140 = 0x140043684;
  local_78[0] = (undefined1 *)locale::facet::_S_get_c_locale();
  local_98[0] = local_b8;
  local_118[0] = 0;
  uStack_140 = 0x1400436bb;
  local_110 = local_98;
  iVar6 = __convert_from_v((string *)local_78,_Src,0x40,"%.*Lf");
  if (0x3f < iVar6) {
    uStack_140 = 0x1400437a3;
    lVar7 = -((longlong)(iVar6 + 1) + 0xfU & 0xfffffffffffffff0);
    puVar8 = auStack_138 + lVar7;
    _Src = local_108 + lVar7;
    *(undefined8 *)(auStack_138 + lVar7 + -8) = 0x1400437b3;
    local_78[0] = (undefined1 *)locale::facet::_S_get_c_locale();
    local_98[0] = local_b8;
    *(undefined1 (**) [10])(local_108 + lVar7 + -8) = local_98;
    *(undefined4 *)((longlong)local_118 + lVar7) = 0;
    *(undefined8 *)(auStack_138 + lVar7 + -8) = 0x1400437df;
    iVar6 = __convert_from_v((string *)local_78,_Src,iVar6 + 1,"%.*Lf");
  }
  _Size = (ulonglong)iVar6;
  local_78[0] = local_68;
  *(undefined8 *)(puVar8 + -8) = 0x1400436dd;
  __cxx11::string::_M_construct((string *)local_78,_Size,'\0');
  local_b8._0_8_ = local_78[0];
  if (this[0x38] != (ctype<char>)0x1) {
    if (this[0x38] == (ctype<char>)0x0) {
      *(undefined8 *)(puVar8 + -8) = 0x1400437f0;
      ctype<char>::_M_widen_init(this);
    }
    pcVar1 = *(code **)(*(longlong *)this + 0x38);
    if (pcVar1 != ctype<char>::do_widen) {
      uVar4 = local_b8._0_8_;
      *(undefined8 *)(puVar8 + -8) = 0x140043807;
      (*pcVar1)(this,_Src,_Src + _Size,uVar4);
      goto LAB_140043727;
    }
  }
  if (_Src + _Size != _Src) {
    uVar4 = local_b8._0_8_;
    *(undefined8 *)(puVar8 + -8) = 0x140043727;
    memcpy((void *)uVar4,_Src,_Size);
  }
LAB_140043727:
  iVar6 = (int)(char)local_c0;
  bVar9 = (char)local_bc == '\0';
  local_a8 = uVar2;
  uStack_a0 = uVar3;
  *(string **)(puVar8 + 0x28) = (string *)local_78;
  *(int *)(puVar8 + 0x20) = iVar6;
  if (bVar9) {
    *(undefined8 *)(puVar8 + -8) = 0x140043756;
    _M_insert<false>(param_1,param_2,&local_a8,param_5,*(string *)(puVar8 + 0x20),
                     *(undefined8 **)(puVar8 + 0x28));
  }
  else {
    *(undefined8 *)(puVar8 + -8) = 0x14004378d;
    _M_insert<true>(param_1,param_2,&local_a8,param_5,*(string *)(puVar8 + 0x20),
                    *(undefined8 **)(puVar8 + 0x28));
  }
  puVar5 = local_78[0];
  if (local_78[0] != local_68) {
    *(undefined8 *)(puVar8 + -8) = 0x140043764;
    operator_delete(puVar5);
  }
  *(undefined8 *)(puVar8 + -8) = 0x14004376c;
  locale::~locale((locale *)&local_80);
  return param_1;
}



// std::ostreambuf_iterator<char, std::char_traits<char> > std::__cxx11::money_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> >
// >::_M_insert<false>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&,
// char, std::__cxx11::string const&) const

undefined8 *
std::__cxx11::money_put<>::_M_insert<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          string param_5,undefined8 *param_6)

{
  longlong *plVar1;
  string sVar2;
  longlong *plVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  undefined1 *puVar7;
  __moneypunct_cache<char,false> *this;
  bool bVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  string *psVar11;
  ulonglong uVar12;
  string *psVar13;
  char cVar14;
  longlong lVar15;
  uint uVar16;
  ulonglong uVar17;
  undefined8 uVar18;
  int iVar19;
  ulonglong local_f8;
  string *local_e8;
  ulonglong local_d8;
  size_t local_b8;
  undefined4 local_8c;
  string *local_88;
  ulonglong local_80;
  string local_78;
  undefined7 uStack_77;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  plVar3 = (longlong *)*param_3;
  uVar18 = param_3[1];
  lVar5 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar5 = *(longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar5 * 8);
  if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar6 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar6 * 8);
  lVar15 = *plVar1;
  if (lVar15 == 0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
    this[0x20] = (__moneypunct_cache<char,false>)0x0;
    *(undefined2 *)(this + 0x21) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,false>)0x0;
    __moneypunct_cache<char,false>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar6);
    lVar15 = *plVar1;
  }
  psVar13 = (string *)*param_6;
  if (*psVar13 == *(string *)(lVar15 + 100)) {
    local_8c = *(undefined4 *)(lVar15 + 0x60);
    local_e8 = *(string **)(lVar15 + 0x48);
    local_f8 = *(ulonglong *)(lVar15 + 0x50);
    if (param_6[1] == 0) goto LAB_140043927;
    psVar13 = psVar13 + 1;
  }
  else {
    local_8c = *(undefined4 *)(lVar15 + 0x5c);
    local_e8 = *(string **)(lVar15 + 0x38);
    local_f8 = *(ulonglong *)(lVar15 + 0x40);
  }
  if (psVar13 < psVar13 + param_6[1]) {
    psVar11 = psVar13;
    do {
      if ((*(byte *)(*(longlong *)(lVar5 + 0x30) + (ulonglong)(byte)*psVar11 * 2) & 8) == 0) break;
      psVar11 = psVar11 + 1;
    } while (psVar13 + param_6[1] != psVar11);
    uVar12 = (longlong)psVar11 - (longlong)psVar13;
    if (uVar12 != 0) {
      local_80 = 0;
      local_78 = (string)0x0;
      local_88 = &local_78;
      __cxx11::string::reserve((string *)&local_88,uVar12 * 2);
      iVar4 = *(int *)(lVar15 + 0x58);
      iVar19 = (int)uVar12 - iVar4;
      if (0 < iVar19) {
        if (iVar4 < 0) {
          iVar19 = (int)uVar12;
        }
        if (*(longlong *)(lVar15 + 0x18) == 0) {
          __cxx11::string::_M_replace((string *)&local_88,0,local_80,psVar13,(longlong)iVar19);
          iVar4 = *(int *)(lVar15 + 0x58);
        }
        else {
          __cxx11::string::_M_replace_aux
                    ((string *)&local_88,0,local_80,(longlong)(iVar19 * 2),(string)0x0);
          puVar7 = __add_grouping<char>
                             (local_88,*(undefined1 *)(lVar15 + 0x22),*(byte **)(lVar15 + 0x10),
                              *(longlong *)(lVar15 + 0x18),(longlong)psVar13,
                              (longlong)(psVar13 + iVar19));
          uVar17 = (longlong)puVar7 - (longlong)local_88;
          if (local_80 < uVar17) {
                    // WARNING: Subroutine does not return
            __throw_out_of_range_fmt
                      ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5494,uVar17,
                       local_80);
          }
          *puVar7 = 0;
          iVar4 = *(int *)(lVar15 + 0x58);
          local_80 = uVar17;
        }
      }
      uVar17 = local_80;
      if (0 < iVar4) {
        sVar2 = *(string *)(lVar15 + 0x21);
        uVar10 = local_80 + 1;
        if (local_88 == &local_78) {
          uVar9 = 0xf;
        }
        else {
          uVar9 = CONCAT71(uStack_77,local_78);
        }
        if (uVar9 < uVar10) {
          __cxx11::string::_M_mutate((string *)&local_88,local_80,0,(undefined1 *)0x0,1);
        }
        local_88[uVar17] = sVar2;
        local_88[uVar17 + 1] = (string)0x0;
        local_80 = uVar10;
        if (iVar19 < 0) {
          __cxx11::string::_M_replace_aux
                    ((string *)&local_88,uVar10,0,(longlong)-iVar19,*(string *)(lVar15 + 0x65));
          if (0x3fffffffffffffff - local_80 < uVar12) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
        }
        else {
          uVar12 = (ulonglong)*(int *)(lVar15 + 0x58);
          psVar13 = psVar13 + iVar19;
          if (0x3fffffffffffffff - uVar10 < uVar12) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
        }
        __cxx11::string::_M_append((string *)&local_88,psVar13,uVar12);
      }
      uVar16 = *(uint *)(param_4 + 0x18) & 0xb0;
      local_d8 = local_80 + local_f8;
      if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
        local_d8 = local_d8 + *(longlong *)(lVar15 + 0x30);
      }
      local_60 = 0;
      local_58 = 0;
      local_68 = &local_58;
      __cxx11::string::reserve((string *)&local_68,local_d8 * 2);
      uVar12 = *(ulonglong *)(param_4 + 0x10);
      psVar13 = (string *)&local_8c;
      bVar8 = uVar16 == 0x10 && local_d8 < uVar12;
      uVar17 = local_60;
      do {
        switch(*psVar13) {
        case (string)0x0:
          if (bVar8) {
LAB_140043c5a:
            __cxx11::string::_M_replace_aux((string *)&local_68,uVar17,0,uVar12 - local_d8,param_5);
            uVar17 = local_60;
          }
          break;
        case (string)0x1:
          if (bVar8) goto LAB_140043c5a;
          if (local_68 == &local_58) {
            uVar10 = 0xf;
          }
          else {
            uVar10 = CONCAT71(uStack_57,local_58);
          }
          sVar2 = param_5;
          if (uVar10 < uVar17 + 1) {
            __cxx11::string::_M_mutate((string *)&local_68,uVar17,0,(undefined1 *)0x0,1);
          }
LAB_140043c25:
          local_b8 = uVar17 + 1;
          *(string *)(local_68 + uVar17) = sVar2;
          local_60 = local_b8;
          local_68[local_b8] = 0;
          uVar17 = local_b8;
          break;
        case (string)0x2:
          if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
            uVar10 = *(ulonglong *)(lVar15 + 0x30);
            psVar11 = *(string **)(lVar15 + 0x28);
            if (0x3fffffffffffffff - uVar17 < uVar10) {
                    // WARNING: Subroutine does not return
              __throw_length_error("basic_string::append");
            }
            goto LAB_140043cae;
          }
          break;
        case (string)0x3:
          if (local_f8 != 0) {
            sVar2 = *local_e8;
            if (local_68 == &local_58) {
              uVar10 = 0xf;
            }
            else {
              uVar10 = CONCAT71(uStack_57,local_58);
            }
            if (uVar10 < uVar17 + 1) {
              __cxx11::string::_M_mutate((string *)&local_68,uVar17,0,(undefined1 *)0x0,1);
            }
            goto LAB_140043c25;
          }
          break;
        case (string)0x4:
          psVar11 = local_88;
          uVar10 = local_80;
          if (0x3fffffffffffffff - uVar17 < local_80) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
LAB_140043cae:
          __cxx11::string::_M_append((string *)&local_68,psVar11,uVar10);
          uVar17 = local_60;
        }
        psVar13 = psVar13 + 1;
      } while (psVar13 != (string *)&local_88);
      if (1 < local_f8) {
        if (0x3fffffffffffffff - uVar17 < local_f8 - 1) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
        __cxx11::string::_M_append((string *)&local_68,local_e8 + 1,local_f8 - 1);
        uVar17 = local_60;
      }
      if (uVar17 < uVar12) {
        if (uVar16 == 0x20) {
          __cxx11::string::_M_replace_aux((string *)&local_68,uVar17,0,uVar12 - uVar17,param_5);
          uVar17 = uVar12;
        }
        else {
          __cxx11::string::_M_replace_aux((string *)&local_68,0,0,uVar12 - uVar17,param_5);
          uVar17 = uVar12;
        }
      }
      cVar14 = (char)uVar18;
      if ((cVar14 == '\0') &&
         (lVar5 = (**(code **)(*plVar3 + 0x60))(plVar3,local_68,(longlong)(int)uVar17),
         (int)uVar17 != lVar5)) {
        cVar14 = '\x01';
      }
      uVar18 = CONCAT71((int7)((ulonglong)uVar18 >> 8),cVar14);
      if (local_68 != &local_58) {
        operator_delete(local_68);
      }
      if (local_88 != &local_78) {
        operator_delete(local_88);
      }
    }
  }
LAB_140043927:
  *(undefined8 *)(param_4 + 0x10) = 0;
  param_1[1] = uVar18;
  *param_1 = plVar3;
  return param_1;
}



// std::ostreambuf_iterator<char, std::char_traits<char> > std::__cxx11::money_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> >
// >::_M_insert<true>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char,
// std::__cxx11::string const&) const

undefined8 *
std::__cxx11::money_put<>::_M_insert<true>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          string param_5,undefined8 *param_6)

{
  longlong *plVar1;
  string sVar2;
  longlong *plVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  undefined1 *puVar7;
  __moneypunct_cache<char,true> *this;
  bool bVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  string *psVar11;
  ulonglong uVar12;
  string *psVar13;
  char cVar14;
  longlong lVar15;
  uint uVar16;
  ulonglong uVar17;
  undefined8 uVar18;
  int iVar19;
  ulonglong local_f8;
  string *local_e8;
  ulonglong local_d8;
  size_t local_b8;
  undefined4 local_8c;
  string *local_88;
  ulonglong local_80;
  string local_78;
  undefined7 uStack_77;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  plVar3 = (longlong *)*param_3;
  uVar18 = param_3[1];
  lVar5 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar5 = *(longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar5 * 8);
  if (lVar5 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar6 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar6 * 8);
  lVar15 = *plVar1;
  if (lVar15 == 0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
    this[0x20] = (__moneypunct_cache<char,true>)0x0;
    *(undefined2 *)(this + 0x21) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,true>)0x0;
    __moneypunct_cache<char,true>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar6);
    lVar15 = *plVar1;
  }
  psVar13 = (string *)*param_6;
  if (*psVar13 == *(string *)(lVar15 + 100)) {
    local_8c = *(undefined4 *)(lVar15 + 0x60);
    local_e8 = *(string **)(lVar15 + 0x48);
    local_f8 = *(ulonglong *)(lVar15 + 0x50);
    if (param_6[1] == 0) goto LAB_1400441f7;
    psVar13 = psVar13 + 1;
  }
  else {
    local_8c = *(undefined4 *)(lVar15 + 0x5c);
    local_e8 = *(string **)(lVar15 + 0x38);
    local_f8 = *(ulonglong *)(lVar15 + 0x40);
  }
  if (psVar13 < psVar13 + param_6[1]) {
    psVar11 = psVar13;
    do {
      if ((*(byte *)(*(longlong *)(lVar5 + 0x30) + (ulonglong)(byte)*psVar11 * 2) & 8) == 0) break;
      psVar11 = psVar11 + 1;
    } while (psVar13 + param_6[1] != psVar11);
    uVar12 = (longlong)psVar11 - (longlong)psVar13;
    if (uVar12 != 0) {
      local_80 = 0;
      local_78 = (string)0x0;
      local_88 = &local_78;
      __cxx11::string::reserve((string *)&local_88,uVar12 * 2);
      iVar4 = *(int *)(lVar15 + 0x58);
      iVar19 = (int)uVar12 - iVar4;
      if (0 < iVar19) {
        if (iVar4 < 0) {
          iVar19 = (int)uVar12;
        }
        if (*(longlong *)(lVar15 + 0x18) == 0) {
          __cxx11::string::_M_replace((string *)&local_88,0,local_80,psVar13,(longlong)iVar19);
          iVar4 = *(int *)(lVar15 + 0x58);
        }
        else {
          __cxx11::string::_M_replace_aux
                    ((string *)&local_88,0,local_80,(longlong)(iVar19 * 2),(string)0x0);
          puVar7 = __add_grouping<char>
                             (local_88,*(undefined1 *)(lVar15 + 0x22),*(byte **)(lVar15 + 0x10),
                              *(longlong *)(lVar15 + 0x18),(longlong)psVar13,
                              (longlong)(psVar13 + iVar19));
          uVar17 = (longlong)puVar7 - (longlong)local_88;
          if (local_80 < uVar17) {
                    // WARNING: Subroutine does not return
            __throw_out_of_range_fmt
                      ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5494,uVar17,
                       local_80);
          }
          *puVar7 = 0;
          iVar4 = *(int *)(lVar15 + 0x58);
          local_80 = uVar17;
        }
      }
      uVar17 = local_80;
      if (0 < iVar4) {
        sVar2 = *(string *)(lVar15 + 0x21);
        uVar10 = local_80 + 1;
        if (local_88 == &local_78) {
          uVar9 = 0xf;
        }
        else {
          uVar9 = CONCAT71(uStack_77,local_78);
        }
        if (uVar9 < uVar10) {
          __cxx11::string::_M_mutate((string *)&local_88,local_80,0,(undefined1 *)0x0,1);
        }
        local_88[uVar17] = sVar2;
        local_88[uVar17 + 1] = (string)0x0;
        local_80 = uVar10;
        if (iVar19 < 0) {
          __cxx11::string::_M_replace_aux
                    ((string *)&local_88,uVar10,0,(longlong)-iVar19,*(string *)(lVar15 + 0x65));
          if (0x3fffffffffffffff - local_80 < uVar12) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
        }
        else {
          uVar12 = (ulonglong)*(int *)(lVar15 + 0x58);
          psVar13 = psVar13 + iVar19;
          if (0x3fffffffffffffff - uVar10 < uVar12) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
        }
        __cxx11::string::_M_append((string *)&local_88,psVar13,uVar12);
      }
      uVar16 = *(uint *)(param_4 + 0x18) & 0xb0;
      local_d8 = local_80 + local_f8;
      if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
        local_d8 = local_d8 + *(longlong *)(lVar15 + 0x30);
      }
      local_60 = 0;
      local_58 = 0;
      local_68 = &local_58;
      __cxx11::string::reserve((string *)&local_68,local_d8 * 2);
      uVar12 = *(ulonglong *)(param_4 + 0x10);
      psVar13 = (string *)&local_8c;
      bVar8 = uVar16 == 0x10 && local_d8 < uVar12;
      uVar17 = local_60;
      do {
        switch(*psVar13) {
        case (string)0x0:
          if (bVar8) {
LAB_14004452a:
            __cxx11::string::_M_replace_aux((string *)&local_68,uVar17,0,uVar12 - local_d8,param_5);
            uVar17 = local_60;
          }
          break;
        case (string)0x1:
          if (bVar8) goto LAB_14004452a;
          if (local_68 == &local_58) {
            uVar10 = 0xf;
          }
          else {
            uVar10 = CONCAT71(uStack_57,local_58);
          }
          sVar2 = param_5;
          if (uVar10 < uVar17 + 1) {
            __cxx11::string::_M_mutate((string *)&local_68,uVar17,0,(undefined1 *)0x0,1);
          }
LAB_1400444f5:
          local_b8 = uVar17 + 1;
          *(string *)(local_68 + uVar17) = sVar2;
          local_60 = local_b8;
          local_68[local_b8] = 0;
          uVar17 = local_b8;
          break;
        case (string)0x2:
          if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
            uVar10 = *(ulonglong *)(lVar15 + 0x30);
            psVar11 = *(string **)(lVar15 + 0x28);
            if (0x3fffffffffffffff - uVar17 < uVar10) {
                    // WARNING: Subroutine does not return
              __throw_length_error("basic_string::append");
            }
            goto LAB_14004457e;
          }
          break;
        case (string)0x3:
          if (local_f8 != 0) {
            sVar2 = *local_e8;
            if (local_68 == &local_58) {
              uVar10 = 0xf;
            }
            else {
              uVar10 = CONCAT71(uStack_57,local_58);
            }
            if (uVar10 < uVar17 + 1) {
              __cxx11::string::_M_mutate((string *)&local_68,uVar17,0,(undefined1 *)0x0,1);
            }
            goto LAB_1400444f5;
          }
          break;
        case (string)0x4:
          psVar11 = local_88;
          uVar10 = local_80;
          if (0x3fffffffffffffff - uVar17 < local_80) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
LAB_14004457e:
          __cxx11::string::_M_append((string *)&local_68,psVar11,uVar10);
          uVar17 = local_60;
        }
        psVar13 = psVar13 + 1;
      } while (psVar13 != (string *)&local_88);
      if (1 < local_f8) {
        if (0x3fffffffffffffff - uVar17 < local_f8 - 1) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
        __cxx11::string::_M_append((string *)&local_68,local_e8 + 1,local_f8 - 1);
        uVar17 = local_60;
      }
      if (uVar17 < uVar12) {
        if (uVar16 == 0x20) {
          __cxx11::string::_M_replace_aux((string *)&local_68,uVar17,0,uVar12 - uVar17,param_5);
          uVar17 = uVar12;
        }
        else {
          __cxx11::string::_M_replace_aux((string *)&local_68,0,0,uVar12 - uVar17,param_5);
          uVar17 = uVar12;
        }
      }
      cVar14 = (char)uVar18;
      if ((cVar14 == '\0') &&
         (lVar5 = (**(code **)(*plVar3 + 0x60))(plVar3,local_68,(longlong)(int)uVar17),
         (int)uVar17 != lVar5)) {
        cVar14 = '\x01';
      }
      uVar18 = CONCAT71((int7)((ulonglong)uVar18 >> 8),cVar14);
      if (local_68 != &local_58) {
        operator_delete(local_68);
      }
      if (local_88 != &local_78) {
        operator_delete(local_88);
      }
    }
  }
LAB_1400441f7:
  *(undefined8 *)(param_4 + 0x10) = 0;
  param_1[1] = uVar18;
  *param_1 = plVar3;
  return param_1;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, std::__cxx11::wstring const&) const

undefined8 *
std::__cxx11::money_put<>::put
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,char param_4,longlong param_5,
          undefined2 param_6,undefined8 *param_7)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x18) != do_put) {
    (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_28,param_4,param_5,param_6,param_7);
    return param_1;
  }
  if (param_4 == '\0') {
    _M_insert<false>(param_1,param_2,&local_28,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<true>(param_1,param_2,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, long double) const

undefined8
std::__cxx11::money_put<>::put
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,undefined2 param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,param_4,param_5,param_6,local_28);
  return param_1;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, std::__cxx11::wstring const&) const

undefined8 *
std::__cxx11::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,char param_4,longlong param_5,
          undefined2 param_6,undefined8 *param_7)

{
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  if (param_4 != '\0') {
    _M_insert<true>(param_1,param_2,&local_18,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<false>(param_1,param_2,&local_18,param_5,param_6,param_7);
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, long double) const

undefined8 *
std::__cxx11::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined4 param_4,
          longlong param_5,uint param_6,undefined1 (*param_7) [10])

{
  longlong *plVar1;
  code *pcVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  uint uVar5;
  undefined1 *puVar6;
  int iVar7;
  longlong lVar8;
  undefined1 *puVar9;
  char *pcVar10;
  bool bVar11;
  undefined8 uStack_140;
  undefined1 auStack_138 [32];
  undefined4 local_118 [2];
  undefined1 (*local_110) [10];
  char local_108 [8];
  undefined *puStack_100;
  int local_c4;
  uint local_c0;
  undefined4 local_bc;
  undefined1 local_b8 [10];
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined1 local_98 [2] [10];
  longlong local_80;
  undefined1 *local_78 [2];
  undefined1 local_68 [40];
  
  uVar3 = *param_3;
  uVar4 = param_3[1];
  local_c0 = param_6;
  local_b8 = *param_7;
  puStack_100 = (undefined *)0x140044bbe;
  local_bc = param_4;
  locale::locale((locale *)&local_80,(undefined8 *)(param_5 + 0xd0));
  puStack_100 = (undefined *)0x140044bca;
  lVar8 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar1 = *(longlong **)(*(longlong *)(local_80 + 8) + lVar8 * 8);
  if (plVar1 != (longlong *)0x0) {
    puVar9 = auStack_138;
    pcVar10 = local_108;
    uStack_140 = 0x140044bf3;
    local_78[0] = (undefined1 *)locale::facet::_S_get_c_locale();
    local_98[0] = local_b8;
    local_118[0] = 0;
    uStack_140 = 0x140044c2a;
    local_110 = local_98;
    iVar7 = __convert_from_v((wstring *)local_78,pcVar10,0x40,"%.*Lf");
    if (0x3f < iVar7) {
      local_c4 = iVar7 + 1;
      uStack_140 = 0x140044ce5;
      lVar8 = -((longlong)local_c4 + 0xfU & 0xfffffffffffffff0);
      puVar9 = auStack_138 + lVar8;
      pcVar10 = local_108 + lVar8;
      *(undefined8 *)(auStack_138 + lVar8 + -8) = 0x140044cf5;
      local_78[0] = (undefined1 *)locale::facet::_S_get_c_locale();
      local_98[0] = local_b8;
      *(undefined1 (**) [10])(local_108 + lVar8 + -8) = local_98;
      *(undefined4 *)((longlong)local_118 + lVar8) = 0;
      iVar7 = local_c4;
      *(undefined8 *)(auStack_138 + lVar8 + -8) = 0x140044d22;
      iVar7 = __convert_from_v((wstring *)local_78,pcVar10,iVar7,"%.*Lf");
    }
    local_78[0] = local_68;
    *(undefined8 *)(puVar9 + -8) = 0x140044c4c;
    __cxx11::wstring::_M_construct((wstring *)local_78,(longlong)iVar7,0);
    puVar6 = local_78[0];
    pcVar2 = *(code **)(*plVar1 + 0x58);
    *(undefined8 *)(puVar9 + -8) = 0x140044c60;
    (*pcVar2)(plVar1,pcVar10,pcVar10 + iVar7,puVar6);
    uVar5 = local_c0;
    bVar11 = (char)local_bc == '\0';
    local_a8 = uVar3;
    uStack_a0 = uVar4;
    *(wstring **)(puVar9 + 0x28) = (wstring *)local_78;
    *(uint *)(puVar9 + 0x20) = uVar5 & 0xffff;
    if (bVar11) {
      *(undefined8 *)(puVar9 + -8) = 0x140044c8e;
      _M_insert<false>(param_1,param_2,&local_a8,param_5,*(undefined2 *)(puVar9 + 0x20),
                       *(undefined8 **)(puVar9 + 0x28));
    }
    else {
      *(undefined8 *)(puVar9 + -8) = 0x140044cc5;
      _M_insert<true>(param_1,param_2,&local_a8,param_5,*(undefined2 *)(puVar9 + 0x20),
                      *(undefined8 **)(puVar9 + 0x28));
    }
    puVar6 = local_78[0];
    if (local_78[0] != local_68) {
      *(undefined8 *)(puVar9 + -8) = 0x140044c9c;
      operator_delete(puVar6);
    }
    *(undefined8 *)(puVar9 + -8) = 0x140044ca4;
    locale::~locale((locale *)&local_80);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  puStack_100 = &UNK_140044d2c;
  __throw_bad_cast();
}



// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::__cxx11::money_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_insert<false>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, wchar_t, std::__cxx11::wstring const&) const

undefined8 *
std::__cxx11::money_put<>::_M_insert<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined2 param_5,undefined8 *param_6)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong *plVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  undefined2 *puVar7;
  __moneypunct_cache<> *this;
  ulonglong uVar8;
  bool bVar9;
  undefined2 uVar10;
  undefined2 *puVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  char cVar14;
  undefined8 uVar15;
  uint uVar16;
  wstring *pwVar17;
  ulonglong uVar18;
  int iVar19;
  ulonglong local_f8;
  undefined2 *local_e0;
  ulonglong local_d8;
  ulonglong local_b8;
  undefined4 local_8c;
  undefined2 *local_88;
  ulonglong local_80;
  undefined2 local_78;
  undefined6 uStack_76;
  undefined2 *local_68;
  ulonglong local_60;
  undefined2 local_58;
  undefined6 uStack_56;
  
  plVar2 = (longlong *)*param_3;
  uVar15 = param_3[1];
  lVar5 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar5 * 8);
  if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar6 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar6 * 8);
  lVar5 = *plVar1;
  if (lVar5 == 0) {
    this = operator_new(0x80);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
    this[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(this + 0x22) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar6);
    lVar5 = *plVar1;
  }
  pwVar17 = (wstring *)*param_6;
  if (*(short *)pwVar17 == *(short *)(lVar5 + 100)) {
    local_8c = *(undefined4 *)(lVar5 + 0x60);
    local_e0 = *(undefined2 **)(lVar5 + 0x48);
    local_f8 = *(ulonglong *)(lVar5 + 0x50);
    if (param_6[1] != 0) {
      pwVar17 = pwVar17 + 2;
    }
  }
  else {
    local_8c = *(undefined4 *)(lVar5 + 0x5c);
    local_f8 = *(ulonglong *)(lVar5 + 0x40);
    local_e0 = *(undefined2 **)(lVar5 + 0x38);
  }
  lVar6 = (**(code **)(*plVar3 + 0x28))(plVar3,8);
  uVar8 = lVar6 - (longlong)pwVar17 >> 1;
  if (uVar8 != 0) {
    local_80 = 0;
    local_78 = 0;
    local_88 = &local_78;
    __cxx11::wstring::reserve((wstring *)&local_88,lVar6 - (longlong)pwVar17);
    iVar4 = *(int *)(lVar5 + 0x58);
    iVar19 = (int)uVar8 - iVar4;
    if (0 < iVar19) {
      if (iVar4 < 0) {
        iVar19 = (int)uVar8;
      }
      if (*(longlong *)(lVar5 + 0x18) == 0) {
        __cxx11::wstring::_M_replace((wstring *)&local_88,0,local_80,pwVar17,(longlong)iVar19);
        iVar4 = *(int *)(lVar5 + 0x58);
      }
      else {
        __cxx11::wstring::_M_replace_aux((wstring *)&local_88,0,local_80,(longlong)(iVar19 * 2),0);
        puVar11 = local_88;
        puVar7 = __add_grouping<wchar_t>
                           (local_88,*(undefined2 *)(lVar5 + 0x24),*(byte **)(lVar5 + 0x10),
                            *(longlong *)(lVar5 + 0x18),(longlong)pwVar17,
                            (longlong)(pwVar17 + iVar19 * 2));
        uVar18 = (longlong)puVar7 - (longlong)puVar11 >> 1;
        if (local_80 < uVar18) {
                    // WARNING: Subroutine does not return
          __throw_out_of_range_fmt
                    ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5824,uVar18,
                     local_80);
        }
        *(undefined2 *)((longlong)local_88 + ((longlong)puVar7 - (longlong)puVar11)) = 0;
        iVar4 = *(int *)(lVar5 + 0x58);
        local_80 = uVar18;
      }
    }
    uVar18 = local_80;
    if (0 < iVar4) {
      uVar10 = *(undefined2 *)(lVar5 + 0x22);
      uVar13 = local_80 + 1;
      if (local_88 == &local_78) {
        uVar12 = 7;
      }
      else {
        uVar12 = CONCAT62(uStack_76,local_78);
      }
      if (uVar12 < uVar13) {
        __cxx11::wstring::_M_mutate((wstring *)&local_88,local_80,0,(undefined2 *)0x0,1);
      }
      local_88[uVar18] = uVar10;
      local_88[uVar18 + 1] = 0;
      local_80 = uVar13;
      if (iVar19 < 0) {
        __cxx11::wstring::_M_replace_aux
                  ((wstring *)&local_88,uVar13,0,(longlong)-iVar19,*(undefined2 *)(lVar5 + 0x66));
        if (0x1fffffffffffffff - local_80 < uVar8) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
      }
      else {
        uVar8 = (ulonglong)*(int *)(lVar5 + 0x58);
        pwVar17 = pwVar17 + (longlong)iVar19 * 2;
        if (0x1fffffffffffffff - uVar13 < uVar8) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
      }
      __cxx11::wstring::_M_append((wstring *)&local_88,(undefined2 *)pwVar17,uVar8);
    }
    uVar16 = *(uint *)(param_4 + 0x18) & 0xb0;
    local_d8 = local_f8 + local_80;
    if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
      local_d8 = local_d8 + *(longlong *)(lVar5 + 0x30);
    }
    local_60 = 0;
    local_58 = 0;
    local_68 = &local_58;
    __cxx11::wstring::reserve((wstring *)&local_68,local_d8 * 2);
    uVar8 = *(ulonglong *)(param_4 + 0x10);
    pwVar17 = (wstring *)&local_8c;
    bVar9 = uVar16 == 0x10 && local_d8 < uVar8;
    uVar18 = local_60;
    do {
      switch(*pwVar17) {
      case (wstring)0x0:
        if (bVar9) {
LAB_140045172:
          __cxx11::wstring::_M_replace_aux((wstring *)&local_68,uVar18,0,uVar8 - local_d8,param_5);
          uVar18 = local_60;
        }
        break;
      case (wstring)0x1:
        if (bVar9) goto LAB_140045172;
        if (local_68 == &local_58) {
          uVar13 = 7;
        }
        else {
          uVar13 = CONCAT62(uStack_56,local_58);
        }
        uVar10 = param_5;
        if (uVar13 < uVar18 + 1) {
          __cxx11::wstring::_M_mutate((wstring *)&local_68,uVar18,0,(undefined2 *)0x0,1);
        }
LAB_140045143:
        local_b8 = uVar18 + 1;
        local_68[uVar18] = uVar10;
        local_60 = local_b8;
        local_68[uVar18 + 1] = 0;
        uVar18 = local_b8;
        break;
      case (wstring)0x2:
        if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
          uVar13 = *(ulonglong *)(lVar5 + 0x30);
          puVar11 = *(undefined2 **)(lVar5 + 0x28);
          if (0x1fffffffffffffff - uVar18 < uVar13) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
          goto LAB_1400451c6;
        }
        break;
      case (wstring)0x3:
        if (local_f8 != 0) {
          uVar10 = *local_e0;
          if (local_68 == &local_58) {
            uVar13 = 7;
          }
          else {
            uVar13 = CONCAT62(uStack_56,local_58);
          }
          if (uVar13 < uVar18 + 1) {
            __cxx11::wstring::_M_mutate((wstring *)&local_68,uVar18,0,(undefined2 *)0x0,1);
          }
          goto LAB_140045143;
        }
        break;
      case (wstring)0x4:
        puVar11 = local_88;
        uVar13 = local_80;
        if (0x1fffffffffffffff - uVar18 < local_80) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
LAB_1400451c6:
        __cxx11::wstring::_M_append((wstring *)&local_68,puVar11,uVar13);
        uVar18 = local_60;
      }
      pwVar17 = pwVar17 + 1;
    } while (pwVar17 != (wstring *)&local_88);
    if (1 < local_f8) {
      if (0x1fffffffffffffff - uVar18 < local_f8 - 1) {
                    // WARNING: Subroutine does not return
        __throw_length_error("basic_string::append");
      }
      __cxx11::wstring::_M_append((wstring *)&local_68,local_e0 + 1,local_f8 - 1);
      uVar18 = local_60;
    }
    if (uVar18 < uVar8) {
      if (uVar16 == 0x20) {
        __cxx11::wstring::_M_replace_aux((wstring *)&local_68,uVar18,0,uVar8 - uVar18,param_5);
        uVar18 = uVar8;
      }
      else {
        __cxx11::wstring::_M_replace_aux((wstring *)&local_68,0,0,uVar8 - uVar18,param_5);
        uVar18 = uVar8;
      }
    }
    cVar14 = (char)uVar15;
    if ((cVar14 == '\0') &&
       (lVar5 = (**(code **)(*plVar2 + 0x60))(plVar2,local_68,(longlong)(int)uVar18),
       (int)uVar18 != lVar5)) {
      cVar14 = '\x01';
    }
    uVar15 = CONCAT71((int7)((ulonglong)uVar15 >> 8),cVar14);
    if (local_68 != &local_58) {
      operator_delete(local_68);
    }
    if (local_88 != &local_78) {
      operator_delete(local_88);
    }
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  param_1[1] = uVar15;
  *param_1 = plVar2;
  return param_1;
}



// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::__cxx11::money_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_insert<true>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// wchar_t, std::__cxx11::wstring const&) const

undefined8 *
std::__cxx11::money_put<>::_M_insert<true>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined2 param_5,undefined8 *param_6)

{
  longlong *plVar1;
  longlong *plVar2;
  longlong *plVar3;
  int iVar4;
  longlong lVar5;
  longlong lVar6;
  undefined2 *puVar7;
  __moneypunct_cache<> *this;
  ulonglong uVar8;
  bool bVar9;
  undefined2 uVar10;
  undefined2 *puVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  char cVar14;
  undefined8 uVar15;
  uint uVar16;
  wstring *pwVar17;
  ulonglong uVar18;
  int iVar19;
  ulonglong local_f8;
  undefined2 *local_e0;
  ulonglong local_d8;
  ulonglong local_b8;
  undefined4 local_8c;
  undefined2 *local_88;
  ulonglong local_80;
  undefined2 local_78;
  undefined6 uStack_76;
  undefined2 *local_68;
  ulonglong local_60;
  undefined2 local_58;
  undefined6 uStack_56;
  
  plVar2 = (longlong *)*param_3;
  uVar15 = param_3[1];
  lVar5 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar5 * 8);
  if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar6 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar6 * 8);
  lVar5 = *plVar1;
  if (lVar5 == 0) {
    this = operator_new(0x80);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dde30;
    this[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(this + 0x22) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar6);
    lVar5 = *plVar1;
  }
  pwVar17 = (wstring *)*param_6;
  if (*(short *)pwVar17 == *(short *)(lVar5 + 100)) {
    local_8c = *(undefined4 *)(lVar5 + 0x60);
    local_e0 = *(undefined2 **)(lVar5 + 0x48);
    local_f8 = *(ulonglong *)(lVar5 + 0x50);
    if (param_6[1] != 0) {
      pwVar17 = pwVar17 + 2;
    }
  }
  else {
    local_8c = *(undefined4 *)(lVar5 + 0x5c);
    local_f8 = *(ulonglong *)(lVar5 + 0x40);
    local_e0 = *(undefined2 **)(lVar5 + 0x38);
  }
  lVar6 = (**(code **)(*plVar3 + 0x28))(plVar3,8);
  uVar8 = lVar6 - (longlong)pwVar17 >> 1;
  if (uVar8 != 0) {
    local_80 = 0;
    local_78 = 0;
    local_88 = &local_78;
    __cxx11::wstring::reserve((wstring *)&local_88,lVar6 - (longlong)pwVar17);
    iVar4 = *(int *)(lVar5 + 0x58);
    iVar19 = (int)uVar8 - iVar4;
    if (0 < iVar19) {
      if (iVar4 < 0) {
        iVar19 = (int)uVar8;
      }
      if (*(longlong *)(lVar5 + 0x18) == 0) {
        __cxx11::wstring::_M_replace((wstring *)&local_88,0,local_80,pwVar17,(longlong)iVar19);
        iVar4 = *(int *)(lVar5 + 0x58);
      }
      else {
        __cxx11::wstring::_M_replace_aux((wstring *)&local_88,0,local_80,(longlong)(iVar19 * 2),0);
        puVar11 = local_88;
        puVar7 = __add_grouping<wchar_t>
                           (local_88,*(undefined2 *)(lVar5 + 0x24),*(byte **)(lVar5 + 0x10),
                            *(longlong *)(lVar5 + 0x18),(longlong)pwVar17,
                            (longlong)(pwVar17 + iVar19 * 2));
        uVar18 = (longlong)puVar7 - (longlong)puVar11 >> 1;
        if (local_80 < uVar18) {
                    // WARNING: Subroutine does not return
          __throw_out_of_range_fmt
                    ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5824,uVar18,
                     local_80);
        }
        *(undefined2 *)((longlong)local_88 + ((longlong)puVar7 - (longlong)puVar11)) = 0;
        iVar4 = *(int *)(lVar5 + 0x58);
        local_80 = uVar18;
      }
    }
    uVar18 = local_80;
    if (0 < iVar4) {
      uVar10 = *(undefined2 *)(lVar5 + 0x22);
      uVar13 = local_80 + 1;
      if (local_88 == &local_78) {
        uVar12 = 7;
      }
      else {
        uVar12 = CONCAT62(uStack_76,local_78);
      }
      if (uVar12 < uVar13) {
        __cxx11::wstring::_M_mutate((wstring *)&local_88,local_80,0,(undefined2 *)0x0,1);
      }
      local_88[uVar18] = uVar10;
      local_88[uVar18 + 1] = 0;
      local_80 = uVar13;
      if (iVar19 < 0) {
        __cxx11::wstring::_M_replace_aux
                  ((wstring *)&local_88,uVar13,0,(longlong)-iVar19,*(undefined2 *)(lVar5 + 0x66));
        if (0x1fffffffffffffff - local_80 < uVar8) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
      }
      else {
        uVar8 = (ulonglong)*(int *)(lVar5 + 0x58);
        pwVar17 = pwVar17 + (longlong)iVar19 * 2;
        if (0x1fffffffffffffff - uVar13 < uVar8) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
      }
      __cxx11::wstring::_M_append((wstring *)&local_88,(undefined2 *)pwVar17,uVar8);
    }
    uVar16 = *(uint *)(param_4 + 0x18) & 0xb0;
    local_d8 = local_f8 + local_80;
    if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
      local_d8 = local_d8 + *(longlong *)(lVar5 + 0x30);
    }
    local_60 = 0;
    local_58 = 0;
    local_68 = &local_58;
    __cxx11::wstring::reserve((wstring *)&local_68,local_d8 * 2);
    uVar8 = *(ulonglong *)(param_4 + 0x10);
    pwVar17 = (wstring *)&local_8c;
    bVar9 = uVar16 == 0x10 && local_d8 < uVar8;
    uVar18 = local_60;
    do {
      switch(*pwVar17) {
      case (wstring)0x0:
        if (bVar9) {
LAB_140045a62:
          __cxx11::wstring::_M_replace_aux((wstring *)&local_68,uVar18,0,uVar8 - local_d8,param_5);
          uVar18 = local_60;
        }
        break;
      case (wstring)0x1:
        if (bVar9) goto LAB_140045a62;
        if (local_68 == &local_58) {
          uVar13 = 7;
        }
        else {
          uVar13 = CONCAT62(uStack_56,local_58);
        }
        uVar10 = param_5;
        if (uVar13 < uVar18 + 1) {
          __cxx11::wstring::_M_mutate((wstring *)&local_68,uVar18,0,(undefined2 *)0x0,1);
        }
LAB_140045a33:
        local_b8 = uVar18 + 1;
        local_68[uVar18] = uVar10;
        local_60 = local_b8;
        local_68[uVar18 + 1] = 0;
        uVar18 = local_b8;
        break;
      case (wstring)0x2:
        if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
          uVar13 = *(ulonglong *)(lVar5 + 0x30);
          puVar11 = *(undefined2 **)(lVar5 + 0x28);
          if (0x1fffffffffffffff - uVar18 < uVar13) {
                    // WARNING: Subroutine does not return
            __throw_length_error("basic_string::append");
          }
          goto LAB_140045ab6;
        }
        break;
      case (wstring)0x3:
        if (local_f8 != 0) {
          uVar10 = *local_e0;
          if (local_68 == &local_58) {
            uVar13 = 7;
          }
          else {
            uVar13 = CONCAT62(uStack_56,local_58);
          }
          if (uVar13 < uVar18 + 1) {
            __cxx11::wstring::_M_mutate((wstring *)&local_68,uVar18,0,(undefined2 *)0x0,1);
          }
          goto LAB_140045a33;
        }
        break;
      case (wstring)0x4:
        puVar11 = local_88;
        uVar13 = local_80;
        if (0x1fffffffffffffff - uVar18 < local_80) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
LAB_140045ab6:
        __cxx11::wstring::_M_append((wstring *)&local_68,puVar11,uVar13);
        uVar18 = local_60;
      }
      pwVar17 = pwVar17 + 1;
    } while (pwVar17 != (wstring *)&local_88);
    if (1 < local_f8) {
      if (0x1fffffffffffffff - uVar18 < local_f8 - 1) {
                    // WARNING: Subroutine does not return
        __throw_length_error("basic_string::append");
      }
      __cxx11::wstring::_M_append((wstring *)&local_68,local_e0 + 1,local_f8 - 1);
      uVar18 = local_60;
    }
    if (uVar18 < uVar8) {
      if (uVar16 == 0x20) {
        __cxx11::wstring::_M_replace_aux((wstring *)&local_68,uVar18,0,uVar8 - uVar18,param_5);
        uVar18 = uVar8;
      }
      else {
        __cxx11::wstring::_M_replace_aux((wstring *)&local_68,0,0,uVar8 - uVar18,param_5);
        uVar18 = uVar8;
      }
    }
    cVar14 = (char)uVar15;
    if ((cVar14 == '\0') &&
       (lVar5 = (**(code **)(*plVar2 + 0x60))(plVar2,local_68,(longlong)(int)uVar18),
       (int)uVar18 != lVar5)) {
      cVar14 = '\x01';
    }
    uVar15 = CONCAT71((int7)((ulonglong)uVar15 >> 8),cVar14);
    if (local_68 != &local_58) {
      operator_delete(local_68);
    }
    if (local_88 != &local_78) {
      operator_delete(local_88);
    }
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  param_1[1] = uVar15;
  *param_1 = plVar2;
  return param_1;
}



// std::codecvt<char32_t, char8_t, int>::do_in(int&, char8_t const*, char8_t const*, char8_t
// const*&, char32_t*, char32_t*, char32_t*&) const

undefined1 __thiscall
std::codecvt<>::do_in
          (codecvt<> *this,undefined8 param_2_00,longlong param_2,longlong param_3,longlong *param_4
          ,uint *param_5,uint *param_6,longlong *param_7)

{
  uint uVar1;
  longlong *plVar2;
  undefined1 uVar3;
  longlong local_28;
  longlong local_20;
  
  plVar2 = &local_28;
  local_28 = param_2;
  local_20 = param_3;
  do {
    if (local_28 == param_3) {
      uVar3 = param_3 != param_2;
LAB_140045fa5:
      *param_4 = local_28;
      *param_7 = (longlong)param_5;
      return uVar3;
    }
    if (param_6 == param_5) {
      uVar3 = param_3 != local_28;
      goto LAB_140045fa5;
    }
    uVar1 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIDuEEDiRNS_5rangeIKT_Lb1EEEm
                      (plVar2,0x10ffff);
    if (uVar1 == 0xfffffffe) {
      uVar3 = 1;
      goto LAB_140045fa5;
    }
    if (0x10ffff < uVar1) {
      uVar3 = 2;
      goto LAB_140045fa5;
    }
    *param_5 = uVar1;
    param_2 = param_3;
    param_5 = param_5 + 1;
  } while( true );
}



// std::codecvt<char32_t, char8_t, int>::do_out(int&, char32_t const*, char32_t const*, char32_t
// const*&, char8_t*, char8_t*, char8_t*&) const

undefined8 __thiscall
std::codecvt<>::do_out
          (codecvt<> *this,undefined8 param_2_00,uint *param_2,uint *param_3,undefined8 *param_4,
          longlong param_5,undefined8 param_6,longlong *param_7)

{
  undefined8 uVar1;
  longlong *plVar2;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  if (param_2 == param_3) {
    uVar1 = 0;
  }
  else {
    plVar2 = &local_18;
    do {
      if (0x10ffff < *param_2) {
        uVar1 = 2;
        goto LAB_14004604a;
      }
      uVar1 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIDuEEbRNS_5rangeIT_Lb1EEEDi
                        (plVar2,*param_2);
      if ((char)uVar1 == '\0') {
        uVar1 = 1;
        goto LAB_14004604a;
      }
      param_2 = param_2 + 1;
    } while (param_3 != param_2);
    uVar1 = 0;
  }
LAB_14004604a:
  *param_4 = param_2;
  *param_7 = local_18;
  return uVar1;
}



// std::codecvt<char32_t, char8_t, int>::do_length(int&, char8_t const*, char8_t const*, unsigned
// long long) const

int std::codecvt<>::do_length
              (undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
              longlong param_5)

{
  uint uVar1;
  undefined8 *puVar2;
  undefined8 local_28;
  undefined8 local_20;
  
  if (param_5 != 0) {
    puVar2 = &local_28;
    local_28 = param_3;
    local_20 = param_4;
    do {
      param_5 = param_5 + -1;
      uVar1 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIDuEEDiRNS_5rangeIKT_Lb1EEEm
                        (puVar2,0x10ffff);
    } while (uVar1 < 0x110000 && param_5 != 0);
    return (int)local_28 - (int)param_3;
  }
  return 0;
}



// std::codecvt<char32_t, char, int>::do_in(int&, char const*, char const*, char const*&, char32_t*,
// char32_t*, char32_t*&) const

undefined1 __thiscall
std::codecvt<>::do_in
          (codecvt<> *this,undefined8 param_2_00,longlong param_2,longlong param_3,longlong *param_4
          ,uint *param_5,uint *param_6,longlong *param_7)

{
  uint uVar1;
  longlong *plVar2;
  undefined1 uVar3;
  longlong local_28;
  longlong local_20;
  
  plVar2 = &local_28;
  local_28 = param_2;
  local_20 = param_3;
  do {
    if (local_28 == param_3) {
      uVar3 = param_3 != param_2;
LAB_140046165:
      *param_4 = local_28;
      *param_7 = (longlong)param_5;
      return uVar3;
    }
    if (param_6 == param_5) {
      uVar3 = param_3 != local_28;
      goto LAB_140046165;
    }
    uVar1 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                      (plVar2,0x10ffff);
    if (uVar1 == 0xfffffffe) {
      uVar3 = 1;
      goto LAB_140046165;
    }
    if (0x10ffff < uVar1) {
      uVar3 = 2;
      goto LAB_140046165;
    }
    *param_5 = uVar1;
    param_2 = param_3;
    param_5 = param_5 + 1;
  } while( true );
}



// std::codecvt<char32_t, char, int>::do_out(int&, char32_t const*, char32_t const*, char32_t
// const*&, char*, char*, char*&) const

undefined8 __thiscall
std::codecvt<>::do_out
          (codecvt<> *this,undefined8 param_2_00,uint *param_2,uint *param_3,undefined8 *param_4,
          longlong param_5,undefined8 param_6,longlong *param_7)

{
  undefined8 uVar1;
  longlong *plVar2;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  if (param_2 == param_3) {
    uVar1 = 0;
  }
  else {
    plVar2 = &local_18;
    do {
      if (0x10ffff < *param_2) {
        uVar1 = 2;
        goto LAB_14004620a;
      }
      uVar1 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIcEEbRNS_5rangeIT_Lb1EEEDi
                        (plVar2,*param_2);
      if ((char)uVar1 == '\0') {
        uVar1 = 1;
        goto LAB_14004620a;
      }
      param_2 = param_2 + 1;
    } while (param_3 != param_2);
    uVar1 = 0;
  }
LAB_14004620a:
  *param_4 = param_2;
  *param_7 = local_18;
  return uVar1;
}



// std::codecvt<char32_t, char, int>::do_length(int&, char const*, char const*, unsigned long long)
// const

int std::codecvt<>::do_length
              (undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
              longlong param_5)

{
  uint uVar1;
  undefined8 *puVar2;
  undefined8 local_28;
  undefined8 local_20;
  
  if (param_5 != 0) {
    puVar2 = &local_28;
    local_28 = param_3;
    local_20 = param_4;
    do {
      param_5 = param_5 + -1;
      uVar1 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                        (puVar2,0x10ffff);
    } while (uVar1 < 0x110000 && param_5 != 0);
    return (int)local_28 - (int)param_3;
  }
  return 0;
}



// std::codecvt<char16_t, char8_t, int>::do_unshift(int&, char8_t*, char8_t*, char8_t*&) const

undefined8 __thiscall
std::codecvt<>::do_unshift
          (codecvt<> *this,undefined8 param_2_00,undefined8 param_2,undefined8 param_4_00,
          undefined8 *param_4)

{
  *param_4 = param_2;
  return 3;
}



// std::codecvt<char16_t, char8_t, int>::do_in(int&, char8_t const*, char8_t const*, char8_t
// const*&, char16_t*, char16_t*, char16_t*&) const

undefined1 __thiscall
std::codecvt<>::do_in
          (codecvt<> *this,undefined8 param_2_00,longlong param_2,longlong param_3,longlong *param_4
          ,ushort *param_5,ushort *param_6,longlong *param_7)

{
  longlong lVar1;
  uint uVar2;
  longlong *plVar3;
  undefined1 uVar4;
  longlong local_38;
  longlong local_30;
  
  plVar3 = &local_38;
  lVar1 = param_2;
  local_30 = param_3;
  while ((local_38 = lVar1, lVar1 != param_3 && (param_2 = lVar1, param_6 != param_5))) {
    uVar2 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIDuEEDiRNS_5rangeIKT_Lb1EEEm
                      (plVar3,0x10ffff);
    if (uVar2 == 0xfffffffe) {
      uVar4 = 1;
      goto LAB_140046359;
    }
    if (0x10ffff < uVar2) {
      uVar4 = 2;
      goto LAB_140046359;
    }
    param_2 = param_3;
    if (uVar2 < 0x10000) {
      *param_5 = (ushort)uVar2;
      lVar1 = local_38;
      param_5 = param_5 + 1;
    }
    else {
      if ((ulonglong)((longlong)param_6 - (longlong)param_5) < 3) {
        uVar4 = 1;
        local_38 = lVar1;
        goto LAB_140046359;
      }
      param_5[1] = ((ushort)uVar2 & 0x3ff) + 0xdc00;
      *param_5 = (short)(uVar2 >> 10) + 0xd7c0;
      lVar1 = local_38;
      param_5 = param_5 + 2;
    }
  }
  uVar4 = param_3 != param_2;
LAB_140046359:
  *param_4 = local_38;
  *param_7 = (longlong)param_5;
  return uVar4;
}



// std::codecvt<char16_t, char8_t, int>::do_out(int&, char16_t const*, char16_t const*, char16_t
// const*&, char8_t*, char8_t*, char8_t*&) const

undefined8 __thiscall
std::codecvt<>::do_out
          (codecvt<> *this,undefined8 param_2_00,ushort *param_2,ushort *param_3,longlong *param_4,
          longlong param_5,undefined8 param_6,longlong *param_7)

{
  ushort uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  uVar3 = (longlong)param_3 - (longlong)param_2;
  if (param_2 == param_3) {
    uVar2 = 0;
  }
  else {
    do {
      uVar1 = *param_2;
      if (uVar1 - 0xd800 < 0x400) {
        if (2 < uVar3) {
          if (0x3ff < param_2[1] - 0xdc00) goto LAB_1400464a8;
          lVar4 = 2;
          uVar2 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIDuEEbRNS_5rangeIT_Lb1EEEDi
                            (&local_18,param_2[1] + 0xfca02400 + (uint)uVar1 * 0x400);
          if ((char)uVar2 != '\0') goto LAB_140046446;
        }
LAB_14004647f:
        uVar2 = 1;
        goto LAB_140046489;
      }
      if (uVar1 - 0xdc00 < 0x400) {
LAB_1400464a8:
        uVar2 = 2;
        goto LAB_140046489;
      }
      lVar4 = 1;
      uVar2 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIDuEEbRNS_5rangeIT_Lb1EEEDi
                        (&local_18,(uint)uVar1);
      if ((char)uVar2 == '\0') goto LAB_14004647f;
LAB_140046446:
      param_2 = param_2 + lVar4;
      uVar3 = (longlong)param_3 - (longlong)param_2;
    } while (param_3 != param_2);
    uVar2 = 0;
  }
LAB_140046489:
  *param_4 = (longlong)param_2;
  *param_7 = local_18;
  return uVar2;
}



// std::codecvt<char16_t, char8_t, int>::do_length(int&, char8_t const*, char8_t const*, unsigned
// long long) const

int __thiscall
std::codecvt<>::do_length
          (codecvt<> *this,undefined8 param_2_00,undefined8 param_2,undefined8 param_3,
          ulonglong param_4)

{
  uint uVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined8 local_38;
  undefined8 local_30;
  
  uVar3 = 1;
  local_38 = param_2;
  local_30 = param_3;
  if (1 < param_4) {
    uVar4 = 0;
    puVar2 = &local_38;
    do {
      uVar1 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIDuEEDiRNS_5rangeIKT_Lb1EEEm
                        (puVar2,0x10ffff);
      if (0x10ffff < uVar1) goto LAB_14004651f;
      if (uVar1 < 0x10000) {
        uVar3 = uVar4;
      }
      uVar4 = uVar3 + 1;
      uVar3 = uVar3 + 2;
    } while (uVar3 < param_4);
  }
  if (param_4 == uVar3) {
    _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIDuEEDiRNS_5rangeIKT_Lb1EEEm(&local_38,0xffff);
    return (int)local_38 - (int)param_2;
  }
LAB_14004651f:
  return (int)local_38 - (int)param_2;
}



// std::codecvt<char16_t, char, int>::do_unshift(int&, char*, char*, char*&) const

undefined8 __thiscall
std::codecvt<>::do_unshift
          (codecvt<> *this,undefined8 param_2_00,undefined8 param_2,undefined8 param_4_00,
          undefined8 *param_4)

{
  *param_4 = param_2;
  return 3;
}



// std::codecvt<char16_t, char, int>::do_encoding() const

undefined8 std::codecvt<>::do_encoding(void)

{
  return 0;
}



// std::codecvt<char16_t, char, int>::do_max_length() const

undefined8 std::codecvt<>::do_max_length(void)

{
  return 4;
}



// std::codecvt<char16_t, char, int>::do_always_noconv() const

undefined8 std::codecvt<>::do_always_noconv(void)

{
  return 0;
}



// std::codecvt<char16_t, char, int>::do_in(int&, char const*, char const*, char const*&, char16_t*,
// char16_t*, char16_t*&) const

void __thiscall
std::codecvt<>::do_in
          (codecvt<> *this,undefined8 param_2_00,undefined8 param_2,undefined8 param_3,
          undefined8 *param_4,longlong param_5,undefined8 param_6,longlong *param_7)

{
  undefined8 local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_18utf16_inIcDsEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_mode
            (&local_28,&local_18,0x10ffff,1);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::codecvt<char16_t, char, int>::do_out(int&, char16_t const*, char16_t const*, char16_t
// const*&, char*, char*, char*&) const

void __thiscall
std::codecvt<>::do_out
          (codecvt<> *this,undefined8 param_2_00,longlong param_2,undefined8 param_3,
          longlong *param_4,longlong param_5,undefined8 param_6,longlong *param_7)

{
  longlong local_28;
  undefined8 local_20;
  longlong local_18;
  undefined8 local_10;
  
  local_18 = param_5;
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  _text__ZNSt12_GLOBAL__N_19utf16_outIDscEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_modeNS_10surrogatesE
            (&local_28,&local_18,0x10ffff,0,0);
  *param_4 = local_28;
  *param_7 = local_18;
  return;
}



// std::codecvt<char16_t, char, int>::do_length(int&, char const*, char const*, unsigned long long)
// const

int __thiscall
std::codecvt<>::do_length
          (codecvt<> *this,undefined8 param_2_00,short *param_2,longlong param_3,ulonglong param_4)

{
  short *psVar1;
  
  psVar1 = _text__ZNSt12_GLOBAL__N_110utf16_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                     (param_2,param_3,param_4,0x10ffff,0);
  return (int)psVar1 - (int)param_2;
}



// std::codecvt<char, char, int>::do_unshift(int&, char*, char*, char*&) const

undefined8 __thiscall
std::codecvt<>::do_unshift
          (codecvt<> *this,undefined8 param_2_00,undefined8 param_2,undefined8 param_4_00,
          undefined8 *param_4)

{
  *param_4 = param_2;
  return 3;
}



// std::codecvt<char, char, int>::do_encoding() const

undefined8 std::codecvt<>::do_encoding(void)

{
  return 1;
}



// std::codecvt<char, char, int>::do_always_noconv() const

undefined8 std::codecvt<>::do_always_noconv(void)

{
  return 1;
}



// std::codecvt<char, char, int>::do_out(int&, char const*, char const*, char const*&, char*, char*,
// char*&) const

undefined8 __thiscall
std::codecvt<>::do_out
          (codecvt<> *this,undefined8 param_2_00,undefined8 param_2,undefined8 param_4_00,
          undefined8 *param_4,undefined8 param_5,undefined8 param_6,undefined8 *param_7)

{
  *param_4 = param_2;
  *param_7 = param_5;
  return 3;
}



// std::codecvt<char, char, int>::do_length(int&, char const*, char const*, unsigned long long)
// const

ulonglong __thiscall
std::codecvt<>::do_length
          (codecvt<> *this,undefined8 param_2_00,longlong param_2,longlong param_3,ulonglong param_4
          )

{
  if ((ulonglong)(param_3 - param_2) <= param_4) {
    param_4 = param_3 - param_2;
  }
  return param_4;
}



// std::codecvt<wchar_t, char, int>::do_encoding() const

bool std::codecvt<>::do_encoding(void)

{
  int iVar1;
  
  iVar1 = ___mb_cur_max_func();
  return iVar1 == 1;
}



// std::codecvt<wchar_t, char, int>::do_max_length() const

void std::codecvt<>::do_max_length(void)

{
  ___mb_cur_max_func();
  return;
}



// std::codecvt<wchar_t, char, int>::do_always_noconv() const

undefined8 std::codecvt<>::do_always_noconv(void)

{
  return 0;
}



// std::codecvt<wchar_t, char, int>::do_in(int&, char const*, char const*, char const*&, wchar_t*,
// wchar_t*, wchar_t*&) const

undefined1 __thiscall
std::codecvt<>::do_in
          (undefined8 param_1_00,mbstate_t *param_2,char *param_3,char *param_4,ulonglong *param_5,
          wchar_t *param_6,wchar_t *param_7,ulonglong *param_8)

{
  size_t sVar1;
  undefined1 uVar2;
  mbstate_t local_3c [3];
  
  local_3c[0] = *param_2;
  uVar2 = param_3 < param_4;
  if ((param_6 < param_7) && ((bool)uVar2)) {
    while( true ) {
      sVar1 = mbrtowc(param_6,param_3,(longlong)param_4 - (longlong)param_3,local_3c);
      if (sVar1 == 0xffffffffffffffff) {
        uVar2 = 2;
        goto LAB_140046823;
      }
      if (sVar1 == 0xfffffffffffffffe) break;
      if (sVar1 == 0) {
        *param_6 = L'\0';
        sVar1 = 1;
      }
      param_3 = param_3 + sVar1;
      param_6 = param_6 + 1;
      uVar2 = param_3 < param_4;
      *param_2 = local_3c[0];
      if ((param_7 <= param_6) || (!(bool)uVar2)) goto LAB_140046823;
    }
    uVar2 = 1;
  }
LAB_140046823:
  *param_5 = (ulonglong)param_3;
  *param_8 = (ulonglong)param_6;
  return uVar2;
}



// std::codecvt<wchar_t, char, int>::do_out(int&, wchar_t const*, wchar_t const*, wchar_t const*&,
// char*, char*, char*&) const

undefined1 __thiscall
std::codecvt<>::do_out
          (undefined8 param_1_00,mbstate_t *param_2,wchar_t *param_3,wchar_t *param_4,
          undefined8 *param_5,char *param_6,char *param_7,ulonglong *param_8)

{
  int iVar1;
  size_t sVar2;
  longlong lVar3;
  undefined1 uVar4;
  mbstate_t local_54;
  char local_4d [13];
  
  local_54 = *param_2;
  iVar1 = ___mb_cur_max_func();
  lVar3 = ((longlong)param_4 - (longlong)param_3 >> 1) * (longlong)iVar1;
  if (lVar3 - ((longlong)param_7 - (longlong)param_6) == 0 ||
      lVar3 < (longlong)param_7 - (longlong)param_6) {
    if (param_3 < param_4) {
      do {
        sVar2 = wcrtomb(param_6,*param_3,&local_54);
        if (sVar2 == 0xffffffffffffffff) goto LAB_140046922;
        param_3 = param_3 + 1;
        param_6 = param_6 + sVar2;
        *param_2 = local_54;
      } while (param_3 < param_4);
    }
    uVar4 = 0;
  }
  else {
    uVar4 = param_3 < param_4;
    if ((param_6 < param_7) && ((bool)uVar4)) {
      while( true ) {
        sVar2 = wcrtomb(local_4d,*param_3,&local_54);
        if (sVar2 == 0xffffffffffffffff) goto LAB_140046922;
        if ((ulonglong)((longlong)param_7 - (longlong)param_6) < sVar2) break;
        param_3 = param_3 + 1;
        memcpy(param_6,local_4d,sVar2);
        param_6 = param_6 + sVar2;
        uVar4 = param_3 < param_4;
        *param_2 = local_54;
        if ((param_7 <= param_6) || (!(bool)uVar4)) goto LAB_140046933;
      }
      uVar4 = 1;
    }
  }
LAB_140046933:
  *param_5 = param_3;
  *param_8 = (ulonglong)param_6;
  return uVar4;
LAB_140046922:
  uVar4 = 2;
  goto LAB_140046933;
}



// std::codecvt<wchar_t, char, int>::do_length(int&, char const*, char const*, unsigned long long)
// const

int __thiscall
std::codecvt<>::do_length
          (undefined8 param_1_00,mbstate_t *param_2,char *param_3,char *param_4,longlong param_5)

{
  size_t sVar1;
  int iVar2;
  int iVar3;
  mbstate_t local_3c [3];
  
  iVar2 = 0;
  local_3c[0] = *param_2;
  iVar3 = iVar2;
  if ((param_3 < param_4) && (iVar3 = 0, param_5 != 0)) {
    while (sVar1 = mbrtowc((wchar_t *)0x0,param_3,(longlong)param_4 - (longlong)param_3,local_3c),
          iVar3 = iVar2, sVar1 < 0xfffffffffffffffe) {
      if (sVar1 == 0) {
        sVar1 = 1;
      }
      param_5 = param_5 + -1;
      param_3 = param_3 + sVar1;
      *param_2 = local_3c[0];
      iVar2 = iVar2 + (int)sVar1;
      if (param_4 <= param_3) {
        return iVar2;
      }
      if (param_5 == 0) {
        return iVar2;
      }
    }
  }
  return iVar3;
}



// std::collate<char>::_M_compare(char const*, char const*) const

uint __thiscall std::collate<char>::_M_compare(undefined8 param_1_00,char *param_2,char *param_3)

{
  int iVar1;
  
  iVar1 = strcoll(param_2,param_3);
  return iVar1 >> 0x1e | (uint)(iVar1 != 0);
}



// std::collate<char>::do_compare(char const*, char const*, char const*, char const*) const

uint __thiscall
std::collate<char>::do_compare
          (collate<char> *this,undefined1 *param_1,longlong param_2,undefined1 *param_3,
          longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  int iVar3;
  uint uVar4;
  ulonglong *puVar5;
  ulonglong *puVar6;
  size_t sVar7;
  longlong lVar8;
  ulonglong *_Str;
  longlong lVar9;
  ulonglong *puVar10;
  
  puVar5 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,param_2);
  puVar6 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_3,param_4);
  uVar1 = puVar5[-3];
  uVar2 = puVar6[-3];
  _Str = puVar5;
  puVar10 = puVar6;
  do {
    uVar4 = _M_compare(this,(char *)_Str,(char *)puVar10);
    if (uVar4 != 0) {
LAB_140046b21:
      if (_CRT_MT == 0) {
        iVar3 = (int)puVar6[-1];
        *(int *)(puVar6 + -1) = iVar3 + -1;
      }
      else {
        LOCK();
        puVar10 = puVar6 + -1;
        iVar3 = (int)*puVar10;
        *(int *)puVar10 = (int)*puVar10 + -1;
        UNLOCK();
      }
      if (iVar3 < 1) {
        std::string::_Rep::_M_destroy(puVar6 + -3);
      }
      if (_CRT_MT == 0) {
        iVar3 = (int)puVar5[-1];
        *(int *)(puVar5 + -1) = iVar3 + -1;
      }
      else {
        LOCK();
        puVar10 = puVar5 + -1;
        iVar3 = (int)*puVar10;
        *(int *)puVar10 = (int)*puVar10 + -1;
        UNLOCK();
      }
      if (iVar3 < 1) {
        std::string::_Rep::_M_destroy(puVar5 + -3);
      }
      return uVar4;
    }
    sVar7 = strlen((char *)_Str);
    lVar9 = (longlong)_Str + sVar7;
    sVar7 = strlen((char *)puVar10);
    lVar8 = sVar7 + (longlong)puVar10;
    if (uVar1 + (longlong)puVar5 == lVar9) {
      if (uVar2 + (longlong)puVar6 == lVar8) goto LAB_140046b21;
      if (uVar1 + (longlong)puVar5 == lVar9) {
        uVar4 = 0xffffffff;
        goto LAB_140046b21;
      }
    }
    if (uVar2 + (longlong)puVar6 == lVar8) {
      uVar4 = 1;
      goto LAB_140046b21;
    }
    _Str = (ulonglong *)(lVar9 + 1);
    puVar10 = (ulonglong *)(lVar8 + 1);
  } while( true );
}



// std::collate<char>::_M_transform(char*, char const*, unsigned long long) const

void __thiscall
std::collate<char>::_M_transform(undefined8 param_1_00,char *param_2,char *param_3,size_t param_4)

{
  strxfrm(param_2,param_3,param_4);
  return;
}



// std::collate<char>::do_transform(char const*, char const*) const

string * std::collate<char>::do_transform
                   (string *param_1,undefined8 param_2,undefined1 *param_3,longlong param_4)

{
  ulonglong uVar1;
  int iVar2;
  ulonglong *puVar3;
  ulonglong *puVar4;
  char *pcVar5;
  longlong lVar6;
  ulonglong uVar7;
  size_t sVar8;
  longlong lVar9;
  size_t sVar10;
  
  puVar3 = std::string::_S_construct(0,'\0');
  *(ulonglong **)param_1 = puVar3;
  puVar4 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_3,param_4);
  uVar1 = puVar4[-3];
  sVar10 = (param_4 - (longlong)param_3) * 2;
  pcVar5 = operator_new__(sVar10);
  puVar3 = puVar4;
  do {
    uVar7 = _M_transform(param_2,pcVar5,(char *)puVar3,sVar10);
    if (sVar10 <= uVar7) {
      sVar10 = uVar7 + 1;
      if (pcVar5 != (char *)0x0) {
        operator_delete__(pcVar5);
      }
      pcVar5 = operator_new__(sVar10);
      uVar7 = _M_transform(param_2,pcVar5,(char *)puVar3,sVar10);
    }
    std::string::append(param_1,pcVar5,uVar7);
    sVar8 = strlen((char *)puVar3);
    if (uVar1 + (longlong)puVar4 == sVar8 + (longlong)puVar3) {
      if (pcVar5 != (char *)0x0) {
        operator_delete__(pcVar5);
      }
      if (_CRT_MT == 0) {
        iVar2 = (int)puVar4[-1];
        *(int *)(puVar4 + -1) = iVar2 + -1;
      }
      else {
        LOCK();
        puVar3 = puVar4 + -1;
        iVar2 = (int)*puVar3;
        *(int *)puVar3 = (int)*puVar3 + -1;
        UNLOCK();
      }
      if (iVar2 < 1) {
        std::string::_Rep::_M_destroy(puVar4 + -3);
      }
      return param_1;
    }
    puVar3 = (ulonglong *)(sVar8 + (longlong)puVar3 + 1);
    lVar6 = *(longlong *)param_1;
    lVar9 = *(longlong *)(lVar6 + -0x18);
    uVar7 = lVar9 + 1;
    if (*(ulonglong *)(lVar6 + -0x10) < uVar7) {
LAB_140046c67:
      std::string::reserve(param_1,uVar7);
LAB_140046c72:
      lVar6 = *(longlong *)param_1;
      lVar9 = *(longlong *)(lVar6 + -0x18);
    }
    else {
      if (_CRT_MT != 0) {
        if (0 < *(int *)(lVar6 + -8)) goto LAB_140046c67;
        goto LAB_140046c72;
      }
      if (0 < *(int *)(lVar6 + -8)) goto LAB_140046c67;
    }
    *(undefined1 *)(lVar6 + lVar9) = 0;
    lVar6 = *(longlong *)param_1;
    *(undefined4 *)(lVar6 + -8) = 0;
    *(ulonglong *)(lVar6 + -0x18) = uVar7;
    *(undefined1 *)(lVar6 + uVar7) = 0;
  } while( true );
}



// std::collate<char>::hash(char const*, char const*) const

ulonglong __thiscall std::collate<char>::hash(collate<char> *this,char *param_1,char *param_2)

{
  char cVar1;
  ulonglong uVar2;
  
  if (*(code **)(*(longlong *)this + 0x20) != do_hash) {
                    // WARNING: Could not recover jumptable at 0x000140046e28. Too many branches
                    // WARNING: Treating indirect jump as call
    uVar2 = (**(code **)(*(longlong *)this + 0x20))();
    return uVar2;
  }
  uVar2 = 0;
  if (param_1 < param_2) {
    do {
      cVar1 = *param_1;
      param_1 = param_1 + 1;
      uVar2 = (ulonglong)(((uint)uVar2 << 7 | (uint)uVar2 >> 0x19) + (int)cVar1);
    } while (param_2 != param_1);
  }
  return uVar2;
}



// std::collate<char>::compare(char const*, char const*, char const*, char const*) const

void std::collate<char>::compare(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140046e33. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x10))();
  return;
}



// std::collate<char>::do_hash(char const*, char const*) const

uint __thiscall std::collate<char>::do_hash(undefined8 param_1_00,char *param_2,char *param_3)

{
  char cVar1;
  uint uVar2;
  
  uVar2 = 0;
  if (param_2 < param_3) {
    do {
      cVar1 = *param_2;
      param_2 = param_2 + 1;
      uVar2 = (uVar2 << 7 | uVar2 >> 0x19) + (int)cVar1;
    } while (param_3 != param_2);
  }
  return uVar2;
}



// std::collate<char>::transform(char const*, char const*) const

undefined8 std::collate<char>::transform(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::collate<wchar_t>::_M_compare(wchar_t const*, wchar_t const*) const

uint __thiscall
std::collate<wchar_t>::_M_compare(undefined8 param_1_00,wchar_t *param_2,wchar_t *param_3)

{
  int iVar1;
  
  iVar1 = wcscoll(param_2,param_3);
  return iVar1 >> 0x1e | (uint)(iVar1 != 0);
}



// std::collate<wchar_t>::do_compare(wchar_t const*, wchar_t const*, wchar_t const*, wchar_t const*)
// const

uint __thiscall
std::collate<wchar_t>::do_compare
          (collate<wchar_t> *this,undefined2 *param_1,longlong param_2,undefined2 *param_3,
          longlong param_4)

{
  int iVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  uint uVar4;
  wchar_t *pwVar5;
  wchar_t *pwVar6;
  size_t sVar7;
  wchar_t *pwVar8;
  wchar_t *pwVar9;
  
  pwVar5 = (wchar_t *)
           _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (param_1,param_2);
  pwVar6 = (wchar_t *)
           _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (param_3,param_4);
  uVar2 = *(ulonglong *)(pwVar5 + -0xc);
  uVar3 = *(ulonglong *)(pwVar6 + -0xc);
  pwVar8 = pwVar5;
  pwVar9 = pwVar6;
  do {
    uVar4 = _M_compare(this,pwVar8,pwVar9);
    if (uVar4 != 0) {
LAB_140046f73:
      if (_CRT_MT == 0) {
        iVar1 = *(int *)(pwVar6 + -4);
        *(int *)(pwVar6 + -4) = iVar1 + -1;
      }
      else {
        LOCK();
        pwVar8 = pwVar6 + -4;
        iVar1 = *(int *)pwVar8;
        *(int *)pwVar8 = *(int *)pwVar8 + -1;
        UNLOCK();
      }
      if (iVar1 < 1) {
        std::wstring::_Rep::_M_destroy(pwVar6 + -0xc);
      }
      if (_CRT_MT == 0) {
        iVar1 = *(int *)(pwVar5 + -4);
        *(int *)(pwVar5 + -4) = iVar1 + -1;
      }
      else {
        LOCK();
        pwVar8 = pwVar5 + -4;
        iVar1 = *(int *)pwVar8;
        *(int *)pwVar8 = *(int *)pwVar8 + -1;
        UNLOCK();
      }
      if (iVar1 < 1) {
        std::wstring::_Rep::_M_destroy(pwVar5 + -0xc);
      }
      return uVar4;
    }
    sVar7 = wcslen(pwVar8);
    pwVar8 = pwVar8 + sVar7;
    sVar7 = wcslen(pwVar9);
    pwVar9 = pwVar9 + sVar7;
    if (pwVar5 + uVar2 == pwVar8) {
      if (pwVar6 + uVar3 == pwVar9) goto LAB_140046f73;
      if (pwVar5 + uVar2 == pwVar8) {
        uVar4 = 0xffffffff;
        goto LAB_140046f73;
      }
    }
    if (pwVar6 + uVar3 == pwVar9) {
      uVar4 = 1;
      goto LAB_140046f73;
    }
    pwVar8 = pwVar8 + 1;
    pwVar9 = pwVar9 + 1;
  } while( true );
}



// std::collate<wchar_t>::_M_transform(wchar_t*, wchar_t const*, unsigned long long) const

void __thiscall
std::collate<wchar_t>::_M_transform
          (undefined8 param_1_00,wchar_t *param_2,wchar_t *param_3,size_t param_4)

{
  wcsxfrm(param_2,param_3,param_4);
  return;
}



// std::collate<wchar_t>::do_transform(wchar_t const*, wchar_t const*) const

wstring * std::collate<wchar_t>::do_transform
                    (wstring *param_1,undefined8 param_2,undefined2 *param_3,longlong param_4)

{
  int iVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  wchar_t *pwVar4;
  wchar_t *pwVar5;
  longlong lVar6;
  ulonglong uVar7;
  size_t sVar8;
  longlong lVar9;
  wchar_t *pwVar10;
  ulonglong uVar11;
  
  puVar3 = std::wstring::_S_construct(0,0);
  *(ulonglong **)param_1 = puVar3;
  pwVar4 = (wchar_t *)
           _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (param_3,param_4);
  uVar2 = *(ulonglong *)(pwVar4 + -0xc);
  uVar11 = param_4 - (longlong)param_3;
  if (0x3ffffffffffffffc < uVar11) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  pwVar5 = operator_new__(uVar11 * 2);
  pwVar10 = pwVar4;
  do {
    uVar7 = _M_transform(param_2,pwVar5,pwVar10,uVar11);
    if (uVar11 <= uVar7) {
      uVar11 = uVar7 + 1;
      if (pwVar5 != (wchar_t *)0x0) {
        operator_delete__(pwVar5);
      }
      if (0x3ffffffffffffffc < uVar11) {
                    // WARNING: Subroutine does not return
        __cxa_throw_bad_array_new_length();
      }
      pwVar5 = operator_new__(uVar11 * 2);
      uVar7 = _M_transform(param_2,pwVar5,pwVar10,uVar11);
    }
    std::wstring::append(param_1,pwVar5,uVar7);
    sVar8 = wcslen(pwVar10);
    if (pwVar4 + uVar2 == pwVar10 + sVar8) {
      if (pwVar5 != (wchar_t *)0x0) {
        operator_delete__(pwVar5);
      }
      if (_CRT_MT == 0) {
        iVar1 = *(int *)(pwVar4 + -4);
        *(int *)(pwVar4 + -4) = iVar1 + -1;
      }
      else {
        LOCK();
        pwVar10 = pwVar4 + -4;
        iVar1 = *(int *)pwVar10;
        *(int *)pwVar10 = *(int *)pwVar10 + -1;
        UNLOCK();
      }
      if (iVar1 < 1) {
        std::wstring::_Rep::_M_destroy(pwVar4 + -0xc);
      }
      return param_1;
    }
    lVar6 = *(longlong *)param_1;
    pwVar10 = pwVar10 + sVar8 + 1;
    lVar9 = *(longlong *)(lVar6 + -0x18);
    uVar7 = lVar9 + 1;
    if (*(ulonglong *)(lVar6 + -0x10) < uVar7) {
LAB_1400470c9:
      std::wstring::reserve(param_1,uVar7);
LAB_1400470d4:
      lVar6 = *(longlong *)param_1;
      lVar9 = *(longlong *)(lVar6 + -0x18);
    }
    else {
      if (_CRT_MT != 0) {
        if (0 < *(int *)(lVar6 + -8)) goto LAB_1400470c9;
        goto LAB_1400470d4;
      }
      if (0 < *(int *)(lVar6 + -8)) goto LAB_1400470c9;
    }
    *(undefined2 *)(lVar6 + lVar9 * 2) = 0;
    *(undefined4 *)(lVar6 + -8) = 0;
    *(ulonglong *)(lVar6 + -0x18) = uVar7;
    *(undefined2 *)(lVar6 + uVar7 * 2) = 0;
  } while( true );
}



// std::collate<wchar_t>::hash(wchar_t const*, wchar_t const*) const

ulonglong __thiscall
std::collate<wchar_t>::hash(collate<wchar_t> *this,ushort *param_1,ushort *param_2)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x20) == do_hash) {
    uVar1 = 0;
    for (; param_1 < param_2; param_1 = param_1 + 1) {
      uVar1 = (ulonglong)(((uint)uVar1 << 7 | (uint)uVar1 >> 0x19) + (uint)*param_1);
    }
    return uVar1;
  }
                    // WARNING: Could not recover jumptable at 0x0001400472b8. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x20))();
  return uVar1;
}



// std::collate<wchar_t>::compare(wchar_t const*, wchar_t const*, wchar_t const*, wchar_t const*)
// const

void std::collate<wchar_t>::compare(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400472c3. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x10))();
  return;
}



// std::collate<wchar_t>::do_hash(wchar_t const*, wchar_t const*) const

uint __thiscall
std::collate<wchar_t>::do_hash(undefined8 param_1_00,ushort *param_2,ushort *param_3)

{
  uint uVar1;
  
  uVar1 = 0;
  for (; param_2 < param_3; param_2 = param_2 + 1) {
    uVar1 = (uVar1 << 7 | uVar1 >> 0x19) + (uint)*param_2;
  }
  return uVar1;
}



// std::collate<wchar_t>::transform(wchar_t const*, wchar_t const*) const

undefined8 std::collate<wchar_t>::transform(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int[abi:cxx11]<unsigned
// int>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong *plVar3;
  bool bVar4;
  char cVar5;
  uint uVar6;
  uint uVar7;
  int iVar8;
  int iVar9;
  longlong lVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  void *pvVar13;
  __numpunct_cache<char> *this;
  uint uVar14;
  ulonglong uVar15;
  longlong *plVar16;
  char cVar17;
  longlong lVar18;
  uint uVar19;
  bool bVar20;
  byte bVar21;
  longlong *plVar22;
  bool bVar23;
  bool bVar24;
  bool bVar25;
  ulonglong local_b0;
  int local_a8;
  uint local_9c;
  ulonglong local_98;
  char local_88;
  byte local_6b;
  byte local_6a;
  undefined1 *local_68;
  ulonglong local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar1 = param_3[1];
  lVar2 = param_4[1];
  plVar3 = (longlong *)*param_3;
  plVar22 = (longlong *)*param_4;
  local_b0 = uVar1 & 0xffffffff;
  lVar10 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  plVar16 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar10 * 8);
  lVar18 = *plVar16;
  if (lVar18 == 0) {
    this = operator_new(0x90);
    *(undefined4 *)(this + 8) = 0;
    *(undefined2 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__numpunct_cache<char>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    this[0x88] = (__numpunct_cache<char>)0x0;
    __numpunct_cache<char>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar10);
    lVar18 = *plVar16;
  }
  uVar14 = *(uint *)(param_5 + 0x18) & 0x4a;
  uVar19 = 8;
  if (uVar14 != 0x40) {
    uVar19 = 10;
    if (uVar14 == 8) {
      uVar19 = 0x10;
    }
  }
  bVar23 = (uint)uVar1 == 0xffffffff;
  plVar16 = plVar3;
  bVar20 = bVar23;
  if (plVar3 != (longlong *)0x0 && bVar23) {
    if ((ulonglong)plVar3[2] < (ulonglong)plVar3[3]) {
      bVar20 = false;
    }
    else {
      iVar9 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar20 = iVar9 == -1;
      plVar16 = (longlong *)0x0;
      if (!bVar20) {
        plVar16 = plVar3;
      }
    }
  }
  local_a8 = (int)lVar2;
  bVar24 = local_a8 == -1;
  bVar4 = bVar24;
  if (plVar22 != (longlong *)0x0 && bVar24) {
    if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
      bVar4 = false;
    }
    else {
      iVar9 = (**(code **)(*plVar22 + 0x48))(plVar22);
      plVar3 = (longlong *)0x0;
      if (iVar9 != -1) {
        plVar3 = plVar22;
      }
      plVar22 = plVar3;
      bVar4 = iVar9 == -1;
    }
  }
  if (bVar20 == bVar4) {
    bVar23 = false;
    cVar5 = *(char *)(lVar18 + 0x20);
    uVar7 = 0;
    bVar20 = false;
    iVar9 = 0;
    bVar4 = true;
LAB_140047557:
    if (uVar19 != 0x10) goto LAB_140047560;
LAB_140047831:
    local_98 = 0x16;
    uVar14 = 0x16;
  }
  else {
    if ((plVar16 == (longlong *)0x0) || (!bVar23)) {
      uVar7 = (uint)uVar1 & 0xff;
    }
    else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
      uVar7 = (uint)*(byte *)plVar16[2];
    }
    else {
      uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
      if (uVar7 == 0xffffffff) {
        uVar7 = 0xffffffff;
        plVar16 = (longlong *)0x0;
      }
    }
    cVar17 = (char)uVar7;
    bVar23 = *(char *)(lVar18 + 0x6e) == cVar17;
    cVar5 = *(char *)(lVar18 + 0x20);
    if ((bVar23) || (*(char *)(lVar18 + 0x6f) == cVar17)) {
      if (((cVar5 == '\0') || (*(char *)(lVar18 + 0x49) != cVar17)) &&
         (*(char *)(lVar18 + 0x48) != cVar17)) {
        uVar12 = plVar16[3];
        if ((ulonglong)plVar16[2] < uVar12) {
          uVar11 = plVar16[2] + 1;
          plVar16[2] = uVar11;
        }
        else {
          (**(code **)(*plVar16 + 0x50))(plVar16);
          uVar11 = plVar16[2];
          uVar12 = plVar16[3];
        }
        if ((uVar11 < uVar12) || (iVar9 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar9 != -1)) {
          bVar20 = false;
        }
        else {
          bVar20 = true;
          plVar16 = (longlong *)0x0;
        }
        bVar4 = bVar24;
        if (plVar22 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
            bVar4 = false;
          }
          else {
            iVar9 = (**(code **)(*plVar22 + 0x48))(plVar22);
            bVar4 = iVar9 == -1;
            if (bVar4) {
              plVar22 = (longlong *)0x0;
            }
          }
        }
        if (bVar4 == bVar20) {
          local_b0 = 0xffffffff;
          cVar5 = *(char *)(lVar18 + 0x20);
          bVar4 = true;
          bVar20 = false;
          iVar9 = 0;
          goto LAB_140047557;
        }
        if (plVar16 == (longlong *)0x0) {
LAB_140047f37:
          uVar7 = 0xffffffff;
          plVar16 = (longlong *)0x0;
        }
        else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
          uVar7 = (uint)*(byte *)plVar16[2];
        }
        else {
          uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
          if (uVar7 == 0xffffffff) goto LAB_140047f37;
        }
        local_b0 = 0xffffffff;
        cVar5 = *(char *)(lVar18 + 0x20);
      }
    }
    else {
      bVar23 = false;
    }
    iVar9 = 0;
    bVar20 = false;
    do {
      uVar6 = (uint)local_b0;
      cVar17 = (char)uVar7;
      if (((cVar5 != '\0') && (*(char *)(lVar18 + 0x49) == cVar17)) ||
         (*(char *)(lVar18 + 0x48) == cVar17)) break;
      if (*(char *)(lVar18 + 0x72) == cVar17) {
        bVar4 = (bool)(bVar20 ^ 1U | uVar19 == 10);
        if (!bVar4) goto LAB_1400474d0;
        bVar20 = uVar14 == 0 || uVar19 == 8;
        if (uVar14 != 0 && uVar19 != 8) {
          iVar9 = iVar9 + 1;
          bVar20 = bVar4;
          goto LAB_140047503;
        }
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        uVar19 = 8;
        iVar9 = 0;
        if (uVar12 < uVar11) goto LAB_140047514;
LAB_1400477a0:
        (**(code **)(*plVar16 + 0x50))(plVar16);
        if ((ulonglong)plVar16[2] < (ulonglong)plVar16[3]) goto LAB_140047525;
LAB_1400477c8:
        iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16);
        if (iVar8 != -1) goto LAB_140047525;
        bVar4 = true;
        plVar16 = (longlong *)0x0;
      }
      else {
        if (!bVar20) break;
LAB_1400474d0:
        if ((*(char *)(lVar18 + 0x70) != cVar17) && (*(char *)(lVar18 + 0x71) != cVar17)) {
          bVar4 = false;
          bVar20 = true;
          goto LAB_140047557;
        }
        bVar4 = uVar14 == 0 || uVar19 == 0x10;
        if (uVar14 != 0 && uVar19 != 0x10) {
          bVar20 = true;
          goto LAB_140047560;
        }
        iVar9 = 0;
        uVar19 = 0x10;
        bVar20 = false;
LAB_140047503:
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        if (uVar11 <= uVar12) goto LAB_1400477a0;
LAB_140047514:
        plVar16[2] = uVar12 + 1;
        if (uVar11 <= uVar12 + 1) goto LAB_1400477c8;
LAB_140047525:
        bVar4 = false;
      }
      bVar25 = bVar24;
      if (plVar22 != (longlong *)0x0 && bVar24) {
        if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
          bVar25 = false;
        }
        else {
          iVar8 = (**(code **)(*plVar22 + 0x48))(plVar22);
          bVar25 = iVar8 == -1;
          if (bVar25) {
            plVar22 = (longlong *)0x0;
          }
        }
      }
      if (bVar25 == bVar4) {
        local_b0 = 0xffffffff;
        cVar5 = *(char *)(lVar18 + 0x20);
        bVar4 = true;
        goto LAB_140047557;
      }
      if (plVar16 == (longlong *)0x0) {
LAB_140047910:
        uVar7 = 0xffffffff;
        plVar16 = (longlong *)0x0;
      }
      else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
        uVar7 = (uint)*(byte *)plVar16[2];
      }
      else {
        uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
        if (uVar7 == 0xffffffff) goto LAB_140047910;
      }
      cVar5 = *(char *)(lVar18 + 0x20);
      local_b0 = 0xffffffff;
      uVar6 = 0xffffffff;
    } while (bVar20);
    local_b0 = (ulonglong)uVar6;
    bVar4 = false;
    if (uVar19 == 0x10) goto LAB_140047831;
LAB_140047560:
    local_98 = (ulonglong)(int)uVar19;
    uVar14 = uVar19;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar5 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar6 = (uint)(0xffffffff / (ulonglong)uVar19);
  local_6a = *(byte *)(lVar18 + 0x88);
  if (local_6a == 0) {
    local_6b = 0;
    if (bVar4 == false) {
      local_88 = (char)uVar14;
      local_9c = 0;
LAB_1400475ed:
      cVar5 = (char)uVar7;
      if (local_98 < 0xb) {
        if ((cVar5 < '0') || ((char)(local_88 + '0') <= cVar5)) goto LAB_140047a20;
LAB_14004760e:
        uVar14 = (int)cVar5 - 0x30;
LAB_140047615:
        if (uVar6 < local_9c) goto LAB_140047880;
LAB_140047623:
        uVar7 = local_9c * uVar19;
        uVar11 = plVar16[3];
        local_9c = uVar14 + uVar7;
        local_6b = local_6b | CARRY4(uVar14,uVar7);
        uVar12 = plVar16[2];
        iVar9 = iVar9 + 1;
        if (uVar11 <= uVar12) goto LAB_140047896;
LAB_140047649:
        uVar12 = uVar12 + 1;
        plVar16[2] = uVar12;
LAB_140047651:
        if ((uVar12 < uVar11) || (iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar8 != -1)) {
          local_b0._0_1_ = false;
        }
        else {
          local_b0._0_1_ = true;
          plVar16 = (longlong *)0x0;
        }
        bVar25 = bVar24;
        if (plVar22 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
            bVar25 = false;
          }
          else {
            iVar8 = (**(code **)(*plVar22 + 0x48))(plVar22);
            bVar25 = iVar8 == -1;
            if (bVar25) {
              plVar22 = (longlong *)0x0;
            }
          }
        }
        if (bVar25 == (bool)(byte)local_b0) goto code_r0x00014004767d;
        if (plVar16 == (longlong *)0x0) {
LAB_140047c18:
          uVar7 = 0xffffffff;
          plVar16 = (longlong *)0x0;
        }
        else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
          uVar7 = (uint)*(byte *)plVar16[2];
        }
        else {
          uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
          if (uVar7 == 0xffffffff) goto LAB_140047c18;
        }
        local_b0 = 0xffffffff;
        goto LAB_1400475ed;
      }
      if ((byte)(cVar5 - 0x30U) < 10) goto LAB_14004760e;
      if ((byte)(cVar5 + 0x9fU) < 6) {
        uVar14 = (int)cVar5 - 0x57;
        if (local_9c <= uVar6) goto LAB_140047623;
LAB_140047880:
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        local_6b = 1;
        if (uVar12 < uVar11) goto LAB_140047649;
LAB_140047896:
        (**(code **)(*plVar16 + 0x50))(plVar16);
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        goto LAB_140047651;
      }
      if ((byte)(cVar5 + 0xbfU) < 6) {
        uVar14 = (int)cVar5 - 0x37;
        goto LAB_140047615;
      }
LAB_140047a20:
      local_6a = 0;
      bVar21 = bVar4;
    }
    else {
      local_9c = 0;
      bVar21 = 0;
      local_6a = bVar4;
    }
  }
  else {
    if (bVar4 == false) {
      local_6b = 0;
      local_9c = 0;
      do {
        uVar12 = local_60;
        bVar21 = *(byte *)(lVar18 + 0x20);
        cVar5 = (char)uVar7;
        if ((bVar21 == 0) || (*(char *)(lVar18 + 0x49) != cVar5)) {
          if (*(char *)(lVar18 + 0x48) == cVar5 || local_98 == 0) goto LAB_140047a20;
          pvVar13 = memchr((void *)(lVar18 + 0x72),(int)cVar5,local_98);
          if (pvVar13 == (void *)0x0) {
            bVar4 = false;
            goto LAB_140047a20;
          }
          uVar14 = (int)pvVar13 - (int)(void *)(lVar18 + 0x72);
          if (0xf < (int)uVar14) {
            uVar14 = uVar14 - 6;
          }
          if (local_9c <= uVar6) {
            uVar7 = local_9c * uVar19;
            local_9c = uVar14 + uVar7;
            iVar9 = iVar9 + 1;
            local_6b = local_6b | CARRY4(uVar14,uVar7);
            goto LAB_140047acc;
          }
          uVar12 = plVar16[3];
          uVar11 = plVar16[2];
          local_6b = local_6a;
          if (uVar11 < uVar12) goto LAB_140047ad9;
LAB_140047b46:
          (**(code **)(*plVar16 + 0x50))(plVar16);
          uVar11 = plVar16[2];
          uVar12 = plVar16[3];
        }
        else {
          if (iVar9 == 0) {
            local_6a = 0;
            goto LAB_14004769a;
          }
          uVar11 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar15 = 0xf;
          }
          else {
            uVar15 = CONCAT71(uStack_57,local_58);
          }
          if (uVar15 < uVar11) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_a8._0_1_ = (undefined1)iVar9;
          iVar9 = 0;
          local_68[uVar12] = (undefined1)local_a8;
          local_68[uVar11] = 0;
          local_60 = uVar11;
LAB_140047acc:
          uVar11 = plVar16[2];
          uVar12 = plVar16[3];
          if (uVar12 <= uVar11) goto LAB_140047b46;
LAB_140047ad9:
          uVar11 = uVar11 + 1;
          plVar16[2] = uVar11;
        }
        if ((uVar11 < uVar12) || (iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar8 != -1)) {
          local_b0._0_1_ = 0;
        }
        else {
          plVar16 = (longlong *)0x0;
          local_b0._0_1_ = local_6a;
        }
        bVar25 = bVar24;
        if (plVar22 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
            bVar25 = false;
          }
          else {
            iVar8 = (**(code **)(*plVar22 + 0x48))(plVar22);
            bVar25 = iVar8 == -1;
            if (bVar25) {
              plVar22 = (longlong *)0x0;
            }
          }
        }
        if (bVar25 == (bool)(byte)local_b0) goto code_r0x000140047b09;
        if (plVar16 == (longlong *)0x0) {
LAB_140047c98:
          uVar7 = 0xffffffff;
          plVar16 = (longlong *)0x0;
        }
        else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
          uVar7 = (uint)*(byte *)plVar16[2];
        }
        else {
          uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
          if (uVar7 == 0xffffffff) goto LAB_140047c98;
        }
        local_b0 = 0xffffffff;
      } while( true );
    }
    bVar21 = 0;
    local_9c = 0;
    local_6b = 0;
    local_6a = bVar4;
  }
LAB_14004769a:
  uVar12 = local_60;
  if (local_60 == 0) {
    if ((bVar20) || (iVar9 != 0)) {
LAB_1400479ab:
      if (bVar21 == 0) {
        if (local_6b == 0) {
          uVar19 = -local_9c;
          if (!bVar23) {
            uVar19 = local_9c;
          }
          *param_7 = uVar19;
        }
        else {
          *param_7 = 0xffffffff;
          *param_6 = 4;
        }
        goto LAB_1400476d8;
      }
    }
  }
  else {
    local_a8._0_1_ = (undefined1)iVar9;
    uVar11 = local_60 + 1;
    if (local_68 == &local_58) {
      uVar15 = 0xf;
    }
    else {
      uVar15 = CONCAT71(uStack_57,local_58);
    }
    if (uVar15 < uVar11) {
      __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
    }
    local_68[uVar12] = (undefined1)local_a8;
    local_68[uVar12 + 1] = 0;
    local_60 = uVar11;
    cVar5 = __verify_grouping(*(longlong *)(lVar18 + 0x10),*(longlong *)(lVar18 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar5 == '\0') {
      *param_6 = 4;
    }
    if (((iVar9 != 0) || (bVar20)) || (local_60 != 0)) goto LAB_1400479ab;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_1400476d8:
  if (local_6a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar16;
  param_1[1] = uVar1 & 0xffffffff00000000 | local_b0;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x000140047b09:
  local_b0 = 0xffffffff;
  bVar21 = bVar4;
  goto LAB_14004769a;
code_r0x00014004767d:
  local_b0 = 0xffffffff;
  local_6a = 1;
  bVar21 = bVar4;
  goto LAB_14004769a;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_int[abi:cxx11]<long>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<long>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong *plVar3;
  char cVar4;
  uint uVar5;
  uint uVar6;
  int iVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  void *pvVar11;
  __numpunct_cache<char> *this;
  uint uVar12;
  ulonglong uVar13;
  longlong *plVar14;
  char cVar15;
  int iVar16;
  uint uVar17;
  longlong lVar18;
  uint uVar19;
  byte bVar20;
  longlong *plVar21;
  bool bVar22;
  bool bVar23;
  bool bVar24;
  bool bVar25;
  ulonglong local_b8;
  int local_b0;
  uint local_a4;
  ulonglong local_a0;
  byte local_92;
  byte local_91;
  uint local_84;
  char local_80;
  undefined1 *local_68;
  ulonglong local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar1 = param_3[1];
  lVar2 = param_4[1];
  plVar3 = (longlong *)*param_3;
  plVar21 = (longlong *)*param_4;
  local_b8 = uVar1 & 0xffffffff;
  lVar8 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  plVar14 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar8 * 8);
  lVar18 = *plVar14;
  if (lVar18 == 0) {
    this = operator_new(0x90);
    *(undefined4 *)(this + 8) = 0;
    *(undefined2 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__numpunct_cache<char>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    this[0x88] = (__numpunct_cache<char>)0x0;
    __numpunct_cache<char>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar8);
    lVar18 = *plVar14;
  }
  uVar12 = *(uint *)(param_5 + 0x18) & 0x4a;
  uVar19 = 8;
  if (uVar12 != 0x40) {
    uVar19 = 10;
    if (uVar12 == 8) {
      uVar19 = 0x10;
    }
  }
  bVar22 = (uint)uVar1 == 0xffffffff;
  plVar14 = plVar3;
  bVar24 = bVar22;
  if (plVar3 != (longlong *)0x0 && bVar22) {
    if ((ulonglong)plVar3[2] < (ulonglong)plVar3[3]) {
      bVar24 = false;
    }
    else {
      iVar7 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar24 = iVar7 == -1;
      plVar14 = (longlong *)0x0;
      if (!bVar24) {
        plVar14 = plVar3;
      }
    }
  }
  local_b0 = (int)lVar2;
  bVar23 = local_b0 == -1;
  bVar25 = bVar23;
  if (plVar21 != (longlong *)0x0 && bVar23) {
    if ((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) {
      bVar25 = false;
    }
    else {
      iVar7 = (**(code **)(*plVar21 + 0x48))(plVar21);
      plVar3 = (longlong *)0x0;
      if (iVar7 != -1) {
        plVar3 = plVar21;
      }
      plVar21 = plVar3;
      bVar25 = iVar7 == -1;
    }
  }
  if (bVar24 == bVar25) {
    local_84 = 0;
    cVar4 = *(char *)(lVar18 + 0x20);
    uVar17 = 0;
    bVar24 = false;
    iVar7 = 0;
    bVar22 = true;
LAB_140048367:
    if (uVar19 != 0x10) goto LAB_140048370;
LAB_140048651:
    local_a0 = 0x16;
    uVar12 = 0x16;
  }
  else {
    if ((plVar14 == (longlong *)0x0) || (!bVar22)) {
      uVar17 = (uint)uVar1 & 0xff;
    }
    else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
      uVar17 = (uint)*(byte *)plVar14[2];
    }
    else {
      uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
      if (uVar17 == 0xffffffff) {
        uVar17 = 0xffffffff;
        plVar14 = (longlong *)0x0;
      }
    }
    cVar15 = (char)uVar17;
    bVar24 = *(char *)(lVar18 + 0x6e) == cVar15;
    cVar4 = *(char *)(lVar18 + 0x20);
    local_84 = (uint)bVar24;
    if ((bVar24) || (*(char *)(lVar18 + 0x6f) == cVar15)) {
      if (((cVar4 == '\0') || (*(char *)(lVar18 + 0x49) != cVar15)) &&
         (*(char *)(lVar18 + 0x48) != cVar15)) {
        uVar10 = plVar14[3];
        if ((ulonglong)plVar14[2] < uVar10) {
          uVar9 = plVar14[2] + 1;
          plVar14[2] = uVar9;
        }
        else {
          (**(code **)(*plVar14 + 0x50))(plVar14);
          uVar9 = plVar14[2];
          uVar10 = plVar14[3];
        }
        if ((uVar9 < uVar10) || (iVar7 = (**(code **)(*plVar14 + 0x48))(plVar14), iVar7 != -1)) {
          bVar24 = false;
        }
        else {
          bVar24 = true;
          plVar14 = (longlong *)0x0;
        }
        bVar22 = bVar23;
        if (plVar21 != (longlong *)0x0 && bVar23) {
          if ((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) {
            bVar22 = false;
          }
          else {
            iVar7 = (**(code **)(*plVar21 + 0x48))(plVar21);
            bVar22 = iVar7 == -1;
            if (bVar22) {
              plVar21 = (longlong *)0x0;
            }
          }
        }
        if (bVar22 == bVar24) {
          local_b8 = 0xffffffff;
          cVar4 = *(char *)(lVar18 + 0x20);
          bVar22 = true;
          bVar24 = false;
          iVar7 = 0;
          goto LAB_140048367;
        }
        if (plVar14 == (longlong *)0x0) {
LAB_140048d67:
          uVar17 = 0xffffffff;
          plVar14 = (longlong *)0x0;
        }
        else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
          uVar17 = (uint)*(byte *)plVar14[2];
        }
        else {
          uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
          if (uVar17 == 0xffffffff) goto LAB_140048d67;
        }
        local_b8 = 0xffffffff;
        cVar4 = *(char *)(lVar18 + 0x20);
      }
    }
    else {
      local_84 = 0;
    }
    iVar7 = 0;
    bVar24 = false;
    do {
      uVar5 = (uint)local_b8;
      cVar15 = (char)uVar17;
      if (((cVar4 != '\0') && (*(char *)(lVar18 + 0x49) == cVar15)) ||
         (*(char *)(lVar18 + 0x48) == cVar15)) break;
      if (*(char *)(lVar18 + 0x72) == cVar15) {
        bVar22 = (bool)(bVar24 ^ 1U | uVar19 == 10);
        if (!bVar22) goto LAB_1400482e0;
        bVar24 = uVar12 == 0 || uVar19 == 8;
        if (uVar12 != 0 && uVar19 != 8) {
          iVar7 = iVar7 + 1;
          bVar24 = bVar22;
          goto LAB_140048313;
        }
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        uVar19 = 8;
        iVar7 = 0;
        if (uVar10 < uVar9) goto LAB_140048324;
LAB_1400485c0:
        (**(code **)(*plVar14 + 0x50))(plVar14);
        if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) goto LAB_140048335;
LAB_1400485e8:
        iVar16 = (**(code **)(*plVar14 + 0x48))(plVar14);
        if (iVar16 != -1) goto LAB_140048335;
        bVar22 = true;
        plVar14 = (longlong *)0x0;
      }
      else {
        if (!bVar24) break;
LAB_1400482e0:
        if ((*(char *)(lVar18 + 0x70) != cVar15) && (*(char *)(lVar18 + 0x71) != cVar15)) {
          bVar22 = false;
          bVar24 = true;
          goto LAB_140048367;
        }
        bVar22 = uVar12 == 0 || uVar19 == 0x10;
        if (uVar12 != 0 && uVar19 != 0x10) {
          bVar24 = true;
          goto LAB_140048370;
        }
        iVar7 = 0;
        uVar19 = 0x10;
        bVar24 = false;
LAB_140048313:
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        if (uVar9 <= uVar10) goto LAB_1400485c0;
LAB_140048324:
        plVar14[2] = uVar10 + 1;
        if (uVar9 <= uVar10 + 1) goto LAB_1400485e8;
LAB_140048335:
        bVar22 = false;
      }
      bVar25 = bVar23;
      if (plVar21 != (longlong *)0x0 && bVar23) {
        if ((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) {
          bVar25 = false;
        }
        else {
          iVar16 = (**(code **)(*plVar21 + 0x48))(plVar21);
          bVar25 = iVar16 == -1;
          if (bVar25) {
            plVar21 = (longlong *)0x0;
          }
        }
      }
      if (bVar25 == bVar22) {
        local_b8 = 0xffffffff;
        cVar4 = *(char *)(lVar18 + 0x20);
        bVar22 = true;
        goto LAB_140048367;
      }
      if (plVar14 == (longlong *)0x0) {
LAB_140048730:
        uVar17 = 0xffffffff;
        plVar14 = (longlong *)0x0;
      }
      else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
        uVar17 = (uint)*(byte *)plVar14[2];
      }
      else {
        uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
        if (uVar17 == 0xffffffff) goto LAB_140048730;
      }
      cVar4 = *(char *)(lVar18 + 0x20);
      local_b8 = 0xffffffff;
      uVar5 = 0xffffffff;
    } while (bVar24);
    local_b8 = (ulonglong)uVar5;
    bVar22 = false;
    if (uVar19 == 0x10) goto LAB_140048651;
LAB_140048370:
    local_a0 = (ulonglong)(int)uVar19;
    uVar12 = uVar19;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar4 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar5 = local_84 + 0x7fffffff;
  uVar6 = uVar5 / uVar19;
  local_91 = *(byte *)(lVar18 + 0x88);
  if (local_91 == 0) {
    local_92 = 0;
    if (bVar22 == false) {
      local_80 = (char)uVar12;
      local_a4 = 0;
LAB_140048406:
      cVar4 = (char)uVar17;
      if (local_a0 < 0xb) {
        if ((cVar4 < '0') || ((char)(local_80 + '0') <= cVar4)) goto LAB_140048850;
LAB_140048427:
        iVar16 = cVar4 + -0x30;
LAB_14004842e:
        if (uVar6 < local_a4) goto LAB_1400486a0;
LAB_14004843c:
        uVar12 = local_a4 * uVar19;
        local_a4 = uVar12 + iVar16;
        local_92 = local_92 | uVar5 - iVar16 < uVar12;
        uVar9 = plVar14[3];
        uVar10 = plVar14[2];
        iVar7 = iVar7 + 1;
        if (uVar9 <= uVar10) goto LAB_1400486b6;
LAB_14004846a:
        uVar10 = uVar10 + 1;
        plVar14[2] = uVar10;
LAB_140048472:
        if ((uVar10 < uVar9) || (iVar16 = (**(code **)(*plVar14 + 0x48))(plVar14), iVar16 != -1)) {
          local_b8._0_1_ = false;
        }
        else {
          local_b8._0_1_ = true;
          plVar14 = (longlong *)0x0;
        }
        bVar25 = bVar23;
        if (plVar21 != (longlong *)0x0 && bVar23) {
          if ((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) {
            bVar25 = false;
          }
          else {
            iVar16 = (**(code **)(*plVar21 + 0x48))(plVar21);
            bVar25 = iVar16 == -1;
            if (bVar25) {
              plVar21 = (longlong *)0x0;
            }
          }
        }
        if (bVar25 == (bool)(byte)local_b8) goto code_r0x00014004849e;
        if (plVar14 == (longlong *)0x0) {
LAB_140048a48:
          uVar17 = 0xffffffff;
          plVar14 = (longlong *)0x0;
        }
        else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
          uVar17 = (uint)*(byte *)plVar14[2];
        }
        else {
          uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
          if (uVar17 == 0xffffffff) goto LAB_140048a48;
        }
        local_b8 = 0xffffffff;
        goto LAB_140048406;
      }
      if ((byte)(cVar4 - 0x30U) < 10) goto LAB_140048427;
      if ((byte)(cVar4 + 0x9fU) < 6) {
        iVar16 = cVar4 + -0x57;
        if (local_a4 <= uVar6) goto LAB_14004843c;
LAB_1400486a0:
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        local_92 = 1;
        if (uVar10 < uVar9) goto LAB_14004846a;
LAB_1400486b6:
        (**(code **)(*plVar14 + 0x50))(plVar14);
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        goto LAB_140048472;
      }
      if ((byte)(cVar4 + 0xbfU) < 6) {
        iVar16 = cVar4 + -0x37;
        goto LAB_14004842e;
      }
LAB_140048850:
      local_91 = 0;
      bVar20 = bVar22;
    }
    else {
      local_a4 = 0;
      bVar20 = 0;
      local_91 = bVar22;
    }
  }
  else {
    if (bVar22 == false) {
      local_92 = 0;
      local_a4 = 0;
      do {
        uVar10 = local_60;
        bVar20 = *(byte *)(lVar18 + 0x20);
        cVar4 = (char)uVar17;
        if ((bVar20 == 0) || (*(char *)(lVar18 + 0x49) != cVar4)) {
          if (*(char *)(lVar18 + 0x48) == cVar4 || local_a0 == 0) goto LAB_140048850;
          pvVar11 = memchr((void *)(lVar18 + 0x72),(int)cVar4,local_a0);
          if (pvVar11 == (void *)0x0) {
            bVar22 = false;
            goto LAB_140048850;
          }
          iVar16 = (int)pvVar11 - (int)(void *)(lVar18 + 0x72);
          if (0xf < iVar16) {
            iVar16 = iVar16 + -6;
          }
          if (local_a4 <= uVar6) {
            uVar12 = local_a4 * uVar19;
            local_a4 = iVar16 + uVar12;
            local_92 = local_92 | uVar5 - iVar16 < uVar12;
            iVar7 = iVar7 + 1;
            goto LAB_140048904;
          }
          uVar10 = plVar14[3];
          uVar9 = plVar14[2];
          local_92 = local_91;
          if (uVar9 < uVar10) goto LAB_140048911;
LAB_140048976:
          (**(code **)(*plVar14 + 0x50))(plVar14);
          uVar9 = plVar14[2];
          uVar10 = plVar14[3];
        }
        else {
          if (iVar7 == 0) {
            local_91 = 0;
            goto LAB_1400484bb;
          }
          uVar9 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar13 = 0xf;
          }
          else {
            uVar13 = CONCAT71(uStack_57,local_58);
          }
          if (uVar13 < uVar9) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_b0._0_1_ = (undefined1)iVar7;
          iVar7 = 0;
          local_68[uVar10] = (undefined1)local_b0;
          local_68[uVar9] = 0;
          local_60 = uVar9;
LAB_140048904:
          uVar9 = plVar14[2];
          uVar10 = plVar14[3];
          if (uVar10 <= uVar9) goto LAB_140048976;
LAB_140048911:
          uVar9 = uVar9 + 1;
          plVar14[2] = uVar9;
        }
        if ((uVar9 < uVar10) || (iVar16 = (**(code **)(*plVar14 + 0x48))(plVar14), iVar16 != -1)) {
          local_b8._0_1_ = 0;
        }
        else {
          plVar14 = (longlong *)0x0;
          local_b8._0_1_ = local_91;
        }
        bVar25 = bVar23;
        if (plVar21 != (longlong *)0x0 && bVar23) {
          if ((ulonglong)plVar21[2] < (ulonglong)plVar21[3]) {
            bVar25 = false;
          }
          else {
            iVar16 = (**(code **)(*plVar21 + 0x48))(plVar21);
            bVar25 = iVar16 == -1;
            if (bVar25) {
              plVar21 = (longlong *)0x0;
            }
          }
        }
        if (bVar25 == (bool)(byte)local_b8) goto code_r0x000140048941;
        if (plVar14 == (longlong *)0x0) {
LAB_140048ac8:
          uVar17 = 0xffffffff;
          plVar14 = (longlong *)0x0;
        }
        else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
          uVar17 = (uint)*(byte *)plVar14[2];
        }
        else {
          uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
          if (uVar17 == 0xffffffff) goto LAB_140048ac8;
        }
        local_b8 = 0xffffffff;
      } while( true );
    }
    bVar20 = 0;
    local_a4 = 0;
    local_92 = 0;
    local_91 = bVar22;
  }
LAB_1400484bb:
  uVar10 = local_60;
  if (local_60 == 0) {
    if ((bVar24) || (iVar7 != 0)) {
LAB_1400487cb:
      if (bVar20 == 0) {
        if (local_92 == 0) {
          uVar19 = -local_a4;
          if ((char)local_84 == '\0') {
            uVar19 = local_a4;
          }
          *param_7 = uVar19;
        }
        else {
          *param_7 = local_84 + 0x7fffffff;
          *param_6 = 4;
        }
        goto LAB_1400484f9;
      }
    }
  }
  else {
    local_b0._0_1_ = (undefined1)iVar7;
    uVar9 = local_60 + 1;
    if (local_68 == &local_58) {
      uVar13 = 0xf;
    }
    else {
      uVar13 = CONCAT71(uStack_57,local_58);
    }
    if (uVar13 < uVar9) {
      __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
    }
    local_68[uVar10] = (undefined1)local_b0;
    local_68[uVar10 + 1] = 0;
    local_60 = uVar9;
    cVar4 = __verify_grouping(*(longlong *)(lVar18 + 0x10),*(longlong *)(lVar18 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar4 == '\0') {
      *param_6 = 4;
    }
    if (((iVar7 != 0) || (bVar24)) || (local_60 != 0)) goto LAB_1400487cb;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_1400484f9:
  if (local_91 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar14;
  param_1[1] = uVar1 & 0xffffffff00000000 | local_b8;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x000140048941:
  local_b8 = 0xffffffff;
  bVar20 = bVar22;
  goto LAB_1400484bb;
code_r0x00014004849e:
  local_b8 = 0xffffffff;
  local_91 = 1;
  bVar20 = bVar22;
  goto LAB_1400484bb;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int[abi:cxx11]<unsigned
// long>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong *plVar3;
  bool bVar4;
  char cVar5;
  uint uVar6;
  uint uVar7;
  int iVar8;
  int iVar9;
  longlong lVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  void *pvVar13;
  __numpunct_cache<char> *this;
  uint uVar14;
  ulonglong uVar15;
  longlong *plVar16;
  char cVar17;
  longlong lVar18;
  uint uVar19;
  bool bVar20;
  byte bVar21;
  longlong *plVar22;
  bool bVar23;
  bool bVar24;
  bool bVar25;
  ulonglong local_b0;
  int local_a8;
  uint local_9c;
  ulonglong local_98;
  char local_88;
  byte local_6b;
  byte local_6a;
  undefined1 *local_68;
  ulonglong local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar1 = param_3[1];
  lVar2 = param_4[1];
  plVar3 = (longlong *)*param_3;
  plVar22 = (longlong *)*param_4;
  local_b0 = uVar1 & 0xffffffff;
  lVar10 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  plVar16 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar10 * 8);
  lVar18 = *plVar16;
  if (lVar18 == 0) {
    this = operator_new(0x90);
    *(undefined4 *)(this + 8) = 0;
    *(undefined2 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__numpunct_cache<char>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    this[0x88] = (__numpunct_cache<char>)0x0;
    __numpunct_cache<char>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar10);
    lVar18 = *plVar16;
  }
  uVar14 = *(uint *)(param_5 + 0x18) & 0x4a;
  uVar19 = 8;
  if (uVar14 != 0x40) {
    uVar19 = 10;
    if (uVar14 == 8) {
      uVar19 = 0x10;
    }
  }
  bVar23 = (uint)uVar1 == 0xffffffff;
  plVar16 = plVar3;
  bVar20 = bVar23;
  if (plVar3 != (longlong *)0x0 && bVar23) {
    if ((ulonglong)plVar3[2] < (ulonglong)plVar3[3]) {
      bVar20 = false;
    }
    else {
      iVar9 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar20 = iVar9 == -1;
      plVar16 = (longlong *)0x0;
      if (!bVar20) {
        plVar16 = plVar3;
      }
    }
  }
  local_a8 = (int)lVar2;
  bVar24 = local_a8 == -1;
  bVar4 = bVar24;
  if (plVar22 != (longlong *)0x0 && bVar24) {
    if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
      bVar4 = false;
    }
    else {
      iVar9 = (**(code **)(*plVar22 + 0x48))(plVar22);
      plVar3 = (longlong *)0x0;
      if (iVar9 != -1) {
        plVar3 = plVar22;
      }
      plVar22 = plVar3;
      bVar4 = iVar9 == -1;
    }
  }
  if (bVar20 == bVar4) {
    bVar23 = false;
    cVar5 = *(char *)(lVar18 + 0x20);
    uVar7 = 0;
    bVar20 = false;
    iVar9 = 0;
    bVar4 = true;
LAB_140049197:
    if (uVar19 != 0x10) goto LAB_1400491a0;
LAB_140049471:
    local_98 = 0x16;
    uVar14 = 0x16;
  }
  else {
    if ((plVar16 == (longlong *)0x0) || (!bVar23)) {
      uVar7 = (uint)uVar1 & 0xff;
    }
    else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
      uVar7 = (uint)*(byte *)plVar16[2];
    }
    else {
      uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
      if (uVar7 == 0xffffffff) {
        uVar7 = 0xffffffff;
        plVar16 = (longlong *)0x0;
      }
    }
    cVar17 = (char)uVar7;
    bVar23 = *(char *)(lVar18 + 0x6e) == cVar17;
    cVar5 = *(char *)(lVar18 + 0x20);
    if ((bVar23) || (*(char *)(lVar18 + 0x6f) == cVar17)) {
      if (((cVar5 == '\0') || (*(char *)(lVar18 + 0x49) != cVar17)) &&
         (*(char *)(lVar18 + 0x48) != cVar17)) {
        uVar12 = plVar16[3];
        if ((ulonglong)plVar16[2] < uVar12) {
          uVar11 = plVar16[2] + 1;
          plVar16[2] = uVar11;
        }
        else {
          (**(code **)(*plVar16 + 0x50))(plVar16);
          uVar11 = plVar16[2];
          uVar12 = plVar16[3];
        }
        if ((uVar11 < uVar12) || (iVar9 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar9 != -1)) {
          bVar20 = false;
        }
        else {
          bVar20 = true;
          plVar16 = (longlong *)0x0;
        }
        bVar4 = bVar24;
        if (plVar22 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
            bVar4 = false;
          }
          else {
            iVar9 = (**(code **)(*plVar22 + 0x48))(plVar22);
            bVar4 = iVar9 == -1;
            if (bVar4) {
              plVar22 = (longlong *)0x0;
            }
          }
        }
        if (bVar4 == bVar20) {
          local_b0 = 0xffffffff;
          cVar5 = *(char *)(lVar18 + 0x20);
          bVar4 = true;
          bVar20 = false;
          iVar9 = 0;
          goto LAB_140049197;
        }
        if (plVar16 == (longlong *)0x0) {
LAB_140049b77:
          uVar7 = 0xffffffff;
          plVar16 = (longlong *)0x0;
        }
        else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
          uVar7 = (uint)*(byte *)plVar16[2];
        }
        else {
          uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
          if (uVar7 == 0xffffffff) goto LAB_140049b77;
        }
        local_b0 = 0xffffffff;
        cVar5 = *(char *)(lVar18 + 0x20);
      }
    }
    else {
      bVar23 = false;
    }
    iVar9 = 0;
    bVar20 = false;
    do {
      uVar6 = (uint)local_b0;
      cVar17 = (char)uVar7;
      if (((cVar5 != '\0') && (*(char *)(lVar18 + 0x49) == cVar17)) ||
         (*(char *)(lVar18 + 0x48) == cVar17)) break;
      if (*(char *)(lVar18 + 0x72) == cVar17) {
        bVar4 = (bool)(bVar20 ^ 1U | uVar19 == 10);
        if (!bVar4) goto LAB_140049110;
        bVar20 = uVar14 == 0 || uVar19 == 8;
        if (uVar14 != 0 && uVar19 != 8) {
          iVar9 = iVar9 + 1;
          bVar20 = bVar4;
          goto LAB_140049143;
        }
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        uVar19 = 8;
        iVar9 = 0;
        if (uVar12 < uVar11) goto LAB_140049154;
LAB_1400493e0:
        (**(code **)(*plVar16 + 0x50))(plVar16);
        if ((ulonglong)plVar16[2] < (ulonglong)plVar16[3]) goto LAB_140049165;
LAB_140049408:
        iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16);
        if (iVar8 != -1) goto LAB_140049165;
        bVar4 = true;
        plVar16 = (longlong *)0x0;
      }
      else {
        if (!bVar20) break;
LAB_140049110:
        if ((*(char *)(lVar18 + 0x70) != cVar17) && (*(char *)(lVar18 + 0x71) != cVar17)) {
          bVar4 = false;
          bVar20 = true;
          goto LAB_140049197;
        }
        bVar4 = uVar14 == 0 || uVar19 == 0x10;
        if (uVar14 != 0 && uVar19 != 0x10) {
          bVar20 = true;
          goto LAB_1400491a0;
        }
        iVar9 = 0;
        uVar19 = 0x10;
        bVar20 = false;
LAB_140049143:
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        if (uVar11 <= uVar12) goto LAB_1400493e0;
LAB_140049154:
        plVar16[2] = uVar12 + 1;
        if (uVar11 <= uVar12 + 1) goto LAB_140049408;
LAB_140049165:
        bVar4 = false;
      }
      bVar25 = bVar24;
      if (plVar22 != (longlong *)0x0 && bVar24) {
        if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
          bVar25 = false;
        }
        else {
          iVar8 = (**(code **)(*plVar22 + 0x48))(plVar22);
          bVar25 = iVar8 == -1;
          if (bVar25) {
            plVar22 = (longlong *)0x0;
          }
        }
      }
      if (bVar25 == bVar4) {
        local_b0 = 0xffffffff;
        cVar5 = *(char *)(lVar18 + 0x20);
        bVar4 = true;
        goto LAB_140049197;
      }
      if (plVar16 == (longlong *)0x0) {
LAB_140049550:
        uVar7 = 0xffffffff;
        plVar16 = (longlong *)0x0;
      }
      else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
        uVar7 = (uint)*(byte *)plVar16[2];
      }
      else {
        uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
        if (uVar7 == 0xffffffff) goto LAB_140049550;
      }
      cVar5 = *(char *)(lVar18 + 0x20);
      local_b0 = 0xffffffff;
      uVar6 = 0xffffffff;
    } while (bVar20);
    local_b0 = (ulonglong)uVar6;
    bVar4 = false;
    if (uVar19 == 0x10) goto LAB_140049471;
LAB_1400491a0:
    local_98 = (ulonglong)(int)uVar19;
    uVar14 = uVar19;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar5 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar6 = (uint)(0xffffffff / (ulonglong)uVar19);
  local_6a = *(byte *)(lVar18 + 0x88);
  if (local_6a == 0) {
    local_6b = 0;
    if (bVar4 == false) {
      local_88 = (char)uVar14;
      local_9c = 0;
LAB_14004922d:
      cVar5 = (char)uVar7;
      if (local_98 < 0xb) {
        if ((cVar5 < '0') || ((char)(local_88 + '0') <= cVar5)) goto LAB_140049660;
LAB_14004924e:
        uVar14 = (int)cVar5 - 0x30;
LAB_140049255:
        if (uVar6 < local_9c) goto LAB_1400494c0;
LAB_140049263:
        uVar7 = local_9c * uVar19;
        uVar11 = plVar16[3];
        local_9c = uVar14 + uVar7;
        local_6b = local_6b | CARRY4(uVar14,uVar7);
        uVar12 = plVar16[2];
        iVar9 = iVar9 + 1;
        if (uVar11 <= uVar12) goto LAB_1400494d6;
LAB_140049289:
        uVar12 = uVar12 + 1;
        plVar16[2] = uVar12;
LAB_140049291:
        if ((uVar12 < uVar11) || (iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar8 != -1)) {
          local_b0._0_1_ = false;
        }
        else {
          local_b0._0_1_ = true;
          plVar16 = (longlong *)0x0;
        }
        bVar25 = bVar24;
        if (plVar22 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
            bVar25 = false;
          }
          else {
            iVar8 = (**(code **)(*plVar22 + 0x48))(plVar22);
            bVar25 = iVar8 == -1;
            if (bVar25) {
              plVar22 = (longlong *)0x0;
            }
          }
        }
        if (bVar25 == (bool)(byte)local_b0) goto code_r0x0001400492bd;
        if (plVar16 == (longlong *)0x0) {
LAB_140049858:
          uVar7 = 0xffffffff;
          plVar16 = (longlong *)0x0;
        }
        else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
          uVar7 = (uint)*(byte *)plVar16[2];
        }
        else {
          uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
          if (uVar7 == 0xffffffff) goto LAB_140049858;
        }
        local_b0 = 0xffffffff;
        goto LAB_14004922d;
      }
      if ((byte)(cVar5 - 0x30U) < 10) goto LAB_14004924e;
      if ((byte)(cVar5 + 0x9fU) < 6) {
        uVar14 = (int)cVar5 - 0x57;
        if (local_9c <= uVar6) goto LAB_140049263;
LAB_1400494c0:
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        local_6b = 1;
        if (uVar12 < uVar11) goto LAB_140049289;
LAB_1400494d6:
        (**(code **)(*plVar16 + 0x50))(plVar16);
        uVar12 = plVar16[2];
        uVar11 = plVar16[3];
        goto LAB_140049291;
      }
      if ((byte)(cVar5 + 0xbfU) < 6) {
        uVar14 = (int)cVar5 - 0x37;
        goto LAB_140049255;
      }
LAB_140049660:
      local_6a = 0;
      bVar21 = bVar4;
    }
    else {
      local_9c = 0;
      bVar21 = 0;
      local_6a = bVar4;
    }
  }
  else {
    if (bVar4 == false) {
      local_6b = 0;
      local_9c = 0;
      do {
        uVar12 = local_60;
        bVar21 = *(byte *)(lVar18 + 0x20);
        cVar5 = (char)uVar7;
        if ((bVar21 == 0) || (*(char *)(lVar18 + 0x49) != cVar5)) {
          if (*(char *)(lVar18 + 0x48) == cVar5 || local_98 == 0) goto LAB_140049660;
          pvVar13 = memchr((void *)(lVar18 + 0x72),(int)cVar5,local_98);
          if (pvVar13 == (void *)0x0) {
            bVar4 = false;
            goto LAB_140049660;
          }
          uVar14 = (int)pvVar13 - (int)(void *)(lVar18 + 0x72);
          if (0xf < (int)uVar14) {
            uVar14 = uVar14 - 6;
          }
          if (local_9c <= uVar6) {
            uVar7 = local_9c * uVar19;
            local_9c = uVar14 + uVar7;
            iVar9 = iVar9 + 1;
            local_6b = local_6b | CARRY4(uVar14,uVar7);
            goto LAB_14004970c;
          }
          uVar12 = plVar16[3];
          uVar11 = plVar16[2];
          local_6b = local_6a;
          if (uVar11 < uVar12) goto LAB_140049719;
LAB_140049786:
          (**(code **)(*plVar16 + 0x50))(plVar16);
          uVar11 = plVar16[2];
          uVar12 = plVar16[3];
        }
        else {
          if (iVar9 == 0) {
            local_6a = 0;
            goto LAB_1400492da;
          }
          uVar11 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar15 = 0xf;
          }
          else {
            uVar15 = CONCAT71(uStack_57,local_58);
          }
          if (uVar15 < uVar11) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_a8._0_1_ = (undefined1)iVar9;
          iVar9 = 0;
          local_68[uVar12] = (undefined1)local_a8;
          local_68[uVar11] = 0;
          local_60 = uVar11;
LAB_14004970c:
          uVar11 = plVar16[2];
          uVar12 = plVar16[3];
          if (uVar12 <= uVar11) goto LAB_140049786;
LAB_140049719:
          uVar11 = uVar11 + 1;
          plVar16[2] = uVar11;
        }
        if ((uVar11 < uVar12) || (iVar8 = (**(code **)(*plVar16 + 0x48))(plVar16), iVar8 != -1)) {
          local_b0._0_1_ = 0;
        }
        else {
          plVar16 = (longlong *)0x0;
          local_b0._0_1_ = local_6a;
        }
        bVar25 = bVar24;
        if (plVar22 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)plVar22[2] < (ulonglong)plVar22[3]) {
            bVar25 = false;
          }
          else {
            iVar8 = (**(code **)(*plVar22 + 0x48))(plVar22);
            bVar25 = iVar8 == -1;
            if (bVar25) {
              plVar22 = (longlong *)0x0;
            }
          }
        }
        if (bVar25 == (bool)(byte)local_b0) goto code_r0x000140049749;
        if (plVar16 == (longlong *)0x0) {
LAB_1400498d8:
          uVar7 = 0xffffffff;
          plVar16 = (longlong *)0x0;
        }
        else if ((byte *)plVar16[2] < (byte *)plVar16[3]) {
          uVar7 = (uint)*(byte *)plVar16[2];
        }
        else {
          uVar7 = (**(code **)(*plVar16 + 0x48))(plVar16);
          if (uVar7 == 0xffffffff) goto LAB_1400498d8;
        }
        local_b0 = 0xffffffff;
      } while( true );
    }
    bVar21 = 0;
    local_9c = 0;
    local_6b = 0;
    local_6a = bVar4;
  }
LAB_1400492da:
  uVar12 = local_60;
  if (local_60 == 0) {
    if ((bVar20) || (iVar9 != 0)) {
LAB_1400495eb:
      if (bVar21 == 0) {
        if (local_6b == 0) {
          uVar19 = -local_9c;
          if (!bVar23) {
            uVar19 = local_9c;
          }
          *param_7 = uVar19;
        }
        else {
          *param_7 = 0xffffffff;
          *param_6 = 4;
        }
        goto LAB_140049318;
      }
    }
  }
  else {
    local_a8._0_1_ = (undefined1)iVar9;
    uVar11 = local_60 + 1;
    if (local_68 == &local_58) {
      uVar15 = 0xf;
    }
    else {
      uVar15 = CONCAT71(uStack_57,local_58);
    }
    if (uVar15 < uVar11) {
      __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
    }
    local_68[uVar12] = (undefined1)local_a8;
    local_68[uVar12 + 1] = 0;
    local_60 = uVar11;
    cVar5 = __verify_grouping(*(longlong *)(lVar18 + 0x10),*(longlong *)(lVar18 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar5 == '\0') {
      *param_6 = 4;
    }
    if (((iVar9 != 0) || (bVar20)) || (local_60 != 0)) goto LAB_1400495eb;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_140049318:
  if (local_6a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar16;
  param_1[1] = uVar1 & 0xffffffff00000000 | local_b0;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x000140049749:
  local_b0 = 0xffffffff;
  bVar21 = bVar4;
  goto LAB_1400492da;
code_r0x0001400492bd:
  local_b0 = 0xffffffff;
  local_6a = 1;
  bVar21 = bVar4;
  goto LAB_1400492da;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int[abi:cxx11]<unsigned
// short>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,ushort *param_7)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong *plVar3;
  ushort uVar4;
  bool bVar5;
  char cVar6;
  int iVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  void *pvVar11;
  __numpunct_cache<char> *this;
  uint uVar12;
  ulonglong uVar13;
  longlong *plVar14;
  char cVar15;
  int iVar16;
  uint uVar17;
  longlong lVar18;
  int iVar19;
  uint uVar20;
  bool bVar21;
  byte bVar22;
  longlong *plVar23;
  bool bVar24;
  bool bVar25;
  bool bVar26;
  ulonglong local_b0;
  int local_a8;
  uint local_9c;
  ulonglong local_98;
  char local_88;
  ushort local_70;
  byte local_6b;
  byte local_6a;
  undefined1 *local_68;
  ulonglong local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar1 = param_3[1];
  lVar2 = param_4[1];
  plVar3 = (longlong *)*param_3;
  plVar23 = (longlong *)*param_4;
  local_b0 = uVar1 & 0xffffffff;
  lVar8 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  plVar14 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar8 * 8);
  lVar18 = *plVar14;
  if (lVar18 == 0) {
    this = operator_new(0x90);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
    this[0x20] = (__numpunct_cache<char>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined2 *)(this + 0x48) = 0;
    this[0x88] = (__numpunct_cache<char>)0x0;
    __numpunct_cache<char>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar8);
    lVar18 = *plVar14;
  }
  uVar12 = *(uint *)(param_5 + 0x18) & 0x4a;
  iVar19 = 8;
  if (uVar12 != 0x40) {
    iVar19 = 10;
    if (uVar12 == 8) {
      iVar19 = 0x10;
    }
  }
  bVar24 = (uint)uVar1 == 0xffffffff;
  plVar14 = plVar3;
  bVar21 = bVar24;
  if (plVar3 != (longlong *)0x0 && bVar24) {
    if ((ulonglong)plVar3[2] < (ulonglong)plVar3[3]) {
      bVar21 = false;
    }
    else {
      iVar7 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar21 = iVar7 == -1;
      plVar14 = (longlong *)0x0;
      if (!bVar21) {
        plVar14 = plVar3;
      }
    }
  }
  local_a8 = (int)lVar2;
  bVar25 = local_a8 == -1;
  bVar5 = bVar25;
  if (plVar23 != (longlong *)0x0 && bVar25) {
    if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
      bVar5 = false;
    }
    else {
      iVar7 = (**(code **)(*plVar23 + 0x48))(plVar23);
      plVar3 = (longlong *)0x0;
      if (iVar7 != -1) {
        plVar3 = plVar23;
      }
      plVar23 = plVar3;
      bVar5 = iVar7 == -1;
    }
  }
  if (bVar21 == bVar5) {
    bVar24 = false;
    cVar6 = *(char *)(lVar18 + 0x20);
    uVar17 = 0;
    bVar21 = false;
    iVar7 = 0;
    bVar5 = true;
LAB_140049fa7:
    if (iVar19 != 0x10) goto LAB_140049fb0;
LAB_14004a291:
    local_98 = 0x16;
    iVar16 = 0x16;
  }
  else {
    if ((plVar14 == (longlong *)0x0) || (!bVar24)) {
      uVar17 = (uint)uVar1 & 0xff;
    }
    else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
      uVar17 = (uint)*(byte *)plVar14[2];
    }
    else {
      uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
      if (uVar17 == 0xffffffff) {
        uVar17 = 0xffffffff;
        plVar14 = (longlong *)0x0;
      }
    }
    cVar15 = (char)uVar17;
    bVar24 = *(char *)(lVar18 + 0x6e) == cVar15;
    cVar6 = *(char *)(lVar18 + 0x20);
    if ((bVar24) || (*(char *)(lVar18 + 0x6f) == cVar15)) {
      if (((cVar6 == '\0') || (*(char *)(lVar18 + 0x49) != cVar15)) &&
         (*(char *)(lVar18 + 0x48) != cVar15)) {
        uVar10 = plVar14[3];
        if ((ulonglong)plVar14[2] < uVar10) {
          uVar9 = plVar14[2] + 1;
          plVar14[2] = uVar9;
        }
        else {
          (**(code **)(*plVar14 + 0x50))(plVar14);
          uVar9 = plVar14[2];
          uVar10 = plVar14[3];
        }
        if ((uVar9 < uVar10) || (iVar7 = (**(code **)(*plVar14 + 0x48))(plVar14), iVar7 != -1)) {
          bVar21 = false;
        }
        else {
          bVar21 = true;
          plVar14 = (longlong *)0x0;
        }
        bVar5 = bVar25;
        if (plVar23 != (longlong *)0x0 && bVar25) {
          if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
            bVar5 = false;
          }
          else {
            iVar7 = (**(code **)(*plVar23 + 0x48))(plVar23);
            bVar5 = iVar7 == -1;
            if (bVar5) {
              plVar23 = (longlong *)0x0;
            }
          }
        }
        if (bVar5 == bVar21) {
          local_b0 = 0xffffffff;
          cVar6 = *(char *)(lVar18 + 0x20);
          bVar5 = true;
          bVar21 = false;
          iVar7 = 0;
          goto LAB_140049fa7;
        }
        if (plVar14 == (longlong *)0x0) {
LAB_14004a9c7:
          uVar17 = 0xffffffff;
          plVar14 = (longlong *)0x0;
        }
        else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
          uVar17 = (uint)*(byte *)plVar14[2];
        }
        else {
          uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
          if (uVar17 == 0xffffffff) goto LAB_14004a9c7;
        }
        local_b0 = 0xffffffff;
        cVar6 = *(char *)(lVar18 + 0x20);
      }
    }
    else {
      bVar24 = false;
    }
    iVar7 = 0;
    bVar21 = false;
    do {
      uVar20 = (uint)local_b0;
      cVar15 = (char)uVar17;
      if (((cVar6 != '\0') && (*(char *)(lVar18 + 0x49) == cVar15)) ||
         (*(char *)(lVar18 + 0x48) == cVar15)) break;
      if (*(char *)(lVar18 + 0x72) == cVar15) {
        bVar5 = (bool)(bVar21 ^ 1U | iVar19 == 10);
        if (!bVar5) goto LAB_140049f20;
        bVar21 = uVar12 == 0 || iVar19 == 8;
        if (uVar12 != 0 && iVar19 != 8) {
          iVar7 = iVar7 + 1;
          bVar21 = bVar5;
          goto LAB_140049f53;
        }
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        iVar19 = 8;
        iVar7 = 0;
        if (uVar10 < uVar9) goto LAB_140049f64;
LAB_14004a200:
        (**(code **)(*plVar14 + 0x50))(plVar14);
        if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) goto LAB_140049f75;
LAB_14004a228:
        iVar16 = (**(code **)(*plVar14 + 0x48))(plVar14);
        if (iVar16 != -1) goto LAB_140049f75;
        bVar5 = true;
        plVar14 = (longlong *)0x0;
      }
      else {
        if (!bVar21) break;
LAB_140049f20:
        if ((*(char *)(lVar18 + 0x70) != cVar15) && (*(char *)(lVar18 + 0x71) != cVar15)) {
          bVar5 = false;
          bVar21 = true;
          goto LAB_140049fa7;
        }
        bVar5 = uVar12 == 0 || iVar19 == 0x10;
        if (uVar12 != 0 && iVar19 != 0x10) {
          bVar21 = true;
          goto LAB_140049fb0;
        }
        iVar7 = 0;
        iVar19 = 0x10;
        bVar21 = false;
LAB_140049f53:
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        if (uVar9 <= uVar10) goto LAB_14004a200;
LAB_140049f64:
        plVar14[2] = uVar10 + 1;
        if (uVar9 <= uVar10 + 1) goto LAB_14004a228;
LAB_140049f75:
        bVar5 = false;
      }
      bVar26 = bVar25;
      if (plVar23 != (longlong *)0x0 && bVar25) {
        if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
          bVar26 = false;
        }
        else {
          iVar16 = (**(code **)(*plVar23 + 0x48))(plVar23);
          bVar26 = iVar16 == -1;
          if (bVar26) {
            plVar23 = (longlong *)0x0;
          }
        }
      }
      if (bVar26 == bVar5) {
        local_b0 = 0xffffffff;
        cVar6 = *(char *)(lVar18 + 0x20);
        bVar5 = true;
        goto LAB_140049fa7;
      }
      if (plVar14 == (longlong *)0x0) {
LAB_14004a370:
        uVar17 = 0xffffffff;
        plVar14 = (longlong *)0x0;
      }
      else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
        uVar17 = (uint)*(byte *)plVar14[2];
      }
      else {
        uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
        if (uVar17 == 0xffffffff) goto LAB_14004a370;
      }
      cVar6 = *(char *)(lVar18 + 0x20);
      local_b0 = 0xffffffff;
      uVar20 = 0xffffffff;
    } while (bVar21);
    local_b0 = (ulonglong)uVar20;
    bVar5 = false;
    if (iVar19 == 0x10) goto LAB_14004a291;
LAB_140049fb0:
    local_98 = (ulonglong)iVar19;
    iVar16 = iVar19;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar6 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  local_6a = *(byte *)(lVar18 + 0x88);
  local_70 = (ushort)(0xffff / (ulonglong)(longlong)iVar19);
  if (local_6a == 0) {
    local_6b = 0;
    if (bVar5 == false) {
      local_9c = 0;
      local_88 = (char)iVar16;
LAB_14004a03c:
      cVar6 = (char)uVar17;
      if (local_98 < 0xb) {
        if ((cVar6 < '0') || ((char)(local_88 + '0') <= cVar6)) goto LAB_14004a490;
LAB_14004a05d:
        iVar16 = cVar6 + -0x30;
LAB_14004a064:
        if (local_70 < (ushort)local_9c) goto LAB_14004a2e0;
LAB_14004a074:
        local_6b = local_6b | 0xffff - iVar16 < (int)(local_9c * iVar19 & 0xffff);
        uVar9 = plVar14[3];
        local_9c = (uint)(ushort)((short)(local_9c * iVar19) + (short)iVar16);
        uVar10 = plVar14[2];
        iVar7 = iVar7 + 1;
        if (uVar9 <= uVar10) goto LAB_14004a2f6;
LAB_14004a0a7:
        uVar10 = uVar10 + 1;
        plVar14[2] = uVar10;
LAB_14004a0af:
        if ((uVar10 < uVar9) || (iVar16 = (**(code **)(*plVar14 + 0x48))(plVar14), iVar16 != -1)) {
          local_b0._0_1_ = false;
        }
        else {
          local_b0._0_1_ = true;
          plVar14 = (longlong *)0x0;
        }
        bVar26 = bVar25;
        if (plVar23 != (longlong *)0x0 && bVar25) {
          if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
            bVar26 = false;
          }
          else {
            iVar16 = (**(code **)(*plVar23 + 0x48))(plVar23);
            bVar26 = iVar16 == -1;
            if (bVar26) {
              plVar23 = (longlong *)0x0;
            }
          }
        }
        if (bVar26 == (bool)(byte)local_b0) goto code_r0x00014004a0db;
        if (plVar14 == (longlong *)0x0) {
LAB_14004a698:
          uVar17 = 0xffffffff;
          plVar14 = (longlong *)0x0;
        }
        else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
          uVar17 = (uint)*(byte *)plVar14[2];
        }
        else {
          uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
          if (uVar17 == 0xffffffff) goto LAB_14004a698;
        }
        local_b0 = 0xffffffff;
        goto LAB_14004a03c;
      }
      if ((byte)(cVar6 - 0x30U) < 10) goto LAB_14004a05d;
      if ((byte)(cVar6 + 0x9fU) < 6) {
        iVar16 = cVar6 + -0x57;
        if ((ushort)local_9c <= local_70) goto LAB_14004a074;
LAB_14004a2e0:
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        local_6b = 1;
        if (uVar10 < uVar9) goto LAB_14004a0a7;
LAB_14004a2f6:
        (**(code **)(*plVar14 + 0x50))(plVar14);
        uVar10 = plVar14[2];
        uVar9 = plVar14[3];
        goto LAB_14004a0af;
      }
      if ((byte)(cVar6 + 0xbfU) < 6) {
        iVar16 = cVar6 + -0x37;
        goto LAB_14004a064;
      }
LAB_14004a490:
      local_6a = 0;
      bVar22 = bVar5;
    }
    else {
      local_9c._0_2_ = 0;
      bVar22 = 0;
      local_6a = bVar5;
    }
  }
  else {
    if (bVar5 == false) {
      local_6b = 0;
      local_9c = 0;
      do {
        uVar10 = local_60;
        bVar22 = *(byte *)(lVar18 + 0x20);
        cVar6 = (char)uVar17;
        if ((bVar22 == 0) || (*(char *)(lVar18 + 0x49) != cVar6)) {
          if (*(char *)(lVar18 + 0x48) == cVar6 || local_98 == 0) goto LAB_14004a490;
          pvVar11 = memchr((void *)(lVar18 + 0x72),(int)cVar6,local_98);
          if (pvVar11 == (void *)0x0) {
            bVar5 = false;
            goto LAB_14004a490;
          }
          iVar16 = (int)pvVar11 - (int)(void *)(lVar18 + 0x72);
          if (0xf < iVar16) {
            iVar16 = iVar16 + -6;
          }
          if ((ushort)local_9c <= local_70) {
            local_6b = local_6b | 0xffff - iVar16 < (int)(local_9c * iVar19 & 0xffff);
            iVar7 = iVar7 + 1;
            local_9c = (uint)(ushort)((short)iVar16 + (short)(local_9c * iVar19));
            goto LAB_14004a550;
          }
          uVar10 = plVar14[3];
          uVar9 = plVar14[2];
          local_6b = local_6a;
          if (uVar9 < uVar10) goto LAB_14004a55d;
LAB_14004a5c6:
          (**(code **)(*plVar14 + 0x50))(plVar14);
          uVar9 = plVar14[2];
          uVar10 = plVar14[3];
        }
        else {
          if (iVar7 == 0) {
            local_6a = 0;
            goto LAB_14004a0f8;
          }
          uVar9 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar13 = 0xf;
          }
          else {
            uVar13 = CONCAT71(uStack_57,local_58);
          }
          if (uVar13 < uVar9) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_a8._0_1_ = (undefined1)iVar7;
          iVar7 = 0;
          local_68[uVar10] = (undefined1)local_a8;
          local_68[uVar9] = 0;
          local_60 = uVar9;
LAB_14004a550:
          uVar9 = plVar14[2];
          uVar10 = plVar14[3];
          if (uVar10 <= uVar9) goto LAB_14004a5c6;
LAB_14004a55d:
          uVar9 = uVar9 + 1;
          plVar14[2] = uVar9;
        }
        if ((uVar9 < uVar10) || (iVar16 = (**(code **)(*plVar14 + 0x48))(plVar14), iVar16 != -1)) {
          local_b0._0_1_ = 0;
        }
        else {
          plVar14 = (longlong *)0x0;
          local_b0._0_1_ = local_6a;
        }
        bVar26 = bVar25;
        if (plVar23 != (longlong *)0x0 && bVar25) {
          if ((ulonglong)plVar23[2] < (ulonglong)plVar23[3]) {
            bVar26 = false;
          }
          else {
            iVar16 = (**(code **)(*plVar23 + 0x48))(plVar23);
            bVar26 = iVar16 == -1;
            if (bVar26) {
              plVar23 = (longlong *)0x0;
            }
          }
        }
        if (bVar26 == (bool)(byte)local_b0) goto code_r0x00014004a58d;
        if (plVar14 == (longlong *)0x0) {
LAB_14004a718:
          uVar17 = 0xffffffff;
          plVar14 = (longlong *)0x0;
        }
        else if ((byte *)plVar14[2] < (byte *)plVar14[3]) {
          uVar17 = (uint)*(byte *)plVar14[2];
        }
        else {
          uVar17 = (**(code **)(*plVar14 + 0x48))(plVar14);
          if (uVar17 == 0xffffffff) goto LAB_14004a718;
        }
        local_b0 = 0xffffffff;
      } while( true );
    }
    bVar22 = 0;
    local_9c._0_2_ = 0;
    local_6b = 0;
    local_6a = bVar5;
  }
LAB_14004a0f8:
  uVar10 = local_60;
  if (local_60 == 0) {
    if ((bVar21) || (iVar7 != 0)) {
LAB_14004a40d:
      if (bVar22 == 0) {
        if (local_6b == 0) {
          uVar4 = -(ushort)local_9c;
          if (!bVar24) {
            uVar4 = (ushort)local_9c;
          }
          *param_7 = uVar4;
        }
        else {
          *param_7 = 0xffff;
          *param_6 = 4;
        }
        goto LAB_14004a137;
      }
    }
  }
  else {
    local_a8._0_1_ = (undefined1)iVar7;
    uVar9 = local_60 + 1;
    if (local_68 == &local_58) {
      uVar13 = 0xf;
    }
    else {
      uVar13 = CONCAT71(uStack_57,local_58);
    }
    if (uVar13 < uVar9) {
      __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
    }
    local_68[uVar10] = (undefined1)local_a8;
    local_68[uVar10 + 1] = 0;
    local_60 = uVar9;
    cVar6 = __verify_grouping(*(longlong *)(lVar18 + 0x10),*(longlong *)(lVar18 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar6 == '\0') {
      *param_6 = 4;
    }
    if (((iVar7 != 0) || (bVar21)) || (local_60 != 0)) goto LAB_14004a40d;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004a137:
  if (local_6a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar14;
  param_1[1] = uVar1 & 0xffffffff00000000 | local_b0;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x00014004a58d:
  local_b0 = 0xffffffff;
  bVar22 = bVar5;
  goto LAB_14004a0f8;
code_r0x00014004a0db:
  local_b0 = 0xffffffff;
  local_6a = 1;
  bVar22 = bVar5;
  goto LAB_14004a0f8;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int[abi:cxx11]<long
// long>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<long_long>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  longlong *plVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  char cVar5;
  uint uVar6;
  int iVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  void *pvVar12;
  __numpunct_cache<char> *this;
  uint uVar13;
  ulonglong uVar14;
  longlong *plVar15;
  char cVar16;
  byte bVar17;
  int iVar18;
  longlong lVar19;
  bool bVar20;
  int iVar21;
  ulonglong uVar22;
  bool bVar23;
  bool bVar24;
  bool bVar25;
  bool bVar26;
  longlong *local_c8;
  int local_c0;
  ulonglong local_b8;
  ulonglong local_b0;
  byte local_83;
  byte local_82;
  bool local_81;
  char local_80;
  undefined1 *local_68;
  ulonglong local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar2 = param_3[1];
  lVar3 = param_4[1];
  local_c8 = (longlong *)*param_4;
  plVar15 = (longlong *)*param_3;
  uVar22 = uVar2 & 0xffffffff;
  lVar8 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar8 * 8);
  lVar19 = *plVar1;
  if (lVar19 == 0) {
    this = operator_new(0x90);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
    this[0x20] = (__numpunct_cache<char>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined2 *)(this + 0x48) = 0;
    this[0x88] = (__numpunct_cache<char>)0x0;
    __numpunct_cache<char>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar8);
    lVar19 = *plVar1;
  }
  uVar6 = *(uint *)(param_5 + 0x18);
  uVar13 = uVar6 & 0x4a;
  iVar18 = 8;
  if (uVar13 != 0x40) {
    iVar18 = 10;
    if (uVar13 == 8) {
      iVar18 = 0x10;
    }
  }
  bVar23 = (int)uVar2 == -1;
  bVar20 = bVar23;
  if (plVar15 != (longlong *)0x0 && bVar23) {
    if ((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) {
      bVar20 = false;
    }
    else {
      iVar21 = (**(code **)(*plVar15 + 0x48))(plVar15);
      plVar1 = (longlong *)0x0;
      if (iVar21 != -1) {
        plVar1 = plVar15;
      }
      plVar15 = plVar1;
      bVar20 = iVar21 == -1;
    }
  }
  uVar6 = uVar6 & 0x4a;
  local_c0 = (int)lVar3;
  bVar24 = local_c0 == -1;
  bVar26 = bVar24;
  if (local_c8 != (longlong *)0x0 && bVar24) {
    if ((ulonglong)local_c8[2] < (ulonglong)local_c8[3]) {
      bVar26 = false;
    }
    else {
      iVar21 = (**(code **)(*local_c8 + 0x48))(local_c8);
      plVar1 = (longlong *)0x0;
      if (iVar21 != -1) {
        plVar1 = local_c8;
      }
      local_c8 = plVar1;
      bVar26 = iVar21 == -1;
    }
  }
  if (bVar20 == bVar26) {
    local_81 = false;
    cVar5 = *(char *)(lVar19 + 0x20);
    uVar11 = 0;
    iVar21 = 0;
    bVar20 = true;
    bVar23 = false;
LAB_14004adf1:
    if (iVar18 != 0x10) goto LAB_14004adfa;
LAB_14004b113:
    local_b0 = 0x16;
    iVar7 = 0x16;
  }
  else {
    if ((plVar15 == (longlong *)0x0) || (!bVar23)) {
      uVar11 = uVar2 & 0xffffffff;
    }
    else if ((byte *)plVar15[2] < (byte *)plVar15[3]) {
      uVar11 = (ulonglong)*(byte *)plVar15[2];
    }
    else {
      uVar13 = (**(code **)(*plVar15 + 0x48))(plVar15);
      uVar11 = (ulonglong)uVar13;
      if (uVar13 == 0xffffffff) {
        uVar11 = 0xffffffff;
        plVar15 = (longlong *)0x0;
      }
    }
    cVar16 = (char)uVar11;
    local_81 = *(char *)(lVar19 + 0x6e) == cVar16;
    cVar5 = *(char *)(lVar19 + 0x20);
    if ((local_81) || (*(char *)(lVar19 + 0x6f) == cVar16)) {
      if (((cVar5 == '\0') || (*(char *)(lVar19 + 0x49) != cVar16)) &&
         (*(char *)(lVar19 + 0x48) != cVar16)) {
        uVar22 = plVar15[3];
        if ((ulonglong)plVar15[2] < uVar22) {
          uVar9 = plVar15[2] + 1;
          plVar15[2] = uVar9;
        }
        else {
          (**(code **)(*plVar15 + 0x50))(plVar15);
          uVar9 = plVar15[2];
          uVar22 = plVar15[3];
        }
        if ((uVar9 < uVar22) || (iVar21 = (**(code **)(*plVar15 + 0x48))(plVar15), iVar21 != -1)) {
          bVar20 = false;
        }
        else {
          bVar20 = true;
          plVar15 = (longlong *)0x0;
        }
        bVar23 = bVar24;
        plVar1 = local_c8;
        if (local_c8 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)local_c8[2] < (ulonglong)local_c8[3]) {
            bVar23 = false;
          }
          else {
            iVar21 = (**(code **)(*local_c8 + 0x48))(local_c8);
            bVar23 = iVar21 == -1;
            plVar1 = (longlong *)0x0;
            if (!bVar23) {
              plVar1 = local_c8;
            }
          }
        }
        local_c8 = plVar1;
        if (bVar23 == bVar20) {
          bVar20 = true;
          cVar5 = *(char *)(lVar19 + 0x20);
          iVar21 = 0;
          bVar23 = false;
          uVar22 = 0xffffffff;
          goto LAB_14004adf1;
        }
        if (plVar15 == (longlong *)0x0) {
LAB_14004b867:
          uVar11 = 0xffffffff;
          plVar15 = (longlong *)0x0;
        }
        else if ((byte *)plVar15[2] < (byte *)plVar15[3]) {
          uVar11 = (ulonglong)*(byte *)plVar15[2];
        }
        else {
          uVar13 = (**(code **)(*plVar15 + 0x48))(plVar15);
          uVar11 = (ulonglong)uVar13;
          if (uVar13 == 0xffffffff) goto LAB_14004b867;
        }
        cVar5 = *(char *)(lVar19 + 0x20);
        uVar22 = 0xffffffff;
      }
    }
    else {
      local_81 = false;
    }
    iVar21 = 0;
    bVar23 = false;
    do {
      cVar16 = (char)uVar11;
      if (((cVar5 != '\0') && (*(char *)(lVar19 + 0x49) == cVar16)) ||
         (*(char *)(lVar19 + 0x48) == cVar16)) break;
      if (*(char *)(lVar19 + 0x72) == cVar16) {
        bVar20 = (bool)(bVar23 ^ 1U | iVar18 == 10);
        if (!bVar20) goto LAB_14004ad6d;
        bVar23 = uVar6 == 0 || iVar18 == 8;
        if (uVar6 != 0 && iVar18 != 8) {
          iVar21 = iVar21 + 1;
          bVar23 = bVar20;
          goto LAB_14004ad9b;
        }
        uVar22 = plVar15[2];
        uVar9 = plVar15[3];
        iVar21 = 0;
        iVar18 = 8;
        if (uVar9 <= uVar22) goto LAB_14004b068;
LAB_14004adac:
        plVar15[2] = uVar22 + 1;
        if (uVar22 + 1 < uVar9) goto LAB_14004adbd;
LAB_14004b098:
        iVar7 = (**(code **)(*plVar15 + 0x48))(plVar15);
        if (iVar7 != -1) goto LAB_14004adbd;
        bVar20 = true;
        plVar15 = (longlong *)0x0;
      }
      else {
        if (!bVar23) break;
LAB_14004ad6d:
        if ((*(char *)(lVar19 + 0x70) != cVar16) && (*(char *)(lVar19 + 0x71) != cVar16)) {
          bVar23 = true;
          bVar20 = false;
          goto LAB_14004adf1;
        }
        bVar20 = uVar6 == 0 || iVar18 == 0x10;
        if (uVar6 != 0 && iVar18 != 0x10) {
          bVar23 = true;
          goto LAB_14004adfa;
        }
        iVar21 = 0;
        iVar18 = 0x10;
        bVar23 = false;
LAB_14004ad9b:
        uVar22 = plVar15[2];
        uVar9 = plVar15[3];
        if (uVar22 < uVar9) goto LAB_14004adac;
LAB_14004b068:
        (**(code **)(*plVar15 + 0x50))(plVar15);
        if ((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) goto LAB_14004b098;
LAB_14004adbd:
        bVar20 = false;
      }
      bVar26 = bVar24;
      if (local_c8 != (longlong *)0x0 && bVar24) {
        if ((ulonglong)local_c8[2] < (ulonglong)local_c8[3]) {
          bVar26 = false;
        }
        else {
          iVar7 = (**(code **)(*local_c8 + 0x48))(local_c8);
          bVar26 = iVar7 == -1;
          if (bVar26) {
            local_c8 = (longlong *)0x0;
          }
        }
      }
      if (bVar26 == bVar20) {
        cVar5 = *(char *)(lVar19 + 0x20);
        uVar22 = 0xffffffff;
        bVar20 = true;
        goto LAB_14004adf1;
      }
      if (plVar15 == (longlong *)0x0) {
LAB_14004b1f8:
        uVar11 = 0xffffffff;
        plVar15 = (longlong *)0x0;
      }
      else if ((byte *)plVar15[2] < (byte *)plVar15[3]) {
        uVar11 = (ulonglong)*(byte *)plVar15[2];
      }
      else {
        uVar13 = (**(code **)(*plVar15 + 0x48))(plVar15);
        uVar11 = (ulonglong)uVar13;
        if (uVar13 == 0xffffffff) goto LAB_14004b1f8;
      }
      cVar5 = *(char *)(lVar19 + 0x20);
      uVar22 = 0xffffffff;
    } while (bVar23);
    bVar20 = false;
    if (iVar18 == 0x10) goto LAB_14004b113;
LAB_14004adfa:
    local_b0 = (ulonglong)iVar18;
    iVar7 = iVar18;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar5 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar9 = (ulonglong)local_81 + 0x7fffffffffffffff;
  uVar14 = (ulonglong)iVar18;
  uVar10 = uVar9 / uVar14;
  local_82 = *(byte *)(lVar19 + 0x88);
  if (local_82 == 0) {
    local_83 = 0;
    if (bVar20 == false) {
      local_b8 = 0;
      local_80 = (char)iVar7;
LAB_14004aeac:
      cVar5 = (char)uVar11;
      if (local_b0 < 0xb) {
        if ((cVar5 < '0') || ((char)(local_80 + '0') <= cVar5)) goto LAB_14004b330;
LAB_14004aecd:
        iVar18 = cVar5 + -0x30;
LAB_14004aed4:
        if (local_b8 <= uVar10) goto LAB_14004aee4;
LAB_14004b160:
        uVar22 = plVar15[2];
        uVar11 = plVar15[3];
        local_83 = 1;
        if (uVar11 <= uVar22) goto LAB_14004b176;
LAB_14004af1f:
        uVar22 = uVar22 + 1;
        plVar15[2] = uVar22;
LAB_14004af27:
        if ((uVar22 < uVar11) || (iVar18 = (**(code **)(*plVar15 + 0x48))(plVar15), iVar18 != -1)) {
          bVar26 = false;
        }
        else {
          bVar26 = true;
          plVar15 = (longlong *)0x0;
        }
        bVar25 = bVar24;
        plVar1 = local_c8;
        if (local_c8 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)local_c8[2] < (ulonglong)local_c8[3]) {
            bVar25 = false;
          }
          else {
            iVar18 = (**(code **)(*local_c8 + 0x48))(local_c8);
            bVar25 = iVar18 == -1;
            plVar1 = (longlong *)0x0;
            if (!bVar25) {
              plVar1 = local_c8;
            }
          }
        }
        local_c8 = plVar1;
        if (bVar25 == bVar26) goto code_r0x00014004af51;
        if (plVar15 == (longlong *)0x0) {
LAB_14004b510:
          uVar11 = 0xffffffff;
          plVar15 = (longlong *)0x0;
        }
        else if ((byte *)plVar15[2] < (byte *)plVar15[3]) {
          uVar11 = (ulonglong)*(byte *)plVar15[2];
        }
        else {
          uVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
          uVar11 = (ulonglong)uVar6;
          if (uVar6 == 0xffffffff) goto LAB_14004b510;
        }
        uVar22 = 0xffffffff;
        goto LAB_14004aeac;
      }
      if ((byte)(cVar5 - 0x30U) < 10) goto LAB_14004aecd;
      if ((byte)(cVar5 + 0x9fU) < 6) {
        iVar18 = cVar5 + -0x57;
        if (uVar10 < local_b8) goto LAB_14004b160;
LAB_14004aee4:
        uVar22 = local_b8 * uVar14;
        local_b8 = uVar22 + (longlong)iVar18;
        local_83 = local_83 | uVar9 - (longlong)iVar18 < uVar22;
        uVar11 = plVar15[3];
        uVar22 = plVar15[2];
        iVar21 = iVar21 + 1;
        if (uVar22 < uVar11) goto LAB_14004af1f;
LAB_14004b176:
        (**(code **)(*plVar15 + 0x50))(plVar15);
        uVar22 = plVar15[2];
        uVar11 = plVar15[3];
        goto LAB_14004af27;
      }
      if ((byte)(cVar5 + 0xbfU) < 6) {
        iVar18 = cVar5 + -0x37;
        goto LAB_14004aed4;
      }
LAB_14004b330:
      local_82 = 0;
      bVar17 = bVar20;
    }
    else {
      local_b8 = 0;
      local_82 = bVar20;
      bVar17 = 0;
    }
  }
  else {
    if (bVar20 == false) {
      local_83 = 0;
      local_b8 = 0;
      do {
        uVar4 = local_60;
        bVar17 = *(byte *)(lVar19 + 0x20);
        cVar5 = (char)uVar11;
        if ((bVar17 == 0) || (*(char *)(lVar19 + 0x49) != cVar5)) {
          if (*(char *)(lVar19 + 0x48) == cVar5 || local_b0 == 0) goto LAB_14004b330;
          pvVar12 = memchr((void *)(lVar19 + 0x72),(int)cVar5,local_b0);
          if (pvVar12 == (void *)0x0) {
            bVar20 = false;
            goto LAB_14004b330;
          }
          iVar18 = (int)pvVar12 - (int)(void *)(lVar19 + 0x72);
          if (0xf < iVar18) {
            iVar18 = iVar18 + -6;
          }
          if (local_b8 <= uVar10) {
            uVar22 = local_b8 * uVar14;
            local_b8 = (longlong)iVar18 + uVar22;
            local_83 = local_83 | uVar9 - (longlong)iVar18 < uVar22;
            iVar21 = iVar21 + 1;
            goto LAB_14004b3f9;
          }
          uVar22 = plVar15[3];
          uVar11 = plVar15[2];
          local_83 = local_82;
          if (uVar22 <= uVar11) goto LAB_14004b466;
LAB_14004b406:
          uVar11 = uVar11 + 1;
          plVar15[2] = uVar11;
        }
        else {
          if (iVar21 == 0) {
            local_82 = 0;
            goto LAB_14004af6c;
          }
          uVar22 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar11 = 0xf;
          }
          else {
            uVar11 = CONCAT71(uStack_57,local_58);
          }
          if (uVar11 < uVar22) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[uVar4] = (char)iVar21;
          iVar21 = 0;
          local_68[uVar22] = 0;
          local_60 = uVar22;
LAB_14004b3f9:
          uVar11 = plVar15[2];
          uVar22 = plVar15[3];
          if (uVar11 < uVar22) goto LAB_14004b406;
LAB_14004b466:
          (**(code **)(*plVar15 + 0x50))(plVar15);
          uVar11 = plVar15[2];
          uVar22 = plVar15[3];
        }
        if ((uVar11 < uVar22) || (iVar18 = (**(code **)(*plVar15 + 0x48))(plVar15), iVar18 != -1)) {
          bVar17 = 0;
        }
        else {
          plVar15 = (longlong *)0x0;
          bVar17 = local_82;
        }
        bVar26 = bVar24;
        plVar1 = local_c8;
        if (local_c8 != (longlong *)0x0 && bVar24) {
          if ((ulonglong)local_c8[2] < (ulonglong)local_c8[3]) {
            bVar26 = false;
          }
          else {
            iVar18 = (**(code **)(*local_c8 + 0x48))(local_c8);
            bVar26 = iVar18 == -1;
            plVar1 = (longlong *)0x0;
            if (!bVar26) {
              plVar1 = local_c8;
            }
          }
        }
        local_c8 = plVar1;
        if (bVar26 == (bool)bVar17) goto code_r0x00014004b434;
        if (plVar15 == (longlong *)0x0) {
LAB_14004b590:
          uVar11 = 0xffffffff;
          plVar15 = (longlong *)0x0;
        }
        else if ((byte *)plVar15[2] < (byte *)plVar15[3]) {
          uVar11 = (ulonglong)*(byte *)plVar15[2];
        }
        else {
          uVar6 = (**(code **)(*plVar15 + 0x48))(plVar15);
          uVar11 = (ulonglong)uVar6;
          if (uVar6 == 0xffffffff) goto LAB_14004b590;
        }
        uVar22 = 0xffffffff;
      } while( true );
    }
    local_83 = 0;
    bVar17 = 0;
    local_b8 = 0;
    local_82 = bVar20;
  }
LAB_14004af6c:
  uVar11 = local_60;
  if (local_60 == 0) {
    if ((bVar23) || (iVar21 != 0)) {
LAB_14004b290:
      if (bVar17 == 0) {
        if (local_83 == 0) {
          uVar11 = -local_b8;
          if (local_81 == false) {
            uVar11 = local_b8;
          }
          *param_7 = uVar11;
        }
        else {
          uVar11 = 0x7fffffffffffffff;
          if (local_81 != false) {
            uVar11 = 0x8000000000000000;
          }
          *param_7 = uVar11;
          *param_6 = 4;
        }
        goto LAB_14004afa8;
      }
    }
  }
  else {
    uVar9 = local_60 + 1;
    if (local_68 == &local_58) {
      uVar10 = 0xf;
    }
    else {
      uVar10 = CONCAT71(uStack_57,local_58);
    }
    if (uVar10 < uVar9) {
      __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
    }
    local_68[uVar11] = (char)iVar21;
    local_68[uVar11 + 1] = 0;
    local_60 = uVar9;
    cVar5 = __verify_grouping(*(longlong *)(lVar19 + 0x10),*(longlong *)(lVar19 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar5 == '\0') {
      *param_6 = 4;
    }
    if (((iVar21 != 0) || (bVar23)) || (local_60 != 0)) goto LAB_14004b290;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004afa8:
  if (local_82 != 0) {
    *param_6 = *param_6 | 2;
  }
  param_1[1] = uVar2 & 0xffffffff00000000 | uVar22;
  *param_1 = plVar15;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x00014004b434:
  uVar22 = 0xffffffff;
  bVar17 = bVar20;
  goto LAB_14004af6c;
code_r0x00014004af51:
  local_82 = 1;
  uVar22 = 0xffffffff;
  bVar17 = bVar20;
  goto LAB_14004af6c;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int[abi:cxx11]<unsigned
// long long>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// unsigned long long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined1 auVar4 [16];
  bool bVar5;
  char cVar6;
  int iVar7;
  int iVar8;
  longlong lVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  void *pvVar13;
  ulonglong uVar14;
  __numpunct_cache<char> *this;
  ulonglong uVar15;
  uint uVar16;
  uint uVar17;
  longlong *plVar18;
  char cVar19;
  int iVar20;
  longlong lVar21;
  undefined1 uVar22;
  bool bVar23;
  byte bVar24;
  longlong *plVar25;
  bool bVar26;
  bool bVar27;
  bool bVar28;
  bool bVar29;
  int local_b8;
  ulonglong local_b0;
  ulonglong local_a8;
  char local_88;
  uint local_70;
  byte local_6b;
  byte local_6a;
  undefined1 *local_68;
  ulonglong local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar1 = param_3[1];
  lVar2 = param_4[1];
  plVar3 = (longlong *)*param_3;
  plVar25 = (longlong *)*param_4;
  local_70 = (uint)uVar1;
  lVar9 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  plVar18 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar9 * 8);
  lVar21 = *plVar18;
  if (lVar21 == 0) {
    this = operator_new(0x90);
    *(undefined4 *)(this + 8) = 0;
    *(undefined2 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__numpunct_cache<char>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    this[0x88] = (__numpunct_cache<char>)0x0;
    __numpunct_cache<char>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar9);
    lVar21 = *plVar18;
  }
  uVar17 = *(uint *)(param_5 + 0x18);
  uVar16 = uVar17 & 0x4a;
  iVar20 = 8;
  if (uVar16 != 0x40) {
    iVar20 = 10;
    if (uVar16 == 8) {
      iVar20 = 0x10;
    }
  }
  bVar26 = local_70 == 0xffffffff;
  plVar18 = plVar3;
  bVar23 = bVar26;
  if (plVar3 != (longlong *)0x0 && bVar26) {
    if ((ulonglong)plVar3[2] < (ulonglong)plVar3[3]) {
      bVar23 = false;
    }
    else {
      iVar8 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar23 = iVar8 == -1;
      plVar18 = (longlong *)0x0;
      if (!bVar23) {
        plVar18 = plVar3;
      }
    }
  }
  uVar17 = uVar17 & 0x4a;
  local_b8 = (int)lVar2;
  bVar27 = local_b8 == -1;
  bVar5 = bVar27;
  if (plVar25 != (longlong *)0x0 && bVar27) {
    if ((ulonglong)plVar25[2] < (ulonglong)plVar25[3]) {
      bVar5 = false;
    }
    else {
      iVar8 = (**(code **)(*plVar25 + 0x48))(plVar25);
      plVar3 = (longlong *)0x0;
      if (iVar8 != -1) {
        plVar3 = plVar25;
      }
      plVar25 = plVar3;
      bVar5 = iVar8 == -1;
    }
  }
  if (bVar23 == bVar5) {
    bVar26 = false;
    cVar6 = *(char *)(lVar21 + 0x20);
    uVar16 = 0;
    bVar23 = false;
    iVar8 = 0;
    bVar5 = true;
LAB_14004bca7:
    if (iVar20 != 0x10) goto LAB_14004bcb0;
LAB_14004bfa1:
    local_a8 = 0x16;
    iVar7 = 0x16;
  }
  else {
    if ((plVar18 == (longlong *)0x0) || (!bVar26)) {
      uVar16 = local_70 & 0xff;
    }
    else if ((byte *)plVar18[2] < (byte *)plVar18[3]) {
      uVar16 = (uint)*(byte *)plVar18[2];
    }
    else {
      uVar16 = (**(code **)(*plVar18 + 0x48))(plVar18);
      if (uVar16 == 0xffffffff) {
        uVar16 = 0xffffffff;
        plVar18 = (longlong *)0x0;
      }
    }
    cVar19 = (char)uVar16;
    bVar26 = *(char *)(lVar21 + 0x6e) == cVar19;
    cVar6 = *(char *)(lVar21 + 0x20);
    if ((bVar26) || (*(char *)(lVar21 + 0x6f) == cVar19)) {
      if (((cVar6 == '\0') || (*(char *)(lVar21 + 0x49) != cVar19)) &&
         (*(char *)(lVar21 + 0x48) != cVar19)) {
        uVar11 = plVar18[3];
        if ((ulonglong)plVar18[2] < uVar11) {
          uVar10 = plVar18[2] + 1;
          plVar18[2] = uVar10;
        }
        else {
          (**(code **)(*plVar18 + 0x50))(plVar18);
          uVar10 = plVar18[2];
          uVar11 = plVar18[3];
        }
        if ((uVar10 < uVar11) || (iVar8 = (**(code **)(*plVar18 + 0x48))(plVar18), iVar8 != -1)) {
          bVar23 = false;
        }
        else {
          bVar23 = true;
          plVar18 = (longlong *)0x0;
        }
        bVar5 = bVar27;
        if (plVar25 != (longlong *)0x0 && bVar27) {
          if ((ulonglong)plVar25[2] < (ulonglong)plVar25[3]) {
            bVar5 = false;
          }
          else {
            iVar8 = (**(code **)(*plVar25 + 0x48))(plVar25);
            bVar5 = iVar8 == -1;
            if (bVar5) {
              plVar25 = (longlong *)0x0;
            }
          }
        }
        if (bVar5 == bVar23) {
          local_70 = 0xffffffff;
          cVar6 = *(char *)(lVar21 + 0x20);
          bVar5 = true;
          bVar23 = false;
          iVar8 = 0;
          goto LAB_14004bca7;
        }
        if (plVar18 == (longlong *)0x0) {
LAB_14004c6cf:
          uVar16 = 0xffffffff;
          plVar18 = (longlong *)0x0;
        }
        else if ((byte *)plVar18[2] < (byte *)plVar18[3]) {
          uVar16 = (uint)*(byte *)plVar18[2];
        }
        else {
          uVar16 = (**(code **)(*plVar18 + 0x48))(plVar18);
          if (uVar16 == 0xffffffff) goto LAB_14004c6cf;
        }
        local_70 = 0xffffffff;
        cVar6 = *(char *)(lVar21 + 0x20);
      }
    }
    else {
      bVar26 = false;
    }
    iVar8 = 0;
    bVar23 = false;
    do {
      cVar19 = (char)uVar16;
      if (((cVar6 != '\0') && (*(char *)(lVar21 + 0x49) == cVar19)) ||
         (*(char *)(lVar21 + 0x48) == cVar19)) break;
      if (*(char *)(lVar21 + 0x72) == cVar19) {
        bVar5 = (bool)(bVar23 ^ 1U | iVar20 == 10);
        if (!bVar5) goto LAB_14004bc20;
        bVar23 = uVar17 == 0 || iVar20 == 8;
        if (uVar17 != 0 && iVar20 != 8) {
          iVar8 = iVar8 + 1;
          bVar23 = bVar5;
          goto LAB_14004bc53;
        }
        uVar11 = plVar18[2];
        uVar10 = plVar18[3];
        iVar20 = 8;
        iVar8 = 0;
        if (uVar11 < uVar10) goto LAB_14004bc64;
LAB_14004bf10:
        (**(code **)(*plVar18 + 0x50))(plVar18);
        if ((ulonglong)plVar18[2] < (ulonglong)plVar18[3]) goto LAB_14004bc75;
LAB_14004bf38:
        iVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
        if (iVar7 != -1) goto LAB_14004bc75;
        bVar5 = true;
        plVar18 = (longlong *)0x0;
      }
      else {
        if (!bVar23) break;
LAB_14004bc20:
        if ((*(char *)(lVar21 + 0x70) != cVar19) && (*(char *)(lVar21 + 0x71) != cVar19)) {
          bVar5 = false;
          bVar23 = true;
          goto LAB_14004bca7;
        }
        bVar5 = uVar17 == 0 || iVar20 == 0x10;
        if (uVar17 != 0 && iVar20 != 0x10) {
          bVar23 = true;
          goto LAB_14004bcb0;
        }
        iVar8 = 0;
        iVar20 = 0x10;
        bVar23 = false;
LAB_14004bc53:
        uVar11 = plVar18[2];
        uVar10 = plVar18[3];
        if (uVar10 <= uVar11) goto LAB_14004bf10;
LAB_14004bc64:
        plVar18[2] = uVar11 + 1;
        if (uVar10 <= uVar11 + 1) goto LAB_14004bf38;
LAB_14004bc75:
        bVar5 = false;
      }
      bVar29 = bVar27;
      if (plVar25 != (longlong *)0x0 && bVar27) {
        if ((ulonglong)plVar25[2] < (ulonglong)plVar25[3]) {
          bVar29 = false;
        }
        else {
          iVar7 = (**(code **)(*plVar25 + 0x48))(plVar25);
          bVar29 = iVar7 == -1;
          if (bVar29) {
            plVar25 = (longlong *)0x0;
          }
        }
      }
      if (bVar29 == bVar5) {
        local_70 = 0xffffffff;
        cVar6 = *(char *)(lVar21 + 0x20);
        bVar5 = true;
        goto LAB_14004bca7;
      }
      if (plVar18 == (longlong *)0x0) {
LAB_14004c080:
        uVar16 = 0xffffffff;
        plVar18 = (longlong *)0x0;
      }
      else if ((byte *)plVar18[2] < (byte *)plVar18[3]) {
        uVar16 = (uint)*(byte *)plVar18[2];
      }
      else {
        uVar16 = (**(code **)(*plVar18 + 0x48))(plVar18);
        if (uVar16 == 0xffffffff) goto LAB_14004c080;
      }
      cVar6 = *(char *)(lVar21 + 0x20);
      local_70 = 0xffffffff;
    } while (bVar23);
    bVar5 = false;
    if (iVar20 == 0x10) goto LAB_14004bfa1;
LAB_14004bcb0:
    local_a8 = (ulonglong)iVar20;
    iVar7 = iVar20;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar6 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar10 = (ulonglong)iVar20;
  auVar4._8_8_ = 0;
  auVar4._0_8_ = uVar10;
  uVar11 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar4,0);
  local_6a = *(byte *)(lVar21 + 0x88);
  if (local_6a == 0) {
    local_6b = 0;
    if (bVar5 == false) {
      local_b0 = 0;
      local_88 = (char)iVar7;
LAB_14004bd4d:
      cVar6 = (char)uVar16;
      if (local_a8 < 0xb) {
        if ((cVar6 < '0') || ((char)(local_88 + '0') <= cVar6)) goto LAB_14004c1a0;
LAB_14004bd6e:
        iVar20 = cVar6 + -0x30;
LAB_14004bd75:
        if (uVar11 < local_b0) goto LAB_14004bff0;
LAB_14004bd85:
        uVar14 = plVar18[3];
        uVar12 = local_b0 * uVar10;
        local_b0 = (longlong)iVar20 + uVar12;
        local_6b = local_6b | CARRY8((longlong)iVar20,uVar12);
        uVar12 = plVar18[2];
        iVar8 = iVar8 + 1;
        if (uVar14 <= uVar12) goto LAB_14004c006;
LAB_14004bdb6:
        uVar12 = uVar12 + 1;
        plVar18[2] = uVar12;
LAB_14004bdbe:
        if ((uVar12 < uVar14) || (iVar20 = (**(code **)(*plVar18 + 0x48))(plVar18), iVar20 != -1)) {
          bVar29 = false;
        }
        else {
          bVar29 = true;
          plVar18 = (longlong *)0x0;
        }
        bVar28 = bVar27;
        if (plVar25 != (longlong *)0x0 && bVar27) {
          if ((ulonglong)plVar25[2] < (ulonglong)plVar25[3]) {
            bVar28 = false;
          }
          else {
            iVar20 = (**(code **)(*plVar25 + 0x48))(plVar25);
            bVar28 = iVar20 == -1;
            if (bVar28) {
              plVar25 = (longlong *)0x0;
            }
          }
        }
        if (bVar28 == bVar29) goto code_r0x00014004bde5;
        if (plVar18 == (longlong *)0x0) {
LAB_14004c388:
          uVar16 = 0xffffffff;
          plVar18 = (longlong *)0x0;
        }
        else if ((byte *)plVar18[2] < (byte *)plVar18[3]) {
          uVar16 = (uint)*(byte *)plVar18[2];
        }
        else {
          uVar16 = (**(code **)(*plVar18 + 0x48))(plVar18);
          if (uVar16 == 0xffffffff) goto LAB_14004c388;
        }
        local_70 = 0xffffffff;
        goto LAB_14004bd4d;
      }
      if ((byte)(cVar6 - 0x30U) < 10) goto LAB_14004bd6e;
      if ((byte)(cVar6 + 0x9fU) < 6) {
        iVar20 = cVar6 + -0x57;
        if (local_b0 <= uVar11) goto LAB_14004bd85;
LAB_14004bff0:
        uVar12 = plVar18[2];
        uVar14 = plVar18[3];
        local_6b = 1;
        if (uVar12 < uVar14) goto LAB_14004bdb6;
LAB_14004c006:
        (**(code **)(*plVar18 + 0x50))(plVar18);
        uVar12 = plVar18[2];
        uVar14 = plVar18[3];
        goto LAB_14004bdbe;
      }
      if ((byte)(cVar6 + 0xbfU) < 6) {
        iVar20 = cVar6 + -0x37;
        goto LAB_14004bd75;
      }
LAB_14004c1a0:
      local_6a = 0;
      bVar24 = bVar5;
    }
    else {
      local_b0 = 0;
      bVar24 = 0;
      local_6a = bVar5;
    }
  }
  else {
    if (bVar5 == false) {
      local_6b = 0;
      local_b0 = 0;
      do {
        uVar12 = local_60;
        bVar24 = *(byte *)(lVar21 + 0x20);
        cVar6 = (char)uVar16;
        if ((bVar24 == 0) || (*(char *)(lVar21 + 0x49) != cVar6)) {
          if (*(char *)(lVar21 + 0x48) == cVar6 || local_a8 == 0) goto LAB_14004c1a0;
          pvVar13 = memchr((void *)(lVar21 + 0x72),(int)cVar6,local_a8);
          if (pvVar13 == (void *)0x0) {
            bVar5 = false;
            goto LAB_14004c1a0;
          }
          iVar20 = (int)pvVar13 - (int)(void *)(lVar21 + 0x72);
          if (0xf < iVar20) {
            iVar20 = iVar20 + -6;
          }
          if (local_b0 <= uVar11) {
            uVar12 = local_b0 * uVar10;
            local_b0 = (longlong)iVar20 + uVar12;
            iVar8 = iVar8 + 1;
            local_6b = local_6b | CARRY8((longlong)iVar20,uVar12);
            goto LAB_14004c259;
          }
          uVar12 = plVar18[3];
          uVar14 = plVar18[2];
          local_6b = local_6a;
          if (uVar14 < uVar12) goto LAB_14004c266;
LAB_14004c2c6:
          (**(code **)(*plVar18 + 0x50))(plVar18);
          uVar14 = plVar18[2];
          uVar12 = plVar18[3];
        }
        else {
          if (iVar8 == 0) {
            local_6a = 0;
            goto LAB_14004be02;
          }
          uVar22 = (undefined1)iVar8;
          uVar14 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar15 = 0xf;
          }
          else {
            uVar15 = CONCAT71(uStack_57,local_58);
          }
          if (uVar15 < uVar14) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          iVar8 = 0;
          local_68[uVar12] = uVar22;
          local_68[uVar14] = 0;
          local_60 = uVar14;
LAB_14004c259:
          uVar14 = plVar18[2];
          uVar12 = plVar18[3];
          if (uVar12 <= uVar14) goto LAB_14004c2c6;
LAB_14004c266:
          uVar14 = uVar14 + 1;
          plVar18[2] = uVar14;
        }
        if ((uVar14 < uVar12) || (iVar20 = (**(code **)(*plVar18 + 0x48))(plVar18), iVar20 != -1)) {
          bVar24 = 0;
        }
        else {
          plVar18 = (longlong *)0x0;
          bVar24 = local_6a;
        }
        bVar29 = bVar27;
        if (plVar25 != (longlong *)0x0 && bVar27) {
          if ((ulonglong)plVar25[2] < (ulonglong)plVar25[3]) {
            bVar29 = false;
          }
          else {
            iVar20 = (**(code **)(*plVar25 + 0x48))(plVar25);
            bVar29 = iVar20 == -1;
            if (bVar29) {
              plVar25 = (longlong *)0x0;
            }
          }
        }
        if (bVar29 == (bool)bVar24) goto code_r0x00014004c291;
        if (plVar18 == (longlong *)0x0) {
LAB_14004c408:
          uVar16 = 0xffffffff;
          plVar18 = (longlong *)0x0;
        }
        else if ((byte *)plVar18[2] < (byte *)plVar18[3]) {
          uVar16 = (uint)*(byte *)plVar18[2];
        }
        else {
          uVar16 = (**(code **)(*plVar18 + 0x48))(plVar18);
          if (uVar16 == 0xffffffff) goto LAB_14004c408;
        }
        local_70 = 0xffffffff;
      } while( true );
    }
    bVar24 = 0;
    local_6b = 0;
    local_b0 = 0;
    local_6a = bVar5;
  }
LAB_14004be02:
  uVar11 = local_60;
  if (local_60 == 0) {
    if ((bVar23) || (iVar8 != 0)) {
LAB_14004c11b:
      if (bVar24 == 0) {
        if (local_6b == 0) {
          uVar11 = -local_b0;
          if (!bVar26) {
            uVar11 = local_b0;
          }
          *param_7 = uVar11;
        }
        else {
          *param_7 = 0xffffffffffffffff;
          *param_6 = 4;
        }
        goto LAB_14004be41;
      }
    }
  }
  else {
    local_b8._0_1_ = (undefined1)iVar8;
    uVar10 = local_60 + 1;
    if (local_68 == &local_58) {
      uVar12 = 0xf;
    }
    else {
      uVar12 = CONCAT71(uStack_57,local_58);
    }
    if (uVar12 < uVar10) {
      __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
    }
    local_68[uVar11] = (undefined1)local_b8;
    local_68[uVar11 + 1] = 0;
    local_60 = uVar10;
    cVar6 = __verify_grouping(*(longlong *)(lVar21 + 0x10),*(longlong *)(lVar21 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar6 == '\0') {
      *param_6 = 4;
    }
    if (((iVar8 != 0) || (bVar23)) || (local_60 != 0)) goto LAB_14004c11b;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004be41:
  if (local_6a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar18;
  param_1[1] = uVar1 & 0xffffffff00000000 | (ulonglong)local_70;
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x00014004c291:
  local_70 = 0xffffffff;
  bVar24 = bVar5;
  goto LAB_14004be02;
code_r0x00014004bde5:
  local_70 = 0xffffffff;
  local_6a = 1;
  bVar24 = bVar5;
  goto LAB_14004be02;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int<unsigned
// int>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  byte bVar1;
  bool bVar2;
  longlong *plVar3;
  char cVar4;
  char cVar5;
  int iVar6;
  uint uVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  void *pvVar11;
  char cVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  int iVar17;
  byte bVar18;
  byte bVar19;
  bool bVar20;
  bool bVar21;
  bool bVar22;
  ulonglong local_b0;
  istreambuf_iterator<> *local_a0;
  longlong **local_98;
  uint local_80;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar8 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar14 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar14 == 0x40) {
    uVar7 = 8;
LAB_14004c918:
    uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar4 = (char)uVar9;
    if (cVar4 == '\0') {
LAB_14004c93e:
      local_98 = &local_78;
      local_a0 = (istreambuf_iterator<> *)&local_68;
      uVar9 = istreambuf_iterator<>::_M_get(local_a0);
      cVar4 = (char)uVar9;
      bVar20 = *(char *)(lVar8 + 0x6e) == cVar4;
      uVar9 = uVar9 & 0xffffffff;
      if ((bVar20) || (*(char *)(lVar8 + 0x6f) == cVar4)) {
        cVar12 = *(char *)(lVar8 + 0x20);
        if (((cVar12 != '\0') && (*(char *)(lVar8 + 0x49) == cVar4)) ||
           (*(char *)(lVar8 + 0x48) == cVar4)) goto LAB_14004c9aa;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar10 = istreambuf_iterator<>::equal(local_a0,(longlong *)local_98);
        cVar4 = (char)uVar10;
        if (cVar4 == '\0') {
          uVar9 = istreambuf_iterator<>::_M_get(local_a0);
          cVar12 = *(char *)(lVar8 + 0x20);
          uVar9 = uVar9 & 0xffffffff;
          goto LAB_14004c9aa;
        }
        iVar17 = 0;
        bVar2 = false;
      }
      else {
        bVar20 = false;
        cVar12 = *(char *)(lVar8 + 0x20);
LAB_14004c9aa:
        iVar17 = 0;
        bVar2 = false;
        while (((plVar3 = local_68, cVar4 = (char)uVar9, cVar12 == '\0' ||
                (*(char *)(lVar8 + 0x49) != cVar4)) && (*(char *)(lVar8 + 0x48) != cVar4))) {
          if (*(char *)(lVar8 + 0x72) == cVar4) {
            bVar2 = (bool)(bVar2 ^ 1U | uVar7 == 10);
            if (!bVar2) goto LAB_14004c9d7;
            bVar22 = uVar7 == 8;
            if (bVar22 || uVar14 == 0) {
              iVar17 = 0;
              uVar7 = 8;
              bVar2 = bVar22 || uVar14 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar2) break;
LAB_14004c9d7:
            if ((*(char *)(lVar8 + 0x70) != cVar4) && (*(char *)(lVar8 + 0x71) != cVar4)) {
              cVar4 = '\0';
              bVar2 = true;
              goto LAB_14004ca5f;
            }
            cVar4 = uVar14 == 0 || uVar7 == 0x10;
            if (uVar14 != 0 && uVar7 != 0x10) {
              bVar2 = true;
              goto LAB_14004ca69;
            }
            iVar17 = 0;
            uVar7 = 0x10;
            bVar2 = false;
          }
          if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
            uVar10 = local_68[2] + 1;
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            local_68[2] = uVar10;
            if (uVar10 < (ulonglong)local_68[3]) goto LAB_14004ca34;
LAB_14004cda0:
            iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar6 != -1) goto LAB_14004ca34;
            local_68 = (longlong *)0x0;
            bVar22 = true;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            if ((ulonglong)plVar3[3] <= (ulonglong)plVar3[2]) goto LAB_14004cda0;
LAB_14004ca34:
            bVar22 = false;
          }
          bVar21 = (int)uStack_70 == -1;
          if (local_78 != (longlong *)0x0 && bVar21) {
            if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
               (iVar6 = (**(code **)(*local_78 + 0x48))(), iVar6 != -1)) {
              bVar21 = false;
            }
            else {
              local_78 = (longlong *)0x0;
              bVar21 = true;
            }
          }
          if (bVar21 == bVar22) {
            cVar4 = '\x01';
            goto LAB_14004ca5f;
          }
          if (local_68 == (longlong *)0x0) {
LAB_14004cde0:
            uVar9 = 0xffffffff;
          }
          else if ((byte *)local_68[2] < (byte *)local_68[3]) {
            uVar9 = (ulonglong)*(byte *)local_68[2];
          }
          else {
            uVar15 = (**(code **)(*local_68 + 0x48))();
            uVar9 = (ulonglong)uVar15;
            if (uVar15 == 0xffffffff) {
              local_68 = (longlong *)0x0;
              goto LAB_14004cde0;
            }
          }
          if (!bVar2) break;
          cVar12 = *(char *)(lVar8 + 0x20);
        }
        cVar4 = '\0';
      }
LAB_14004ca5f:
      if (uVar7 == 0x10) goto LAB_14004cc68;
    }
    else {
      bVar20 = false;
      uVar9 = 0;
      iVar17 = 0;
      bVar2 = false;
    }
LAB_14004ca69:
    local_b0 = (ulonglong)(int)uVar7;
    local_80 = uVar7;
  }
  else {
    uVar7 = 10;
    if (uVar14 != 8) goto LAB_14004c918;
    uVar7 = 0x10;
    uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar4 = (char)uVar9;
    if (cVar4 == '\0') goto LAB_14004c93e;
    bVar20 = false;
    uVar9 = 0;
    iVar17 = 0;
    bVar2 = false;
LAB_14004cc68:
    local_80 = 0x10;
    uVar7 = 0x16;
    local_b0 = 0x16;
  }
  local_98 = &local_78;
  local_a0 = (istreambuf_iterator<> *)&local_68;
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar8 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar14 = (uint)(0xffffffff / (ulonglong)local_80);
  bVar1 = *(byte *)(lVar8 + 0x88);
  cVar12 = cVar4;
  if (bVar1 == 0) {
    bVar18 = 0;
    if (cVar4 == '\0') {
      uVar15 = 0;
LAB_14004cadb:
      do {
        cVar12 = (char)uVar9;
        if (local_b0 < 0xb) {
          if ((cVar12 < '0') || ((char)((char)uVar7 + '0') <= cVar12)) goto LAB_14004cdf0;
        }
        else if (9 < (byte)(cVar12 - 0x30U)) goto LAB_14004cd1d;
        uVar13 = (int)cVar12 - 0x30;
        while( true ) {
          plVar3 = local_68;
          if (uVar14 < uVar15) {
            bVar18 = 1;
          }
          else {
            uVar16 = uVar15 * local_80;
            uVar15 = uVar13 + uVar16;
            iVar17 = iVar17 + 1;
            bVar18 = bVar18 | CARRY4(uVar13,uVar16);
          }
          uVar9 = local_68[3];
          if ((ulonglong)local_68[2] < uVar9) {
            uVar10 = local_68[2] + 1;
            local_68[2] = uVar10;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uVar10 = plVar3[2];
            uVar9 = plVar3[3];
          }
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          bVar22 = false;
          if (uVar9 <= uVar10) {
            iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar6 == -1) {
              local_68 = (longlong *)0x0;
            }
            bVar22 = iVar6 == -1;
          }
          bVar21 = (int)uStack_70 == -1;
          if (((local_78 != (longlong *)0x0) && (bVar21)) &&
             (bVar21 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
            iVar6 = (**(code **)(*local_78 + 0x48))();
            bVar21 = iVar6 == -1;
            if (bVar21) {
              local_78 = (longlong *)0x0;
            }
          }
          if (bVar21 == bVar22) {
            cVar5 = cVar4;
            cVar12 = '\x01';
            goto LAB_14004cb7e;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14004cdf0;
          if ((byte *)local_68[2] < (byte *)local_68[3]) break;
          uVar13 = (**(code **)(*local_68 + 0x48))();
          uVar9 = (ulonglong)uVar13;
          if (uVar13 != 0xffffffff) goto LAB_14004cadb;
          local_68 = (longlong *)0x0;
          if (local_b0 < 0xb) goto LAB_14004cdf0;
          cVar12 = -1;
LAB_14004cd1d:
          if ((byte)(cVar12 + 0x9fU) < 6) {
            uVar13 = (int)cVar12 - 0x57;
          }
          else {
            if (5 < (byte)(cVar12 + 0xbfU)) goto LAB_14004cdf0;
            uVar13 = (int)cVar12 - 0x37;
          }
        }
        uVar9 = (ulonglong)*(byte *)local_68[2];
      } while( true );
    }
    uVar15 = 0;
    cVar5 = '\0';
LAB_14004cb7e:
    cVar4 = cVar5;
    cVar5 = cVar12;
    if (local_50[0][-3] != 0) goto LAB_14004ce06;
LAB_14004cb98:
    if ((iVar17 != 0) || (bVar2)) goto LAB_14004ce50;
  }
  else {
    if (cVar4 != '\0') {
      uVar15 = 0;
      bVar18 = 0;
      cVar5 = '\0';
      goto LAB_14004cb7e;
    }
    bVar18 = 0;
    uVar15 = 0;
    cVar5 = *(char *)(lVar8 + 0x20);
    if ((cVar5 != '\0') && (*(char *)(lVar8 + 0x49) == (char)uVar9)) goto LAB_14004cfc6;
LAB_14004cf09:
    cVar12 = (char)uVar9;
    bVar22 = *(char *)(lVar8 + 0x48) == cVar12;
    if (!bVar22 && local_b0 != 0) {
      pvVar11 = memchr((void *)(lVar8 + 0x72),(int)cVar12,local_b0);
      if (pvVar11 != (void *)0x0) {
        uVar7 = (int)pvVar11 - (int)(void *)(lVar8 + 0x72);
        if (0xf < (int)uVar7) {
          uVar7 = uVar7 - 6;
        }
        bVar19 = bVar1;
        if (uVar15 <= uVar14) {
          uVar13 = uVar15 * local_80;
          uVar15 = uVar7 + uVar13;
          iVar17 = iVar17 + 1;
          bVar19 = bVar18 | CARRY4(uVar7,uVar13);
        }
        uVar9 = local_68[2];
        bVar18 = bVar19;
        if ((ulonglong)local_68[3] <= uVar9) goto LAB_14004cff2;
        do {
          local_68[2] = uVar9 + 1;
          while( true ) {
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            uVar9 = istreambuf_iterator<>::equal(local_a0,(longlong *)local_98);
            cVar5 = cVar4;
            cVar12 = (char)uVar9;
            if ((char)uVar9 != '\0') goto LAB_14004cb7e;
            uVar9 = istreambuf_iterator<>::_M_get(local_a0);
            uVar9 = uVar9 & 0xffffffff;
            cVar5 = *(char *)(lVar8 + 0x20);
            if ((cVar5 == '\0') || (*(char *)(lVar8 + 0x49) != (char)uVar9)) goto LAB_14004cf09;
LAB_14004cfc6:
            if (iVar17 == 0) {
              iVar17 = 0;
              cVar12 = '\0';
              goto LAB_14004cb7e;
            }
            std::string::push_back((string *)local_50,(char)iVar17);
            iVar17 = 0;
            uVar9 = local_68[2];
            if (uVar9 < (ulonglong)local_68[3]) break;
LAB_14004cff2:
            (**(code **)(*local_68 + 0x50))();
          }
        } while( true );
      }
      cVar5 = '\0';
      cVar12 = bVar22 || local_b0 == 0;
      goto LAB_14004cb7e;
    }
LAB_14004cdf0:
    cVar12 = '\0';
    cVar5 = '\0';
    if (local_50[0][-3] == 0) goto LAB_14004cb98;
LAB_14004ce06:
    cVar12 = cVar5;
    std::string::push_back((string *)local_50,(char)iVar17);
    cVar5 = __verify_grouping(*(longlong *)(lVar8 + 0x10),*(longlong *)(lVar8 + 0x18),
                              (undefined8 *)local_50);
    if (cVar5 == '\0') {
      *param_6 = 4;
    }
    if (((iVar17 != 0) || (bVar2)) || (local_50[0][-3] != 0)) {
LAB_14004ce50:
      if (cVar4 == '\0') {
        if (bVar18 == 0) {
          if (bVar20) {
            uVar15 = -uVar15;
          }
          *param_7 = uVar15;
        }
        else {
          *param_7 = 0xffffffff;
          *param_6 = 4;
        }
        goto LAB_14004cbc7;
      }
    }
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004cbc7:
  if (cVar12 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_int<long>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// long&) const

undefined8 *
std::num_get<>::_M_extract_int<long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  byte bVar1;
  longlong *plVar2;
  char cVar3;
  char cVar4;
  longlong lVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  void *pvVar8;
  char cVar9;
  int iVar10;
  int iVar11;
  uint uVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  byte bVar16;
  byte bVar17;
  bool bVar18;
  bool bVar19;
  bool bVar20;
  ulonglong local_b8;
  istreambuf_iterator<> *local_a8;
  uint local_a0;
  longlong **local_98;
  uint local_80;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar5 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar12 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar12 == 0x40) {
    uVar15 = 8;
LAB_14004d258:
    uVar6 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar3 = (char)uVar6;
    if (cVar3 == '\0') {
LAB_14004d27e:
      local_98 = &local_78;
      local_a8 = (istreambuf_iterator<> *)&local_68;
      uVar6 = istreambuf_iterator<>::_M_get(local_a8);
      cVar3 = (char)uVar6;
      bVar18 = *(char *)(lVar5 + 0x6e) == cVar3;
      uVar6 = uVar6 & 0xffffffff;
      local_80 = (uint)bVar18;
      if ((bVar18) || (*(char *)(lVar5 + 0x6f) == cVar3)) {
        cVar9 = *(char *)(lVar5 + 0x20);
        if (((cVar9 != '\0') && (*(char *)(lVar5 + 0x49) == cVar3)) ||
           (*(char *)(lVar5 + 0x48) == cVar3)) goto LAB_14004d2ea;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar7 = istreambuf_iterator<>::equal(local_a8,(longlong *)local_98);
        cVar3 = (char)uVar7;
        if (cVar3 == '\0') {
          uVar6 = istreambuf_iterator<>::_M_get(local_a8);
          cVar9 = *(char *)(lVar5 + 0x20);
          uVar6 = uVar6 & 0xffffffff;
          goto LAB_14004d2ea;
        }
        iVar11 = 0;
        bVar18 = false;
      }
      else {
        local_80 = 0;
        cVar9 = *(char *)(lVar5 + 0x20);
LAB_14004d2ea:
        iVar11 = 0;
        bVar18 = false;
        while (((plVar2 = local_68, cVar3 = (char)uVar6, cVar9 == '\0' ||
                (*(char *)(lVar5 + 0x49) != cVar3)) && (*(char *)(lVar5 + 0x48) != cVar3))) {
          if (*(char *)(lVar5 + 0x72) == cVar3) {
            bVar18 = (bool)(bVar18 ^ 1U | uVar15 == 10);
            if (!bVar18) goto LAB_14004d317;
            bVar20 = uVar15 == 8;
            if (bVar20 || uVar12 == 0) {
              iVar11 = 0;
              uVar15 = 8;
              bVar18 = bVar20 || uVar12 == 0;
            }
            else {
              iVar11 = iVar11 + 1;
            }
          }
          else {
            if (!bVar18) break;
LAB_14004d317:
            if ((*(char *)(lVar5 + 0x70) != cVar3) && (*(char *)(lVar5 + 0x71) != cVar3)) {
              cVar3 = '\0';
              bVar18 = true;
              goto LAB_14004d39f;
            }
            cVar3 = uVar12 == 0 || uVar15 == 0x10;
            if (uVar12 != 0 && uVar15 != 0x10) {
              bVar18 = true;
              goto LAB_14004d3a9;
            }
            iVar11 = 0;
            uVar15 = 0x10;
            bVar18 = false;
          }
          if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
            uVar7 = local_68[2] + 1;
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            local_68[2] = uVar7;
            if (uVar7 < (ulonglong)local_68[3]) goto LAB_14004d374;
LAB_14004d6e0:
            iVar10 = (**(code **)(*plVar2 + 0x48))(plVar2);
            if (iVar10 != -1) goto LAB_14004d374;
            local_68 = (longlong *)0x0;
            bVar20 = true;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            if ((ulonglong)plVar2[3] <= (ulonglong)plVar2[2]) goto LAB_14004d6e0;
LAB_14004d374:
            bVar20 = false;
          }
          bVar19 = (int)uStack_70 == -1;
          if (local_78 != (longlong *)0x0 && bVar19) {
            if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
               (iVar10 = (**(code **)(*local_78 + 0x48))(), iVar10 != -1)) {
              bVar19 = false;
            }
            else {
              local_78 = (longlong *)0x0;
              bVar19 = true;
            }
          }
          if (bVar19 == bVar20) {
            cVar3 = '\x01';
            goto LAB_14004d39f;
          }
          if (local_68 == (longlong *)0x0) {
LAB_14004d720:
            uVar6 = 0xffffffff;
          }
          else if ((byte *)local_68[2] < (byte *)local_68[3]) {
            uVar6 = (ulonglong)*(byte *)local_68[2];
          }
          else {
            uVar13 = (**(code **)(*local_68 + 0x48))();
            uVar6 = (ulonglong)uVar13;
            if (uVar13 == 0xffffffff) {
              local_68 = (longlong *)0x0;
              goto LAB_14004d720;
            }
          }
          if (!bVar18) break;
          cVar9 = *(char *)(lVar5 + 0x20);
        }
        cVar3 = '\0';
      }
LAB_14004d39f:
      if (uVar15 == 0x10) goto LAB_14004d5a8;
    }
    else {
      local_80 = 0;
      uVar6 = 0;
      iVar11 = 0;
      bVar18 = false;
    }
LAB_14004d3a9:
    local_b8 = (ulonglong)(int)uVar15;
    local_a0 = uVar15;
  }
  else {
    uVar15 = 10;
    if (uVar12 != 8) goto LAB_14004d258;
    uVar15 = 0x10;
    uVar6 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar3 = (char)uVar6;
    if (cVar3 == '\0') goto LAB_14004d27e;
    local_80 = 0;
    uVar6 = 0;
    iVar11 = 0;
    bVar18 = false;
LAB_14004d5a8:
    local_a0 = 0x10;
    uVar15 = 0x16;
    local_b8 = 0x16;
  }
  local_98 = &local_78;
  local_a8 = (istreambuf_iterator<> *)&local_68;
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar5 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar12 = local_80 + 0x7fffffff;
  bVar1 = *(byte *)(lVar5 + 0x88);
  cVar9 = cVar3;
  if (bVar1 == 0) {
    bVar16 = 0;
    if (cVar3 == '\0') {
      uVar13 = 0;
LAB_14004d424:
      do {
        cVar9 = (char)uVar6;
        if (local_b8 < 0xb) {
          if ((cVar9 < '0') || ((char)((char)uVar15 + '0') <= cVar9)) goto LAB_14004d730;
        }
        else if (9 < (byte)(cVar9 - 0x30U)) goto LAB_14004d65d;
        iVar10 = cVar9 + -0x30;
        while( true ) {
          plVar2 = local_68;
          if (uVar12 / local_a0 < uVar13) {
            bVar16 = 1;
          }
          else {
            uVar14 = uVar13 * local_a0;
            uVar13 = uVar14 + iVar10;
            iVar11 = iVar11 + 1;
            bVar16 = bVar16 | uVar12 - iVar10 < uVar14;
          }
          uVar6 = local_68[3];
          if ((ulonglong)local_68[2] < uVar6) {
            uVar7 = local_68[2] + 1;
            local_68[2] = uVar7;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uVar7 = plVar2[2];
            uVar6 = plVar2[3];
          }
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          bVar20 = false;
          if (uVar6 <= uVar7) {
            iVar10 = (**(code **)(*plVar2 + 0x48))(plVar2);
            if (iVar10 == -1) {
              local_68 = (longlong *)0x0;
            }
            bVar20 = iVar10 == -1;
          }
          bVar19 = (int)uStack_70 == -1;
          if (((local_78 != (longlong *)0x0) && (bVar19)) &&
             (bVar19 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
            iVar10 = (**(code **)(*local_78 + 0x48))();
            bVar19 = iVar10 == -1;
            if (bVar19) {
              local_78 = (longlong *)0x0;
            }
          }
          if (bVar19 == bVar20) {
            cVar4 = cVar3;
            cVar9 = '\x01';
            goto LAB_14004d4cd;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14004d730;
          if ((byte *)local_68[2] < (byte *)local_68[3]) break;
          uVar14 = (**(code **)(*local_68 + 0x48))();
          uVar6 = (ulonglong)uVar14;
          if (uVar14 != 0xffffffff) goto LAB_14004d424;
          local_68 = (longlong *)0x0;
          if (local_b8 < 0xb) goto LAB_14004d730;
          cVar9 = -1;
LAB_14004d65d:
          if ((byte)(cVar9 + 0x9fU) < 6) {
            iVar10 = cVar9 + -0x57;
          }
          else {
            if (5 < (byte)(cVar9 + 0xbfU)) goto LAB_14004d730;
            iVar10 = cVar9 + -0x37;
          }
        }
        uVar6 = (ulonglong)*(byte *)local_68[2];
      } while( true );
    }
    uVar13 = 0;
    cVar4 = '\0';
LAB_14004d4cd:
    cVar3 = cVar4;
    cVar4 = cVar9;
    if (local_50[0][-3] != 0) goto LAB_14004d746;
LAB_14004d4e0:
    if ((bVar18) || (iVar11 != 0)) goto LAB_14004d790;
  }
  else {
    if (cVar3 != '\0') {
      uVar13 = 0;
      bVar16 = 0;
      cVar4 = '\0';
      goto LAB_14004d4cd;
    }
    bVar16 = 0;
    uVar13 = 0;
    cVar4 = *(char *)(lVar5 + 0x20);
    if ((cVar4 != '\0') && (*(char *)(lVar5 + 0x49) == (char)uVar6)) goto LAB_14004d90c;
LAB_14004d849:
    cVar9 = (char)uVar6;
    bVar20 = *(char *)(lVar5 + 0x48) == cVar9;
    if (!bVar20 && local_b8 != 0) {
      pvVar8 = memchr((void *)(lVar5 + 0x72),(int)cVar9,local_b8);
      if (pvVar8 != (void *)0x0) {
        iVar10 = (int)pvVar8 - (int)(void *)(lVar5 + 0x72);
        if (0xf < iVar10) {
          iVar10 = iVar10 + -6;
        }
        bVar17 = bVar1;
        if (uVar13 <= uVar12 / local_a0) {
          uVar15 = uVar13 * local_a0;
          uVar13 = uVar15 + iVar10;
          iVar11 = iVar11 + 1;
          bVar17 = bVar16 | uVar12 - iVar10 < uVar15;
        }
        uVar6 = local_68[2];
        bVar16 = bVar17;
        if ((ulonglong)local_68[3] <= uVar6) goto LAB_14004d938;
        do {
          local_68[2] = uVar6 + 1;
          while( true ) {
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            uVar6 = istreambuf_iterator<>::equal(local_a8,(longlong *)local_98);
            cVar4 = cVar3;
            cVar9 = (char)uVar6;
            if ((char)uVar6 != '\0') goto LAB_14004d4cd;
            uVar6 = istreambuf_iterator<>::_M_get(local_a8);
            uVar6 = uVar6 & 0xffffffff;
            cVar4 = *(char *)(lVar5 + 0x20);
            if ((cVar4 == '\0') || (*(char *)(lVar5 + 0x49) != (char)uVar6)) goto LAB_14004d849;
LAB_14004d90c:
            if (iVar11 == 0) {
              iVar11 = 0;
              cVar9 = '\0';
              goto LAB_14004d4cd;
            }
            std::string::push_back((string *)local_50,(char)iVar11);
            iVar11 = 0;
            uVar6 = local_68[2];
            if (uVar6 < (ulonglong)local_68[3]) break;
LAB_14004d938:
            (**(code **)(*local_68 + 0x50))();
          }
        } while( true );
      }
      cVar4 = '\0';
      cVar9 = bVar20 || local_b8 == 0;
      goto LAB_14004d4cd;
    }
LAB_14004d730:
    cVar9 = '\0';
    cVar4 = '\0';
    if (local_50[0][-3] == 0) goto LAB_14004d4e0;
LAB_14004d746:
    cVar9 = cVar4;
    std::string::push_back((string *)local_50,(char)iVar11);
    cVar4 = __verify_grouping(*(longlong *)(lVar5 + 0x10),*(longlong *)(lVar5 + 0x18),
                              (undefined8 *)local_50);
    if (cVar4 == '\0') {
      *param_6 = 4;
    }
    if (((iVar11 != 0) || (bVar18)) || (local_50[0][-3] != 0)) {
LAB_14004d790:
      if (cVar3 == '\0') {
        if (bVar16 == 0) {
          uVar12 = -uVar13;
          if ((char)local_80 == '\0') {
            uVar12 = uVar13;
          }
          *param_7 = uVar12;
        }
        else {
          *param_7 = local_80 + 0x7fffffff;
          *param_6 = 4;
        }
        goto LAB_14004d50f;
      }
    }
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004d50f:
  if (cVar9 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int<unsigned
// long>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  byte bVar1;
  bool bVar2;
  longlong *plVar3;
  char cVar4;
  char cVar5;
  int iVar6;
  uint uVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  void *pvVar11;
  char cVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  int iVar17;
  byte bVar18;
  byte bVar19;
  bool bVar20;
  bool bVar21;
  bool bVar22;
  ulonglong local_b0;
  istreambuf_iterator<> *local_a0;
  longlong **local_98;
  uint local_80;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar8 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar14 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar14 == 0x40) {
    uVar7 = 8;
LAB_14004db98:
    uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar4 = (char)uVar9;
    if (cVar4 == '\0') {
LAB_14004dbbe:
      local_98 = &local_78;
      local_a0 = (istreambuf_iterator<> *)&local_68;
      uVar9 = istreambuf_iterator<>::_M_get(local_a0);
      cVar4 = (char)uVar9;
      bVar20 = *(char *)(lVar8 + 0x6e) == cVar4;
      uVar9 = uVar9 & 0xffffffff;
      if ((bVar20) || (*(char *)(lVar8 + 0x6f) == cVar4)) {
        cVar12 = *(char *)(lVar8 + 0x20);
        if (((cVar12 != '\0') && (*(char *)(lVar8 + 0x49) == cVar4)) ||
           (*(char *)(lVar8 + 0x48) == cVar4)) goto LAB_14004dc2a;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar10 = istreambuf_iterator<>::equal(local_a0,(longlong *)local_98);
        cVar4 = (char)uVar10;
        if (cVar4 == '\0') {
          uVar9 = istreambuf_iterator<>::_M_get(local_a0);
          cVar12 = *(char *)(lVar8 + 0x20);
          uVar9 = uVar9 & 0xffffffff;
          goto LAB_14004dc2a;
        }
        iVar17 = 0;
        bVar2 = false;
      }
      else {
        bVar20 = false;
        cVar12 = *(char *)(lVar8 + 0x20);
LAB_14004dc2a:
        iVar17 = 0;
        bVar2 = false;
        while (((plVar3 = local_68, cVar4 = (char)uVar9, cVar12 == '\0' ||
                (*(char *)(lVar8 + 0x49) != cVar4)) && (*(char *)(lVar8 + 0x48) != cVar4))) {
          if (*(char *)(lVar8 + 0x72) == cVar4) {
            bVar2 = (bool)(bVar2 ^ 1U | uVar7 == 10);
            if (!bVar2) goto LAB_14004dc57;
            bVar22 = uVar7 == 8;
            if (bVar22 || uVar14 == 0) {
              iVar17 = 0;
              uVar7 = 8;
              bVar2 = bVar22 || uVar14 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar2) break;
LAB_14004dc57:
            if ((*(char *)(lVar8 + 0x70) != cVar4) && (*(char *)(lVar8 + 0x71) != cVar4)) {
              cVar4 = '\0';
              bVar2 = true;
              goto LAB_14004dcdf;
            }
            cVar4 = uVar14 == 0 || uVar7 == 0x10;
            if (uVar14 != 0 && uVar7 != 0x10) {
              bVar2 = true;
              goto LAB_14004dce9;
            }
            iVar17 = 0;
            uVar7 = 0x10;
            bVar2 = false;
          }
          if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
            uVar10 = local_68[2] + 1;
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            local_68[2] = uVar10;
            if (uVar10 < (ulonglong)local_68[3]) goto LAB_14004dcb4;
LAB_14004e020:
            iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar6 != -1) goto LAB_14004dcb4;
            local_68 = (longlong *)0x0;
            bVar22 = true;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            if ((ulonglong)plVar3[3] <= (ulonglong)plVar3[2]) goto LAB_14004e020;
LAB_14004dcb4:
            bVar22 = false;
          }
          bVar21 = (int)uStack_70 == -1;
          if (local_78 != (longlong *)0x0 && bVar21) {
            if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
               (iVar6 = (**(code **)(*local_78 + 0x48))(), iVar6 != -1)) {
              bVar21 = false;
            }
            else {
              local_78 = (longlong *)0x0;
              bVar21 = true;
            }
          }
          if (bVar21 == bVar22) {
            cVar4 = '\x01';
            goto LAB_14004dcdf;
          }
          if (local_68 == (longlong *)0x0) {
LAB_14004e060:
            uVar9 = 0xffffffff;
          }
          else if ((byte *)local_68[2] < (byte *)local_68[3]) {
            uVar9 = (ulonglong)*(byte *)local_68[2];
          }
          else {
            uVar15 = (**(code **)(*local_68 + 0x48))();
            uVar9 = (ulonglong)uVar15;
            if (uVar15 == 0xffffffff) {
              local_68 = (longlong *)0x0;
              goto LAB_14004e060;
            }
          }
          if (!bVar2) break;
          cVar12 = *(char *)(lVar8 + 0x20);
        }
        cVar4 = '\0';
      }
LAB_14004dcdf:
      if (uVar7 == 0x10) goto LAB_14004dee8;
    }
    else {
      bVar20 = false;
      uVar9 = 0;
      iVar17 = 0;
      bVar2 = false;
    }
LAB_14004dce9:
    local_b0 = (ulonglong)(int)uVar7;
    local_80 = uVar7;
  }
  else {
    uVar7 = 10;
    if (uVar14 != 8) goto LAB_14004db98;
    uVar7 = 0x10;
    uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar4 = (char)uVar9;
    if (cVar4 == '\0') goto LAB_14004dbbe;
    bVar20 = false;
    uVar9 = 0;
    iVar17 = 0;
    bVar2 = false;
LAB_14004dee8:
    local_80 = 0x10;
    uVar7 = 0x16;
    local_b0 = 0x16;
  }
  local_98 = &local_78;
  local_a0 = (istreambuf_iterator<> *)&local_68;
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar8 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar14 = (uint)(0xffffffff / (ulonglong)local_80);
  bVar1 = *(byte *)(lVar8 + 0x88);
  cVar12 = cVar4;
  if (bVar1 == 0) {
    bVar18 = 0;
    if (cVar4 == '\0') {
      uVar15 = 0;
LAB_14004dd5b:
      do {
        cVar12 = (char)uVar9;
        if (local_b0 < 0xb) {
          if ((cVar12 < '0') || ((char)((char)uVar7 + '0') <= cVar12)) goto LAB_14004e070;
        }
        else if (9 < (byte)(cVar12 - 0x30U)) goto LAB_14004df9d;
        uVar13 = (int)cVar12 - 0x30;
        while( true ) {
          plVar3 = local_68;
          if (uVar14 < uVar15) {
            bVar18 = 1;
          }
          else {
            uVar16 = uVar15 * local_80;
            uVar15 = uVar13 + uVar16;
            iVar17 = iVar17 + 1;
            bVar18 = bVar18 | CARRY4(uVar13,uVar16);
          }
          uVar9 = local_68[3];
          if ((ulonglong)local_68[2] < uVar9) {
            uVar10 = local_68[2] + 1;
            local_68[2] = uVar10;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uVar10 = plVar3[2];
            uVar9 = plVar3[3];
          }
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          bVar22 = false;
          if (uVar9 <= uVar10) {
            iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar6 == -1) {
              local_68 = (longlong *)0x0;
            }
            bVar22 = iVar6 == -1;
          }
          bVar21 = (int)uStack_70 == -1;
          if (((local_78 != (longlong *)0x0) && (bVar21)) &&
             (bVar21 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
            iVar6 = (**(code **)(*local_78 + 0x48))();
            bVar21 = iVar6 == -1;
            if (bVar21) {
              local_78 = (longlong *)0x0;
            }
          }
          if (bVar21 == bVar22) {
            cVar5 = cVar4;
            cVar12 = '\x01';
            goto LAB_14004ddfe;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14004e070;
          if ((byte *)local_68[2] < (byte *)local_68[3]) break;
          uVar13 = (**(code **)(*local_68 + 0x48))();
          uVar9 = (ulonglong)uVar13;
          if (uVar13 != 0xffffffff) goto LAB_14004dd5b;
          local_68 = (longlong *)0x0;
          if (local_b0 < 0xb) goto LAB_14004e070;
          cVar12 = -1;
LAB_14004df9d:
          if ((byte)(cVar12 + 0x9fU) < 6) {
            uVar13 = (int)cVar12 - 0x57;
          }
          else {
            if (5 < (byte)(cVar12 + 0xbfU)) goto LAB_14004e070;
            uVar13 = (int)cVar12 - 0x37;
          }
        }
        uVar9 = (ulonglong)*(byte *)local_68[2];
      } while( true );
    }
    uVar15 = 0;
    cVar5 = '\0';
LAB_14004ddfe:
    cVar4 = cVar5;
    cVar5 = cVar12;
    if (local_50[0][-3] != 0) goto LAB_14004e086;
LAB_14004de18:
    if ((iVar17 != 0) || (bVar2)) goto LAB_14004e0d0;
  }
  else {
    if (cVar4 != '\0') {
      uVar15 = 0;
      bVar18 = 0;
      cVar5 = '\0';
      goto LAB_14004ddfe;
    }
    bVar18 = 0;
    uVar15 = 0;
    cVar5 = *(char *)(lVar8 + 0x20);
    if ((cVar5 != '\0') && (*(char *)(lVar8 + 0x49) == (char)uVar9)) goto LAB_14004e246;
LAB_14004e189:
    cVar12 = (char)uVar9;
    bVar22 = *(char *)(lVar8 + 0x48) == cVar12;
    if (!bVar22 && local_b0 != 0) {
      pvVar11 = memchr((void *)(lVar8 + 0x72),(int)cVar12,local_b0);
      if (pvVar11 != (void *)0x0) {
        uVar7 = (int)pvVar11 - (int)(void *)(lVar8 + 0x72);
        if (0xf < (int)uVar7) {
          uVar7 = uVar7 - 6;
        }
        bVar19 = bVar1;
        if (uVar15 <= uVar14) {
          uVar13 = uVar15 * local_80;
          uVar15 = uVar7 + uVar13;
          iVar17 = iVar17 + 1;
          bVar19 = bVar18 | CARRY4(uVar7,uVar13);
        }
        uVar9 = local_68[2];
        bVar18 = bVar19;
        if ((ulonglong)local_68[3] <= uVar9) goto LAB_14004e272;
        do {
          local_68[2] = uVar9 + 1;
          while( true ) {
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            uVar9 = istreambuf_iterator<>::equal(local_a0,(longlong *)local_98);
            cVar5 = cVar4;
            cVar12 = (char)uVar9;
            if ((char)uVar9 != '\0') goto LAB_14004ddfe;
            uVar9 = istreambuf_iterator<>::_M_get(local_a0);
            uVar9 = uVar9 & 0xffffffff;
            cVar5 = *(char *)(lVar8 + 0x20);
            if ((cVar5 == '\0') || (*(char *)(lVar8 + 0x49) != (char)uVar9)) goto LAB_14004e189;
LAB_14004e246:
            if (iVar17 == 0) {
              iVar17 = 0;
              cVar12 = '\0';
              goto LAB_14004ddfe;
            }
            std::string::push_back((string *)local_50,(char)iVar17);
            iVar17 = 0;
            uVar9 = local_68[2];
            if (uVar9 < (ulonglong)local_68[3]) break;
LAB_14004e272:
            (**(code **)(*local_68 + 0x50))();
          }
        } while( true );
      }
      cVar5 = '\0';
      cVar12 = bVar22 || local_b0 == 0;
      goto LAB_14004ddfe;
    }
LAB_14004e070:
    cVar12 = '\0';
    cVar5 = '\0';
    if (local_50[0][-3] == 0) goto LAB_14004de18;
LAB_14004e086:
    cVar12 = cVar5;
    std::string::push_back((string *)local_50,(char)iVar17);
    cVar5 = __verify_grouping(*(longlong *)(lVar8 + 0x10),*(longlong *)(lVar8 + 0x18),
                              (undefined8 *)local_50);
    if (cVar5 == '\0') {
      *param_6 = 4;
    }
    if (((iVar17 != 0) || (bVar2)) || (local_50[0][-3] != 0)) {
LAB_14004e0d0:
      if (cVar4 == '\0') {
        if (bVar18 == 0) {
          if (bVar20) {
            uVar15 = -uVar15;
          }
          *param_7 = uVar15;
        }
        else {
          *param_7 = 0xffffffff;
          *param_6 = 4;
        }
        goto LAB_14004de47;
      }
    }
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004de47:
  if (cVar12 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int<unsigned
// short>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ushort *param_7)

{
  byte bVar1;
  bool bVar2;
  longlong *plVar3;
  char cVar4;
  char cVar5;
  uint uVar6;
  longlong lVar7;
  ulonglong uVar8;
  ulonglong uVar9;
  void *pvVar10;
  char cVar11;
  int iVar12;
  ushort uVar13;
  uint uVar14;
  int iVar15;
  int iVar16;
  int iVar17;
  byte bVar18;
  byte bVar19;
  bool bVar20;
  bool bVar21;
  bool bVar22;
  ulonglong local_b0;
  ushort local_a4;
  istreambuf_iterator<> *local_a0;
  longlong **local_98;
  int local_80;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar7 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar14 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar14 == 0x40) {
    iVar16 = 8;
LAB_14004e4d8:
    uVar8 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar4 = (char)uVar8;
    if (cVar4 == '\0') {
LAB_14004e4fe:
      local_98 = &local_78;
      local_a0 = (istreambuf_iterator<> *)&local_68;
      uVar8 = istreambuf_iterator<>::_M_get(local_a0);
      cVar4 = (char)uVar8;
      bVar20 = *(char *)(lVar7 + 0x6e) == cVar4;
      uVar8 = uVar8 & 0xffffffff;
      if ((bVar20) || (*(char *)(lVar7 + 0x6f) == cVar4)) {
        cVar11 = *(char *)(lVar7 + 0x20);
        if (((cVar11 != '\0') && (*(char *)(lVar7 + 0x49) == cVar4)) ||
           (*(char *)(lVar7 + 0x48) == cVar4)) goto LAB_14004e56a;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar9 = istreambuf_iterator<>::equal(local_a0,(longlong *)local_98);
        cVar4 = (char)uVar9;
        if (cVar4 == '\0') {
          uVar8 = istreambuf_iterator<>::_M_get(local_a0);
          cVar11 = *(char *)(lVar7 + 0x20);
          uVar8 = uVar8 & 0xffffffff;
          goto LAB_14004e56a;
        }
        iVar17 = 0;
        bVar2 = false;
      }
      else {
        bVar20 = false;
        cVar11 = *(char *)(lVar7 + 0x20);
LAB_14004e56a:
        iVar17 = 0;
        bVar2 = false;
        while (((plVar3 = local_68, cVar4 = (char)uVar8, cVar11 == '\0' ||
                (*(char *)(lVar7 + 0x49) != cVar4)) && (*(char *)(lVar7 + 0x48) != cVar4))) {
          if (*(char *)(lVar7 + 0x72) == cVar4) {
            bVar2 = (bool)(bVar2 ^ 1U | iVar16 == 10);
            if (!bVar2) goto LAB_14004e597;
            bVar22 = iVar16 == 8;
            if (bVar22 || uVar14 == 0) {
              iVar17 = 0;
              iVar16 = 8;
              bVar2 = bVar22 || uVar14 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar2) break;
LAB_14004e597:
            if ((*(char *)(lVar7 + 0x70) != cVar4) && (*(char *)(lVar7 + 0x71) != cVar4)) {
              cVar4 = '\0';
              bVar2 = true;
              goto LAB_14004e61f;
            }
            cVar4 = uVar14 == 0 || iVar16 == 0x10;
            if (uVar14 != 0 && iVar16 != 0x10) {
              bVar2 = true;
              goto LAB_14004e629;
            }
            iVar17 = 0;
            iVar16 = 0x10;
            bVar2 = false;
          }
          if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
            uVar9 = local_68[2] + 1;
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            local_68[2] = uVar9;
            if (uVar9 < (ulonglong)local_68[3]) goto LAB_14004e5f4;
LAB_14004e960:
            iVar15 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar15 != -1) goto LAB_14004e5f4;
            local_68 = (longlong *)0x0;
            bVar22 = true;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            if ((ulonglong)plVar3[3] <= (ulonglong)plVar3[2]) goto LAB_14004e960;
LAB_14004e5f4:
            bVar22 = false;
          }
          bVar21 = (int)uStack_70 == -1;
          if (local_78 != (longlong *)0x0 && bVar21) {
            if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
               (iVar15 = (**(code **)(*local_78 + 0x48))(), iVar15 != -1)) {
              bVar21 = false;
            }
            else {
              local_78 = (longlong *)0x0;
              bVar21 = true;
            }
          }
          if (bVar21 == bVar22) {
            cVar4 = '\x01';
            goto LAB_14004e61f;
          }
          if (local_68 == (longlong *)0x0) {
LAB_14004e9a0:
            uVar8 = 0xffffffff;
          }
          else if ((byte *)local_68[2] < (byte *)local_68[3]) {
            uVar8 = (ulonglong)*(byte *)local_68[2];
          }
          else {
            uVar6 = (**(code **)(*local_68 + 0x48))();
            uVar8 = (ulonglong)uVar6;
            if (uVar6 == 0xffffffff) {
              local_68 = (longlong *)0x0;
              goto LAB_14004e9a0;
            }
          }
          if (!bVar2) break;
          cVar11 = *(char *)(lVar7 + 0x20);
        }
        cVar4 = '\0';
      }
LAB_14004e61f:
      if (iVar16 == 0x10) goto LAB_14004e828;
    }
    else {
      bVar20 = false;
      uVar8 = 0;
      iVar17 = 0;
      bVar2 = false;
    }
LAB_14004e629:
    local_b0 = (ulonglong)iVar16;
    local_80 = iVar16;
  }
  else {
    iVar16 = 10;
    if (uVar14 != 8) goto LAB_14004e4d8;
    iVar16 = 0x10;
    uVar8 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar4 = (char)uVar8;
    if (cVar4 == '\0') goto LAB_14004e4fe;
    bVar20 = false;
    uVar8 = 0;
    iVar17 = 0;
    bVar2 = false;
LAB_14004e828:
    local_80 = 0x10;
    iVar16 = 0x16;
    local_b0 = 0x16;
  }
  local_98 = &local_78;
  local_a0 = (istreambuf_iterator<> *)&local_68;
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar7 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  bVar1 = *(byte *)(lVar7 + 0x88);
  local_a4 = (ushort)(0xffff / (ulonglong)(longlong)local_80);
  cVar11 = cVar4;
  if (bVar1 == 0) {
    bVar18 = 0;
    if (cVar4 == '\0') {
      iVar15 = 0;
LAB_14004e69b:
      do {
        uVar13 = (ushort)iVar15;
        cVar11 = (char)uVar8;
        if (local_b0 < 0xb) {
          if ((cVar11 < '0') || ((char)((char)iVar16 + '0') <= cVar11)) goto LAB_14004e9b0;
        }
        else if (9 < (byte)(cVar11 - 0x30U)) goto LAB_14004e8dd;
        iVar12 = cVar11 + -0x30;
        while( true ) {
          plVar3 = local_68;
          if (local_a4 < (ushort)iVar15) {
            bVar18 = 1;
          }
          else {
            uVar13 = (ushort)iVar15 * (short)local_80;
            iVar15 = (uint)uVar13 + iVar12;
            iVar17 = iVar17 + 1;
            bVar18 = bVar18 | 0xffff - iVar12 < (int)(uint)uVar13;
          }
          uVar13 = (ushort)iVar15;
          uVar8 = local_68[3];
          if ((ulonglong)local_68[2] < uVar8) {
            uVar9 = local_68[2] + 1;
            local_68[2] = uVar9;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uVar9 = plVar3[2];
            uVar8 = plVar3[3];
          }
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          bVar22 = false;
          if (uVar8 <= uVar9) {
            iVar12 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar12 == -1) {
              local_68 = (longlong *)0x0;
            }
            bVar22 = iVar12 == -1;
          }
          bVar21 = (int)uStack_70 == -1;
          if (((local_78 != (longlong *)0x0) && (bVar21)) &&
             (bVar21 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
            iVar12 = (**(code **)(*local_78 + 0x48))();
            bVar21 = iVar12 == -1;
            if (bVar21) {
              local_78 = (longlong *)0x0;
            }
          }
          if (bVar21 == bVar22) {
            cVar5 = cVar4;
            cVar11 = '\x01';
            goto LAB_14004e748;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14004e9b0;
          if ((byte *)local_68[2] < (byte *)local_68[3]) break;
          uVar14 = (**(code **)(*local_68 + 0x48))();
          uVar8 = (ulonglong)uVar14;
          if (uVar14 != 0xffffffff) goto LAB_14004e69b;
          local_68 = (longlong *)0x0;
          if (local_b0 < 0xb) goto LAB_14004e9b0;
          cVar11 = -1;
LAB_14004e8dd:
          uVar13 = (ushort)iVar15;
          if ((byte)(cVar11 + 0x9fU) < 6) {
            iVar12 = cVar11 + -0x57;
          }
          else {
            if (5 < (byte)(cVar11 + 0xbfU)) goto LAB_14004e9b0;
            iVar12 = cVar11 + -0x37;
          }
        }
        uVar8 = (ulonglong)*(byte *)local_68[2];
      } while( true );
    }
    uVar13 = 0;
    cVar5 = '\0';
LAB_14004e748:
    cVar4 = cVar5;
    cVar5 = cVar11;
    if (local_50[0][-3] != 0) goto LAB_14004e9c6;
LAB_14004e760:
    if ((iVar17 != 0) || (bVar2)) goto LAB_14004ea10;
  }
  else {
    if (cVar4 != '\0') {
      uVar13 = 0;
      bVar18 = 0;
      cVar5 = '\0';
      goto LAB_14004e748;
    }
    bVar18 = 0;
    iVar16 = 0;
    cVar5 = *(char *)(lVar7 + 0x20);
    if ((cVar5 != '\0') && (*(char *)(lVar7 + 0x49) == (char)uVar8)) goto LAB_14004eb90;
LAB_14004eac9:
    uVar13 = (ushort)iVar16;
    cVar11 = (char)uVar8;
    bVar22 = *(char *)(lVar7 + 0x48) == cVar11;
    if (!bVar22 && local_b0 != 0) {
      pvVar10 = memchr((void *)(lVar7 + 0x72),(int)cVar11,local_b0);
      if (pvVar10 != (void *)0x0) {
        iVar15 = (int)pvVar10 - (int)(void *)(lVar7 + 0x72);
        if (0xf < iVar15) {
          iVar15 = iVar15 + -6;
        }
        bVar19 = bVar1;
        if (uVar13 <= local_a4) {
          iVar16 = (uint)(ushort)(uVar13 * (short)local_80) + iVar15;
          iVar17 = iVar17 + 1;
          bVar19 = bVar18 | 0xffff - iVar15 < (int)(uint)(ushort)(uVar13 * (short)local_80);
        }
        uVar8 = local_68[2];
        bVar18 = bVar19;
        if ((ulonglong)local_68[3] <= uVar8) goto LAB_14004ebbc;
        do {
          local_68[2] = uVar8 + 1;
          while( true ) {
            uVar13 = (ushort)iVar16;
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            uVar8 = istreambuf_iterator<>::equal(local_a0,(longlong *)local_98);
            cVar5 = cVar4;
            cVar11 = (char)uVar8;
            if ((char)uVar8 != '\0') goto LAB_14004e748;
            uVar8 = istreambuf_iterator<>::_M_get(local_a0);
            uVar8 = uVar8 & 0xffffffff;
            cVar5 = *(char *)(lVar7 + 0x20);
            if ((cVar5 == '\0') || (*(char *)(lVar7 + 0x49) != (char)uVar8)) goto LAB_14004eac9;
LAB_14004eb90:
            uVar13 = (ushort)iVar16;
            if (iVar17 == 0) {
              iVar17 = 0;
              cVar11 = '\0';
              goto LAB_14004e748;
            }
            std::string::push_back((string *)local_50,(char)iVar17);
            iVar17 = 0;
            uVar8 = local_68[2];
            if (uVar8 < (ulonglong)local_68[3]) break;
LAB_14004ebbc:
            (**(code **)(*local_68 + 0x50))();
          }
        } while( true );
      }
      cVar5 = '\0';
      cVar11 = bVar22 || local_b0 == 0;
      goto LAB_14004e748;
    }
LAB_14004e9b0:
    cVar11 = '\0';
    cVar5 = '\0';
    if (local_50[0][-3] == 0) goto LAB_14004e760;
LAB_14004e9c6:
    cVar11 = cVar5;
    std::string::push_back((string *)local_50,(char)iVar17);
    cVar5 = __verify_grouping(*(longlong *)(lVar7 + 0x10),*(longlong *)(lVar7 + 0x18),
                              (undefined8 *)local_50);
    if (cVar5 == '\0') {
      *param_6 = 4;
    }
    if (((iVar17 != 0) || (bVar2)) || (local_50[0][-3] != 0)) {
LAB_14004ea10:
      if (cVar4 == '\0') {
        if (bVar18 == 0) {
          if (bVar20) {
            uVar13 = -uVar13;
          }
          *param_7 = uVar13;
        }
        else {
          *param_7 = 0xffff;
          *param_6 = 4;
        }
        goto LAB_14004e790;
      }
    }
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004e790:
  if (cVar11 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int<long
// long>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::_M_extract_int<long_long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  byte bVar1;
  bool bVar2;
  longlong *plVar3;
  byte bVar4;
  char cVar5;
  char cVar6;
  uint uVar7;
  int iVar8;
  longlong lVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  void *pvVar13;
  ulonglong uVar14;
  char cVar15;
  int iVar16;
  int iVar17;
  uint uVar18;
  ulonglong uVar19;
  byte bVar20;
  bool bVar21;
  bool bVar22;
  ulonglong local_c0;
  istreambuf_iterator<> *local_b0;
  longlong **local_98;
  bool local_7a;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar18 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar18 == 0x40) {
    iVar16 = 8;
LAB_14004ee2b:
    uVar10 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar5 = (char)uVar10;
    if (cVar5 == '\0') {
LAB_14004ee54:
      local_98 = &local_78;
      local_b0 = (istreambuf_iterator<> *)&local_68;
      uVar10 = istreambuf_iterator<>::_M_get(local_b0);
      cVar5 = (char)uVar10;
      local_7a = *(char *)(lVar9 + 0x6e) == cVar5;
      uVar10 = uVar10 & 0xffffffff;
      if ((local_7a) || (*(char *)(lVar9 + 0x6f) == cVar5)) {
        cVar15 = *(char *)(lVar9 + 0x20);
        if (((cVar15 != '\0') && (*(char *)(lVar9 + 0x49) == cVar5)) ||
           (*(char *)(lVar9 + 0x48) == cVar5)) goto LAB_14004eec6;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar11 = istreambuf_iterator<>::equal(local_b0,(longlong *)local_98);
        cVar5 = (char)uVar11;
        if (cVar5 == '\0') {
          uVar10 = istreambuf_iterator<>::_M_get(local_b0);
          cVar15 = *(char *)(lVar9 + 0x20);
          uVar10 = uVar10 & 0xffffffff;
          goto LAB_14004eec6;
        }
        iVar17 = 0;
        bVar2 = false;
      }
      else {
        local_7a = false;
        cVar15 = *(char *)(lVar9 + 0x20);
LAB_14004eec6:
        iVar17 = 0;
        bVar2 = false;
        while (((plVar3 = local_68, cVar5 = (char)uVar10, cVar15 == '\0' ||
                (*(char *)(lVar9 + 0x49) != cVar5)) && (*(char *)(lVar9 + 0x48) != cVar5))) {
          if (*(char *)(lVar9 + 0x72) == cVar5) {
            bVar2 = (bool)(bVar2 ^ 1U | iVar16 == 10);
            if (!bVar2) goto LAB_14004eef3;
            bVar22 = iVar16 == 8;
            if (bVar22 || uVar18 == 0) {
              iVar17 = 0;
              iVar16 = 8;
              bVar2 = bVar22 || uVar18 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar2) break;
LAB_14004eef3:
            if ((*(char *)(lVar9 + 0x70) != cVar5) && (*(char *)(lVar9 + 0x71) != cVar5)) {
              cVar5 = '\0';
              bVar2 = true;
              goto LAB_14004ef81;
            }
            cVar5 = uVar18 == 0 || iVar16 == 0x10;
            if (uVar18 != 0 && iVar16 != 0x10) {
              bVar2 = true;
              goto LAB_14004ef8b;
            }
            iVar17 = 0;
            iVar16 = 0x10;
            bVar2 = false;
          }
          if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            uVar11 = local_68[2] + 1;
            local_68[2] = uVar11;
            if (uVar11 < (ulonglong)local_68[3]) goto LAB_14004ef56;
LAB_14004f2e8:
            iVar8 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar8 != -1) goto LAB_14004ef56;
            local_68 = (longlong *)0x0;
            bVar22 = true;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            if ((ulonglong)plVar3[3] <= (ulonglong)plVar3[2]) goto LAB_14004f2e8;
LAB_14004ef56:
            bVar22 = false;
          }
          bVar21 = (int)uStack_70 == -1;
          if (local_78 != (longlong *)0x0 && bVar21) {
            if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
               (iVar8 = (**(code **)(*local_78 + 0x48))(), iVar8 != -1)) {
              bVar21 = false;
            }
            else {
              local_78 = (longlong *)0x0;
              bVar21 = true;
            }
          }
          if (bVar21 == bVar22) {
            cVar5 = '\x01';
            goto LAB_14004ef81;
          }
          if (local_68 == (longlong *)0x0) {
LAB_14004f330:
            uVar10 = 0xffffffff;
          }
          else if ((byte *)local_68[2] < (byte *)local_68[3]) {
            uVar10 = (ulonglong)*(byte *)local_68[2];
          }
          else {
            uVar7 = (**(code **)(*local_68 + 0x48))();
            uVar10 = (ulonglong)uVar7;
            if (uVar7 == 0xffffffff) {
              local_68 = (longlong *)0x0;
              goto LAB_14004f330;
            }
          }
          if (!bVar2) break;
          cVar15 = *(char *)(lVar9 + 0x20);
        }
        cVar5 = '\0';
      }
LAB_14004ef81:
      if (iVar16 == 0x10) goto LAB_14004f1ab;
    }
    else {
      local_7a = false;
      uVar10 = 0;
      iVar17 = 0;
      bVar2 = false;
    }
LAB_14004ef8b:
    local_c0 = (ulonglong)iVar16;
    iVar8 = iVar16;
  }
  else {
    iVar16 = 10;
    if (uVar18 != 8) goto LAB_14004ee2b;
    iVar16 = 0x10;
    uVar10 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar5 = (char)uVar10;
    if (cVar5 == '\0') goto LAB_14004ee54;
    local_7a = false;
    uVar10 = 0;
    iVar17 = 0;
    bVar2 = false;
LAB_14004f1ab:
    local_c0 = 0x16;
    iVar16 = 0x10;
    iVar8 = 0x16;
  }
  local_98 = &local_78;
  local_b0 = (istreambuf_iterator<> *)&local_68;
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar9 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar14 = (ulonglong)iVar16;
  uVar11 = (ulonglong)local_7a + 0x7fffffffffffffff;
  bVar1 = *(byte *)(lVar9 + 0x88);
  cVar15 = cVar5;
  if (bVar1 == 0) {
    bVar20 = 0;
    if (cVar5 == '\0') {
      uVar19 = 0;
LAB_14004f015:
      do {
        cVar15 = (char)uVar10;
        if (local_c0 < 0xb) {
          if ((cVar15 < '0') || ((char)((char)iVar8 + '0') <= cVar15)) goto LAB_14004f340;
        }
        else if (9 < (byte)(cVar15 - 0x30U)) goto LAB_14004f25d;
        iVar16 = cVar15 + -0x30;
        while( true ) {
          plVar3 = local_68;
          if (uVar11 / uVar14 < uVar19) {
            bVar20 = 1;
          }
          else {
            uVar10 = uVar19 * uVar14;
            uVar19 = uVar10 + (longlong)iVar16;
            iVar17 = iVar17 + 1;
            bVar20 = bVar20 | uVar11 - (longlong)iVar16 < uVar10;
          }
          uVar10 = local_68[3];
          if ((ulonglong)local_68[2] < uVar10) {
            uVar12 = local_68[2] + 1;
            local_68[2] = uVar12;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uVar12 = plVar3[2];
            uVar10 = plVar3[3];
          }
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          bVar22 = false;
          if (uVar10 <= uVar12) {
            iVar16 = (**(code **)(*plVar3 + 0x48))(plVar3);
            if (iVar16 == -1) {
              local_68 = (longlong *)0x0;
            }
            bVar22 = iVar16 == -1;
          }
          bVar21 = (int)uStack_70 == -1;
          if (((local_78 != (longlong *)0x0) && (bVar21)) &&
             (bVar21 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
            iVar16 = (**(code **)(*local_78 + 0x48))();
            bVar21 = iVar16 == -1;
            if (bVar21) {
              local_78 = (longlong *)0x0;
            }
          }
          if (bVar21 == bVar22) {
            cVar6 = cVar5;
            cVar15 = '\x01';
            goto LAB_14004f0ca;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14004f340;
          if ((byte *)local_68[2] < (byte *)local_68[3]) break;
          uVar18 = (**(code **)(*local_68 + 0x48))();
          uVar10 = (ulonglong)uVar18;
          if (uVar18 != 0xffffffff) goto LAB_14004f015;
          local_68 = (longlong *)0x0;
          if (local_c0 < 0xb) goto LAB_14004f340;
          cVar15 = -1;
LAB_14004f25d:
          if ((byte)(cVar15 + 0x9fU) < 6) {
            iVar16 = cVar15 + -0x57;
          }
          else {
            if (5 < (byte)(cVar15 + 0xbfU)) goto LAB_14004f340;
            iVar16 = cVar15 + -0x37;
          }
        }
        uVar10 = (ulonglong)*(byte *)local_68[2];
      } while( true );
    }
    uVar19 = 0;
    cVar6 = '\0';
LAB_14004f0ca:
    cVar5 = cVar6;
    cVar6 = cVar15;
    if (local_50[0][-3] != 0) goto LAB_14004f356;
LAB_14004f0e0:
    if ((bVar2) || (iVar17 != 0)) goto LAB_14004f3a0;
  }
  else {
    if (cVar5 != '\0') {
      uVar19 = 0;
      bVar20 = 0;
      cVar6 = '\0';
      goto LAB_14004f0ca;
    }
    bVar20 = 0;
    uVar19 = 0;
    cVar6 = *(char *)(lVar9 + 0x20);
    if ((cVar6 != '\0') && (*(char *)(lVar9 + 0x49) == (char)uVar10)) goto LAB_14004f53b;
    while (*(char *)(lVar9 + 0x48) != (char)uVar10 && local_c0 != 0) {
      pvVar13 = memchr((void *)(lVar9 + 0x72),(int)(char)uVar10,local_c0);
      if (pvVar13 == (void *)0x0) {
        cVar6 = '\0';
        cVar15 = '\0';
        goto LAB_14004f0ca;
      }
      iVar16 = (int)pvVar13 - (int)(void *)(lVar9 + 0x72);
      if (0xf < iVar16) {
        iVar16 = iVar16 + -6;
      }
      bVar4 = bVar1;
      if (uVar19 <= uVar11 / uVar14) {
        uVar10 = uVar19 * uVar14;
        uVar19 = uVar10 + (longlong)iVar16;
        iVar17 = iVar17 + 1;
        bVar4 = bVar20 | uVar11 - (longlong)iVar16 < uVar10;
      }
      while( true ) {
        bVar20 = bVar4;
        if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
          local_68[2] = local_68[2] + 1;
        }
        else {
          (**(code **)(*local_68 + 0x50))();
        }
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar10 = istreambuf_iterator<>::equal(local_b0,(longlong *)local_98);
        cVar6 = cVar5;
        cVar15 = (char)uVar10;
        if ((char)uVar10 != '\0') goto LAB_14004f0ca;
        uVar10 = istreambuf_iterator<>::_M_get(local_b0);
        uVar10 = uVar10 & 0xffffffff;
        cVar6 = *(char *)(lVar9 + 0x20);
        if ((cVar6 == '\0') || (*(char *)(lVar9 + 0x49) != (char)uVar10)) break;
LAB_14004f53b:
        if (iVar17 == 0) {
          iVar17 = 0;
          cVar15 = '\0';
          goto LAB_14004f0ca;
        }
        std::string::push_back((string *)local_50,(char)iVar17);
        iVar17 = 0;
        bVar4 = bVar20;
      }
    }
LAB_14004f340:
    cVar15 = '\0';
    cVar6 = '\0';
    if (local_50[0][-3] == 0) goto LAB_14004f0e0;
LAB_14004f356:
    cVar15 = cVar6;
    std::string::push_back((string *)local_50,(char)iVar17);
    cVar6 = __verify_grouping(*(longlong *)(lVar9 + 0x10),*(longlong *)(lVar9 + 0x18),
                              (undefined8 *)local_50);
    if (cVar6 == '\0') {
      *param_6 = 4;
    }
    if (((iVar17 != 0) || (bVar2)) || (local_50[0][-3] != 0)) {
LAB_14004f3a0:
      if (cVar5 == '\0') {
        if (bVar20 == 0) {
          uVar10 = -uVar19;
          if (local_7a == false) {
            uVar10 = uVar19;
          }
          *param_7 = uVar10;
        }
        else {
          uVar10 = 0x7fffffffffffffff;
          if (local_7a != false) {
            uVar10 = 0x8000000000000000;
          }
          *param_7 = uVar10;
          *param_6 = 4;
        }
        goto LAB_14004f110;
      }
    }
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004f110:
  if (cVar15 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<char, std::char_traits<char> > std::num_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> > >::_M_extract_int<unsigned long
// long>(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  byte bVar1;
  undefined1 auVar2 [16];
  bool bVar3;
  longlong *plVar4;
  char cVar5;
  char cVar6;
  uint uVar7;
  int iVar8;
  longlong lVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  void *pvVar13;
  ulonglong uVar14;
  char cVar15;
  int iVar16;
  ulonglong uVar17;
  uint uVar18;
  int iVar19;
  byte bVar20;
  byte bVar21;
  bool bVar22;
  bool bVar23;
  bool bVar24;
  ulonglong local_b8;
  istreambuf_iterator<> *local_a8;
  longlong **local_98;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar18 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar18 == 0x40) {
    iVar16 = 8;
LAB_14004f7d8:
    uVar10 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar5 = (char)uVar10;
    if (cVar5 == '\0') {
LAB_14004f7fe:
      local_98 = &local_78;
      local_a8 = (istreambuf_iterator<> *)&local_68;
      uVar10 = istreambuf_iterator<>::_M_get(local_a8);
      cVar5 = (char)uVar10;
      bVar22 = *(char *)(lVar9 + 0x6e) == cVar5;
      uVar10 = uVar10 & 0xffffffff;
      if ((bVar22) || (*(char *)(lVar9 + 0x6f) == cVar5)) {
        cVar15 = *(char *)(lVar9 + 0x20);
        if (((cVar15 != '\0') && (*(char *)(lVar9 + 0x49) == cVar5)) ||
           (*(char *)(lVar9 + 0x48) == cVar5)) goto LAB_14004f86a;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar11 = istreambuf_iterator<>::equal(local_a8,(longlong *)local_98);
        cVar5 = (char)uVar11;
        if (cVar5 == '\0') {
          uVar10 = istreambuf_iterator<>::_M_get(local_a8);
          cVar15 = *(char *)(lVar9 + 0x20);
          uVar10 = uVar10 & 0xffffffff;
          goto LAB_14004f86a;
        }
        iVar19 = 0;
        bVar3 = false;
      }
      else {
        bVar22 = false;
        cVar15 = *(char *)(lVar9 + 0x20);
LAB_14004f86a:
        iVar19 = 0;
        bVar3 = false;
        while (((plVar4 = local_68, cVar5 = (char)uVar10, cVar15 == '\0' ||
                (*(char *)(lVar9 + 0x49) != cVar5)) && (*(char *)(lVar9 + 0x48) != cVar5))) {
          if (*(char *)(lVar9 + 0x72) == cVar5) {
            bVar3 = (bool)(bVar3 ^ 1U | iVar16 == 10);
            if (!bVar3) goto LAB_14004f897;
            bVar24 = iVar16 == 8;
            if (bVar24 || uVar18 == 0) {
              iVar19 = 0;
              iVar16 = 8;
              bVar3 = bVar24 || uVar18 == 0;
            }
            else {
              iVar19 = iVar19 + 1;
            }
          }
          else {
            if (!bVar3) break;
LAB_14004f897:
            if ((*(char *)(lVar9 + 0x70) != cVar5) && (*(char *)(lVar9 + 0x71) != cVar5)) {
              cVar5 = '\0';
              bVar3 = true;
              goto LAB_14004f91f;
            }
            cVar5 = uVar18 == 0 || iVar16 == 0x10;
            if (uVar18 != 0 && iVar16 != 0x10) {
              bVar3 = true;
              goto LAB_14004f929;
            }
            iVar19 = 0;
            iVar16 = 0x10;
            bVar3 = false;
          }
          if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
            uVar11 = local_68[2] + 1;
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            local_68[2] = uVar11;
            if (uVar11 < (ulonglong)local_68[3]) goto LAB_14004f8f4;
LAB_14004fc60:
            iVar8 = (**(code **)(*plVar4 + 0x48))(plVar4);
            if (iVar8 != -1) goto LAB_14004f8f4;
            local_68 = (longlong *)0x0;
            bVar24 = true;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            if ((ulonglong)plVar4[3] <= (ulonglong)plVar4[2]) goto LAB_14004fc60;
LAB_14004f8f4:
            bVar24 = false;
          }
          bVar23 = (int)uStack_70 == -1;
          if (local_78 != (longlong *)0x0 && bVar23) {
            if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
               (iVar8 = (**(code **)(*local_78 + 0x48))(), iVar8 != -1)) {
              bVar23 = false;
            }
            else {
              local_78 = (longlong *)0x0;
              bVar23 = true;
            }
          }
          if (bVar23 == bVar24) {
            cVar5 = '\x01';
            goto LAB_14004f91f;
          }
          if (local_68 == (longlong *)0x0) {
LAB_14004fca0:
            uVar10 = 0xffffffff;
          }
          else if ((byte *)local_68[2] < (byte *)local_68[3]) {
            uVar10 = (ulonglong)*(byte *)local_68[2];
          }
          else {
            uVar7 = (**(code **)(*local_68 + 0x48))();
            uVar10 = (ulonglong)uVar7;
            if (uVar7 == 0xffffffff) {
              local_68 = (longlong *)0x0;
              goto LAB_14004fca0;
            }
          }
          if (!bVar3) break;
          cVar15 = *(char *)(lVar9 + 0x20);
        }
        cVar5 = '\0';
      }
LAB_14004f91f:
      if (iVar16 == 0x10) goto LAB_14004fb28;
    }
    else {
      bVar22 = false;
      uVar10 = 0;
      iVar19 = 0;
      bVar3 = false;
    }
LAB_14004f929:
    local_b8 = (ulonglong)iVar16;
    iVar8 = iVar16;
  }
  else {
    iVar16 = 10;
    if (uVar18 != 8) goto LAB_14004f7d8;
    iVar16 = 0x10;
    uVar10 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar5 = (char)uVar10;
    if (cVar5 == '\0') goto LAB_14004f7fe;
    bVar22 = false;
    uVar10 = 0;
    iVar19 = 0;
    bVar3 = false;
LAB_14004fb28:
    local_b8 = 0x16;
    iVar16 = 0x10;
    iVar8 = 0x16;
  }
  local_98 = &local_78;
  local_a8 = (istreambuf_iterator<> *)&local_68;
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar9 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar14 = (ulonglong)iVar16;
  auVar2._8_8_ = 0;
  auVar2._0_8_ = uVar14;
  uVar11 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0);
  bVar1 = *(byte *)(lVar9 + 0x88);
  cVar15 = cVar5;
  if (bVar1 == 0) {
    bVar20 = 0;
    if (cVar5 == '\0') {
      uVar17 = 0;
LAB_14004f9a3:
      do {
        cVar15 = (char)uVar10;
        if (local_b8 < 0xb) {
          if ((cVar15 < '0') || ((char)((char)iVar8 + '0') <= cVar15)) goto LAB_14004fcb0;
        }
        else if (9 < (byte)(cVar15 - 0x30U)) goto LAB_14004fbdd;
        iVar16 = cVar15 + -0x30;
        while( true ) {
          plVar4 = local_68;
          if (uVar11 < uVar17) {
            bVar20 = 1;
          }
          else {
            uVar10 = uVar17 * uVar14;
            uVar17 = (longlong)iVar16 + uVar10;
            iVar19 = iVar19 + 1;
            bVar20 = bVar20 | CARRY8((longlong)iVar16,uVar10);
          }
          uVar10 = local_68[3];
          if ((ulonglong)local_68[2] < uVar10) {
            uVar12 = local_68[2] + 1;
            local_68[2] = uVar12;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            uVar12 = plVar4[2];
            uVar10 = plVar4[3];
          }
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          bVar24 = false;
          if (uVar10 <= uVar12) {
            iVar16 = (**(code **)(*plVar4 + 0x48))(plVar4);
            if (iVar16 == -1) {
              local_68 = (longlong *)0x0;
            }
            bVar24 = iVar16 == -1;
          }
          bVar23 = (int)uStack_70 == -1;
          if (((local_78 != (longlong *)0x0) && (bVar23)) &&
             (bVar23 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
            iVar16 = (**(code **)(*local_78 + 0x48))();
            bVar23 = iVar16 == -1;
            if (bVar23) {
              local_78 = (longlong *)0x0;
            }
          }
          if (bVar23 == bVar24) {
            cVar6 = cVar5;
            cVar15 = '\x01';
            goto LAB_14004fa4a;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14004fcb0;
          if ((byte *)local_68[2] < (byte *)local_68[3]) break;
          uVar18 = (**(code **)(*local_68 + 0x48))();
          uVar10 = (ulonglong)uVar18;
          if (uVar18 != 0xffffffff) goto LAB_14004f9a3;
          local_68 = (longlong *)0x0;
          if (local_b8 < 0xb) goto LAB_14004fcb0;
          cVar15 = -1;
LAB_14004fbdd:
          if ((byte)(cVar15 + 0x9fU) < 6) {
            iVar16 = cVar15 + -0x57;
          }
          else {
            if (5 < (byte)(cVar15 + 0xbfU)) goto LAB_14004fcb0;
            iVar16 = cVar15 + -0x37;
          }
        }
        uVar10 = (ulonglong)*(byte *)local_68[2];
      } while( true );
    }
    uVar17 = 0;
    cVar6 = '\0';
LAB_14004fa4a:
    cVar5 = cVar6;
    cVar6 = cVar15;
    if (local_50[0][-3] != 0) goto LAB_14004fcc6;
LAB_14004fa60:
    if ((iVar19 != 0) || (bVar3)) goto LAB_14004fd10;
  }
  else {
    if (cVar5 != '\0') {
      uVar17 = 0;
      bVar20 = 0;
      cVar6 = '\0';
      goto LAB_14004fa4a;
    }
    bVar20 = 0;
    uVar17 = 0;
    cVar6 = *(char *)(lVar9 + 0x20);
    if ((cVar6 != '\0') && (*(char *)(lVar9 + 0x49) == (char)uVar10)) goto LAB_14004fe89;
LAB_14004fdc9:
    cVar15 = (char)uVar10;
    bVar24 = *(char *)(lVar9 + 0x48) == cVar15;
    if (!bVar24 && local_b8 != 0) {
      pvVar13 = memchr((void *)(lVar9 + 0x72),(int)cVar15,local_b8);
      if (pvVar13 != (void *)0x0) {
        iVar16 = (int)pvVar13 - (int)(void *)(lVar9 + 0x72);
        if (0xf < iVar16) {
          iVar16 = iVar16 + -6;
        }
        bVar21 = bVar1;
        if (uVar17 <= uVar11) {
          uVar10 = uVar17 * uVar14;
          uVar17 = (longlong)iVar16 + uVar10;
          iVar19 = iVar19 + 1;
          bVar21 = bVar20 | CARRY8((longlong)iVar16,uVar10);
        }
        uVar10 = local_68[2];
        bVar20 = bVar21;
        if ((ulonglong)local_68[3] <= uVar10) goto LAB_14004feb5;
        do {
          local_68[2] = uVar10 + 1;
          while( true ) {
            uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
            uVar10 = istreambuf_iterator<>::equal(local_a8,(longlong *)local_98);
            cVar6 = cVar5;
            cVar15 = (char)uVar10;
            if ((char)uVar10 != '\0') goto LAB_14004fa4a;
            uVar10 = istreambuf_iterator<>::_M_get(local_a8);
            uVar10 = uVar10 & 0xffffffff;
            cVar6 = *(char *)(lVar9 + 0x20);
            if ((cVar6 == '\0') || (*(char *)(lVar9 + 0x49) != (char)uVar10)) goto LAB_14004fdc9;
LAB_14004fe89:
            if (iVar19 == 0) {
              iVar19 = 0;
              cVar15 = '\0';
              goto LAB_14004fa4a;
            }
            std::string::push_back((string *)local_50,(char)iVar19);
            iVar19 = 0;
            uVar10 = local_68[2];
            if (uVar10 < (ulonglong)local_68[3]) break;
LAB_14004feb5:
            (**(code **)(*local_68 + 0x50))();
          }
        } while( true );
      }
      cVar6 = '\0';
      cVar15 = bVar24 || local_b8 == 0;
      goto LAB_14004fa4a;
    }
LAB_14004fcb0:
    cVar15 = '\0';
    cVar6 = '\0';
    if (local_50[0][-3] == 0) goto LAB_14004fa60;
LAB_14004fcc6:
    cVar15 = cVar6;
    std::string::push_back((string *)local_50,(char)iVar19);
    cVar6 = __verify_grouping(*(longlong *)(lVar9 + 0x10),*(longlong *)(lVar9 + 0x18),
                              (undefined8 *)local_50);
    if (cVar6 == '\0') {
      *param_6 = 4;
    }
    if (((iVar19 != 0) || (bVar3)) || (local_50[0][-3] != 0)) {
LAB_14004fd10:
      if (cVar5 == '\0') {
        if (bVar20 == 0) {
          if (bVar22) {
            uVar17 = -uVar17;
          }
          *param_7 = uVar17;
        }
        else {
          *param_7 = 0xffffffffffffffff;
          *param_6 = 4;
        }
        goto LAB_14004fa90;
      }
    }
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14004fa90:
  if (cVar15 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_float(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// std::string&) const

undefined8 *
std::num_get<>::_M_extract_float
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,undefined4 *param_6,string *param_7)

{
  char cVar1;
  longlong *plVar2;
  byte bVar3;
  char cVar4;
  char cVar5;
  char cVar6;
  int iVar7;
  longlong lVar8;
  ulonglong uVar9;
  void *pvVar10;
  longlong lVar11;
  char cVar12;
  undefined1 uVar13;
  longlong lVar14;
  ulonglong *puVar15;
  byte bVar16;
  uint uVar17;
  byte bVar18;
  int iVar19;
  bool bVar20;
  bool bVar21;
  byte local_92;
  byte local_91;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar8 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
  cVar4 = (char)uVar9;
  if (cVar4 == '\0') {
    uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
    cVar6 = *(char *)(lVar8 + 0x20);
    uVar17 = (uint)uVar9;
    cVar5 = (char)uVar9;
    if (*(char *)(lVar8 + 0x6f) == cVar5) {
      if (cVar6 == '\0') {
        cVar12 = '+';
        cVar1 = *(char *)(lVar8 + 0x48);
        goto joined_r0x000140050c07;
      }
LAB_140050b5a:
      if ((*(char *)(lVar8 + 0x49) == cVar5) || (*(char *)(lVar8 + 0x48) == cVar5))
      goto LAB_140050928;
      cVar12 = (*(char *)(lVar8 + 0x6f) != cVar5) * '\x02' + '+';
    }
    else {
      if (*(char *)(lVar8 + 0x6e) != cVar5) goto LAB_140050928;
      if (cVar6 != '\0') goto LAB_140050b5a;
      cVar12 = '-';
      cVar1 = *(char *)(lVar8 + 0x48);
joined_r0x000140050c07:
      if (cVar1 == cVar5) goto LAB_140050928;
    }
    std::string::push_back(param_7,cVar12);
    _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
    uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
    uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    cVar6 = (char)uVar9;
    if (cVar6 == '\0') {
      uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      cVar6 = *(char *)(lVar8 + 0x20);
      uVar17 = (uint)uVar9;
LAB_140050928:
      bVar18 = 0;
      iVar19 = 0;
      do {
        cVar5 = (char)uVar17;
        if ((((cVar6 != '\0') && (cVar6 = cVar4, *(char *)(lVar8 + 0x49) == cVar5)) ||
            (cVar6 = cVar4, *(char *)(lVar8 + 0x48) == cVar5)) || (*(char *)(lVar8 + 0x72) != cVar5)
           ) goto LAB_140050130;
        if (bVar18 == 0) {
          lVar11 = *(longlong *)param_7;
          lVar14 = *(longlong *)(lVar11 + -0x18);
          uVar9 = lVar14 + 1;
          if (*(ulonglong *)(lVar11 + -0x10) < uVar9) {
LAB_140050a17:
            std::string::reserve(param_7,uVar9);
          }
          else {
            if (_CRT_MT == 0) {
              iVar7 = *(int *)(lVar11 + -8);
            }
            else {
              iVar7 = *(int *)(lVar11 + -8);
            }
            if (0 < iVar7) goto LAB_140050a17;
          }
          *(undefined1 *)(*(longlong *)param_7 + *(longlong *)(*(longlong *)param_7 + -0x18)) = 0x30
          ;
          lVar11 = *(longlong *)param_7;
          *(undefined4 *)(lVar11 + -8) = 0;
          *(ulonglong *)(lVar11 + -0x18) = uVar9;
          *(undefined1 *)(lVar11 + 1 + lVar14) = 0;
        }
        plVar2 = local_68;
        iVar19 = iVar19 + 1;
        if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
          uVar9 = local_68[2] + 1;
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          local_68[2] = uVar9;
          if (uVar9 < (ulonglong)local_68[3]) goto LAB_14005098f;
LAB_140050a98:
          iVar7 = (**(code **)(*plVar2 + 0x48))(plVar2);
          if (iVar7 != -1) goto LAB_14005098f;
          local_68 = (longlong *)0x0;
          bVar21 = true;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
          if ((ulonglong)plVar2[3] <= (ulonglong)plVar2[2]) goto LAB_140050a98;
LAB_14005098f:
          bVar21 = false;
        }
        bVar20 = (int)uStack_70 == -1;
        if (local_78 != (longlong *)0x0 && bVar20) {
          if (((ulonglong)local_78[2] < (ulonglong)local_78[3]) ||
             (iVar7 = (**(code **)(*local_78 + 0x48))(), iVar7 != -1)) {
            bVar20 = false;
          }
          else {
            local_78 = (longlong *)0x0;
            bVar20 = true;
          }
        }
        if (bVar20 == bVar21) goto code_r0x0001400509b1;
        if (local_68 == (longlong *)0x0) {
LAB_140050ae0:
          uVar17 = 0xffffffff;
        }
        else if ((byte *)local_68[2] < (byte *)local_68[3]) {
          uVar17 = (uint)*(byte *)local_68[2];
        }
        else {
          uVar17 = (**(code **)(*local_68 + 0x48))();
          if (uVar17 == 0xffffffff) {
            local_68 = (longlong *)0x0;
            goto LAB_140050ae0;
          }
        }
        cVar6 = *(char *)(lVar8 + 0x20);
        bVar18 = 1;
      } while( true );
    }
    bVar18 = 0;
    iVar19 = 0;
  }
  else {
    uVar17 = 0;
    iVar19 = 0;
    bVar18 = 0;
    cVar6 = cVar4;
  }
  goto LAB_140050130;
code_r0x000140050844:
  cVar4 = (*(char *)(lVar8 + 0x6f) != cVar6) * '\x02' + '+';
LAB_140050640:
  std::string::push_back(param_7,cVar4);
LAB_1400503c4:
  plVar2 = local_68;
  if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
    uVar9 = local_68[2] + 1;
    uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
    bVar21 = false;
    local_68[2] = uVar9;
    if (uVar9 < (ulonglong)local_68[3]) goto LAB_1400503f5;
  }
  else {
    (**(code **)(*local_68 + 0x50))(local_68);
    uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
    bVar21 = false;
    if ((ulonglong)plVar2[2] < (ulonglong)plVar2[3]) goto LAB_1400503f5;
  }
  iVar7 = (**(code **)(*plVar2 + 0x48))(plVar2);
  if (iVar7 == -1) {
    local_68 = (longlong *)0x0;
  }
  bVar21 = iVar7 == -1;
LAB_1400503f5:
  bVar20 = (int)uStack_70 == -1;
  if (((local_78 != (longlong *)0x0) && (bVar20)) &&
     (bVar20 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
    iVar7 = (**(code **)(*local_78 + 0x48))();
    bVar20 = iVar7 == -1;
    if (bVar20) {
      local_78 = (longlong *)0x0;
    }
  }
  if (bVar21 == bVar20) goto LAB_14005041d;
  if (local_68 == (longlong *)0x0) {
    uVar17 = 0xffffffff;
  }
  else if ((byte *)local_68[2] < (byte *)local_68[3]) {
    uVar17 = (uint)*(byte *)local_68[2];
  }
  else {
    uVar17 = (**(code **)(*local_68 + 0x48))();
    if (uVar17 == 0xffffffff) {
      local_68 = (longlong *)0x0;
    }
  }
  cVar4 = *(char *)(lVar8 + 0x20);
  goto LAB_140050328;
code_r0x000140050257:
  bVar16 = *(byte *)local_68[2];
  uVar17 = (uint)bVar16;
  goto joined_r0x000140050185;
LAB_140050bdf:
  puVar15 = local_50[0];
  if (local_50[0][-3] == 0) goto LAB_140050475;
  goto LAB_140050453;
code_r0x0001400509b1:
  bVar18 = 1;
  cVar6 = '\x01';
LAB_140050130:
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar8 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  bVar16 = *(byte *)(lVar8 + 0x88);
  if (bVar16 == 0) {
    if (cVar6 == '\0') {
      local_92 = 0;
      local_91 = 0;
LAB_140050180:
      bVar16 = (byte)uVar17;
joined_r0x000140050185:
      if (9 < (byte)(bVar16 - 0x30)) {
        bVar3 = bVar16;
        if (*(byte *)(lVar8 + 0x48) == bVar16) goto LAB_14005074f;
        goto LAB_140050270;
      }
      lVar11 = *(longlong *)param_7;
      lVar14 = *(longlong *)(lVar11 + -0x18);
      uVar9 = lVar14 + 1;
      if (uVar9 <= *(ulonglong *)(lVar11 + -0x10)) {
        if (_CRT_MT == 0) {
          iVar7 = *(int *)(lVar11 + -8);
        }
        else {
          iVar7 = *(int *)(lVar11 + -8);
        }
        if (iVar7 < 1) goto LAB_1400501c1;
      }
      std::string::reserve(param_7,uVar9);
LAB_1400501c1:
      *(char *)(*(longlong *)param_7 + *(longlong *)(*(longlong *)param_7 + -0x18)) = (char)uVar17;
      lVar11 = *(longlong *)param_7;
      *(ulonglong *)(lVar11 + -0x18) = uVar9;
      bVar18 = 1;
      *(undefined4 *)(lVar11 + -8) = 0;
      *(undefined1 *)(lVar11 + 1 + lVar14) = 0;
LAB_1400501e6:
      plVar2 = local_68;
      if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
        uVar9 = local_68[2] + 1;
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        bVar21 = false;
        local_68[2] = uVar9;
        if ((ulonglong)local_68[3] <= uVar9) {
LAB_140050708:
          iVar7 = (**(code **)(*plVar2 + 0x48))(plVar2);
          if (iVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar21 = iVar7 == -1;
        }
      }
      else {
        (**(code **)(*local_68 + 0x50))(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        bVar21 = false;
        if ((ulonglong)plVar2[3] <= (ulonglong)plVar2[2]) goto LAB_140050708;
      }
      bVar20 = (int)uStack_70 == -1;
      if (((local_78 != (longlong *)0x0) && (bVar20)) &&
         (bVar20 = false, (ulonglong)local_78[3] <= (ulonglong)local_78[2])) {
        iVar7 = (**(code **)(*local_78 + 0x48))();
        bVar20 = iVar7 == -1;
        if (bVar20) {
          local_78 = (longlong *)0x0;
        }
      }
      if (bVar20 == bVar21) goto LAB_14005041d;
      if (local_68 != (longlong *)0x0) {
        if ((byte *)local_68[2] < (byte *)local_68[3]) goto code_r0x000140050257;
        uVar17 = (**(code **)(*local_68 + 0x48))();
        if (uVar17 != 0xffffffff) goto LAB_140050180;
        local_68 = (longlong *)0x0;
      }
      bVar16 = 0xff;
      bVar3 = 0xff;
      if (*(char *)(lVar8 + 0x48) == -1) {
LAB_14005074f:
        bVar16 = bVar3;
        if (local_91 != 0 || local_92 != 0) goto LAB_140050270;
        local_91 = 1;
        std::string::push_back(param_7,0x2e);
        local_92 = 0;
      }
      else {
LAB_140050270:
        if (((*(byte *)(lVar8 + 0x80) != bVar16) && (*(byte *)(lVar8 + 0x86) != bVar16)) ||
           (bVar18 = bVar18 & (local_92 ^ 1), bVar18 == 0)) goto LAB_14005041d;
        std::string::push_back(param_7,0x65);
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
        uVar9 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if ((char)uVar9 != '\0') goto LAB_140050bdf;
        uVar9 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
        uVar17 = (uint)uVar9;
        local_92 = bVar18;
        if (*(char *)(lVar8 + 0x6f) == (char)uVar9) {
          uVar13 = 0x2b;
        }
        else {
          uVar13 = 0x2d;
          if ((char)uVar9 != *(char *)(lVar8 + 0x6e)) goto LAB_140050180;
        }
        std::string::push_back(param_7,uVar13);
      }
      goto LAB_1400501e6;
    }
LAB_140050c25:
    puVar15 = local_50[0];
    if (local_50[0][-3] == 0) goto LAB_140050475;
LAB_14005043d:
    std::string::push_back((string *)local_50,(char)iVar19);
  }
  else {
    if (cVar6 != '\0') goto LAB_140050c25;
    local_92 = 0;
    cVar4 = *(char *)(lVar8 + 0x20);
    local_91 = 0;
LAB_140050328:
    uVar13 = (undefined1)iVar19;
    if (cVar4 == '\0') goto LAB_140050336;
    while (*(char *)(lVar8 + 0x49) != (char)uVar17) {
LAB_140050336:
      cVar4 = (char)uVar17;
      if (*(char *)(lVar8 + 0x48) == cVar4) {
        if (local_92 != 0 || local_91 != 0) goto LAB_140050bdf;
        if (local_50[0][-3] != 0) {
          std::string::push_back((string *)local_50,uVar13);
        }
        lVar11 = *(longlong *)param_7;
        lVar14 = *(longlong *)(lVar11 + -0x18);
        uVar9 = lVar14 + 1;
        if (*(ulonglong *)(lVar11 + -0x10) < uVar9) {
LAB_140050509:
          std::string::reserve(param_7,uVar9);
LAB_140050514:
          lVar11 = *(longlong *)param_7;
          lVar14 = *(longlong *)(lVar11 + -0x18);
        }
        else {
          if (_CRT_MT != 0) {
            if (0 < *(int *)(lVar11 + -8)) goto LAB_140050509;
            goto LAB_140050514;
          }
          if (0 < *(int *)(lVar11 + -8)) goto LAB_140050509;
        }
        *(undefined1 *)(lVar11 + lVar14) = 0x2e;
        lVar11 = *(longlong *)param_7;
        *(undefined4 *)(lVar11 + -8) = 0;
        *(ulonglong *)(lVar11 + -0x18) = uVar9;
        *(undefined1 *)(lVar11 + uVar9) = 0;
        local_92 = 0;
        local_91 = bVar16;
        goto LAB_1400503c4;
      }
      pvVar10 = memchr((void *)(lVar8 + 0x72),(int)cVar4,10);
      if (pvVar10 != (void *)0x0) {
        lVar11 = *(longlong *)param_7;
        lVar14 = *(longlong *)(lVar11 + -0x18);
        uVar9 = lVar14 + 1;
        if (*(ulonglong *)(lVar11 + -0x10) < uVar9) {
LAB_14005038d:
          std::string::reserve(param_7,uVar9);
        }
        else {
          if (_CRT_MT == 0) {
            iVar7 = *(int *)(lVar11 + -8);
          }
          else {
            iVar7 = *(int *)(lVar11 + -8);
          }
          if (0 < iVar7) goto LAB_14005038d;
        }
        iVar19 = iVar19 + 1;
        *(char *)(*(longlong *)param_7 + *(longlong *)(*(longlong *)param_7 + -0x18)) =
             ((char)pvVar10 - (char)(void *)(lVar8 + 0x72)) + '0';
        lVar11 = *(longlong *)param_7;
        *(undefined4 *)(lVar11 + -8) = 0;
        *(ulonglong *)(lVar11 + -0x18) = uVar9;
        *(undefined1 *)(lVar11 + 1 + lVar14) = 0;
        bVar18 = bVar16;
        goto LAB_1400503c4;
      }
      if ((*(char *)(lVar8 + 0x80) != cVar4) && (*(char *)(lVar8 + 0x86) != cVar4))
      goto LAB_14005041d;
      bVar18 = bVar18 & (local_92 ^ 1);
      if (bVar18 == 0) goto LAB_14005041d;
      if ((local_50[0][-3] != 0) && (local_91 == 0)) {
        std::string::push_back((string *)local_50,uVar13);
      }
      std::string::push_back(param_7,0x65);
      if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
        local_68[2] = local_68[2] + 1;
      }
      else {
        (**(code **)(*local_68 + 0x50))();
      }
      uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
      uVar9 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78)
      ;
      if ((char)uVar9 != '\0') goto LAB_140050bdf;
      uVar17 = (uint)uStack_60;
      if (((uint)uStack_60 == 0xffffffff) && (local_68 != (longlong *)0x0)) {
        if ((byte *)local_68[2] < (byte *)local_68[3]) {
          uVar17 = (uint)*(byte *)local_68[2];
        }
        else {
          uVar17 = (**(code **)(*local_68 + 0x48))();
          if (uVar17 == 0xffffffff) {
            local_68 = (longlong *)0x0;
          }
        }
      }
      cVar4 = *(char *)(lVar8 + 0x20);
      cVar6 = (char)uVar17;
      local_92 = bVar18;
      if (*(char *)(lVar8 + 0x6f) == cVar6) {
        if (cVar4 != '\0') goto LAB_140050830;
        if (cVar6 != *(char *)(lVar8 + 0x48)) {
          cVar4 = '+';
          goto LAB_140050640;
        }
        goto LAB_140050336;
      }
      if (*(char *)(lVar8 + 0x6e) != cVar6) goto LAB_140050328;
      if (cVar4 == '\0') {
        if (*(char *)(lVar8 + 0x48) != cVar6) {
          cVar4 = '-';
          goto LAB_140050640;
        }
        goto LAB_140050336;
      }
LAB_140050830:
      if ((*(char *)(lVar8 + 0x49) != cVar6) && (*(char *)(lVar8 + 0x48) != cVar6))
      goto code_r0x000140050844;
    }
    if (local_91 != 0 || local_92 != 0) goto LAB_140050bdf;
    local_91 = 0;
    if (iVar19 != 0) {
      std::string::push_back((string *)local_50,uVar13);
      local_92 = 0;
      iVar19 = 0;
      goto LAB_1400503c4;
    }
    std::string::_M_mutate(param_7,0,*(longlong *)(*(longlong *)param_7 + -0x18),0);
    local_92 = 0;
LAB_14005041d:
    puVar15 = local_50[0];
    if (local_50[0][-3] == 0) goto LAB_140050475;
    if ((local_91 == 0) && (local_92 == 0)) goto LAB_14005043d;
  }
LAB_140050453:
  puVar15 = local_50[0];
  cVar4 = __verify_grouping(*(longlong *)(lVar8 + 0x10),*(longlong *)(lVar8 + 0x18),local_50);
  if (cVar4 == '\0') {
    *param_6 = 4;
  }
LAB_140050475:
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(puVar15 + -3);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, void*&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ulonglong *param_7)

{
  uint uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  ulonglong local_40;
  ulonglong local_30 [2];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  local_68 = *param_4;
  local_60 = param_4[1];
  if (*(code **)(*param_2 + 0x60) == do_get) {
    uVar1 = *(uint *)(param_5 + 0x18);
    *(uint *)(param_5 + 0x18) = uVar1 & 0xffffffb5 | 8;
    local_58 = uVar2;
    local_50 = uVar3;
    _M_extract_int<>(&local_48,param_2,&local_58,&local_68,param_5,param_6,local_30);
    *(uint *)(param_5 + 0x18) = uVar1;
    *param_1 = local_48;
    param_1[1] = uVar3 & 0xffffffff00000000 | local_40 & 0xffffffff;
    *param_7 = local_30[0];
    return param_1;
  }
  local_58 = local_68;
  local_50 = local_60;
  local_48 = uVar2;
  local_40 = uVar3;
  (**(code **)(*param_2 + 0x60))(param_1,param_2,&local_48,&local_58,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, bool&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, double&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x50))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long double&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x58))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, float&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x48))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x28) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))();
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x18) == do_get) {
    _M_extract_int<long>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x30) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))();
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ushort *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x20) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))();
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x38) == do_get) {
    _M_extract_int<long_long>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))();
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x40) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x40))();
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, void*&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  uint local_40;
  ulonglong local_30 [2];
  
  local_58 = *param_3;
  uVar2 = param_3[1];
  local_68 = *param_4;
  uVar1 = *(uint *)(param_5 + 0x18);
  local_60 = param_4[1];
  *(uint *)(param_5 + 0x18) = uVar1 & 0xffffffb5 | 8;
  local_50 = uVar2;
  _M_extract_int<>(&local_48,param_2,&local_58,&local_68,param_5,param_6,local_30);
  *(uint *)(param_5 + 0x18) = uVar1;
  *param_1 = local_48;
  param_1[1] = uVar2 & 0xffffffff00000000 | (ulonglong)local_40;
  *param_7 = local_30[0];
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, bool&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,byte *param_7)

{
  int iVar1;
  longlong lVar2;
  ulonglong uVar3;
  bool bVar4;
  longlong *plVar5;
  uint uVar6;
  bool bVar7;
  byte bVar8;
  bool bVar9;
  bool bVar10;
  bool bVar11;
  bool bVar12;
  bool bVar13;
  bool bVar14;
  longlong *local_a8;
  undefined8 local_a0;
  longlong *local_98;
  undefined8 local_90;
  longlong *local_88;
  undefined4 local_80;
  longlong *local_78;
  undefined8 local_70;
  longlong *local_68;
  undefined8 uStack_60;
  uint local_4c [3];
  
  local_98 = (longlong *)*param_3;
  local_90 = param_3[1];
  local_a8 = (longlong *)*param_4;
  local_a0 = param_4[1];
  local_78 = local_a8;
  local_70 = local_a0;
  local_68 = local_98;
  uStack_60 = local_90;
  if ((*(byte *)(param_5 + 0x18) & 1) == 0) {
    local_4c[0] = 0xffffffff;
    _M_extract_int<long>(&local_88,param_2,&local_98,&local_a8,param_5,param_6,local_4c);
    local_68 = local_88;
    uStack_60 = CONCAT44(uStack_60._4_4_,local_80);
    if (local_4c[0] < 2) {
      *param_7 = (byte)local_4c[0];
      *param_7 = *param_7 & 1;
    }
    else {
      *param_7 = 1;
      *param_6 = 4;
      uVar3 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78)
      ;
      if ((char)uVar3 != '\0') {
        *param_6 = *param_6 | 2;
      }
    }
    goto LAB_1400514f5;
  }
  lVar2 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  bVar9 = *(longlong *)(lVar2 + 0x40) == 0;
  bVar10 = *(longlong *)(lVar2 + 0x30) == 0;
  if (*(longlong *)(lVar2 + 0x40) == 0 && *(longlong *)(lVar2 + 0x30) == 0) {
LAB_140051889:
    *param_7 = 0;
  }
  else {
    bVar11 = (int)local_70 == -1;
    bVar13 = true;
    uVar3 = 0;
    bVar14 = true;
    plVar5 = local_68;
    uVar6 = (uint)uStack_60;
    do {
      bVar12 = uVar6 == 0xffffffff;
      bVar7 = bVar12;
      if (plVar5 != (longlong *)0x0 && bVar12) {
        if (((ulonglong)plVar5[2] < (ulonglong)plVar5[3]) ||
           (iVar1 = (**(code **)(*plVar5 + 0x48))(plVar5), iVar1 != -1)) {
          bVar7 = false;
        }
        else {
          local_68 = (longlong *)0x0;
          bVar7 = true;
        }
      }
      bVar4 = bVar11;
      if (local_78 != (longlong *)0x0 && bVar11) {
        if (((ulonglong)local_78[3] <= (ulonglong)local_78[2]) &&
           (iVar1 = (**(code **)(*local_78 + 0x48))(), iVar1 == -1)) {
          local_78 = (longlong *)0x0;
          bVar4 = true;
          goto LAB_1400515ea;
        }
        if (bVar7 == false) goto LAB_140051710;
      }
      else {
LAB_1400515ea:
        if (bVar7 == bVar4) {
LAB_140051710:
          bVar8 = 1;
          goto LAB_140051726;
        }
      }
      if ((local_68 != (longlong *)0x0) && (bVar12)) {
        if ((byte *)local_68[2] < (byte *)local_68[3]) {
          uVar6 = (uint)*(byte *)local_68[2];
        }
        else {
          uVar6 = (**(code **)(*local_68 + 0x48))();
          if (uVar6 == 0xffffffff) {
            local_68 = (longlong *)0x0;
          }
        }
      }
      plVar5 = local_68;
      if (!bVar9) {
        bVar13 = *(char *)(*(longlong *)(lVar2 + 0x38) + uVar3) == (char)uVar6;
      }
      if ((bool)((bVar13 ^ 1U) & bVar10)) {
        bVar8 = 0;
        if (bVar14) goto LAB_140051739;
        goto LAB_140051889;
      }
      if (!bVar10) {
        bVar14 = *(char *)(*(longlong *)(lVar2 + 0x28) + uVar3) == (char)uVar6;
      }
      if ((bool)((bVar14 ^ 1U) & bVar9)) {
        if (!bVar13) goto LAB_140051889;
        bVar8 = 0;
        if (uVar3 != *(ulonglong *)(lVar2 + 0x40)) goto LAB_140051748;
        bVar14 = false;
        bVar8 = 0;
        goto LAB_1400518c3;
      }
      bVar7 = (bool)(bVar13 | bVar14);
      if (!bVar7) {
        *param_7 = 0;
        goto LAB_14005185b;
      }
      uVar3 = uVar3 + 1;
      if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
        local_68[2] = local_68[2] + 1;
      }
      else {
        (**(code **)(*local_68 + 0x50))(local_68);
      }
      uStack_60 = CONCAT44(uStack_60._4_4_,0xffffffff);
      bVar9 = bVar7;
      if ((!bVar13) || (bVar9 = *(ulonglong *)(lVar2 + 0x40) <= uVar3, bVar14)) {
        bVar10 = *(ulonglong *)(lVar2 + 0x30) <= uVar3;
        bVar14 = bVar7;
        bVar7 = (bool)(bVar9 & bVar10);
      }
      else {
        bVar10 = true;
        bVar7 = bVar9;
      }
      uVar6 = 0xffffffff;
    } while (!bVar7);
    bVar8 = 0;
LAB_140051726:
    if ((bVar13) && (*(ulonglong *)(lVar2 + 0x40) == uVar3)) {
LAB_1400518c3:
      if (uVar3 != 0) {
        *param_7 = 0;
        if ((!bVar14) || (*(ulonglong *)(lVar2 + 0x30) != uVar3)) {
LAB_1400518e8:
          *param_6 = (uint)bVar8 * 2;
          goto LAB_1400514f5;
        }
        goto LAB_14005185b;
      }
    }
    else if (bVar14) {
LAB_140051739:
      if ((*(ulonglong *)(lVar2 + 0x30) == uVar3) && (uVar3 != 0)) {
        *param_7 = 1;
        goto LAB_1400518e8;
      }
    }
LAB_140051748:
    *param_7 = 0;
    if (bVar8 != 0) {
      *param_6 = 6;
      goto LAB_1400514f5;
    }
  }
LAB_14005185b:
  *param_6 = 4;
LAB_1400514f5:
  *param_1 = local_68;
  param_1[1] = uStack_60;
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, double&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,double *param_7)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  int iVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  plVar4 = (longlong *)*param_4;
  lVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  std::string::reserve((string *)&local_58,0x20);
  local_88 = plVar4;
  local_80 = lVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_float(&local_68,param_2,&local_78,&local_88,param_5,param_6,(string *)&local_58);
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<double>((char *)local_58,param_7,param_6);
  bVar8 = (int)local_60 == -1;
  plVar7 = local_68;
  if ((local_68 != (longlong *)0x0 && bVar8) &&
     (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
    iVar6 = (**(code **)(*local_68 + 0x48))(local_68);
    bVar8 = iVar6 == -1;
    if (bVar8) {
      plVar7 = (longlong *)0x0;
    }
  }
  bVar9 = (int)lVar5 == -1;
  if (((plVar4 != (longlong *)0x0) && (bVar9)) &&
     (bVar9 = false, (ulonglong)plVar4[3] <= (ulonglong)plVar4[2])) {
    iVar6 = (**(code **)(*plVar4 + 0x48))(plVar4);
    bVar9 = iVar6 == -1;
  }
  if (bVar9 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar7;
  param_1[1] = uVar3 & 0xffffffff00000000 | local_60 & 0xffffffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long double&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,float10 *param_7)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  int iVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  plVar4 = (longlong *)*param_4;
  lVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  std::string::reserve((string *)&local_58,0x20);
  local_88 = plVar4;
  local_80 = lVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_float(&local_68,param_2,&local_78,&local_88,param_5,param_6,(string *)&local_58);
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<>((char *)local_58,param_7,param_6);
  bVar8 = (int)local_60 == -1;
  plVar7 = local_68;
  if ((local_68 != (longlong *)0x0 && bVar8) &&
     (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
    iVar6 = (**(code **)(*local_68 + 0x48))(local_68);
    bVar8 = iVar6 == -1;
    if (bVar8) {
      plVar7 = (longlong *)0x0;
    }
  }
  bVar9 = (int)lVar5 == -1;
  if (((plVar4 != (longlong *)0x0) && (bVar9)) &&
     (bVar9 = false, (ulonglong)plVar4[3] <= (ulonglong)plVar4[2])) {
    iVar6 = (**(code **)(*plVar4 + 0x48))(plVar4);
    bVar9 = iVar6 == -1;
  }
  if (bVar9 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar7;
  param_1[1] = uVar3 & 0xffffffff00000000 | local_60 & 0xffffffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, float&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,float *param_7)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  int iVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  plVar4 = (longlong *)*param_4;
  lVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  std::string::reserve((string *)&local_58,0x20);
  local_88 = plVar4;
  local_80 = lVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_float(&local_68,param_2,&local_78,&local_88,param_5,param_6,(string *)&local_58);
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<float>((char *)local_58,param_7,param_6);
  bVar8 = (int)local_60 == -1;
  plVar7 = local_68;
  if ((local_68 != (longlong *)0x0 && bVar8) &&
     (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
    iVar6 = (**(code **)(*local_68 + 0x48))(local_68);
    bVar8 = iVar6 == -1;
    if (bVar8) {
      plVar7 = (longlong *)0x0;
    }
  }
  bVar9 = (int)lVar5 == -1;
  if (((plVar4 != (longlong *)0x0) && (bVar9)) &&
     (bVar9 = false, (ulonglong)plVar4[3] <= (ulonglong)plVar4[2])) {
    iVar6 = (**(code **)(*plVar4 + 0x48))(plVar4);
    bVar9 = iVar6 == -1;
  }
  if (bVar9 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar7;
  param_1[1] = uVar3 & 0xffffffff00000000 | local_60 & 0xffffffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<long>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ushort *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<long_long>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_int[abi:cxx11]<unsigned int>(std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> >, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  byte bVar1;
  byte bVar2;
  ushort uVar3;
  longlong lVar4;
  longlong *plVar5;
  longlong lVar6;
  size_t sVar7;
  bool bVar8;
  char cVar9;
  short sVar10;
  short sVar11;
  ushort uVar12;
  ushort uVar13;
  uint uVar14;
  uint uVar15;
  longlong lVar16;
  short *psVar17;
  short *psVar18;
  ulonglong uVar19;
  __numpunct_cache<wchar_t> *this;
  ulonglong uVar20;
  longlong *plVar21;
  longlong *plVar22;
  longlong lVar23;
  uint uVar24;
  uint uVar25;
  uint uVar26;
  int iVar27;
  bool bVar28;
  bool bVar29;
  bool bVar30;
  bool bVar31;
  longlong *local_a8;
  ulonglong local_98;
  short local_90;
  byte local_6a;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  lVar4 = param_3[1];
  plVar5 = (longlong *)*param_4;
  plVar21 = (longlong *)*param_3;
  lVar6 = param_4[1];
  uVar12 = (ushort)lVar4;
  lVar16 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  plVar22 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar16 * 8);
  lVar23 = *plVar22;
  if (lVar23 == 0) {
    this = operator_new(0xd0);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
    this[0x20] = (__numpunct_cache<wchar_t>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined4 *)(this + 0x48) = 0;
    this[200] = (__numpunct_cache<wchar_t>)0x0;
    __numpunct_cache<wchar_t>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar16);
    lVar23 = *plVar22;
  }
  uVar24 = *(uint *)(param_5 + 0x18);
  uVar25 = uVar24 & 0x4a;
  uVar26 = 8;
  if (uVar25 != 0x40) {
    uVar26 = 10;
    if (uVar25 == 8) {
      uVar26 = 0x10;
    }
  }
  bVar28 = uVar12 == 0xffff;
  bVar8 = bVar28;
  if (plVar21 != (longlong *)0x0 && bVar28) {
    if ((short *)plVar21[2] < (short *)plVar21[3]) {
      sVar11 = *(short *)plVar21[2];
    }
    else {
      sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
    }
    plVar22 = (longlong *)0x0;
    if (sVar11 != -1) {
      plVar22 = plVar21;
    }
    plVar21 = plVar22;
    bVar8 = sVar11 == -1;
  }
  uVar24 = uVar24 & 0x4a;
  bVar29 = (short)lVar6 == -1;
  local_a8 = plVar5;
  bVar30 = bVar29;
  if (plVar5 != (longlong *)0x0 && bVar29) {
    if ((short *)plVar5[2] < (short *)plVar5[3]) {
      sVar11 = *(short *)plVar5[2];
    }
    else {
      sVar11 = (**(code **)(*plVar5 + 0x48))(plVar5);
    }
    bVar30 = sVar11 == -1;
    local_a8 = (longlong *)0x0;
    if (sVar11 != -1) {
      local_a8 = plVar5;
    }
  }
  if (bVar8 == bVar30) {
    bVar30 = false;
    cVar9 = *(char *)(lVar23 + 0x20);
    uVar25 = 0;
    iVar27 = 0;
    bVar8 = true;
    bVar28 = false;
LAB_140052458:
    if (uVar26 != 0x10) goto LAB_140052462;
LAB_1400527c5:
    local_98 = 0x16;
    uVar24 = 0x16;
  }
  else {
    uVar13 = uVar12;
    if ((plVar21 != (longlong *)0x0) && (bVar28)) {
      if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
        uVar13 = *(ushort *)plVar21[2];
      }
      else {
        uVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
      }
      if (uVar13 == 0xffff) {
        plVar21 = (longlong *)0x0;
      }
    }
    uVar25 = (uint)uVar13;
    cVar9 = *(char *)(lVar23 + 0x20);
    if ((*(ushort *)(lVar23 + 0x94) == uVar13) ||
       (bVar30 = false, *(ushort *)(lVar23 + 0x96) == uVar13)) {
      bVar30 = *(ushort *)(lVar23 + 0x94) == uVar13;
      if (cVar9 == '\0') {
        uVar3 = *(ushort *)(lVar23 + 0x48);
      }
      else {
        if (*(ushort *)(lVar23 + 0x4a) == uVar13) goto LAB_14005237d;
        uVar3 = *(ushort *)(lVar23 + 0x48);
      }
      if (uVar3 != uVar13) {
        psVar17 = (short *)plVar21[3];
        if ((short *)plVar21[2] < psVar17) {
          psVar18 = (short *)plVar21[2] + 1;
          plVar21[2] = (longlong)psVar18;
        }
        else {
          (**(code **)(*plVar21 + 0x50))(plVar21);
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
        }
        if (psVar18 < psVar17) {
          sVar11 = *psVar18;
        }
        else {
          sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar11 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar8 = bVar29;
        plVar22 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar29) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar8 = sVar10 == -1;
          plVar22 = (longlong *)0x0;
          if (sVar10 != -1) {
            plVar22 = local_a8;
          }
        }
        local_a8 = plVar22;
        if ((sVar11 == -1) == bVar8) {
          bVar8 = true;
          cVar9 = *(char *)(lVar23 + 0x20);
          iVar27 = 0;
          uVar12 = 0xffff;
          bVar28 = false;
          goto LAB_140052458;
        }
        if (plVar21 == (longlong *)0x0) {
          cVar9 = *(char *)(lVar23 + 0x20);
          uVar25 = 0xffff;
          uVar12 = 0xffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar13 = *(ushort *)plVar21[2];
          }
          else {
            uVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
          }
          uVar25 = (uint)uVar13;
          cVar9 = *(char *)(lVar23 + 0x20);
          uVar12 = 0xffff;
          if (uVar13 == 0xffff) {
            plVar21 = (longlong *)0x0;
          }
        }
      }
    }
LAB_14005237d:
    iVar27 = 0;
    bVar28 = false;
    do {
      sVar11 = (short)uVar25;
      if (((cVar9 != '\0') && (*(short *)(lVar23 + 0x4a) == sVar11)) ||
         (*(short *)(lVar23 + 0x48) == sVar11)) break;
      if (*(short *)(lVar23 + 0x9c) == sVar11) {
        bVar8 = (bool)(bVar28 ^ 1U | uVar26 == 10);
        if (!bVar8) goto LAB_1400523b9;
        bVar28 = uVar26 == 8 || uVar24 == 0;
        if (uVar26 != 8 && uVar24 != 0) {
          iVar27 = iVar27 + 1;
          bVar28 = bVar8;
          goto LAB_1400523ef;
        }
        psVar18 = (short *)plVar21[2];
        psVar17 = (short *)plVar21[3];
        iVar27 = 0;
        uVar26 = 8;
        if (psVar18 < psVar17) goto LAB_140052400;
LAB_140052728:
        (**(code **)(*plVar21 + 0x50))(plVar21);
        psVar18 = (short *)plVar21[2];
        if (psVar18 < (short *)plVar21[3]) goto LAB_140052411;
LAB_140052750:
        sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
      }
      else {
        if (!bVar28) break;
LAB_1400523b9:
        if ((*(short *)(lVar23 + 0x98) != sVar11) && (*(short *)(lVar23 + 0x9a) != sVar11)) {
          bVar28 = true;
          bVar8 = false;
          goto LAB_140052458;
        }
        bVar8 = uVar24 == 0 || uVar26 == 0x10;
        if (uVar24 != 0 && uVar26 != 0x10) {
          bVar28 = true;
          goto LAB_140052462;
        }
        iVar27 = 0;
        uVar26 = 0x10;
        bVar28 = false;
LAB_1400523ef:
        psVar18 = (short *)plVar21[2];
        psVar17 = (short *)plVar21[3];
        if (psVar17 <= psVar18) goto LAB_140052728;
LAB_140052400:
        psVar18 = psVar18 + 1;
        plVar21[2] = (longlong)psVar18;
        if (psVar17 <= psVar18) goto LAB_140052750;
LAB_140052411:
        sVar11 = *psVar18;
      }
      if (sVar11 == -1) {
        plVar21 = (longlong *)0x0;
      }
      bVar8 = bVar29;
      if (local_a8 != (longlong *)0x0 && bVar29) {
        if ((short *)local_a8[2] < (short *)local_a8[3]) {
          sVar10 = *(short *)local_a8[2];
        }
        else {
          sVar10 = (**(code **)(*local_a8 + 0x48))();
        }
        plVar22 = (longlong *)0x0;
        if (sVar10 != -1) {
          plVar22 = local_a8;
        }
        local_a8 = plVar22;
        bVar8 = sVar10 == -1;
      }
      if (bVar8 == (sVar11 == -1)) {
        bVar8 = true;
        cVar9 = *(char *)(lVar23 + 0x20);
        uVar12 = 0xffff;
        goto LAB_140052458;
      }
      uVar25 = 0xffff;
      if (plVar21 != (longlong *)0x0) {
        if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
          uVar12 = *(ushort *)plVar21[2];
        }
        else {
          uVar12 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        uVar25 = (uint)uVar12;
        if (uVar12 == 0xffff) {
          plVar21 = (longlong *)0x0;
        }
      }
      cVar9 = *(char *)(lVar23 + 0x20);
      uVar12 = 0xffff;
    } while (bVar28);
    bVar8 = false;
    if (uVar26 == 0x10) goto LAB_1400527c5;
LAB_140052462:
    local_98 = (ulonglong)(int)uVar26;
    uVar24 = uVar26;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar9 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar14 = (uint)(0xffffffff / (ulonglong)uVar26);
  bVar1 = *(byte *)(lVar23 + 200);
  sVar7 = local_60;
  if (bVar1 == 0) {
    local_6a = 0;
    if (bVar8 == false) {
      local_90 = (short)uVar24;
      uVar24 = 0;
LAB_1400524e5:
      uVar13 = (ushort)uVar25;
      if (local_98 < 0xb) {
        if ((uVar13 < 0x30) || ((ushort)(local_90 + 0x30U) <= uVar13)) goto LAB_1400528a0;
LAB_140052506:
        uVar25 = uVar25 - 0x30;
LAB_140052509:
        if (uVar14 < uVar24) goto LAB_140052810;
LAB_140052514:
        psVar18 = (short *)plVar21[3];
        uVar15 = uVar24 * uVar26;
        uVar24 = uVar25 + uVar15;
        local_6a = local_6a | CARRY4(uVar25,uVar15);
        psVar17 = (short *)plVar21[2];
        iVar27 = iVar27 + 1;
        if (psVar18 <= psVar17) goto LAB_140052826;
LAB_14005253c:
        psVar17 = psVar17 + 1;
        plVar21[2] = (longlong)psVar17;
LAB_140052544:
        if (psVar17 < psVar18) {
          sVar11 = *psVar17;
        }
        else {
          sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar11 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar31 = bVar29;
        plVar22 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar29) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar31 = sVar10 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar31) {
            plVar22 = local_a8;
          }
        }
        local_a8 = plVar22;
        if (bVar31 == (sVar11 == -1)) goto code_r0x000140052583;
        if (plVar21 == (longlong *)0x0) {
          uVar25 = 0xffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar12 = *(ushort *)plVar21[2];
          }
          else {
            uVar12 = (**(code **)(*plVar21 + 0x48))(plVar21);
          }
          uVar25 = (uint)uVar12;
          if (uVar12 == 0xffff) {
            plVar21 = (longlong *)0x0;
          }
        }
        uVar12 = 0xffff;
        goto LAB_1400524e5;
      }
      if ((ushort)(uVar13 - 0x30) < 10) goto LAB_140052506;
      if ((ushort)(uVar13 - 0x61) < 6) {
        uVar25 = uVar25 - 0x57;
        if (uVar24 <= uVar14) goto LAB_140052514;
LAB_140052810:
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        local_6a = 1;
        if (psVar17 < psVar18) goto LAB_14005253c;
LAB_140052826:
        (**(code **)(*plVar21 + 0x50))(plVar21);
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        goto LAB_140052544;
      }
      if ((ushort)(uVar13 - 0x41) < 6) {
        uVar25 = uVar25 - 0x37;
        goto LAB_140052509;
      }
LAB_1400528a0:
      sVar7 = local_60;
      bVar1 = 0;
      bVar2 = bVar8;
    }
    else {
      uVar24 = 0;
      bVar1 = bVar8;
      bVar2 = 0;
    }
  }
  else {
    if (bVar8 == false) {
      local_6a = 0;
      uVar24 = 0;
      do {
        sVar7 = local_60;
        bVar2 = *(byte *)(lVar23 + 0x20);
        sVar11 = (short)uVar25;
        if ((bVar2 == 0) || (*(short *)(lVar23 + 0x4a) != sVar11)) {
          psVar17 = (short *)(lVar23 + 0x9c);
          uVar20 = local_98;
          if (*(short *)(lVar23 + 0x48) == sVar11 || local_98 == 0) goto LAB_1400528a0;
          while (sVar11 != *psVar17) {
            uVar20 = uVar20 - 1;
            psVar17 = psVar17 + 1;
            if (uVar20 == 0) {
              bVar2 = 0;
              bVar1 = 0;
              goto joined_r0x0001400525a2;
            }
          }
          uVar25 = (uint)((longlong)psVar17 - (lVar23 + 0x9c) >> 1);
          if (0xf < (int)uVar25) {
            uVar25 = uVar25 - 6;
          }
          if (uVar24 <= uVar14) {
            uVar15 = uVar24 * uVar26;
            uVar24 = uVar25 + uVar15;
            local_6a = local_6a | CARRY4(uVar25,uVar15);
            iVar27 = iVar27 + 1;
            goto LAB_140052a79;
          }
          psVar17 = (short *)plVar21[3];
          psVar18 = (short *)plVar21[2];
          local_6a = bVar1;
          if (psVar18 < psVar17) goto LAB_140052a86;
LAB_140052afe:
          (**(code **)(*plVar21 + 0x50))(plVar21);
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
        }
        else {
          if (iVar27 == 0) {
            bVar1 = 0;
            goto joined_r0x0001400525a2;
          }
          uVar20 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar19 = 0xf;
          }
          else {
            uVar19 = CONCAT71(uStack_57,local_58);
          }
          if (uVar19 < uVar20) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[sVar7] = (char)iVar27;
          local_68[uVar20] = 0;
          iVar27 = 0;
          local_60 = uVar20;
LAB_140052a79:
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
          if (psVar17 <= psVar18) goto LAB_140052afe;
LAB_140052a86:
          psVar18 = psVar18 + 1;
          plVar21[2] = (longlong)psVar18;
        }
        if (psVar18 < psVar17) {
          sVar11 = *psVar18;
        }
        else {
          sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar11 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar31 = bVar29;
        plVar22 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar29) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar31 = sVar10 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar31) {
            plVar22 = local_a8;
          }
        }
        local_a8 = plVar22;
        if (bVar31 == (sVar11 == -1)) goto code_r0x000140052ac9;
        if (plVar21 == (longlong *)0x0) {
          uVar25 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar25 = (uint)*(ushort *)plVar21[2];
          }
          else {
            uVar25 = (**(code **)(*plVar21 + 0x48))(plVar21);
          }
          if ((short)uVar25 == -1) {
            plVar21 = (longlong *)0x0;
          }
        }
        uVar12 = 0xffff;
      } while( true );
    }
    local_6a = 0;
    uVar24 = 0;
    bVar2 = 0;
    bVar1 = bVar8;
  }
joined_r0x0001400525a2:
  if (sVar7 == 0) {
    local_60 = 0;
    if ((bVar28) || (iVar27 != 0)) {
LAB_14005292a:
      if (bVar2 == 0) {
        if (local_6a == 0) {
          if (bVar30) {
            uVar24 = -uVar24;
          }
          *param_7 = uVar24;
        }
        else {
          *param_7 = 0xffffffff;
          *param_6 = 4;
        }
        goto LAB_1400525df;
      }
    }
  }
  else {
    if (local_68 == &local_58) {
      uVar20 = 0xf;
    }
    else {
      uVar20 = CONCAT71(uStack_57,local_58);
    }
    if (uVar20 < sVar7 + 1) {
      local_60 = sVar7;
      __cxx11::string::_M_mutate((string *)&local_68,sVar7,0,(undefined1 *)0x0,1);
    }
    local_68[sVar7] = (char)iVar27;
    local_68[sVar7 + 1] = 0;
    local_60 = sVar7 + 1;
    cVar9 = __verify_grouping(*(longlong *)(lVar23 + 0x10),*(longlong *)(lVar23 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar9 == '\0') {
      *param_6 = 4;
    }
    if (((iVar27 != 0) || (bVar28)) || (local_60 != 0)) goto LAB_14005292a;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_1400525df:
  if (bVar1 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar21;
  param_1[1] = CONCAT62((int6)((ulonglong)lVar4 >> 0x10),uVar12);
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x000140052ac9:
  uVar12 = 0xffff;
  sVar7 = local_60;
  bVar2 = bVar8;
  goto joined_r0x0001400525a2;
code_r0x000140052583:
  uVar12 = 0xffff;
  sVar7 = local_60;
  bVar1 = 1;
  bVar2 = bVar8;
  goto joined_r0x0001400525a2;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_int[abi:cxx11]<long>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<long>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  byte bVar1;
  byte bVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong *plVar5;
  size_t sVar6;
  bool bVar7;
  char cVar8;
  short sVar9;
  short sVar10;
  uint uVar11;
  uint uVar12;
  uint uVar13;
  longlong lVar14;
  short *psVar15;
  short *psVar16;
  __numpunct_cache<wchar_t> *this;
  ulonglong uVar17;
  longlong *plVar18;
  longlong *plVar19;
  longlong lVar20;
  ushort uVar21;
  int iVar22;
  uint uVar23;
  uint uVar24;
  int iVar25;
  undefined2 uVar26;
  ulonglong uVar27;
  bool bVar28;
  bool bVar29;
  bool bVar30;
  short local_b8;
  longlong *local_b0;
  ulonglong local_a0;
  byte local_97;
  short local_90;
  uint local_7c;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar3 = param_3[1];
  lVar4 = param_4[1];
  plVar5 = (longlong *)*param_4;
  plVar18 = (longlong *)*param_3;
  uVar27 = uVar3 & 0xffffffff;
  lVar14 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  plVar19 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar14 * 8);
  lVar20 = *plVar19;
  if (lVar20 == 0) {
    this = operator_new(0xd0);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
    this[0x20] = (__numpunct_cache<wchar_t>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined4 *)(this + 0x48) = 0;
    this[200] = (__numpunct_cache<wchar_t>)0x0;
    __numpunct_cache<wchar_t>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar14);
    lVar20 = *plVar19;
  }
  uVar13 = *(uint *)(param_5 + 0x18);
  uVar23 = uVar13 & 0x4a;
  uVar24 = 8;
  if (uVar23 != 0x40) {
    uVar24 = 10;
    if (uVar23 == 8) {
      uVar24 = 0x10;
    }
  }
  bVar28 = (short)uVar27 == -1;
  bVar7 = bVar28;
  if (plVar18 != (longlong *)0x0 && bVar28) {
    if ((short *)plVar18[2] < (short *)plVar18[3]) {
      sVar10 = *(short *)plVar18[2];
    }
    else {
      sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
    }
    plVar19 = (longlong *)0x0;
    if (sVar10 != -1) {
      plVar19 = plVar18;
    }
    plVar18 = plVar19;
    bVar7 = sVar10 == -1;
  }
  uVar13 = uVar13 & 0x4a;
  local_b8 = (short)lVar4;
  bVar29 = local_b8 == -1;
  bVar30 = bVar29;
  local_b0 = plVar5;
  if (plVar5 != (longlong *)0x0 && bVar29) {
    if ((short *)plVar5[2] < (short *)plVar5[3]) {
      sVar10 = *(short *)plVar5[2];
    }
    else {
      sVar10 = (**(code **)(*plVar5 + 0x48))(plVar5);
    }
    bVar30 = sVar10 == -1;
    local_b0 = (longlong *)0x0;
    if (!bVar30) {
      local_b0 = plVar5;
    }
  }
  if (bVar30 == bVar7) {
    local_7c = 0;
    cVar8 = *(char *)(lVar20 + 0x20);
    uVar17 = 0;
    iVar25 = 0;
    bVar7 = true;
    bVar28 = false;
LAB_1400532aa:
    if (uVar24 != 0x10) goto LAB_1400532b4;
LAB_14005362f:
    local_a0 = 0x16;
    uVar13 = 0x16;
  }
  else {
    if ((plVar18 == (longlong *)0x0) || (!bVar28)) {
      uVar17 = uVar3 & 0xffff;
    }
    else {
      if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
        uVar17 = (ulonglong)*(ushort *)plVar18[2];
      }
      else {
        uVar17 = (**(code **)(*plVar18 + 0x48))(plVar18);
        uVar17 = uVar17 & 0xffff;
      }
      if ((short)uVar17 == -1) {
        plVar18 = (longlong *)0x0;
      }
    }
    cVar8 = *(char *)(lVar20 + 0x20);
    sVar10 = (short)uVar17;
    if ((*(short *)(lVar20 + 0x94) == sVar10) || (local_7c = 0, *(short *)(lVar20 + 0x96) == sVar10)
       ) {
      local_7c = (uint)(*(short *)(lVar20 + 0x94) == sVar10);
      if (cVar8 == '\0') {
        sVar9 = *(short *)(lVar20 + 0x48);
      }
      else {
        if (*(short *)(lVar20 + 0x4a) == sVar10) goto LAB_1400531de;
        sVar9 = *(short *)(lVar20 + 0x48);
      }
      if (sVar9 != sVar10) {
        psVar15 = (short *)plVar18[3];
        if ((short *)plVar18[2] < psVar15) {
          psVar16 = (short *)plVar18[2] + 1;
          plVar18[2] = (longlong)psVar16;
        }
        else {
          (**(code **)(*plVar18 + 0x50))(plVar18);
          psVar16 = (short *)plVar18[2];
          psVar15 = (short *)plVar18[3];
        }
        if (psVar16 < psVar15) {
          sVar10 = *psVar16;
        }
        else {
          sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        if (sVar10 == -1) {
          plVar18 = (longlong *)0x0;
        }
        bVar7 = bVar29;
        plVar19 = local_b0;
        if (local_b0 != (longlong *)0x0 && bVar29) {
          if ((short *)local_b0[2] < (short *)local_b0[3]) {
            sVar9 = *(short *)local_b0[2];
          }
          else {
            sVar9 = (**(code **)(*local_b0 + 0x48))();
          }
          bVar7 = sVar9 == -1;
          plVar19 = (longlong *)0x0;
          if (!bVar7) {
            plVar19 = local_b0;
          }
        }
        local_b0 = plVar19;
        if (bVar7 == (sVar10 == -1)) {
          bVar7 = true;
          cVar8 = *(char *)(lVar20 + 0x20);
          iVar25 = 0;
          bVar28 = false;
          uVar27 = 0xffffffff;
          goto LAB_1400532aa;
        }
        if (plVar18 == (longlong *)0x0) {
          cVar8 = *(char *)(lVar20 + 0x20);
          uVar17 = 0xffff;
          uVar27 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
            uVar17 = (ulonglong)*(ushort *)plVar18[2];
          }
          else {
            uVar17 = (**(code **)(*plVar18 + 0x48))(plVar18);
            uVar17 = uVar17 & 0xffff;
          }
          cVar8 = *(char *)(lVar20 + 0x20);
          uVar27 = 0xffffffff;
          if ((short)uVar17 == -1) {
            plVar18 = (longlong *)0x0;
          }
        }
      }
    }
LAB_1400531de:
    iVar25 = 0;
    bVar28 = false;
    do {
      sVar10 = (short)uVar17;
      if (((cVar8 != '\0') && (*(short *)(lVar20 + 0x4a) == sVar10)) ||
         (*(short *)(lVar20 + 0x48) == sVar10)) break;
      if (*(short *)(lVar20 + 0x9c) == sVar10) {
        bVar7 = (bool)(bVar28 ^ 1U | uVar24 == 10);
        if (!bVar7) goto LAB_140053211;
        bVar28 = uVar24 == 8 || uVar13 == 0;
        if (uVar24 != 8 && uVar13 != 0) {
          iVar25 = iVar25 + 1;
          bVar28 = bVar7;
          goto LAB_140053247;
        }
        psVar16 = (short *)plVar18[2];
        psVar15 = (short *)plVar18[3];
        iVar25 = 0;
        uVar24 = 8;
        if (psVar15 <= psVar16) goto LAB_140053598;
LAB_140053258:
        psVar16 = psVar16 + 1;
        plVar18[2] = (longlong)psVar16;
        if (psVar16 < psVar15) goto LAB_140053269;
LAB_1400535c0:
        sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
      }
      else {
        if (!bVar28) break;
LAB_140053211:
        if ((*(short *)(lVar20 + 0x98) != sVar10) && (*(short *)(lVar20 + 0x9a) != sVar10)) {
          bVar7 = false;
          bVar28 = true;
          goto LAB_1400532aa;
        }
        bVar7 = uVar13 == 0 || uVar24 == 0x10;
        if (uVar13 != 0 && uVar24 != 0x10) {
          bVar28 = true;
          goto LAB_1400532b4;
        }
        iVar25 = 0;
        uVar24 = 0x10;
        bVar28 = false;
LAB_140053247:
        psVar16 = (short *)plVar18[2];
        psVar15 = (short *)plVar18[3];
        if (psVar16 < psVar15) goto LAB_140053258;
LAB_140053598:
        (**(code **)(*plVar18 + 0x50))(plVar18);
        psVar16 = (short *)plVar18[2];
        if ((short *)plVar18[3] <= psVar16) goto LAB_1400535c0;
LAB_140053269:
        sVar10 = *psVar16;
      }
      if (sVar10 == -1) {
        plVar18 = (longlong *)0x0;
      }
      bVar7 = bVar29;
      plVar19 = local_b0;
      if (local_b0 != (longlong *)0x0 && bVar29) {
        if ((short *)local_b0[2] < (short *)local_b0[3]) {
          sVar9 = *(short *)local_b0[2];
        }
        else {
          sVar9 = (**(code **)(*local_b0 + 0x48))();
        }
        bVar7 = sVar9 == -1;
        plVar19 = (longlong *)0x0;
        if (!bVar7) {
          plVar19 = local_b0;
        }
      }
      local_b0 = plVar19;
      if ((sVar10 == -1) == bVar7) {
        bVar7 = true;
        cVar8 = *(char *)(lVar20 + 0x20);
        uVar27 = 0xffffffff;
        goto LAB_1400532aa;
      }
      uVar17 = 0xffff;
      if (plVar18 != (longlong *)0x0) {
        if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
          uVar17 = (ulonglong)*(ushort *)plVar18[2];
        }
        else {
          uVar17 = (**(code **)(*plVar18 + 0x48))(plVar18);
          uVar17 = uVar17 & 0xffff;
        }
        if ((short)uVar17 == -1) {
          plVar18 = (longlong *)0x0;
        }
      }
      cVar8 = *(char *)(lVar20 + 0x20);
      uVar27 = 0xffffffff;
    } while (bVar28);
    bVar7 = false;
    if (uVar24 == 0x10) goto LAB_14005362f;
LAB_1400532b4:
    local_a0 = (ulonglong)(int)uVar24;
    uVar13 = uVar24;
  }
  uVar26 = (undefined2)uVar27;
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar8 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar23 = local_7c + 0x7fffffff;
  uVar11 = uVar23 / uVar24;
  bVar1 = *(byte *)(lVar20 + 200);
  sVar6 = local_60;
  if (bVar1 == 0) {
    local_97 = 0;
    if (bVar7 == false) {
      local_90 = (short)uVar13;
      uVar13 = 0;
LAB_14005334e:
      uVar26 = (undefined2)uVar27;
      iVar22 = (int)uVar17;
      uVar21 = (ushort)uVar17;
      if (local_a0 < 0xb) {
        if ((uVar21 < 0x30) || ((ushort)(local_90 + 0x30U) <= uVar21)) goto LAB_140053710;
LAB_14005336f:
        iVar22 = iVar22 + -0x30;
LAB_140053372:
        if (uVar13 <= uVar11) goto LAB_140053380;
LAB_140053678:
        psVar15 = (short *)plVar18[2];
        psVar16 = (short *)plVar18[3];
        local_97 = 1;
        if (psVar16 <= psVar15) goto LAB_14005368e;
LAB_1400533ae:
        psVar15 = psVar15 + 1;
        plVar18[2] = (longlong)psVar15;
LAB_1400533b6:
        if (psVar15 < psVar16) {
          sVar10 = *psVar15;
        }
        else {
          sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        if (sVar10 == -1) {
          plVar18 = (longlong *)0x0;
        }
        bVar30 = bVar29;
        plVar19 = local_b0;
        if (local_b0 != (longlong *)0x0 && bVar29) {
          if ((short *)local_b0[2] < (short *)local_b0[3]) {
            sVar9 = *(short *)local_b0[2];
          }
          else {
            sVar9 = (**(code **)(*local_b0 + 0x48))();
          }
          bVar30 = sVar9 == -1;
          plVar19 = (longlong *)0x0;
          if (!bVar30) {
            plVar19 = local_b0;
          }
        }
        local_b0 = plVar19;
        if (bVar30 == (sVar10 == -1)) goto code_r0x0001400533f2;
        if (plVar18 == (longlong *)0x0) {
          uVar17 = 0xffff;
        }
        else {
          if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
            uVar17 = (ulonglong)*(ushort *)plVar18[2];
          }
          else {
            uVar17 = (**(code **)(*plVar18 + 0x48))(plVar18);
            uVar17 = uVar17 & 0xffff;
          }
          if ((short)uVar17 == -1) {
            plVar18 = (longlong *)0x0;
          }
        }
        uVar27 = 0xffffffff;
        goto LAB_14005334e;
      }
      if ((ushort)(uVar21 - 0x30) < 10) goto LAB_14005336f;
      if ((ushort)(uVar21 - 0x61) < 6) {
        iVar22 = iVar22 + -0x57;
        if (uVar11 < uVar13) goto LAB_140053678;
LAB_140053380:
        uVar12 = uVar13 * uVar24;
        uVar13 = uVar12 + iVar22;
        local_97 = local_97 | uVar23 - iVar22 < uVar12;
        psVar16 = (short *)plVar18[3];
        psVar15 = (short *)plVar18[2];
        iVar25 = iVar25 + 1;
        if (psVar15 < psVar16) goto LAB_1400533ae;
LAB_14005368e:
        (**(code **)(*plVar18 + 0x50))(plVar18);
        psVar15 = (short *)plVar18[2];
        psVar16 = (short *)plVar18[3];
        goto LAB_1400533b6;
      }
      if ((ushort)(uVar21 - 0x41) < 6) {
        iVar22 = iVar22 + -0x37;
        goto LAB_140053372;
      }
LAB_140053710:
      sVar6 = local_60;
      bVar1 = 0;
      bVar2 = bVar7;
    }
    else {
      uVar13 = 0;
      bVar1 = bVar7;
      bVar2 = 0;
    }
  }
  else {
    if (bVar7 == false) {
      local_97 = 0;
      uVar13 = 0;
      do {
        sVar6 = local_60;
        uVar26 = (undefined2)uVar27;
        bVar2 = *(byte *)(lVar20 + 0x20);
        sVar10 = (short)uVar17;
        if ((bVar2 == 0) || (*(short *)(lVar20 + 0x4a) != sVar10)) {
          psVar15 = (short *)(lVar20 + 0x9c);
          uVar27 = local_a0;
          if (*(short *)(lVar20 + 0x48) == sVar10 || local_a0 == 0) goto LAB_140053710;
          while (sVar10 != *psVar15) {
            uVar27 = uVar27 - 1;
            psVar15 = psVar15 + 1;
            if (uVar27 == 0) {
              bVar2 = 0;
              bVar1 = 0;
              goto joined_r0x000140053413;
            }
          }
          iVar22 = (int)((longlong)psVar15 - (lVar20 + 0x9c) >> 1);
          if (0xf < iVar22) {
            iVar22 = iVar22 + -6;
          }
          if (uVar13 <= uVar11) {
            uVar12 = uVar13 * uVar24;
            uVar13 = iVar22 + uVar12;
            local_97 = local_97 | uVar23 - iVar22 < uVar12;
            iVar25 = iVar25 + 1;
            goto LAB_140053904;
          }
          psVar15 = (short *)plVar18[3];
          psVar16 = (short *)plVar18[2];
          local_97 = bVar1;
          if (psVar15 <= psVar16) goto LAB_140053986;
LAB_140053911:
          psVar16 = psVar16 + 1;
          plVar18[2] = (longlong)psVar16;
        }
        else {
          if (iVar25 == 0) {
            bVar1 = 0;
            goto joined_r0x000140053413;
          }
          uVar27 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar17 = 0xf;
          }
          else {
            uVar17 = CONCAT71(uStack_57,local_58);
          }
          if (uVar17 < uVar27) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[sVar6] = (char)iVar25;
          iVar25 = 0;
          local_68[uVar27] = 0;
          local_60 = uVar27;
LAB_140053904:
          psVar16 = (short *)plVar18[2];
          psVar15 = (short *)plVar18[3];
          if (psVar16 < psVar15) goto LAB_140053911;
LAB_140053986:
          (**(code **)(*plVar18 + 0x50))(plVar18);
          psVar16 = (short *)plVar18[2];
          psVar15 = (short *)plVar18[3];
        }
        if (psVar16 < psVar15) {
          sVar10 = *psVar16;
        }
        else {
          sVar10 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        if (sVar10 == -1) {
          plVar18 = (longlong *)0x0;
        }
        bVar30 = bVar29;
        plVar19 = local_b0;
        if (local_b0 != (longlong *)0x0 && bVar29) {
          if ((short *)local_b0[2] < (short *)local_b0[3]) {
            sVar9 = *(short *)local_b0[2];
          }
          else {
            sVar9 = (**(code **)(*local_b0 + 0x48))();
          }
          bVar30 = sVar9 == -1;
          plVar19 = (longlong *)0x0;
          if (!bVar30) {
            plVar19 = local_b0;
          }
        }
        local_b0 = plVar19;
        if ((sVar10 == -1) == bVar30) goto code_r0x000140053951;
        if (plVar18 == (longlong *)0x0) {
          uVar17 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar18[2] < (ushort *)plVar18[3]) {
            uVar17 = (ulonglong)*(ushort *)plVar18[2];
          }
          else {
            uVar12 = (**(code **)(*plVar18 + 0x48))(plVar18);
            uVar17 = (ulonglong)uVar12;
          }
          if ((short)uVar17 == -1) {
            plVar18 = (longlong *)0x0;
          }
        }
        uVar27 = 0xffffffff;
      } while( true );
    }
    uVar13 = 0;
    local_97 = 0;
    bVar2 = 0;
    bVar1 = bVar7;
  }
joined_r0x000140053413:
  if (sVar6 == 0) {
    local_60 = 0;
    if ((iVar25 != 0) || (bVar28)) {
LAB_1400537ac:
      if (bVar2 == 0) {
        if (local_97 == 0) {
          uVar24 = -uVar13;
          if ((char)local_7c == '\0') {
            uVar24 = uVar13;
          }
          *param_7 = uVar24;
        }
        else {
          *param_7 = local_7c + 0x7fffffff;
          *param_6 = 4;
        }
        goto LAB_14005344f;
      }
    }
  }
  else {
    if (local_68 == &local_58) {
      uVar27 = 0xf;
    }
    else {
      uVar27 = CONCAT71(uStack_57,local_58);
    }
    if (uVar27 < sVar6 + 1) {
      local_60 = sVar6;
      __cxx11::string::_M_mutate((string *)&local_68,sVar6,0,(undefined1 *)0x0,1);
    }
    local_68[sVar6] = (char)iVar25;
    local_68[sVar6 + 1] = 0;
    local_60 = sVar6 + 1;
    cVar8 = __verify_grouping(*(longlong *)(lVar20 + 0x10),*(longlong *)(lVar20 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar8 == '\0') {
      *param_6 = 4;
    }
    if (((iVar25 != 0) || (bVar28)) || (local_60 != 0)) goto LAB_1400537ac;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_14005344f:
  if (bVar1 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar18;
  param_1[1] = CONCAT62((int6)(uVar3 >> 0x10),uVar26);
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x000140053951:
  uVar26 = 0xffff;
  sVar6 = local_60;
  bVar2 = bVar7;
  goto joined_r0x000140053413;
code_r0x0001400533f2:
  uVar26 = 0xffff;
  sVar6 = local_60;
  bVar1 = 1;
  bVar2 = bVar7;
  goto joined_r0x000140053413;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_int[abi:cxx11]<unsigned long>(std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> >, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  byte bVar1;
  byte bVar2;
  ushort uVar3;
  longlong lVar4;
  longlong *plVar5;
  longlong lVar6;
  size_t sVar7;
  bool bVar8;
  char cVar9;
  short sVar10;
  short sVar11;
  ushort uVar12;
  ushort uVar13;
  uint uVar14;
  uint uVar15;
  longlong lVar16;
  short *psVar17;
  short *psVar18;
  ulonglong uVar19;
  __numpunct_cache<wchar_t> *this;
  ulonglong uVar20;
  longlong *plVar21;
  longlong *plVar22;
  longlong lVar23;
  uint uVar24;
  uint uVar25;
  uint uVar26;
  int iVar27;
  bool bVar28;
  bool bVar29;
  bool bVar30;
  bool bVar31;
  longlong *local_a8;
  ulonglong local_98;
  short local_90;
  byte local_6a;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  lVar4 = param_3[1];
  plVar5 = (longlong *)*param_4;
  plVar21 = (longlong *)*param_3;
  lVar6 = param_4[1];
  uVar12 = (ushort)lVar4;
  lVar16 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  plVar22 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar16 * 8);
  lVar23 = *plVar22;
  if (lVar23 == 0) {
    this = operator_new(0xd0);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
    this[0x20] = (__numpunct_cache<wchar_t>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined4 *)(this + 0x48) = 0;
    this[200] = (__numpunct_cache<wchar_t>)0x0;
    __numpunct_cache<wchar_t>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar16);
    lVar23 = *plVar22;
  }
  uVar24 = *(uint *)(param_5 + 0x18);
  uVar25 = uVar24 & 0x4a;
  uVar26 = 8;
  if (uVar25 != 0x40) {
    uVar26 = 10;
    if (uVar25 == 8) {
      uVar26 = 0x10;
    }
  }
  bVar28 = uVar12 == 0xffff;
  bVar8 = bVar28;
  if (plVar21 != (longlong *)0x0 && bVar28) {
    if ((short *)plVar21[2] < (short *)plVar21[3]) {
      sVar11 = *(short *)plVar21[2];
    }
    else {
      sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
    }
    plVar22 = (longlong *)0x0;
    if (sVar11 != -1) {
      plVar22 = plVar21;
    }
    plVar21 = plVar22;
    bVar8 = sVar11 == -1;
  }
  uVar24 = uVar24 & 0x4a;
  bVar29 = (short)lVar6 == -1;
  local_a8 = plVar5;
  bVar30 = bVar29;
  if (plVar5 != (longlong *)0x0 && bVar29) {
    if ((short *)plVar5[2] < (short *)plVar5[3]) {
      sVar11 = *(short *)plVar5[2];
    }
    else {
      sVar11 = (**(code **)(*plVar5 + 0x48))(plVar5);
    }
    bVar30 = sVar11 == -1;
    local_a8 = (longlong *)0x0;
    if (sVar11 != -1) {
      local_a8 = plVar5;
    }
  }
  if (bVar8 == bVar30) {
    bVar30 = false;
    cVar9 = *(char *)(lVar23 + 0x20);
    uVar25 = 0;
    iVar27 = 0;
    bVar8 = true;
    bVar28 = false;
LAB_140054138:
    if (uVar26 != 0x10) goto LAB_140054142;
LAB_1400544a5:
    local_98 = 0x16;
    uVar24 = 0x16;
  }
  else {
    uVar13 = uVar12;
    if ((plVar21 != (longlong *)0x0) && (bVar28)) {
      if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
        uVar13 = *(ushort *)plVar21[2];
      }
      else {
        uVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
      }
      if (uVar13 == 0xffff) {
        plVar21 = (longlong *)0x0;
      }
    }
    uVar25 = (uint)uVar13;
    cVar9 = *(char *)(lVar23 + 0x20);
    if ((*(ushort *)(lVar23 + 0x94) == uVar13) ||
       (bVar30 = false, *(ushort *)(lVar23 + 0x96) == uVar13)) {
      bVar30 = *(ushort *)(lVar23 + 0x94) == uVar13;
      if (cVar9 == '\0') {
        uVar3 = *(ushort *)(lVar23 + 0x48);
      }
      else {
        if (*(ushort *)(lVar23 + 0x4a) == uVar13) goto LAB_14005405d;
        uVar3 = *(ushort *)(lVar23 + 0x48);
      }
      if (uVar3 != uVar13) {
        psVar17 = (short *)plVar21[3];
        if ((short *)plVar21[2] < psVar17) {
          psVar18 = (short *)plVar21[2] + 1;
          plVar21[2] = (longlong)psVar18;
        }
        else {
          (**(code **)(*plVar21 + 0x50))(plVar21);
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
        }
        if (psVar18 < psVar17) {
          sVar11 = *psVar18;
        }
        else {
          sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar11 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar8 = bVar29;
        plVar22 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar29) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar8 = sVar10 == -1;
          plVar22 = (longlong *)0x0;
          if (sVar10 != -1) {
            plVar22 = local_a8;
          }
        }
        local_a8 = plVar22;
        if ((sVar11 == -1) == bVar8) {
          bVar8 = true;
          cVar9 = *(char *)(lVar23 + 0x20);
          iVar27 = 0;
          uVar12 = 0xffff;
          bVar28 = false;
          goto LAB_140054138;
        }
        if (plVar21 == (longlong *)0x0) {
          cVar9 = *(char *)(lVar23 + 0x20);
          uVar25 = 0xffff;
          uVar12 = 0xffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar13 = *(ushort *)plVar21[2];
          }
          else {
            uVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
          }
          uVar25 = (uint)uVar13;
          cVar9 = *(char *)(lVar23 + 0x20);
          uVar12 = 0xffff;
          if (uVar13 == 0xffff) {
            plVar21 = (longlong *)0x0;
          }
        }
      }
    }
LAB_14005405d:
    iVar27 = 0;
    bVar28 = false;
    do {
      sVar11 = (short)uVar25;
      if (((cVar9 != '\0') && (*(short *)(lVar23 + 0x4a) == sVar11)) ||
         (*(short *)(lVar23 + 0x48) == sVar11)) break;
      if (*(short *)(lVar23 + 0x9c) == sVar11) {
        bVar8 = (bool)(bVar28 ^ 1U | uVar26 == 10);
        if (!bVar8) goto LAB_140054099;
        bVar28 = uVar26 == 8 || uVar24 == 0;
        if (uVar26 != 8 && uVar24 != 0) {
          iVar27 = iVar27 + 1;
          bVar28 = bVar8;
          goto LAB_1400540cf;
        }
        psVar18 = (short *)plVar21[2];
        psVar17 = (short *)plVar21[3];
        iVar27 = 0;
        uVar26 = 8;
        if (psVar18 < psVar17) goto LAB_1400540e0;
LAB_140054408:
        (**(code **)(*plVar21 + 0x50))(plVar21);
        psVar18 = (short *)plVar21[2];
        if (psVar18 < (short *)plVar21[3]) goto LAB_1400540f1;
LAB_140054430:
        sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
      }
      else {
        if (!bVar28) break;
LAB_140054099:
        if ((*(short *)(lVar23 + 0x98) != sVar11) && (*(short *)(lVar23 + 0x9a) != sVar11)) {
          bVar28 = true;
          bVar8 = false;
          goto LAB_140054138;
        }
        bVar8 = uVar24 == 0 || uVar26 == 0x10;
        if (uVar24 != 0 && uVar26 != 0x10) {
          bVar28 = true;
          goto LAB_140054142;
        }
        iVar27 = 0;
        uVar26 = 0x10;
        bVar28 = false;
LAB_1400540cf:
        psVar18 = (short *)plVar21[2];
        psVar17 = (short *)plVar21[3];
        if (psVar17 <= psVar18) goto LAB_140054408;
LAB_1400540e0:
        psVar18 = psVar18 + 1;
        plVar21[2] = (longlong)psVar18;
        if (psVar17 <= psVar18) goto LAB_140054430;
LAB_1400540f1:
        sVar11 = *psVar18;
      }
      if (sVar11 == -1) {
        plVar21 = (longlong *)0x0;
      }
      bVar8 = bVar29;
      if (local_a8 != (longlong *)0x0 && bVar29) {
        if ((short *)local_a8[2] < (short *)local_a8[3]) {
          sVar10 = *(short *)local_a8[2];
        }
        else {
          sVar10 = (**(code **)(*local_a8 + 0x48))();
        }
        plVar22 = (longlong *)0x0;
        if (sVar10 != -1) {
          plVar22 = local_a8;
        }
        local_a8 = plVar22;
        bVar8 = sVar10 == -1;
      }
      if (bVar8 == (sVar11 == -1)) {
        bVar8 = true;
        cVar9 = *(char *)(lVar23 + 0x20);
        uVar12 = 0xffff;
        goto LAB_140054138;
      }
      uVar25 = 0xffff;
      if (plVar21 != (longlong *)0x0) {
        if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
          uVar12 = *(ushort *)plVar21[2];
        }
        else {
          uVar12 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        uVar25 = (uint)uVar12;
        if (uVar12 == 0xffff) {
          plVar21 = (longlong *)0x0;
        }
      }
      cVar9 = *(char *)(lVar23 + 0x20);
      uVar12 = 0xffff;
    } while (bVar28);
    bVar8 = false;
    if (uVar26 == 0x10) goto LAB_1400544a5;
LAB_140054142:
    local_98 = (ulonglong)(int)uVar26;
    uVar24 = uVar26;
  }
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar9 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar14 = (uint)(0xffffffff / (ulonglong)uVar26);
  bVar1 = *(byte *)(lVar23 + 200);
  sVar7 = local_60;
  if (bVar1 == 0) {
    local_6a = 0;
    if (bVar8 == false) {
      local_90 = (short)uVar24;
      uVar24 = 0;
LAB_1400541c5:
      uVar13 = (ushort)uVar25;
      if (local_98 < 0xb) {
        if ((uVar13 < 0x30) || ((ushort)(local_90 + 0x30U) <= uVar13)) goto LAB_140054580;
LAB_1400541e6:
        uVar25 = uVar25 - 0x30;
LAB_1400541e9:
        if (uVar14 < uVar24) goto LAB_1400544f0;
LAB_1400541f4:
        psVar18 = (short *)plVar21[3];
        uVar15 = uVar24 * uVar26;
        uVar24 = uVar25 + uVar15;
        local_6a = local_6a | CARRY4(uVar25,uVar15);
        psVar17 = (short *)plVar21[2];
        iVar27 = iVar27 + 1;
        if (psVar18 <= psVar17) goto LAB_140054506;
LAB_14005421c:
        psVar17 = psVar17 + 1;
        plVar21[2] = (longlong)psVar17;
LAB_140054224:
        if (psVar17 < psVar18) {
          sVar11 = *psVar17;
        }
        else {
          sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar11 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar31 = bVar29;
        plVar22 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar29) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar31 = sVar10 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar31) {
            plVar22 = local_a8;
          }
        }
        local_a8 = plVar22;
        if (bVar31 == (sVar11 == -1)) goto code_r0x000140054263;
        if (plVar21 == (longlong *)0x0) {
          uVar25 = 0xffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar12 = *(ushort *)plVar21[2];
          }
          else {
            uVar12 = (**(code **)(*plVar21 + 0x48))(plVar21);
          }
          uVar25 = (uint)uVar12;
          if (uVar12 == 0xffff) {
            plVar21 = (longlong *)0x0;
          }
        }
        uVar12 = 0xffff;
        goto LAB_1400541c5;
      }
      if ((ushort)(uVar13 - 0x30) < 10) goto LAB_1400541e6;
      if ((ushort)(uVar13 - 0x61) < 6) {
        uVar25 = uVar25 - 0x57;
        if (uVar24 <= uVar14) goto LAB_1400541f4;
LAB_1400544f0:
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        local_6a = 1;
        if (psVar17 < psVar18) goto LAB_14005421c;
LAB_140054506:
        (**(code **)(*plVar21 + 0x50))(plVar21);
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        goto LAB_140054224;
      }
      if ((ushort)(uVar13 - 0x41) < 6) {
        uVar25 = uVar25 - 0x37;
        goto LAB_1400541e9;
      }
LAB_140054580:
      sVar7 = local_60;
      bVar1 = 0;
      bVar2 = bVar8;
    }
    else {
      uVar24 = 0;
      bVar1 = bVar8;
      bVar2 = 0;
    }
  }
  else {
    if (bVar8 == false) {
      local_6a = 0;
      uVar24 = 0;
      do {
        sVar7 = local_60;
        bVar2 = *(byte *)(lVar23 + 0x20);
        sVar11 = (short)uVar25;
        if ((bVar2 == 0) || (*(short *)(lVar23 + 0x4a) != sVar11)) {
          psVar17 = (short *)(lVar23 + 0x9c);
          uVar20 = local_98;
          if (*(short *)(lVar23 + 0x48) == sVar11 || local_98 == 0) goto LAB_140054580;
          while (sVar11 != *psVar17) {
            uVar20 = uVar20 - 1;
            psVar17 = psVar17 + 1;
            if (uVar20 == 0) {
              bVar2 = 0;
              bVar1 = 0;
              goto joined_r0x000140054282;
            }
          }
          uVar25 = (uint)((longlong)psVar17 - (lVar23 + 0x9c) >> 1);
          if (0xf < (int)uVar25) {
            uVar25 = uVar25 - 6;
          }
          if (uVar24 <= uVar14) {
            uVar15 = uVar24 * uVar26;
            uVar24 = uVar25 + uVar15;
            local_6a = local_6a | CARRY4(uVar25,uVar15);
            iVar27 = iVar27 + 1;
            goto LAB_140054759;
          }
          psVar17 = (short *)plVar21[3];
          psVar18 = (short *)plVar21[2];
          local_6a = bVar1;
          if (psVar18 < psVar17) goto LAB_140054766;
LAB_1400547de:
          (**(code **)(*plVar21 + 0x50))(plVar21);
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
        }
        else {
          if (iVar27 == 0) {
            bVar1 = 0;
            goto joined_r0x000140054282;
          }
          uVar20 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar19 = 0xf;
          }
          else {
            uVar19 = CONCAT71(uStack_57,local_58);
          }
          if (uVar19 < uVar20) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[sVar7] = (char)iVar27;
          local_68[uVar20] = 0;
          iVar27 = 0;
          local_60 = uVar20;
LAB_140054759:
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
          if (psVar17 <= psVar18) goto LAB_1400547de;
LAB_140054766:
          psVar18 = psVar18 + 1;
          plVar21[2] = (longlong)psVar18;
        }
        if (psVar18 < psVar17) {
          sVar11 = *psVar18;
        }
        else {
          sVar11 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar11 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar31 = bVar29;
        plVar22 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar29) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar31 = sVar10 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar31) {
            plVar22 = local_a8;
          }
        }
        local_a8 = plVar22;
        if (bVar31 == (sVar11 == -1)) goto code_r0x0001400547a9;
        if (plVar21 == (longlong *)0x0) {
          uVar25 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar25 = (uint)*(ushort *)plVar21[2];
          }
          else {
            uVar25 = (**(code **)(*plVar21 + 0x48))(plVar21);
          }
          if ((short)uVar25 == -1) {
            plVar21 = (longlong *)0x0;
          }
        }
        uVar12 = 0xffff;
      } while( true );
    }
    local_6a = 0;
    uVar24 = 0;
    bVar2 = 0;
    bVar1 = bVar8;
  }
joined_r0x000140054282:
  if (sVar7 == 0) {
    local_60 = 0;
    if ((bVar28) || (iVar27 != 0)) {
LAB_14005460a:
      if (bVar2 == 0) {
        if (local_6a == 0) {
          if (bVar30) {
            uVar24 = -uVar24;
          }
          *param_7 = uVar24;
        }
        else {
          *param_7 = 0xffffffff;
          *param_6 = 4;
        }
        goto LAB_1400542bf;
      }
    }
  }
  else {
    if (local_68 == &local_58) {
      uVar20 = 0xf;
    }
    else {
      uVar20 = CONCAT71(uStack_57,local_58);
    }
    if (uVar20 < sVar7 + 1) {
      local_60 = sVar7;
      __cxx11::string::_M_mutate((string *)&local_68,sVar7,0,(undefined1 *)0x0,1);
    }
    local_68[sVar7] = (char)iVar27;
    local_68[sVar7 + 1] = 0;
    local_60 = sVar7 + 1;
    cVar9 = __verify_grouping(*(longlong *)(lVar23 + 0x10),*(longlong *)(lVar23 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar9 == '\0') {
      *param_6 = 4;
    }
    if (((iVar27 != 0) || (bVar28)) || (local_60 != 0)) goto LAB_14005460a;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_1400542bf:
  if (bVar1 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar21;
  param_1[1] = CONCAT62((int6)((ulonglong)lVar4 >> 0x10),uVar12);
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x0001400547a9:
  uVar12 = 0xffff;
  sVar7 = local_60;
  bVar2 = bVar8;
  goto joined_r0x000140054282;
code_r0x000140054263:
  uVar12 = 0xffff;
  sVar7 = local_60;
  bVar1 = 1;
  bVar2 = bVar8;
  goto joined_r0x000140054282;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_int[abi:cxx11]<unsigned short>(std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> >, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,ushort *param_7)

{
  byte bVar1;
  byte bVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong *plVar5;
  size_t sVar6;
  bool bVar7;
  char cVar8;
  ushort uVar9;
  short sVar10;
  short sVar11;
  uint uVar12;
  longlong lVar13;
  short *psVar14;
  short *psVar15;
  __numpunct_cache<wchar_t> *this;
  ulonglong uVar16;
  longlong *plVar17;
  longlong *plVar18;
  longlong lVar19;
  ushort uVar20;
  int iVar21;
  uint uVar22;
  int iVar23;
  int iVar24;
  undefined2 uVar25;
  ulonglong uVar26;
  bool bVar27;
  bool bVar28;
  bool bVar29;
  bool bVar30;
  short local_b0;
  longlong *local_a8;
  ulonglong local_98;
  short local_90;
  ushort local_70;
  byte local_6a;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar3 = param_3[1];
  lVar4 = param_4[1];
  plVar5 = (longlong *)*param_4;
  plVar17 = (longlong *)*param_3;
  uVar26 = uVar3 & 0xffffffff;
  lVar13 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  plVar18 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar13 * 8);
  lVar19 = *plVar18;
  if (lVar19 == 0) {
    this = operator_new(0xd0);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
    this[0x20] = (__numpunct_cache<wchar_t>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined4 *)(this + 0x48) = 0;
    this[200] = (__numpunct_cache<wchar_t>)0x0;
    __numpunct_cache<wchar_t>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar13);
    lVar19 = *plVar18;
  }
  uVar12 = *(uint *)(param_5 + 0x18);
  uVar22 = uVar12 & 0x4a;
  iVar23 = 8;
  if (uVar22 != 0x40) {
    iVar23 = 10;
    if (uVar22 == 8) {
      iVar23 = 0x10;
    }
  }
  bVar27 = (short)uVar26 == -1;
  bVar7 = bVar27;
  if (plVar17 != (longlong *)0x0 && bVar27) {
    if ((short *)plVar17[2] < (short *)plVar17[3]) {
      sVar11 = *(short *)plVar17[2];
    }
    else {
      sVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
    }
    plVar18 = (longlong *)0x0;
    if (sVar11 != -1) {
      plVar18 = plVar17;
    }
    plVar17 = plVar18;
    bVar7 = sVar11 == -1;
  }
  uVar12 = uVar12 & 0x4a;
  local_b0 = (short)lVar4;
  bVar28 = local_b0 == -1;
  bVar29 = bVar28;
  local_a8 = plVar5;
  if (plVar5 != (longlong *)0x0 && bVar28) {
    if ((short *)plVar5[2] < (short *)plVar5[3]) {
      sVar11 = *(short *)plVar5[2];
    }
    else {
      sVar11 = (**(code **)(*plVar5 + 0x48))(plVar5);
    }
    bVar29 = sVar11 == -1;
    local_a8 = (longlong *)0x0;
    if (!bVar29) {
      local_a8 = plVar5;
    }
  }
  if (bVar7 == bVar29) {
    bVar29 = false;
    cVar8 = *(char *)(lVar19 + 0x20);
    uVar16 = 0;
    iVar24 = 0;
    bVar7 = true;
    bVar27 = false;
LAB_140054f8b:
    if (iVar23 != 0x10) goto LAB_140054f95;
LAB_14005530f:
    local_98 = 0x16;
    iVar21 = 0x16;
  }
  else {
    if ((plVar17 == (longlong *)0x0) || (!bVar27)) {
      uVar16 = uVar3 & 0xffff;
    }
    else {
      if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
        uVar16 = (ulonglong)*(ushort *)plVar17[2];
      }
      else {
        uVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
        uVar16 = uVar16 & 0xffff;
      }
      if ((short)uVar16 == -1) {
        plVar17 = (longlong *)0x0;
      }
    }
    cVar8 = *(char *)(lVar19 + 0x20);
    sVar11 = (short)uVar16;
    if ((*(short *)(lVar19 + 0x94) == sVar11) ||
       (bVar29 = false, *(short *)(lVar19 + 0x96) == sVar11)) {
      bVar29 = *(short *)(lVar19 + 0x94) == sVar11;
      if (cVar8 == '\0') {
        sVar10 = *(short *)(lVar19 + 0x48);
      }
      else {
        if (*(short *)(lVar19 + 0x4a) == sVar11) goto LAB_140054ebf;
        sVar10 = *(short *)(lVar19 + 0x48);
      }
      if (sVar10 != sVar11) {
        psVar14 = (short *)plVar17[3];
        if ((short *)plVar17[2] < psVar14) {
          psVar15 = (short *)plVar17[2] + 1;
          plVar17[2] = (longlong)psVar15;
        }
        else {
          (**(code **)(*plVar17 + 0x50))(plVar17);
          psVar15 = (short *)plVar17[2];
          psVar14 = (short *)plVar17[3];
        }
        if (psVar15 < psVar14) {
          sVar11 = *psVar15;
        }
        else {
          sVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar11 == -1) {
          plVar17 = (longlong *)0x0;
        }
        bVar7 = bVar28;
        plVar18 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar28) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar7 = sVar10 == -1;
          plVar18 = (longlong *)0x0;
          if (!bVar7) {
            plVar18 = local_a8;
          }
        }
        local_a8 = plVar18;
        if ((sVar11 == -1) == bVar7) {
          bVar7 = true;
          cVar8 = *(char *)(lVar19 + 0x20);
          iVar24 = 0;
          bVar27 = false;
          uVar26 = 0xffffffff;
          goto LAB_140054f8b;
        }
        if (plVar17 == (longlong *)0x0) {
          cVar8 = *(char *)(lVar19 + 0x20);
          uVar16 = 0xffff;
          uVar26 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
            uVar16 = (ulonglong)*(ushort *)plVar17[2];
          }
          else {
            uVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
            uVar16 = uVar16 & 0xffff;
          }
          cVar8 = *(char *)(lVar19 + 0x20);
          uVar26 = 0xffffffff;
          if ((short)uVar16 == -1) {
            plVar17 = (longlong *)0x0;
          }
        }
      }
    }
LAB_140054ebf:
    iVar24 = 0;
    bVar27 = false;
    do {
      sVar11 = (short)uVar16;
      if (((cVar8 != '\0') && (*(short *)(lVar19 + 0x4a) == sVar11)) ||
         (*(short *)(lVar19 + 0x48) == sVar11)) break;
      if (*(short *)(lVar19 + 0x9c) == sVar11) {
        bVar7 = (bool)(bVar27 ^ 1U | iVar23 == 10);
        if (!bVar7) goto LAB_140054ef2;
        bVar27 = iVar23 == 8 || uVar12 == 0;
        if (iVar23 != 8 && uVar12 != 0) {
          iVar24 = iVar24 + 1;
          bVar27 = bVar7;
          goto LAB_140054f28;
        }
        psVar15 = (short *)plVar17[2];
        psVar14 = (short *)plVar17[3];
        iVar24 = 0;
        iVar23 = 8;
        if (psVar14 <= psVar15) goto LAB_140055278;
LAB_140054f39:
        psVar15 = psVar15 + 1;
        plVar17[2] = (longlong)psVar15;
        if (psVar15 < psVar14) goto LAB_140054f4a;
LAB_1400552a0:
        sVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
      }
      else {
        if (!bVar27) break;
LAB_140054ef2:
        if ((*(short *)(lVar19 + 0x98) != sVar11) && (*(short *)(lVar19 + 0x9a) != sVar11)) {
          bVar7 = false;
          bVar27 = true;
          goto LAB_140054f8b;
        }
        bVar7 = uVar12 == 0 || iVar23 == 0x10;
        if (uVar12 != 0 && iVar23 != 0x10) {
          bVar27 = true;
          goto LAB_140054f95;
        }
        iVar24 = 0;
        iVar23 = 0x10;
        bVar27 = false;
LAB_140054f28:
        psVar15 = (short *)plVar17[2];
        psVar14 = (short *)plVar17[3];
        if (psVar15 < psVar14) goto LAB_140054f39;
LAB_140055278:
        (**(code **)(*plVar17 + 0x50))(plVar17);
        psVar15 = (short *)plVar17[2];
        if ((short *)plVar17[3] <= psVar15) goto LAB_1400552a0;
LAB_140054f4a:
        sVar11 = *psVar15;
      }
      if (sVar11 == -1) {
        plVar17 = (longlong *)0x0;
      }
      bVar7 = bVar28;
      plVar18 = local_a8;
      if (local_a8 != (longlong *)0x0 && bVar28) {
        if ((short *)local_a8[2] < (short *)local_a8[3]) {
          sVar10 = *(short *)local_a8[2];
        }
        else {
          sVar10 = (**(code **)(*local_a8 + 0x48))();
        }
        bVar7 = sVar10 == -1;
        plVar18 = (longlong *)0x0;
        if (!bVar7) {
          plVar18 = local_a8;
        }
      }
      local_a8 = plVar18;
      if (bVar7 == (sVar11 == -1)) {
        bVar7 = true;
        cVar8 = *(char *)(lVar19 + 0x20);
        uVar26 = 0xffffffff;
        goto LAB_140054f8b;
      }
      uVar16 = 0xffff;
      if (plVar17 != (longlong *)0x0) {
        if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
          uVar16 = (ulonglong)*(ushort *)plVar17[2];
        }
        else {
          uVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
          uVar16 = uVar16 & 0xffff;
        }
        if ((short)uVar16 == -1) {
          plVar17 = (longlong *)0x0;
        }
      }
      cVar8 = *(char *)(lVar19 + 0x20);
      uVar26 = 0xffffffff;
    } while (bVar27);
    bVar7 = false;
    if (iVar23 == 0x10) goto LAB_14005530f;
LAB_140054f95:
    local_98 = (ulonglong)iVar23;
    iVar21 = iVar23;
  }
  uVar25 = (undefined2)uVar26;
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar8 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  bVar1 = *(byte *)(lVar19 + 200);
  local_70 = (ushort)(0xffff / (ulonglong)(longlong)iVar23);
  sVar6 = local_60;
  if (bVar1 == 0) {
    local_6a = 0;
    if (bVar7 == false) {
      local_90 = (short)iVar21;
      uVar9 = 0;
LAB_140055027:
      uVar25 = (undefined2)uVar26;
      iVar21 = (int)uVar16;
      uVar20 = (ushort)uVar16;
      if (local_98 < 0xb) {
        if ((uVar20 < 0x30) || ((ushort)(local_90 + 0x30U) <= uVar20)) goto LAB_1400553f0;
LAB_140055048:
        iVar21 = iVar21 + -0x30;
LAB_14005504b:
        if (uVar9 <= local_70) goto LAB_14005505b;
LAB_140055358:
        psVar14 = (short *)plVar17[2];
        psVar15 = (short *)plVar17[3];
        local_6a = 1;
        if (psVar15 <= psVar14) goto LAB_14005536e;
LAB_14005508e:
        psVar14 = psVar14 + 1;
        plVar17[2] = (longlong)psVar14;
LAB_140055096:
        if (psVar14 < psVar15) {
          sVar11 = *psVar14;
        }
        else {
          sVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar11 == -1) {
          plVar17 = (longlong *)0x0;
        }
        bVar30 = bVar28;
        plVar18 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar28) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar30 = sVar10 == -1;
          plVar18 = (longlong *)0x0;
          if (!bVar30) {
            plVar18 = local_a8;
          }
        }
        local_a8 = plVar18;
        if (bVar30 == (sVar11 == -1)) goto code_r0x0001400550d2;
        if (plVar17 == (longlong *)0x0) {
          uVar16 = 0xffff;
        }
        else {
          if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
            uVar16 = (ulonglong)*(ushort *)plVar17[2];
          }
          else {
            uVar16 = (**(code **)(*plVar17 + 0x48))(plVar17);
            uVar16 = uVar16 & 0xffff;
          }
          if ((short)uVar16 == -1) {
            plVar17 = (longlong *)0x0;
          }
        }
        uVar26 = 0xffffffff;
        goto LAB_140055027;
      }
      if ((ushort)(uVar20 - 0x30) < 10) goto LAB_140055048;
      if ((ushort)(uVar20 - 0x61) < 6) {
        iVar21 = iVar21 + -0x57;
        if (local_70 < uVar9) goto LAB_140055358;
LAB_14005505b:
        uVar12 = (uint)uVar9;
        uVar9 = (short)(uVar12 * iVar23) + (short)iVar21;
        local_6a = local_6a | 0xffff - iVar21 < (int)(uVar12 * iVar23 & 0xffff);
        psVar15 = (short *)plVar17[3];
        psVar14 = (short *)plVar17[2];
        iVar24 = iVar24 + 1;
        if (psVar14 < psVar15) goto LAB_14005508e;
LAB_14005536e:
        (**(code **)(*plVar17 + 0x50))(plVar17);
        psVar14 = (short *)plVar17[2];
        psVar15 = (short *)plVar17[3];
        goto LAB_140055096;
      }
      if ((ushort)(uVar20 - 0x41) < 6) {
        iVar21 = iVar21 + -0x37;
        goto LAB_14005504b;
      }
LAB_1400553f0:
      sVar6 = local_60;
      bVar1 = 0;
      bVar2 = bVar7;
    }
    else {
      uVar9 = 0;
      bVar1 = bVar7;
      bVar2 = 0;
    }
  }
  else {
    if (bVar7 == false) {
      local_6a = 0;
      uVar9 = 0;
      do {
        sVar6 = local_60;
        uVar25 = (undefined2)uVar26;
        bVar2 = *(byte *)(lVar19 + 0x20);
        sVar11 = (short)uVar16;
        if ((bVar2 == 0) || (*(short *)(lVar19 + 0x4a) != sVar11)) {
          psVar14 = (short *)(lVar19 + 0x9c);
          uVar26 = local_98;
          if (*(short *)(lVar19 + 0x48) == sVar11 || local_98 == 0) goto LAB_1400553f0;
          while (sVar11 != *psVar14) {
            uVar26 = uVar26 - 1;
            psVar14 = psVar14 + 1;
            if (uVar26 == 0) {
              bVar2 = 0;
              bVar1 = 0;
              goto joined_r0x0001400550f3;
            }
          }
          iVar21 = (int)((longlong)psVar14 - (lVar19 + 0x9c) >> 1);
          if (0xf < iVar21) {
            iVar21 = iVar21 + -6;
          }
          if (uVar9 <= local_70) {
            uVar12 = (uint)uVar9;
            uVar9 = (short)iVar21 + (short)(uVar12 * iVar23);
            local_6a = local_6a | 0xffff - iVar21 < (int)(uVar12 * iVar23 & 0xffff);
            iVar24 = iVar24 + 1;
            goto LAB_1400555ec;
          }
          psVar14 = (short *)plVar17[3];
          psVar15 = (short *)plVar17[2];
          local_6a = bVar1;
          if (psVar14 <= psVar15) goto LAB_14005566e;
LAB_1400555f9:
          psVar15 = psVar15 + 1;
          plVar17[2] = (longlong)psVar15;
        }
        else {
          if (iVar24 == 0) {
            bVar1 = 0;
            goto joined_r0x0001400550f3;
          }
          uVar26 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar16 = 0xf;
          }
          else {
            uVar16 = CONCAT71(uStack_57,local_58);
          }
          if (uVar16 < uVar26) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[sVar6] = (char)iVar24;
          iVar24 = 0;
          local_68[uVar26] = 0;
          local_60 = uVar26;
LAB_1400555ec:
          psVar15 = (short *)plVar17[2];
          psVar14 = (short *)plVar17[3];
          if (psVar15 < psVar14) goto LAB_1400555f9;
LAB_14005566e:
          (**(code **)(*plVar17 + 0x50))(plVar17);
          psVar15 = (short *)plVar17[2];
          psVar14 = (short *)plVar17[3];
        }
        if (psVar15 < psVar14) {
          sVar11 = *psVar15;
        }
        else {
          sVar11 = (**(code **)(*plVar17 + 0x48))(plVar17);
        }
        if (sVar11 == -1) {
          plVar17 = (longlong *)0x0;
        }
        bVar30 = bVar28;
        plVar18 = local_a8;
        if (local_a8 != (longlong *)0x0 && bVar28) {
          if ((short *)local_a8[2] < (short *)local_a8[3]) {
            sVar10 = *(short *)local_a8[2];
          }
          else {
            sVar10 = (**(code **)(*local_a8 + 0x48))();
          }
          bVar30 = sVar10 == -1;
          plVar18 = (longlong *)0x0;
          if (!bVar30) {
            plVar18 = local_a8;
          }
        }
        local_a8 = plVar18;
        if (bVar30 == (sVar11 == -1)) goto code_r0x000140055639;
        if (plVar17 == (longlong *)0x0) {
          uVar16 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
            uVar16 = (ulonglong)*(ushort *)plVar17[2];
          }
          else {
            uVar12 = (**(code **)(*plVar17 + 0x48))(plVar17);
            uVar16 = (ulonglong)uVar12;
          }
          if ((short)uVar16 == -1) {
            plVar17 = (longlong *)0x0;
          }
        }
        uVar26 = 0xffffffff;
      } while( true );
    }
    local_6a = 0;
    uVar9 = 0;
    bVar2 = 0;
    bVar1 = bVar7;
  }
joined_r0x0001400550f3:
  if (sVar6 == 0) {
    local_60 = 0;
    if ((bVar27) || (iVar24 != 0)) {
LAB_14005548c:
      if (bVar2 == 0) {
        if (local_6a == 0) {
          uVar20 = -uVar9;
          if (!bVar29) {
            uVar20 = uVar9;
          }
          *param_7 = uVar20;
        }
        else {
          *param_7 = 0xffff;
          *param_6 = 4;
        }
        goto LAB_140055130;
      }
    }
  }
  else {
    if (local_68 == &local_58) {
      uVar26 = 0xf;
    }
    else {
      uVar26 = CONCAT71(uStack_57,local_58);
    }
    if (uVar26 < sVar6 + 1) {
      local_60 = sVar6;
      __cxx11::string::_M_mutate((string *)&local_68,sVar6,0,(undefined1 *)0x0,1);
    }
    local_68[sVar6] = (char)iVar24;
    local_68[sVar6 + 1] = 0;
    local_60 = sVar6 + 1;
    cVar8 = __verify_grouping(*(longlong *)(lVar19 + 0x10),*(longlong *)(lVar19 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar8 == '\0') {
      *param_6 = 4;
    }
    if (((iVar24 != 0) || (bVar27)) || (local_60 != 0)) goto LAB_14005548c;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_140055130:
  if (bVar1 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar17;
  param_1[1] = CONCAT62((int6)(uVar3 >> 0x10),uVar25);
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x000140055639:
  uVar25 = 0xffff;
  sVar6 = local_60;
  bVar2 = bVar7;
  goto joined_r0x0001400550f3;
code_r0x0001400550d2:
  uVar25 = 0xffff;
  sVar6 = local_60;
  bVar1 = 1;
  bVar2 = bVar7;
  goto joined_r0x0001400550f3;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_extract_int[abi:cxx11]<long
// long>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<long_long>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  byte bVar1;
  byte bVar2;
  byte bVar3;
  ulonglong uVar4;
  longlong lVar5;
  longlong *plVar6;
  size_t sVar7;
  int iVar8;
  char cVar9;
  short sVar10;
  short sVar11;
  longlong lVar12;
  ulonglong uVar13;
  ulonglong uVar14;
  short *psVar15;
  short *psVar16;
  __numpunct_cache<wchar_t> *this;
  ulonglong uVar17;
  ulonglong uVar18;
  longlong *plVar19;
  longlong *plVar20;
  longlong lVar21;
  ushort uVar22;
  int iVar23;
  uint uVar24;
  ulonglong uVar25;
  int iVar26;
  undefined2 uVar27;
  ulonglong uVar28;
  bool bVar29;
  bool bVar30;
  bool bVar31;
  bool bVar32;
  longlong *local_c0;
  short local_b8;
  ulonglong local_b0;
  short local_a0;
  bool local_79;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar4 = param_3[1];
  lVar5 = param_4[1];
  plVar6 = (longlong *)*param_4;
  plVar19 = (longlong *)*param_3;
  uVar28 = uVar4 & 0xffffffff;
  lVar12 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  plVar20 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar12 * 8);
  lVar21 = *plVar20;
  if (lVar21 == 0) {
    this = operator_new(0xd0);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
    this[0x20] = (__numpunct_cache<wchar_t>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined4 *)(this + 0x48) = 0;
    this[200] = (__numpunct_cache<wchar_t>)0x0;
    __numpunct_cache<wchar_t>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar12);
    lVar21 = *plVar20;
  }
  uVar24 = *(uint *)(param_5 + 0x18) & 0x4a;
  iVar23 = 8;
  if (uVar24 != 0x40) {
    iVar23 = 10;
    if (uVar24 == 8) {
      iVar23 = 0x10;
    }
  }
  bVar29 = (short)uVar28 == -1;
  bVar31 = bVar29;
  if (plVar19 != (longlong *)0x0 && bVar29) {
    if ((short *)plVar19[2] < (short *)plVar19[3]) {
      sVar11 = *(short *)plVar19[2];
    }
    else {
      sVar11 = (**(code **)(*plVar19 + 0x48))(plVar19);
    }
    plVar20 = (longlong *)0x0;
    if (sVar11 != -1) {
      plVar20 = plVar19;
    }
    plVar19 = plVar20;
    bVar31 = sVar11 == -1;
  }
  local_b8 = (short)lVar5;
  bVar30 = local_b8 == -1;
  bVar32 = bVar30;
  local_c0 = plVar6;
  if (plVar6 != (longlong *)0x0 && bVar30) {
    if ((short *)plVar6[2] < (short *)plVar6[3]) {
      sVar11 = *(short *)plVar6[2];
    }
    else {
      sVar11 = (**(code **)(*plVar6 + 0x48))(plVar6);
    }
    bVar32 = sVar11 == -1;
    local_c0 = (longlong *)0x0;
    if (!bVar32) {
      local_c0 = plVar6;
    }
  }
  if (bVar32 == bVar31) {
    local_79 = false;
    cVar9 = *(char *)(lVar21 + 0x20);
    uVar17 = 0;
    iVar26 = 0;
    bVar31 = true;
    bVar29 = false;
LAB_140055e1d:
    if (iVar23 != 0x10) goto LAB_140055e27;
LAB_1400561af:
    local_b0 = 0x16;
    iVar8 = 0x16;
  }
  else {
    if ((plVar19 == (longlong *)0x0) || (!bVar29)) {
      uVar17 = uVar4 & 0xffff;
    }
    else {
      if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
        uVar17 = (ulonglong)*(ushort *)plVar19[2];
      }
      else {
        uVar17 = (**(code **)(*plVar19 + 0x48))(plVar19);
        uVar17 = uVar17 & 0xffff;
      }
      if ((short)uVar17 == -1) {
        plVar19 = (longlong *)0x0;
      }
    }
    cVar9 = *(char *)(lVar21 + 0x20);
    sVar11 = (short)uVar17;
    if ((*(short *)(lVar21 + 0x94) == sVar11) ||
       (local_79 = false, *(short *)(lVar21 + 0x96) == sVar11)) {
      local_79 = *(short *)(lVar21 + 0x94) == sVar11;
      if (cVar9 == '\0') {
        sVar10 = *(short *)(lVar21 + 0x48);
      }
      else {
        if (*(short *)(lVar21 + 0x4a) == sVar11) goto LAB_140055d51;
        sVar10 = *(short *)(lVar21 + 0x48);
      }
      if (sVar10 != sVar11) {
        psVar15 = (short *)plVar19[3];
        if ((short *)plVar19[2] < psVar15) {
          psVar16 = (short *)plVar19[2] + 1;
          plVar19[2] = (longlong)psVar16;
        }
        else {
          (**(code **)(*plVar19 + 0x50))(plVar19);
          psVar16 = (short *)plVar19[2];
          psVar15 = (short *)plVar19[3];
        }
        if (psVar16 < psVar15) {
          sVar11 = *psVar16;
        }
        else {
          sVar11 = (**(code **)(*plVar19 + 0x48))(plVar19);
        }
        if (sVar11 == -1) {
          plVar19 = (longlong *)0x0;
        }
        bVar31 = bVar30;
        plVar20 = local_c0;
        if (local_c0 != (longlong *)0x0 && bVar30) {
          if ((short *)local_c0[2] < (short *)local_c0[3]) {
            sVar10 = *(short *)local_c0[2];
          }
          else {
            sVar10 = (**(code **)(*local_c0 + 0x48))();
          }
          bVar31 = sVar10 == -1;
          plVar20 = (longlong *)0x0;
          if (!bVar31) {
            plVar20 = local_c0;
          }
        }
        local_c0 = plVar20;
        if (bVar31 == (sVar11 == -1)) {
          bVar31 = true;
          cVar9 = *(char *)(lVar21 + 0x20);
          iVar26 = 0;
          bVar29 = false;
          uVar28 = 0xffffffff;
          goto LAB_140055e1d;
        }
        if (plVar19 == (longlong *)0x0) {
          cVar9 = *(char *)(lVar21 + 0x20);
          uVar17 = 0xffff;
          uVar28 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
            uVar17 = (ulonglong)*(ushort *)plVar19[2];
          }
          else {
            uVar17 = (**(code **)(*plVar19 + 0x48))(plVar19);
            uVar17 = uVar17 & 0xffff;
          }
          cVar9 = *(char *)(lVar21 + 0x20);
          uVar28 = 0xffffffff;
          if ((short)uVar17 == -1) {
            plVar19 = (longlong *)0x0;
          }
        }
      }
    }
LAB_140055d51:
    iVar26 = 0;
    bVar29 = false;
    do {
      sVar11 = (short)uVar17;
      if (((cVar9 != '\0') && (*(short *)(lVar21 + 0x4a) == sVar11)) ||
         (*(short *)(lVar21 + 0x48) == sVar11)) break;
      if (*(short *)(lVar21 + 0x9c) == sVar11) {
        bVar31 = (bool)(bVar29 ^ 1U | iVar23 == 10);
        if (!bVar31) goto LAB_140055d84;
        bVar29 = iVar23 == 8 || uVar24 == 0;
        if (iVar23 != 8 && uVar24 != 0) {
          iVar26 = iVar26 + 1;
          bVar29 = bVar31;
          goto LAB_140055dba;
        }
        psVar16 = (short *)plVar19[2];
        psVar15 = (short *)plVar19[3];
        iVar26 = 0;
        iVar23 = 8;
        if (psVar15 <= psVar16) goto LAB_140056120;
LAB_140055dcb:
        psVar16 = psVar16 + 1;
        plVar19[2] = (longlong)psVar16;
        if (psVar16 < psVar15) goto LAB_140055ddc;
LAB_140056148:
        sVar11 = (**(code **)(*plVar19 + 0x48))(plVar19);
      }
      else {
        if (!bVar29) break;
LAB_140055d84:
        if ((*(short *)(lVar21 + 0x98) != sVar11) && (*(short *)(lVar21 + 0x9a) != sVar11)) {
          bVar31 = false;
          bVar29 = true;
          goto LAB_140055e1d;
        }
        bVar31 = uVar24 == 0 || iVar23 == 0x10;
        if (uVar24 != 0 && iVar23 != 0x10) {
          bVar29 = true;
          goto LAB_140055e27;
        }
        iVar26 = 0;
        iVar23 = 0x10;
        bVar29 = false;
LAB_140055dba:
        psVar16 = (short *)plVar19[2];
        psVar15 = (short *)plVar19[3];
        if (psVar16 < psVar15) goto LAB_140055dcb;
LAB_140056120:
        (**(code **)(*plVar19 + 0x50))(plVar19);
        psVar16 = (short *)plVar19[2];
        if ((short *)plVar19[3] <= psVar16) goto LAB_140056148;
LAB_140055ddc:
        sVar11 = *psVar16;
      }
      if (sVar11 == -1) {
        plVar19 = (longlong *)0x0;
      }
      bVar31 = bVar30;
      plVar20 = local_c0;
      if (local_c0 != (longlong *)0x0 && bVar30) {
        if ((short *)local_c0[2] < (short *)local_c0[3]) {
          sVar10 = *(short *)local_c0[2];
        }
        else {
          sVar10 = (**(code **)(*local_c0 + 0x48))();
        }
        bVar31 = sVar10 == -1;
        plVar20 = (longlong *)0x0;
        if (!bVar31) {
          plVar20 = local_c0;
        }
      }
      local_c0 = plVar20;
      if ((sVar11 == -1) == bVar31) {
        bVar31 = true;
        cVar9 = *(char *)(lVar21 + 0x20);
        uVar28 = 0xffffffff;
        goto LAB_140055e1d;
      }
      uVar17 = 0xffff;
      if (plVar19 != (longlong *)0x0) {
        if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
          uVar17 = (ulonglong)*(ushort *)plVar19[2];
        }
        else {
          uVar17 = (**(code **)(*plVar19 + 0x48))(plVar19);
          uVar17 = uVar17 & 0xffff;
        }
        if ((short)uVar17 == -1) {
          plVar19 = (longlong *)0x0;
        }
      }
      cVar9 = *(char *)(lVar21 + 0x20);
      uVar28 = 0xffffffff;
    } while (bVar29);
    bVar31 = false;
    if (iVar23 == 0x10) goto LAB_1400561af;
LAB_140055e27:
    local_b0 = (ulonglong)iVar23;
    iVar8 = iVar23;
  }
  uVar27 = (undefined2)uVar28;
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar9 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar18 = (ulonglong)iVar23;
  uVar13 = (ulonglong)local_79 + 0x7fffffffffffffff;
  uVar14 = uVar13 / uVar18;
  bVar2 = *(byte *)(lVar21 + 200);
  sVar7 = local_60;
  if (bVar2 == 0) {
    bVar1 = 0;
    if (bVar31 == false) {
      local_a0 = (short)iVar8;
      uVar25 = 0;
LAB_140055ed1:
      uVar27 = (undefined2)uVar28;
      iVar23 = (int)uVar17;
      uVar22 = (ushort)uVar17;
      if (local_b0 < 0xb) {
        if ((uVar22 < 0x30) || ((ushort)(local_a0 + 0x30U) <= uVar22)) goto LAB_140056288;
LAB_140055ef2:
        iVar23 = iVar23 + -0x30;
LAB_140055ef5:
        if (uVar25 <= uVar14) goto LAB_140055f00;
LAB_1400561f0:
        psVar15 = (short *)plVar19[2];
        psVar16 = (short *)plVar19[3];
        bVar1 = 1;
        if (psVar16 <= psVar15) goto LAB_140056206;
LAB_140055f36:
        psVar15 = psVar15 + 1;
        plVar19[2] = (longlong)psVar15;
LAB_140055f3e:
        if (psVar15 < psVar16) {
          sVar11 = *psVar15;
        }
        else {
          sVar11 = (**(code **)(*plVar19 + 0x48))(plVar19);
        }
        if (sVar11 == -1) {
          plVar19 = (longlong *)0x0;
        }
        bVar32 = bVar30;
        plVar20 = local_c0;
        if (local_c0 != (longlong *)0x0 && bVar30) {
          if ((short *)local_c0[2] < (short *)local_c0[3]) {
            sVar10 = *(short *)local_c0[2];
          }
          else {
            sVar10 = (**(code **)(*local_c0 + 0x48))();
          }
          bVar32 = sVar10 == -1;
          plVar20 = (longlong *)0x0;
          if (!bVar32) {
            plVar20 = local_c0;
          }
        }
        local_c0 = plVar20;
        if (bVar32 == (sVar11 == -1)) goto code_r0x000140055f7a;
        if (plVar19 == (longlong *)0x0) {
          uVar17 = 0xffff;
        }
        else {
          if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
            uVar17 = (ulonglong)*(ushort *)plVar19[2];
          }
          else {
            uVar17 = (**(code **)(*plVar19 + 0x48))(plVar19);
            uVar17 = uVar17 & 0xffff;
          }
          if ((short)uVar17 == -1) {
            plVar19 = (longlong *)0x0;
          }
        }
        uVar28 = 0xffffffff;
        goto LAB_140055ed1;
      }
      if ((ushort)(uVar22 - 0x30) < 10) goto LAB_140055ef2;
      if ((ushort)(uVar22 - 0x61) < 6) {
        iVar23 = iVar23 + -0x57;
        if (uVar14 < uVar25) goto LAB_1400561f0;
LAB_140055f00:
        psVar16 = (short *)plVar19[3];
        bVar1 = bVar1 | uVar13 - (longlong)iVar23 < uVar25 * uVar18;
        psVar15 = (short *)plVar19[2];
        uVar25 = uVar25 * uVar18 + (longlong)iVar23;
        iVar26 = iVar26 + 1;
        if (psVar15 < psVar16) goto LAB_140055f36;
LAB_140056206:
        (**(code **)(*plVar19 + 0x50))(plVar19);
        psVar15 = (short *)plVar19[2];
        psVar16 = (short *)plVar19[3];
        goto LAB_140055f3e;
      }
      if ((ushort)(uVar22 - 0x41) < 6) {
        iVar23 = iVar23 + -0x37;
        goto LAB_140055ef5;
      }
LAB_140056288:
      sVar7 = local_60;
      bVar2 = 0;
      bVar3 = bVar31;
    }
    else {
      uVar25 = 0;
      bVar2 = bVar31;
      bVar3 = 0;
    }
  }
  else {
    if (bVar31 == false) {
      bVar1 = 0;
      uVar25 = 0;
      do {
        sVar7 = local_60;
        uVar27 = (undefined2)uVar28;
        bVar3 = *(byte *)(lVar21 + 0x20);
        sVar11 = (short)uVar17;
        if ((bVar3 == 0) || (*(short *)(lVar21 + 0x4a) != sVar11)) {
          psVar15 = (short *)(lVar21 + 0x9c);
          uVar28 = local_b0;
          if (*(short *)(lVar21 + 0x48) == sVar11 || local_b0 == 0) goto LAB_140056288;
          while (sVar11 != *psVar15) {
            uVar28 = uVar28 - 1;
            psVar15 = psVar15 + 1;
            if (uVar28 == 0) {
              bVar3 = 0;
              bVar2 = 0;
              goto joined_r0x000140055f9b;
            }
          }
          iVar23 = (int)((longlong)psVar15 - (lVar21 + 0x9c) >> 1);
          if (0xf < iVar23) {
            iVar23 = iVar23 + -6;
          }
          if (uVar25 <= uVar14) {
            bVar1 = bVar1 | uVar13 - (longlong)iVar23 < uVar25 * uVar18;
            uVar25 = uVar25 * uVar18 + (longlong)iVar23;
            iVar26 = iVar26 + 1;
            goto LAB_140056496;
          }
          psVar15 = (short *)plVar19[3];
          psVar16 = (short *)plVar19[2];
          bVar1 = bVar2;
          if (psVar15 <= psVar16) goto LAB_140056516;
LAB_1400564a3:
          psVar16 = psVar16 + 1;
          plVar19[2] = (longlong)psVar16;
        }
        else {
          if (iVar26 == 0) {
            bVar2 = 0;
            goto joined_r0x000140055f9b;
          }
          uVar28 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar17 = 0xf;
          }
          else {
            uVar17 = CONCAT71(uStack_57,local_58);
          }
          if (uVar17 < uVar28) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[sVar7] = (char)iVar26;
          iVar26 = 0;
          local_68[uVar28] = 0;
          local_60 = uVar28;
LAB_140056496:
          psVar16 = (short *)plVar19[2];
          psVar15 = (short *)plVar19[3];
          if (psVar16 < psVar15) goto LAB_1400564a3;
LAB_140056516:
          (**(code **)(*plVar19 + 0x50))(plVar19);
          psVar16 = (short *)plVar19[2];
          psVar15 = (short *)plVar19[3];
        }
        if (psVar16 < psVar15) {
          sVar11 = *psVar16;
        }
        else {
          sVar11 = (**(code **)(*plVar19 + 0x48))(plVar19);
        }
        if (sVar11 == -1) {
          plVar19 = (longlong *)0x0;
        }
        bVar32 = bVar30;
        plVar20 = local_c0;
        if (local_c0 != (longlong *)0x0 && bVar30) {
          if ((short *)local_c0[2] < (short *)local_c0[3]) {
            sVar10 = *(short *)local_c0[2];
          }
          else {
            sVar10 = (**(code **)(*local_c0 + 0x48))();
          }
          bVar32 = sVar10 == -1;
          plVar20 = (longlong *)0x0;
          if (!bVar32) {
            plVar20 = local_c0;
          }
        }
        local_c0 = plVar20;
        if ((sVar11 == -1) == bVar32) goto code_r0x0001400564e3;
        if (plVar19 == (longlong *)0x0) {
          uVar17 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
            uVar17 = (ulonglong)*(ushort *)plVar19[2];
          }
          else {
            uVar24 = (**(code **)(*plVar19 + 0x48))(plVar19);
            uVar17 = (ulonglong)uVar24;
          }
          if ((short)uVar17 == -1) {
            plVar19 = (longlong *)0x0;
          }
        }
        uVar28 = 0xffffffff;
      } while( true );
    }
    bVar1 = 0;
    uVar25 = 0;
    bVar3 = 0;
    bVar2 = bVar31;
  }
joined_r0x000140055f9b:
  if (sVar7 == 0) {
    local_60 = 0;
    if ((iVar26 != 0) || (bVar29)) {
LAB_140056329:
      if (bVar3 == 0) {
        if (bVar1 == 0) {
          uVar28 = -uVar25;
          if (local_79 == false) {
            uVar28 = uVar25;
          }
          *param_7 = uVar28;
        }
        else {
          uVar28 = 0x7fffffffffffffff;
          if (local_79 != false) {
            uVar28 = 0x8000000000000000;
          }
          *param_7 = uVar28;
          *param_6 = 4;
        }
        goto LAB_140055fd8;
      }
    }
  }
  else {
    if (local_68 == &local_58) {
      uVar28 = 0xf;
    }
    else {
      uVar28 = CONCAT71(uStack_57,local_58);
    }
    if (uVar28 < sVar7 + 1) {
      local_60 = sVar7;
      __cxx11::string::_M_mutate((string *)&local_68,sVar7,0,(undefined1 *)0x0,1);
    }
    local_68[sVar7] = (char)iVar26;
    local_68[sVar7 + 1] = 0;
    local_60 = sVar7 + 1;
    cVar9 = __verify_grouping(*(longlong *)(lVar21 + 0x10),*(longlong *)(lVar21 + 0x18),
                              (undefined8 *)&local_68);
    if (cVar9 == '\0') {
      *param_6 = 4;
    }
    if (((iVar26 != 0) || (bVar29)) || (local_60 != 0)) goto LAB_140056329;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_140055fd8:
  if (bVar2 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar19;
  param_1[1] = CONCAT62((int6)(uVar4 >> 0x10),uVar27);
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x0001400564e3:
  uVar27 = 0xffff;
  sVar7 = local_60;
  bVar3 = bVar31;
  goto joined_r0x000140055f9b;
code_r0x000140055f7a:
  uVar27 = 0xffff;
  sVar7 = local_60;
  bVar2 = 1;
  bVar3 = bVar31;
  goto joined_r0x000140055f9b;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_int[abi:cxx11]<unsigned long long>(std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> >, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::_M_extract_int_abi_cxx11_<>
          (undefined8 *param_1,undefined8 param_2,longlong *param_3,longlong *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  byte bVar1;
  byte bVar2;
  byte bVar3;
  ulonglong uVar4;
  longlong lVar5;
  longlong *plVar6;
  undefined1 auVar7 [16];
  size_t sVar8;
  int iVar9;
  bool bVar10;
  char cVar11;
  short sVar12;
  short sVar13;
  longlong lVar14;
  ulonglong uVar15;
  ulonglong uVar16;
  short *psVar17;
  short *psVar18;
  __numpunct_cache<wchar_t> *this;
  ulonglong uVar19;
  ulonglong uVar20;
  longlong *plVar21;
  longlong *plVar22;
  longlong lVar23;
  ushort uVar24;
  int iVar25;
  uint uVar26;
  int iVar27;
  undefined2 uVar28;
  ulonglong uVar29;
  bool bVar30;
  bool bVar31;
  bool bVar32;
  bool bVar33;
  longlong *local_b8;
  short local_b0;
  ulonglong local_a8;
  short local_98;
  undefined1 *local_68;
  size_t local_60;
  undefined1 local_58;
  undefined7 uStack_57;
  
  uVar4 = param_3[1];
  lVar5 = param_4[1];
  plVar6 = (longlong *)*param_4;
  plVar21 = (longlong *)*param_3;
  uVar29 = uVar4 & 0xffffffff;
  lVar14 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  plVar22 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar14 * 8);
  lVar23 = *plVar22;
  if (lVar23 == 0) {
    this = operator_new(0xd0);
    *(undefined4 *)(this + 8) = 0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
    this[0x20] = (__numpunct_cache<wchar_t>)0x0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined4 *)(this + 0x48) = 0;
    this[200] = (__numpunct_cache<wchar_t>)0x0;
    __numpunct_cache<wchar_t>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar14);
    lVar23 = *plVar22;
  }
  uVar26 = *(uint *)(param_5 + 0x18) & 0x4a;
  iVar25 = 8;
  if (uVar26 != 0x40) {
    iVar25 = 10;
    if (uVar26 == 8) {
      iVar25 = 0x10;
    }
  }
  bVar30 = (short)uVar29 == -1;
  bVar10 = bVar30;
  if (plVar21 != (longlong *)0x0 && bVar30) {
    if ((short *)plVar21[2] < (short *)plVar21[3]) {
      sVar13 = *(short *)plVar21[2];
    }
    else {
      sVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
    }
    plVar22 = (longlong *)0x0;
    if (sVar13 != -1) {
      plVar22 = plVar21;
    }
    plVar21 = plVar22;
    bVar10 = sVar13 == -1;
  }
  local_b0 = (short)lVar5;
  bVar31 = local_b0 == -1;
  bVar32 = bVar31;
  local_b8 = plVar6;
  if (plVar6 != (longlong *)0x0 && bVar31) {
    if ((short *)plVar6[2] < (short *)plVar6[3]) {
      sVar13 = *(short *)plVar6[2];
    }
    else {
      sVar13 = (**(code **)(*plVar6 + 0x48))(plVar6);
    }
    bVar32 = sVar13 == -1;
    local_b8 = (longlong *)0x0;
    if (!bVar32) {
      local_b8 = plVar6;
    }
  }
  if (bVar10 == bVar32) {
    bVar32 = false;
    cVar11 = *(char *)(lVar23 + 0x20);
    uVar19 = 0;
    iVar27 = 0;
    bVar10 = true;
    bVar30 = false;
LAB_140056cbb:
    if (iVar25 != 0x10) goto LAB_140056cc5;
LAB_14005702f:
    local_a8 = 0x16;
    iVar9 = 0x16;
  }
  else {
    if ((plVar21 == (longlong *)0x0) || (!bVar30)) {
      uVar19 = uVar4 & 0xffff;
    }
    else {
      if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
        uVar19 = (ulonglong)*(ushort *)plVar21[2];
      }
      else {
        uVar19 = (**(code **)(*plVar21 + 0x48))(plVar21);
        uVar19 = uVar19 & 0xffff;
      }
      if ((short)uVar19 == -1) {
        plVar21 = (longlong *)0x0;
      }
    }
    cVar11 = *(char *)(lVar23 + 0x20);
    sVar13 = (short)uVar19;
    if ((*(short *)(lVar23 + 0x94) == sVar13) ||
       (bVar32 = false, *(short *)(lVar23 + 0x96) == sVar13)) {
      bVar32 = *(short *)(lVar23 + 0x94) == sVar13;
      if (cVar11 == '\0') {
        sVar12 = *(short *)(lVar23 + 0x48);
      }
      else {
        if (*(short *)(lVar23 + 0x4a) == sVar13) goto LAB_140056bef;
        sVar12 = *(short *)(lVar23 + 0x48);
      }
      if (sVar12 != sVar13) {
        psVar17 = (short *)plVar21[3];
        if ((short *)plVar21[2] < psVar17) {
          psVar18 = (short *)plVar21[2] + 1;
          plVar21[2] = (longlong)psVar18;
        }
        else {
          (**(code **)(*plVar21 + 0x50))(plVar21);
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
        }
        if (psVar18 < psVar17) {
          sVar13 = *psVar18;
        }
        else {
          sVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar13 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar10 = bVar31;
        plVar22 = local_b8;
        if (local_b8 != (longlong *)0x0 && bVar31) {
          if ((short *)local_b8[2] < (short *)local_b8[3]) {
            sVar12 = *(short *)local_b8[2];
          }
          else {
            sVar12 = (**(code **)(*local_b8 + 0x48))();
          }
          bVar10 = sVar12 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar10) {
            plVar22 = local_b8;
          }
        }
        local_b8 = plVar22;
        if ((sVar13 == -1) == bVar10) {
          bVar10 = true;
          cVar11 = *(char *)(lVar23 + 0x20);
          iVar27 = 0;
          bVar30 = false;
          uVar29 = 0xffffffff;
          goto LAB_140056cbb;
        }
        if (plVar21 == (longlong *)0x0) {
          cVar11 = *(char *)(lVar23 + 0x20);
          uVar19 = 0xffff;
          uVar29 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar19 = (ulonglong)*(ushort *)plVar21[2];
          }
          else {
            uVar19 = (**(code **)(*plVar21 + 0x48))(plVar21);
            uVar19 = uVar19 & 0xffff;
          }
          cVar11 = *(char *)(lVar23 + 0x20);
          uVar29 = 0xffffffff;
          if ((short)uVar19 == -1) {
            plVar21 = (longlong *)0x0;
          }
        }
      }
    }
LAB_140056bef:
    iVar27 = 0;
    bVar30 = false;
    do {
      sVar13 = (short)uVar19;
      if (((cVar11 != '\0') && (*(short *)(lVar23 + 0x4a) == sVar13)) ||
         (*(short *)(lVar23 + 0x48) == sVar13)) break;
      if (*(short *)(lVar23 + 0x9c) == sVar13) {
        bVar10 = (bool)(bVar30 ^ 1U | iVar25 == 10);
        if (!bVar10) goto LAB_140056c22;
        bVar30 = iVar25 == 8 || uVar26 == 0;
        if (iVar25 != 8 && uVar26 != 0) {
          iVar27 = iVar27 + 1;
          bVar30 = bVar10;
          goto LAB_140056c58;
        }
        psVar18 = (short *)plVar21[2];
        psVar17 = (short *)plVar21[3];
        iVar27 = 0;
        iVar25 = 8;
        if (psVar17 <= psVar18) goto LAB_140056fa0;
LAB_140056c69:
        psVar18 = psVar18 + 1;
        plVar21[2] = (longlong)psVar18;
        if (psVar18 < psVar17) goto LAB_140056c7a;
LAB_140056fc8:
        sVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
      }
      else {
        if (!bVar30) break;
LAB_140056c22:
        if ((*(short *)(lVar23 + 0x98) != sVar13) && (*(short *)(lVar23 + 0x9a) != sVar13)) {
          bVar10 = false;
          bVar30 = true;
          goto LAB_140056cbb;
        }
        bVar10 = uVar26 == 0 || iVar25 == 0x10;
        if (uVar26 != 0 && iVar25 != 0x10) {
          bVar30 = true;
          goto LAB_140056cc5;
        }
        iVar27 = 0;
        iVar25 = 0x10;
        bVar30 = false;
LAB_140056c58:
        psVar18 = (short *)plVar21[2];
        psVar17 = (short *)plVar21[3];
        if (psVar18 < psVar17) goto LAB_140056c69;
LAB_140056fa0:
        (**(code **)(*plVar21 + 0x50))(plVar21);
        psVar18 = (short *)plVar21[2];
        if ((short *)plVar21[3] <= psVar18) goto LAB_140056fc8;
LAB_140056c7a:
        sVar13 = *psVar18;
      }
      if (sVar13 == -1) {
        plVar21 = (longlong *)0x0;
      }
      bVar10 = bVar31;
      plVar22 = local_b8;
      if (local_b8 != (longlong *)0x0 && bVar31) {
        if ((short *)local_b8[2] < (short *)local_b8[3]) {
          sVar12 = *(short *)local_b8[2];
        }
        else {
          sVar12 = (**(code **)(*local_b8 + 0x48))();
        }
        bVar10 = sVar12 == -1;
        plVar22 = (longlong *)0x0;
        if (!bVar10) {
          plVar22 = local_b8;
        }
      }
      local_b8 = plVar22;
      if (bVar10 == (sVar13 == -1)) {
        bVar10 = true;
        cVar11 = *(char *)(lVar23 + 0x20);
        uVar29 = 0xffffffff;
        goto LAB_140056cbb;
      }
      uVar19 = 0xffff;
      if (plVar21 != (longlong *)0x0) {
        if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
          uVar19 = (ulonglong)*(ushort *)plVar21[2];
        }
        else {
          uVar19 = (**(code **)(*plVar21 + 0x48))(plVar21);
          uVar19 = uVar19 & 0xffff;
        }
        if ((short)uVar19 == -1) {
          plVar21 = (longlong *)0x0;
        }
      }
      cVar11 = *(char *)(lVar23 + 0x20);
      uVar29 = 0xffffffff;
    } while (bVar30);
    bVar10 = false;
    if (iVar25 == 0x10) goto LAB_14005702f;
LAB_140056cc5:
    local_a8 = (ulonglong)iVar25;
    iVar9 = iVar25;
  }
  uVar28 = (undefined2)uVar29;
  local_58 = 0;
  local_60 = 0;
  local_68 = &local_58;
  if (cVar11 != '\0') {
    __cxx11::string::reserve((string *)&local_68,0x20);
  }
  uVar20 = (ulonglong)iVar25;
  auVar7._8_8_ = 0;
  auVar7._0_8_ = uVar20;
  uVar15 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar7,0);
  bVar2 = *(byte *)(lVar23 + 200);
  sVar8 = local_60;
  if (bVar2 == 0) {
    bVar1 = 0;
    if (bVar10 == false) {
      local_98 = (short)iVar9;
      uVar16 = 0;
LAB_140056d5c:
      uVar28 = (undefined2)uVar29;
      iVar25 = (int)uVar19;
      uVar24 = (ushort)uVar19;
      if (local_a8 < 0xb) {
        if ((uVar24 < 0x30) || ((ushort)(local_98 + 0x30U) <= uVar24)) goto LAB_140057108;
LAB_140056d7d:
        iVar25 = iVar25 + -0x30;
LAB_140056d80:
        if (uVar16 <= uVar15) goto LAB_140056d8b;
LAB_140057070:
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        bVar1 = 1;
        if (psVar18 <= psVar17) goto LAB_140057086;
LAB_140056db9:
        psVar17 = psVar17 + 1;
        plVar21[2] = (longlong)psVar17;
LAB_140056dc1:
        if (psVar17 < psVar18) {
          sVar13 = *psVar17;
        }
        else {
          sVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar13 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar33 = bVar31;
        plVar22 = local_b8;
        if (local_b8 != (longlong *)0x0 && bVar31) {
          if ((short *)local_b8[2] < (short *)local_b8[3]) {
            sVar12 = *(short *)local_b8[2];
          }
          else {
            sVar12 = (**(code **)(*local_b8 + 0x48))();
          }
          bVar33 = sVar12 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar33) {
            plVar22 = local_b8;
          }
        }
        local_b8 = plVar22;
        if (bVar33 == (sVar13 == -1)) goto code_r0x000140056dfd;
        if (plVar21 == (longlong *)0x0) {
          uVar19 = 0xffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar19 = (ulonglong)*(ushort *)plVar21[2];
          }
          else {
            uVar19 = (**(code **)(*plVar21 + 0x48))(plVar21);
            uVar19 = uVar19 & 0xffff;
          }
          if ((short)uVar19 == -1) {
            plVar21 = (longlong *)0x0;
          }
        }
        uVar29 = 0xffffffff;
        goto LAB_140056d5c;
      }
      if ((ushort)(uVar24 - 0x30) < 10) goto LAB_140056d7d;
      if ((ushort)(uVar24 - 0x61) < 6) {
        iVar25 = iVar25 + -0x57;
        if (uVar15 < uVar16) goto LAB_140057070;
LAB_140056d8b:
        uVar29 = uVar16 * uVar20;
        uVar16 = (longlong)iVar25 + uVar29;
        bVar1 = bVar1 | CARRY8((longlong)iVar25,uVar29);
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        iVar27 = iVar27 + 1;
        if (psVar17 < psVar18) goto LAB_140056db9;
LAB_140057086:
        (**(code **)(*plVar21 + 0x50))(plVar21);
        psVar17 = (short *)plVar21[2];
        psVar18 = (short *)plVar21[3];
        goto LAB_140056dc1;
      }
      if ((ushort)(uVar24 - 0x41) < 6) {
        iVar25 = iVar25 + -0x37;
        goto LAB_140056d80;
      }
LAB_140057108:
      sVar8 = local_60;
      bVar2 = 0;
      bVar3 = bVar10;
    }
    else {
      uVar16 = 0;
      bVar2 = bVar10;
      bVar3 = 0;
    }
  }
  else {
    if (bVar10 == false) {
      bVar1 = 0;
      uVar16 = 0;
      do {
        sVar8 = local_60;
        uVar28 = (undefined2)uVar29;
        bVar3 = *(byte *)(lVar23 + 0x20);
        sVar13 = (short)uVar19;
        if ((bVar3 == 0) || (*(short *)(lVar23 + 0x4a) != sVar13)) {
          psVar17 = (short *)(lVar23 + 0x9c);
          uVar29 = local_a8;
          if (*(short *)(lVar23 + 0x48) == sVar13 || local_a8 == 0) goto LAB_140057108;
          while (sVar13 != *psVar17) {
            uVar29 = uVar29 - 1;
            psVar17 = psVar17 + 1;
            if (uVar29 == 0) {
              bVar3 = 0;
              bVar2 = 0;
              goto joined_r0x000140056e1e;
            }
          }
          iVar25 = (int)((longlong)psVar17 - (lVar23 + 0x9c) >> 1);
          if (0xf < iVar25) {
            iVar25 = iVar25 + -6;
          }
          if (uVar16 <= uVar15) {
            uVar29 = uVar16 * uVar20;
            uVar16 = (longlong)iVar25 + uVar29;
            bVar1 = bVar1 | CARRY8((longlong)iVar25,uVar29);
            iVar27 = iVar27 + 1;
            goto LAB_1400572ee;
          }
          psVar17 = (short *)plVar21[3];
          psVar18 = (short *)plVar21[2];
          bVar1 = bVar2;
          if (psVar17 <= psVar18) goto LAB_140057376;
LAB_1400572fb:
          psVar18 = psVar18 + 1;
          plVar21[2] = (longlong)psVar18;
        }
        else {
          if (iVar27 == 0) {
            bVar2 = 0;
            goto joined_r0x000140056e1e;
          }
          uVar29 = local_60 + 1;
          if (local_68 == &local_58) {
            uVar19 = 0xf;
          }
          else {
            uVar19 = CONCAT71(uStack_57,local_58);
          }
          if (uVar19 < uVar29) {
            __cxx11::string::_M_mutate((string *)&local_68,local_60,0,(undefined1 *)0x0,1);
          }
          local_68[sVar8] = (char)iVar27;
          iVar27 = 0;
          local_68[uVar29] = 0;
          local_60 = uVar29;
LAB_1400572ee:
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
          if (psVar18 < psVar17) goto LAB_1400572fb;
LAB_140057376:
          (**(code **)(*plVar21 + 0x50))(plVar21);
          psVar18 = (short *)plVar21[2];
          psVar17 = (short *)plVar21[3];
        }
        if (psVar18 < psVar17) {
          sVar13 = *psVar18;
        }
        else {
          sVar13 = (**(code **)(*plVar21 + 0x48))(plVar21);
        }
        if (sVar13 == -1) {
          plVar21 = (longlong *)0x0;
        }
        bVar33 = bVar31;
        plVar22 = local_b8;
        if (local_b8 != (longlong *)0x0 && bVar31) {
          if ((short *)local_b8[2] < (short *)local_b8[3]) {
            sVar12 = *(short *)local_b8[2];
          }
          else {
            sVar12 = (**(code **)(*local_b8 + 0x48))();
          }
          bVar33 = sVar12 == -1;
          plVar22 = (longlong *)0x0;
          if (!bVar33) {
            plVar22 = local_b8;
          }
        }
        local_b8 = plVar22;
        if (bVar33 == (sVar13 == -1)) goto code_r0x00014005733b;
        if (plVar21 == (longlong *)0x0) {
          uVar19 = 0xffffffff;
        }
        else {
          if ((ushort *)plVar21[2] < (ushort *)plVar21[3]) {
            uVar19 = (ulonglong)*(ushort *)plVar21[2];
          }
          else {
            uVar26 = (**(code **)(*plVar21 + 0x48))(plVar21);
            uVar19 = (ulonglong)uVar26;
          }
          if ((short)uVar19 == -1) {
            plVar21 = (longlong *)0x0;
          }
        }
        uVar29 = 0xffffffff;
      } while( true );
    }
    bVar1 = 0;
    uVar16 = 0;
    bVar3 = 0;
    bVar2 = bVar10;
  }
joined_r0x000140056e1e:
  if (sVar8 == 0) {
    local_60 = 0;
    if ((bVar30) || (iVar27 != 0)) {
LAB_1400571a6:
      if (bVar3 == 0) {
        if (bVar1 == 0) {
          if (bVar32) {
            uVar16 = -uVar16;
          }
          *param_7 = uVar16;
        }
        else {
          *param_7 = 0xffffffffffffffff;
          *param_6 = 4;
        }
        goto LAB_140056e58;
      }
    }
  }
  else {
    if (local_68 == &local_58) {
      uVar29 = 0xf;
    }
    else {
      uVar29 = CONCAT71(uStack_57,local_58);
    }
    if (uVar29 < sVar8 + 1) {
      local_60 = sVar8;
      __cxx11::string::_M_mutate((string *)&local_68,sVar8,0,(undefined1 *)0x0,1);
    }
    local_68[sVar8] = (char)iVar27;
    local_68[sVar8 + 1] = 0;
    local_60 = sVar8 + 1;
    cVar11 = __verify_grouping(*(longlong *)(lVar23 + 0x10),*(longlong *)(lVar23 + 0x18),
                               (undefined8 *)&local_68);
    if (cVar11 == '\0') {
      *param_6 = 4;
    }
    if (((iVar27 != 0) || (bVar30)) || (local_60 != 0)) goto LAB_1400571a6;
  }
  *param_7 = 0;
  *param_6 = 4;
LAB_140056e58:
  if (bVar2 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar21;
  param_1[1] = CONCAT62((int6)(uVar4 >> 0x10),uVar28);
  if (local_68 != &local_58) {
    operator_delete(local_68);
  }
  return param_1;
code_r0x00014005733b:
  uVar28 = 0xffff;
  sVar8 = local_60;
  bVar3 = bVar10;
  goto joined_r0x000140056e1e;
code_r0x000140056dfd:
  uVar28 = 0xffff;
  sVar8 = local_60;
  bVar2 = 1;
  bVar3 = bVar10;
  goto joined_r0x000140056e1e;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_extract_int<unsigned
// int>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  longlong *plVar1;
  byte bVar2;
  bool bVar3;
  char cVar4;
  char cVar5;
  ushort uVar6;
  short sVar7;
  short sVar8;
  longlong lVar9;
  short *psVar10;
  short *psVar11;
  ulonglong uVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  int iVar17;
  byte bVar18;
  uint uVar19;
  bool bVar20;
  bool bVar21;
  ulonglong local_a0;
  uint local_80;
  byte local_7a;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar19 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar19 == 0x40) {
    uVar16 = 8;
LAB_1400579a8:
    bVar3 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (bVar3) {
      bVar21 = false;
      uVar13 = 0;
      iVar17 = 0;
      bVar3 = false;
      cVar4 = true;
    }
    else {
LAB_1400579c7:
      uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      uVar13 = (uint)uVar6;
      if ((*(ushort *)(lVar9 + 0x94) == uVar6) || (*(ushort *)(lVar9 + 0x96) == uVar6)) {
        bVar21 = *(ushort *)(lVar9 + 0x94) == uVar6;
        cVar4 = *(char *)(lVar9 + 0x20);
        if (cVar4 != '\0') {
          if ((*(ushort *)(lVar9 + 0x4a) != uVar6) && (*(ushort *)(lVar9 + 0x48) != uVar6))
          goto LAB_140057cae;
          goto LAB_1400579f8;
        }
        if (*(ushort *)(lVar9 + 0x48) == uVar6) goto LAB_1400579f8;
LAB_140057cae:
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        cVar4 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (!(bool)cVar4) {
          uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
          uVar13 = (uint)uVar6;
          cVar4 = *(char *)(lVar9 + 0x20);
          goto LAB_1400579f8;
        }
        iVar17 = 0;
        bVar3 = false;
      }
      else {
        bVar21 = false;
        cVar4 = *(char *)(lVar9 + 0x20);
LAB_1400579f8:
        iVar17 = 0;
        bVar3 = false;
        while (((plVar1 = local_68, sVar7 = (short)uVar13, cVar4 == '\0' ||
                (*(short *)(lVar9 + 0x4a) != sVar7)) && (*(short *)(lVar9 + 0x48) != sVar7))) {
          if (*(short *)(lVar9 + 0x9c) == sVar7) {
            bVar3 = (bool)(bVar3 ^ 1U | uVar16 == 10);
            if (!bVar3) goto LAB_140057a2b;
            bVar20 = uVar16 == 8;
            if (bVar20 || uVar19 == 0) {
              iVar17 = 0;
              uVar16 = 8;
              bVar3 = bVar20 || uVar19 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar3) break;
LAB_140057a2b:
            if ((*(short *)(lVar9 + 0x98) != sVar7) && (*(short *)(lVar9 + 0x9a) != sVar7)) {
              cVar4 = false;
              bVar3 = true;
              goto LAB_140057ad4;
            }
            cVar4 = uVar19 == 0 || uVar16 == 0x10;
            if (uVar19 != 0 && uVar16 != 0x10) {
              bVar3 = true;
              goto LAB_140057ade;
            }
            iVar17 = 0;
            uVar16 = 0x10;
            bVar3 = false;
          }
          if ((short *)local_68[2] < (short *)local_68[3]) {
            psVar11 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar11;
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if (psVar11 < (short *)local_68[3]) goto LAB_140057a94;
LAB_140057f30:
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar11 = (short *)plVar1[2];
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if ((short *)plVar1[3] <= psVar11) goto LAB_140057f30;
LAB_140057a94:
            sVar7 = *psVar11;
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar20 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar20)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar20 = sVar8 == -1;
          }
          if (bVar20 == (sVar7 == -1)) {
            cVar4 = true;
            goto LAB_140057ad4;
          }
          uVar13 = 0xffff;
          if (local_68 != (longlong *)0x0) {
            if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
              uVar6 = *(ushort *)local_68[2];
            }
            else {
              uVar6 = (**(code **)(*local_68 + 0x48))();
            }
            uVar13 = (uint)uVar6;
            if (uVar6 == 0xffff) {
              local_68 = (longlong *)0x0;
            }
          }
          if (!bVar3) break;
          cVar4 = *(char *)(lVar9 + 0x20);
        }
        cVar4 = false;
      }
LAB_140057ad4:
      if (uVar16 == 0x10) goto LAB_140057d1c;
    }
LAB_140057ade:
    local_a0 = (ulonglong)(int)uVar16;
    local_80 = uVar16;
  }
  else {
    uVar16 = 10;
    if (uVar19 != 8) goto LAB_1400579a8;
    uVar16 = 0x10;
    cVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!(bool)cVar4) goto LAB_1400579c7;
    bVar21 = false;
    uVar13 = 0;
    iVar17 = 0;
    bVar3 = false;
LAB_140057d1c:
    local_80 = 0x10;
    uVar16 = 0x16;
    local_a0 = 0x16;
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar9 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar19 = (uint)(0xffffffff / (ulonglong)local_80);
  local_7a = *(byte *)(lVar9 + 200);
  if (local_7a == 0) {
    bVar18 = 0;
    if ((bool)cVar4 == false) {
      uVar14 = 0;
      do {
        uVar6 = (ushort)uVar13;
        if (local_a0 < 0xb) {
          if ((uVar6 < 0x30) || ((ushort)((short)uVar16 + 0x30U) <= uVar6)) goto LAB_140057e78;
LAB_140057b65:
          uVar13 = uVar13 - 0x30;
        }
        else {
          if ((ushort)(uVar6 - 0x30) < 10) goto LAB_140057b65;
          if (5 < (ushort)(uVar6 - 0x61)) goto LAB_140057e60;
          uVar13 = uVar13 - 0x57;
        }
        while( true ) {
          plVar1 = local_68;
          if (uVar19 < uVar14) {
            bVar18 = 1;
          }
          else {
            uVar15 = uVar14 * local_80;
            uVar14 = uVar13 + uVar15;
            iVar17 = iVar17 + 1;
            bVar18 = bVar18 | CARRY4(uVar13,uVar15);
          }
          psVar11 = (short *)local_68[3];
          if ((short *)local_68[2] < psVar11) {
            psVar10 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar10;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar10 = (short *)plVar1[2];
            psVar11 = (short *)plVar1[3];
          }
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar10 < psVar11) {
            sVar7 = *psVar10;
          }
          else {
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar20 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar20)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar20 = sVar8 == -1;
          }
          if (bVar20 == (sVar7 == -1)) {
            local_7a = 1;
            cVar5 = cVar4;
            goto LAB_140057bfc;
          }
          if (local_68 == (longlong *)0x0) goto LAB_140057e78;
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar6 = *(ushort *)local_68[2];
          }
          else {
            uVar6 = (**(code **)(*local_68 + 0x48))();
          }
          uVar13 = (uint)uVar6;
          if (uVar6 != 0xffff) break;
          local_68 = (longlong *)0x0;
          if (local_a0 < 0xb) goto LAB_140057e78;
LAB_140057e60:
          if (5 < (ushort)((short)uVar13 - 0x41U)) goto LAB_140057e78;
          uVar13 = uVar13 - 0x37;
        }
      } while( true );
    }
    uVar14 = 0;
    cVar5 = '\0';
    local_7a = cVar4;
  }
  else {
    if ((bool)cVar4 == false) {
      bVar18 = 0;
      uVar14 = 0;
      do {
        cVar5 = *(char *)(lVar9 + 0x20);
        sVar7 = (short)uVar13;
        if ((cVar5 == '\0') || (*(short *)(lVar9 + 0x4a) != sVar7)) {
          psVar11 = (short *)(lVar9 + 0x9c);
          uVar12 = local_a0;
          if (*(short *)(lVar9 + 0x48) == sVar7 || local_a0 == 0) goto LAB_140057e78;
          while (sVar7 != *psVar11) {
            uVar12 = uVar12 - 1;
            psVar11 = psVar11 + 1;
            if (uVar12 == 0) {
              local_7a = 0;
              cVar5 = '\0';
              goto LAB_140057bfc;
            }
          }
          uVar16 = (uint)((longlong)psVar11 - (lVar9 + 0x9c) >> 1);
          if (0xf < (int)uVar16) {
            uVar16 = uVar16 - 6;
          }
          bVar2 = local_7a;
          if (uVar14 <= uVar19) {
            uVar13 = uVar14 * local_80;
            uVar14 = uVar16 + uVar13;
            iVar17 = iVar17 + 1;
            bVar2 = bVar18 | CARRY4(uVar16,uVar13);
          }
        }
        else {
          if (iVar17 == 0) {
            local_7a = 0;
            goto LAB_140057bfc;
          }
          std::string::push_back((string *)local_50,(char)iVar17);
          iVar17 = 0;
          bVar2 = bVar18;
        }
        bVar18 = bVar2;
        plVar1 = local_68;
        psVar11 = (short *)local_68[3];
        if ((short *)local_68[2] < psVar11) {
          psVar10 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar10;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar11 = (short *)plVar1[3];
          psVar10 = (short *)plVar1[2];
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar10 < psVar11) {
          sVar7 = *psVar10;
        }
        else {
          sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
        }
        if (sVar7 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar20 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar20)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar8 = *(short *)local_78[2];
          }
          else {
            sVar8 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar8 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar20 = sVar8 == -1;
        }
        cVar5 = cVar4;
        if (bVar20 == (sVar7 == -1)) goto LAB_140057bfc;
        if (local_68 == (longlong *)0x0) {
          uVar13 = 0xffffffff;
        }
        else {
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar13 = (uint)*(ushort *)local_68[2];
          }
          else {
            uVar13 = (**(code **)(*local_68 + 0x48))();
          }
          if ((short)uVar13 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
      } while( true );
    }
    uVar14 = 0;
    bVar18 = 0;
    cVar5 = '\0';
    local_7a = cVar4;
  }
LAB_140057bfc:
  cVar4 = cVar5;
  if (local_50[0][-3] != 0) goto LAB_140057e8d;
LAB_140057c10:
  if ((iVar17 != 0) || (bVar3)) {
LAB_140057ed1:
    if (cVar4 == '\0') {
      if (bVar18 == 0) {
        if (bVar21) {
          uVar14 = -uVar14;
        }
        *param_7 = uVar14;
      }
      else {
        *param_7 = 0xffffffff;
        *param_6 = 4;
      }
      goto LAB_140057c3f;
    }
  }
  goto LAB_140057c23;
LAB_140057e78:
  local_7a = 0;
  if (local_50[0][-3] == 0) goto LAB_140057c10;
LAB_140057e8d:
  std::string::push_back((string *)local_50,(char)iVar17);
  cVar5 = __verify_grouping(*(longlong *)(lVar9 + 0x10),*(longlong *)(lVar9 + 0x18),
                            (undefined8 *)local_50);
  if (cVar5 == '\0') {
    *param_6 = 4;
  }
  if (((iVar17 != 0) || (bVar3)) || (local_50[0][-3] != 0)) goto LAB_140057ed1;
LAB_140057c23:
  *param_7 = 0;
  *param_6 = 4;
LAB_140057c3f:
  if (local_7a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_int<long>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long&) const

undefined8 *
std::num_get<>::_M_extract_int<long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  longlong *plVar1;
  byte bVar2;
  bool bVar3;
  char cVar4;
  char cVar5;
  ushort uVar6;
  short sVar7;
  short sVar8;
  longlong lVar9;
  short *psVar10;
  short *psVar11;
  ulonglong uVar12;
  int iVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  int iVar17;
  byte bVar18;
  uint uVar19;
  bool bVar20;
  ulonglong local_a8;
  byte local_99;
  uint local_94;
  uint local_8c;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar19 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar19 == 0x40) {
    uVar16 = 8;
LAB_1400583b8:
    bVar3 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (bVar3) {
      local_8c = 0;
      uVar14 = 0;
      iVar17 = 0;
      bVar3 = false;
      cVar4 = true;
    }
    else {
LAB_1400583d7:
      uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      uVar14 = (uint)uVar6;
      if ((*(ushort *)(lVar9 + 0x94) == uVar6) || (*(ushort *)(lVar9 + 0x96) == uVar6)) {
        cVar4 = *(char *)(lVar9 + 0x20);
        local_8c = (uint)(*(ushort *)(lVar9 + 0x94) == uVar6);
        if (cVar4 != '\0') {
          if ((*(ushort *)(lVar9 + 0x4a) != uVar6) && (*(ushort *)(lVar9 + 0x48) != uVar6))
          goto LAB_1400586ce;
          goto LAB_140058408;
        }
        if (*(ushort *)(lVar9 + 0x48) == uVar6) goto LAB_140058408;
LAB_1400586ce:
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        cVar4 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (!(bool)cVar4) {
          uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
          uVar14 = (uint)uVar6;
          cVar4 = *(char *)(lVar9 + 0x20);
          goto LAB_140058408;
        }
        iVar17 = 0;
        bVar3 = false;
      }
      else {
        local_8c = 0;
        cVar4 = *(char *)(lVar9 + 0x20);
LAB_140058408:
        iVar17 = 0;
        bVar3 = false;
        while (((plVar1 = local_68, sVar7 = (short)uVar14, cVar4 == '\0' ||
                (*(short *)(lVar9 + 0x4a) != sVar7)) && (*(short *)(lVar9 + 0x48) != sVar7))) {
          if (*(short *)(lVar9 + 0x9c) == sVar7) {
            bVar3 = (bool)(bVar3 ^ 1U | uVar16 == 10);
            if (!bVar3) goto LAB_14005843b;
            bVar20 = uVar16 == 8;
            if (bVar20 || uVar19 == 0) {
              iVar17 = 0;
              uVar16 = 8;
              bVar3 = bVar20 || uVar19 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar3) break;
LAB_14005843b:
            if ((*(short *)(lVar9 + 0x98) != sVar7) && (*(short *)(lVar9 + 0x9a) != sVar7)) {
              cVar4 = false;
              bVar3 = true;
              goto LAB_1400584e4;
            }
            cVar4 = uVar19 == 0 || uVar16 == 0x10;
            if (uVar19 != 0 && uVar16 != 0x10) {
              bVar3 = true;
              goto LAB_1400584ee;
            }
            iVar17 = 0;
            uVar16 = 0x10;
            bVar3 = false;
          }
          if ((short *)local_68[2] < (short *)local_68[3]) {
            psVar11 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar11;
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if (psVar11 < (short *)local_68[3]) goto LAB_1400584a4;
LAB_140058960:
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar11 = (short *)plVar1[2];
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if ((short *)plVar1[3] <= psVar11) goto LAB_140058960;
LAB_1400584a4:
            sVar7 = *psVar11;
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar20 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar20)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar20 = sVar8 == -1;
          }
          if ((sVar7 == -1) == bVar20) {
            cVar4 = true;
            goto LAB_1400584e4;
          }
          uVar14 = 0xffff;
          if (local_68 != (longlong *)0x0) {
            if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
              uVar6 = *(ushort *)local_68[2];
            }
            else {
              uVar6 = (**(code **)(*local_68 + 0x48))();
            }
            uVar14 = (uint)uVar6;
            if (uVar6 == 0xffff) {
              local_68 = (longlong *)0x0;
            }
          }
          if (!bVar3) break;
          cVar4 = *(char *)(lVar9 + 0x20);
        }
        cVar4 = false;
      }
LAB_1400584e4:
      if (uVar16 == 0x10) goto LAB_14005873c;
    }
LAB_1400584ee:
    local_a8 = (ulonglong)(int)uVar16;
    local_94 = uVar16;
  }
  else {
    uVar16 = 10;
    if (uVar19 != 8) goto LAB_1400583b8;
    uVar16 = 0x10;
    cVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!(bool)cVar4) goto LAB_1400583d7;
    local_8c = 0;
    uVar14 = 0;
    iVar17 = 0;
    bVar3 = false;
LAB_14005873c:
    local_94 = 0x10;
    uVar16 = 0x16;
    local_a8 = 0x16;
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar9 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar19 = local_8c + 0x7fffffff;
  local_99 = *(byte *)(lVar9 + 200);
  if (local_99 == 0) {
    bVar18 = 0;
    if ((bool)cVar4 == false) {
      uVar15 = 0;
      do {
        uVar6 = (ushort)uVar14;
        if (local_a8 < 0xb) {
          if ((uVar6 < 0x30) || ((ushort)((short)uVar16 + 0x30U) <= uVar6)) goto LAB_140058898;
LAB_14005857e:
          iVar13 = uVar14 - 0x30;
        }
        else {
          if ((ushort)(uVar6 - 0x30) < 10) goto LAB_14005857e;
          if (5 < (ushort)(uVar6 - 0x61)) goto LAB_140058880;
          iVar13 = uVar14 - 0x57;
        }
        while( true ) {
          plVar1 = local_68;
          if (uVar19 / local_94 < uVar15) {
            bVar18 = 1;
          }
          else {
            uVar14 = uVar15 * local_94;
            uVar15 = uVar14 + iVar13;
            iVar17 = iVar17 + 1;
            bVar18 = bVar18 | uVar19 - iVar13 < uVar14;
          }
          psVar11 = (short *)local_68[3];
          if ((short *)local_68[2] < psVar11) {
            psVar10 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar10;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar10 = (short *)plVar1[2];
            psVar11 = (short *)plVar1[3];
          }
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar10 < psVar11) {
            sVar7 = *psVar10;
          }
          else {
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar20 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar20)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar20 = sVar8 == -1;
          }
          if (bVar20 == (sVar7 == -1)) {
            local_99 = 1;
            cVar5 = cVar4;
            goto LAB_14005861b;
          }
          if (local_68 == (longlong *)0x0) goto LAB_140058898;
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar6 = *(ushort *)local_68[2];
          }
          else {
            uVar6 = (**(code **)(*local_68 + 0x48))();
          }
          uVar14 = (uint)uVar6;
          if (uVar6 != 0xffff) break;
          local_68 = (longlong *)0x0;
          if (local_a8 < 0xb) goto LAB_140058898;
LAB_140058880:
          if (5 < (ushort)((short)uVar14 - 0x41U)) goto LAB_140058898;
          iVar13 = uVar14 - 0x37;
        }
      } while( true );
    }
    uVar15 = 0;
    cVar5 = '\0';
    local_99 = cVar4;
  }
  else {
    if ((bool)cVar4 == false) {
      bVar18 = 0;
      uVar15 = 0;
      do {
        cVar5 = *(char *)(lVar9 + 0x20);
        sVar7 = (short)uVar14;
        if ((cVar5 == '\0') || (*(short *)(lVar9 + 0x4a) != sVar7)) {
          psVar11 = (short *)(lVar9 + 0x9c);
          uVar12 = local_a8;
          if (*(short *)(lVar9 + 0x48) == sVar7 || local_a8 == 0) goto LAB_140058898;
          while (sVar7 != *psVar11) {
            uVar12 = uVar12 - 1;
            psVar11 = psVar11 + 1;
            if (uVar12 == 0) {
              local_99 = 0;
              cVar5 = '\0';
              goto LAB_14005861b;
            }
          }
          iVar13 = (int)((longlong)psVar11 - (lVar9 + 0x9c) >> 1);
          if (0xf < iVar13) {
            iVar13 = iVar13 + -6;
          }
          bVar2 = local_99;
          if (uVar15 <= uVar19 / local_94) {
            uVar16 = uVar15 * local_94;
            uVar15 = uVar16 + iVar13;
            iVar17 = iVar17 + 1;
            bVar2 = bVar18 | uVar19 - iVar13 < uVar16;
          }
        }
        else {
          if (iVar17 == 0) {
            local_99 = 0;
            goto LAB_14005861b;
          }
          std::string::push_back((string *)local_50,(char)iVar17);
          iVar17 = 0;
          bVar2 = bVar18;
        }
        bVar18 = bVar2;
        plVar1 = local_68;
        psVar11 = (short *)local_68[3];
        if ((short *)local_68[2] < psVar11) {
          psVar10 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar10;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar11 = (short *)plVar1[3];
          psVar10 = (short *)plVar1[2];
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar10 < psVar11) {
          sVar7 = *psVar10;
        }
        else {
          sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
        }
        if (sVar7 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar20 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar20)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar8 = *(short *)local_78[2];
          }
          else {
            sVar8 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar8 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar20 = sVar8 == -1;
        }
        cVar5 = cVar4;
        if (bVar20 == (sVar7 == -1)) goto LAB_14005861b;
        if (local_68 == (longlong *)0x0) {
          uVar14 = 0xffffffff;
        }
        else {
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar14 = (uint)*(ushort *)local_68[2];
          }
          else {
            uVar14 = (**(code **)(*local_68 + 0x48))();
          }
          if ((short)uVar14 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
      } while( true );
    }
    uVar15 = 0;
    bVar18 = 0;
    cVar5 = '\0';
    local_99 = cVar4;
  }
LAB_14005861b:
  cVar4 = cVar5;
  if (local_50[0][-3] != 0) goto LAB_1400588ad;
LAB_140058630:
  cVar4 = cVar5;
  if ((iVar17 != 0) || (bVar3)) {
LAB_1400588f1:
    if (cVar4 == '\0') {
      if (bVar18 == 0) {
        uVar19 = -uVar15;
        if ((char)local_8c == '\0') {
          uVar19 = uVar15;
        }
        *param_7 = uVar19;
      }
      else {
        *param_7 = local_8c + 0x7fffffff;
        *param_6 = 4;
      }
      goto LAB_14005865f;
    }
  }
  goto LAB_140058643;
LAB_140058898:
  local_99 = 0;
  cVar5 = cVar4;
  if (local_50[0][-3] == 0) goto LAB_140058630;
LAB_1400588ad:
  std::string::push_back((string *)local_50,(char)iVar17);
  cVar5 = __verify_grouping(*(longlong *)(lVar9 + 0x10),*(longlong *)(lVar9 + 0x18),
                            (undefined8 *)local_50);
  if (cVar5 == '\0') {
    *param_6 = 4;
  }
  if (((iVar17 != 0) || (bVar3)) || (local_50[0][-3] != 0)) goto LAB_1400588f1;
LAB_140058643:
  *param_7 = 0;
  *param_6 = 4;
LAB_14005865f:
  if (local_99 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_extract_int<unsigned
// long>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  longlong *plVar1;
  byte bVar2;
  bool bVar3;
  char cVar4;
  char cVar5;
  ushort uVar6;
  short sVar7;
  short sVar8;
  longlong lVar9;
  short *psVar10;
  short *psVar11;
  ulonglong uVar12;
  uint uVar13;
  uint uVar14;
  uint uVar15;
  uint uVar16;
  int iVar17;
  byte bVar18;
  uint uVar19;
  bool bVar20;
  bool bVar21;
  ulonglong local_a0;
  uint local_80;
  byte local_7a;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar19 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar19 == 0x40) {
    uVar16 = 8;
LAB_140058de8:
    bVar3 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (bVar3) {
      bVar21 = false;
      uVar13 = 0;
      iVar17 = 0;
      bVar3 = false;
      cVar4 = true;
    }
    else {
LAB_140058e07:
      uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      uVar13 = (uint)uVar6;
      if ((*(ushort *)(lVar9 + 0x94) == uVar6) || (*(ushort *)(lVar9 + 0x96) == uVar6)) {
        bVar21 = *(ushort *)(lVar9 + 0x94) == uVar6;
        cVar4 = *(char *)(lVar9 + 0x20);
        if (cVar4 != '\0') {
          if ((*(ushort *)(lVar9 + 0x4a) != uVar6) && (*(ushort *)(lVar9 + 0x48) != uVar6))
          goto LAB_1400590ee;
          goto LAB_140058e38;
        }
        if (*(ushort *)(lVar9 + 0x48) == uVar6) goto LAB_140058e38;
LAB_1400590ee:
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        cVar4 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (!(bool)cVar4) {
          uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
          uVar13 = (uint)uVar6;
          cVar4 = *(char *)(lVar9 + 0x20);
          goto LAB_140058e38;
        }
        iVar17 = 0;
        bVar3 = false;
      }
      else {
        bVar21 = false;
        cVar4 = *(char *)(lVar9 + 0x20);
LAB_140058e38:
        iVar17 = 0;
        bVar3 = false;
        while (((plVar1 = local_68, sVar7 = (short)uVar13, cVar4 == '\0' ||
                (*(short *)(lVar9 + 0x4a) != sVar7)) && (*(short *)(lVar9 + 0x48) != sVar7))) {
          if (*(short *)(lVar9 + 0x9c) == sVar7) {
            bVar3 = (bool)(bVar3 ^ 1U | uVar16 == 10);
            if (!bVar3) goto LAB_140058e6b;
            bVar20 = uVar16 == 8;
            if (bVar20 || uVar19 == 0) {
              iVar17 = 0;
              uVar16 = 8;
              bVar3 = bVar20 || uVar19 == 0;
            }
            else {
              iVar17 = iVar17 + 1;
            }
          }
          else {
            if (!bVar3) break;
LAB_140058e6b:
            if ((*(short *)(lVar9 + 0x98) != sVar7) && (*(short *)(lVar9 + 0x9a) != sVar7)) {
              cVar4 = false;
              bVar3 = true;
              goto LAB_140058f14;
            }
            cVar4 = uVar19 == 0 || uVar16 == 0x10;
            if (uVar19 != 0 && uVar16 != 0x10) {
              bVar3 = true;
              goto LAB_140058f1e;
            }
            iVar17 = 0;
            uVar16 = 0x10;
            bVar3 = false;
          }
          if ((short *)local_68[2] < (short *)local_68[3]) {
            psVar11 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar11;
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if (psVar11 < (short *)local_68[3]) goto LAB_140058ed4;
LAB_140059370:
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar11 = (short *)plVar1[2];
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if ((short *)plVar1[3] <= psVar11) goto LAB_140059370;
LAB_140058ed4:
            sVar7 = *psVar11;
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar20 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar20)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar20 = sVar8 == -1;
          }
          if (bVar20 == (sVar7 == -1)) {
            cVar4 = true;
            goto LAB_140058f14;
          }
          uVar13 = 0xffff;
          if (local_68 != (longlong *)0x0) {
            if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
              uVar6 = *(ushort *)local_68[2];
            }
            else {
              uVar6 = (**(code **)(*local_68 + 0x48))();
            }
            uVar13 = (uint)uVar6;
            if (uVar6 == 0xffff) {
              local_68 = (longlong *)0x0;
            }
          }
          if (!bVar3) break;
          cVar4 = *(char *)(lVar9 + 0x20);
        }
        cVar4 = false;
      }
LAB_140058f14:
      if (uVar16 == 0x10) goto LAB_14005915c;
    }
LAB_140058f1e:
    local_a0 = (ulonglong)(int)uVar16;
    local_80 = uVar16;
  }
  else {
    uVar16 = 10;
    if (uVar19 != 8) goto LAB_140058de8;
    uVar16 = 0x10;
    cVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!(bool)cVar4) goto LAB_140058e07;
    bVar21 = false;
    uVar13 = 0;
    iVar17 = 0;
    bVar3 = false;
LAB_14005915c:
    local_80 = 0x10;
    uVar16 = 0x16;
    local_a0 = 0x16;
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar9 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar19 = (uint)(0xffffffff / (ulonglong)local_80);
  local_7a = *(byte *)(lVar9 + 200);
  if (local_7a == 0) {
    bVar18 = 0;
    if ((bool)cVar4 == false) {
      uVar14 = 0;
      do {
        uVar6 = (ushort)uVar13;
        if (local_a0 < 0xb) {
          if ((uVar6 < 0x30) || ((ushort)((short)uVar16 + 0x30U) <= uVar6)) goto LAB_1400592b8;
LAB_140058fa5:
          uVar13 = uVar13 - 0x30;
        }
        else {
          if ((ushort)(uVar6 - 0x30) < 10) goto LAB_140058fa5;
          if (5 < (ushort)(uVar6 - 0x61)) goto LAB_1400592a0;
          uVar13 = uVar13 - 0x57;
        }
        while( true ) {
          plVar1 = local_68;
          if (uVar19 < uVar14) {
            bVar18 = 1;
          }
          else {
            uVar15 = uVar14 * local_80;
            uVar14 = uVar13 + uVar15;
            iVar17 = iVar17 + 1;
            bVar18 = bVar18 | CARRY4(uVar13,uVar15);
          }
          psVar11 = (short *)local_68[3];
          if ((short *)local_68[2] < psVar11) {
            psVar10 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar10;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar10 = (short *)plVar1[2];
            psVar11 = (short *)plVar1[3];
          }
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar10 < psVar11) {
            sVar7 = *psVar10;
          }
          else {
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar20 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar20)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar20 = sVar8 == -1;
          }
          if (bVar20 == (sVar7 == -1)) {
            local_7a = 1;
            cVar5 = cVar4;
            goto LAB_14005903c;
          }
          if (local_68 == (longlong *)0x0) goto LAB_1400592b8;
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar6 = *(ushort *)local_68[2];
          }
          else {
            uVar6 = (**(code **)(*local_68 + 0x48))();
          }
          uVar13 = (uint)uVar6;
          if (uVar6 != 0xffff) break;
          local_68 = (longlong *)0x0;
          if (local_a0 < 0xb) goto LAB_1400592b8;
LAB_1400592a0:
          if (5 < (ushort)((short)uVar13 - 0x41U)) goto LAB_1400592b8;
          uVar13 = uVar13 - 0x37;
        }
      } while( true );
    }
    uVar14 = 0;
    cVar5 = '\0';
    local_7a = cVar4;
  }
  else {
    if ((bool)cVar4 == false) {
      bVar18 = 0;
      uVar14 = 0;
      do {
        cVar5 = *(char *)(lVar9 + 0x20);
        sVar7 = (short)uVar13;
        if ((cVar5 == '\0') || (*(short *)(lVar9 + 0x4a) != sVar7)) {
          psVar11 = (short *)(lVar9 + 0x9c);
          uVar12 = local_a0;
          if (*(short *)(lVar9 + 0x48) == sVar7 || local_a0 == 0) goto LAB_1400592b8;
          while (sVar7 != *psVar11) {
            uVar12 = uVar12 - 1;
            psVar11 = psVar11 + 1;
            if (uVar12 == 0) {
              local_7a = 0;
              cVar5 = '\0';
              goto LAB_14005903c;
            }
          }
          uVar16 = (uint)((longlong)psVar11 - (lVar9 + 0x9c) >> 1);
          if (0xf < (int)uVar16) {
            uVar16 = uVar16 - 6;
          }
          bVar2 = local_7a;
          if (uVar14 <= uVar19) {
            uVar13 = uVar14 * local_80;
            uVar14 = uVar16 + uVar13;
            iVar17 = iVar17 + 1;
            bVar2 = bVar18 | CARRY4(uVar16,uVar13);
          }
        }
        else {
          if (iVar17 == 0) {
            local_7a = 0;
            goto LAB_14005903c;
          }
          std::string::push_back((string *)local_50,(char)iVar17);
          iVar17 = 0;
          bVar2 = bVar18;
        }
        bVar18 = bVar2;
        plVar1 = local_68;
        psVar11 = (short *)local_68[3];
        if ((short *)local_68[2] < psVar11) {
          psVar10 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar10;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar11 = (short *)plVar1[3];
          psVar10 = (short *)plVar1[2];
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar10 < psVar11) {
          sVar7 = *psVar10;
        }
        else {
          sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
        }
        if (sVar7 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar20 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar20)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar8 = *(short *)local_78[2];
          }
          else {
            sVar8 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar8 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar20 = sVar8 == -1;
        }
        cVar5 = cVar4;
        if (bVar20 == (sVar7 == -1)) goto LAB_14005903c;
        if (local_68 == (longlong *)0x0) {
          uVar13 = 0xffffffff;
        }
        else {
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar13 = (uint)*(ushort *)local_68[2];
          }
          else {
            uVar13 = (**(code **)(*local_68 + 0x48))();
          }
          if ((short)uVar13 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
      } while( true );
    }
    uVar14 = 0;
    bVar18 = 0;
    cVar5 = '\0';
    local_7a = cVar4;
  }
LAB_14005903c:
  cVar4 = cVar5;
  if (local_50[0][-3] != 0) goto LAB_1400592cd;
LAB_140059050:
  if ((iVar17 != 0) || (bVar3)) {
LAB_140059311:
    if (cVar4 == '\0') {
      if (bVar18 == 0) {
        if (bVar21) {
          uVar14 = -uVar14;
        }
        *param_7 = uVar14;
      }
      else {
        *param_7 = 0xffffffff;
        *param_6 = 4;
      }
      goto LAB_14005907f;
    }
  }
  goto LAB_140059063;
LAB_1400592b8:
  local_7a = 0;
  if (local_50[0][-3] == 0) goto LAB_140059050;
LAB_1400592cd:
  std::string::push_back((string *)local_50,(char)iVar17);
  cVar5 = __verify_grouping(*(longlong *)(lVar9 + 0x10),*(longlong *)(lVar9 + 0x18),
                            (undefined8 *)local_50);
  if (cVar5 == '\0') {
    *param_6 = 4;
  }
  if (((iVar17 != 0) || (bVar3)) || (local_50[0][-3] != 0)) goto LAB_140059311;
LAB_140059063:
  *param_7 = 0;
  *param_6 = 4;
LAB_14005907f:
  if (local_7a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_extract_int<unsigned
// short>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ushort *param_7)

{
  byte bVar1;
  longlong *plVar2;
  byte bVar3;
  bool bVar4;
  char cVar5;
  char cVar6;
  ushort uVar7;
  short sVar8;
  short sVar9;
  ushort uVar10;
  longlong lVar11;
  short *psVar12;
  short *psVar13;
  ulonglong uVar14;
  int iVar15;
  uint uVar16;
  int iVar17;
  int iVar18;
  int iVar19;
  byte bVar20;
  uint uVar21;
  bool bVar22;
  bool bVar23;
  ulonglong local_a0;
  ushort local_94;
  int local_80;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar11 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                     ((longlong *)(param_5 + 0xd0));
  uVar21 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar21 == 0x40) {
    iVar18 = 8;
LAB_1400597f8:
    bVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (bVar4) {
      bVar23 = false;
      uVar16 = 0;
      iVar19 = 0;
      bVar4 = false;
      cVar5 = true;
    }
    else {
LAB_140059817:
      uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      uVar16 = (uint)uVar7;
      if ((*(ushort *)(lVar11 + 0x94) == uVar7) || (*(ushort *)(lVar11 + 0x96) == uVar7)) {
        bVar23 = *(ushort *)(lVar11 + 0x94) == uVar7;
        cVar5 = *(char *)(lVar11 + 0x20);
        if (cVar5 != '\0') {
          if ((*(ushort *)(lVar11 + 0x4a) != uVar7) && (*(ushort *)(lVar11 + 0x48) != uVar7))
          goto LAB_140059b0e;
          goto LAB_140059848;
        }
        if (*(ushort *)(lVar11 + 0x48) == uVar7) goto LAB_140059848;
LAB_140059b0e:
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        cVar5 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (!(bool)cVar5) {
          uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
          uVar16 = (uint)uVar7;
          cVar5 = *(char *)(lVar11 + 0x20);
          goto LAB_140059848;
        }
        iVar19 = 0;
        bVar4 = false;
      }
      else {
        bVar23 = false;
        cVar5 = *(char *)(lVar11 + 0x20);
LAB_140059848:
        iVar19 = 0;
        bVar4 = false;
        while (((plVar2 = local_68, sVar8 = (short)uVar16, cVar5 == '\0' ||
                (*(short *)(lVar11 + 0x4a) != sVar8)) && (*(short *)(lVar11 + 0x48) != sVar8))) {
          if (*(short *)(lVar11 + 0x9c) == sVar8) {
            bVar4 = (bool)(bVar4 ^ 1U | iVar18 == 10);
            if (!bVar4) goto LAB_14005987b;
            bVar22 = iVar18 == 8;
            if (bVar22 || uVar21 == 0) {
              iVar19 = 0;
              iVar18 = 8;
              bVar4 = bVar22 || uVar21 == 0;
            }
            else {
              iVar19 = iVar19 + 1;
            }
          }
          else {
            if (!bVar4) break;
LAB_14005987b:
            if ((*(short *)(lVar11 + 0x98) != sVar8) && (*(short *)(lVar11 + 0x9a) != sVar8)) {
              cVar5 = false;
              bVar4 = true;
              goto LAB_140059924;
            }
            cVar5 = uVar21 == 0 || iVar18 == 0x10;
            if (uVar21 != 0 && iVar18 != 0x10) {
              bVar4 = true;
              goto LAB_14005992e;
            }
            iVar19 = 0;
            iVar18 = 0x10;
            bVar4 = false;
          }
          if ((short *)local_68[2] < (short *)local_68[3]) {
            psVar13 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar13;
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if (psVar13 < (short *)local_68[3]) goto LAB_1400598e4;
LAB_140059da0:
            sVar8 = (**(code **)(*plVar2 + 0x48))(plVar2);
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar13 = (short *)plVar2[2];
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if ((short *)plVar2[3] <= psVar13) goto LAB_140059da0;
LAB_1400598e4:
            sVar8 = *psVar13;
          }
          if (sVar8 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar22 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar22)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar9 = *(short *)local_78[2];
            }
            else {
              sVar9 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar9 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar22 = sVar9 == -1;
          }
          if (bVar22 == (sVar8 == -1)) {
            cVar5 = true;
            goto LAB_140059924;
          }
          uVar16 = 0xffff;
          if (local_68 != (longlong *)0x0) {
            if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
              uVar7 = *(ushort *)local_68[2];
            }
            else {
              uVar7 = (**(code **)(*local_68 + 0x48))();
            }
            uVar16 = (uint)uVar7;
            if (uVar7 == 0xffff) {
              local_68 = (longlong *)0x0;
            }
          }
          if (!bVar4) break;
          cVar5 = *(char *)(lVar11 + 0x20);
        }
        cVar5 = false;
      }
LAB_140059924:
      if (iVar18 == 0x10) goto LAB_140059b7e;
    }
LAB_14005992e:
    local_a0 = (ulonglong)iVar18;
    local_80 = iVar18;
  }
  else {
    iVar18 = 10;
    if (uVar21 != 8) goto LAB_1400597f8;
    iVar18 = 0x10;
    cVar5 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!(bool)cVar5) goto LAB_140059817;
    bVar23 = false;
    uVar16 = 0;
    iVar19 = 0;
    bVar4 = false;
LAB_140059b7e:
    local_80 = 0x10;
    iVar18 = 0x16;
    local_a0 = 0x16;
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar11 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  bVar1 = *(byte *)(lVar11 + 200);
  local_94 = (ushort)(0xffff / (ulonglong)(longlong)local_80);
  if (bVar1 == 0) {
    bVar20 = 0;
    if ((bool)cVar5 == false) {
      iVar17 = 0;
      do {
        uVar7 = (ushort)iVar17;
        uVar10 = (ushort)uVar16;
        if (local_a0 < 0xb) {
          if ((uVar10 < 0x30) || ((ushort)((short)iVar18 + 0x30U) <= uVar10)) goto LAB_140059cd8;
LAB_1400599c1:
          iVar15 = uVar16 - 0x30;
        }
        else {
          if ((ushort)(uVar10 - 0x30) < 10) goto LAB_1400599c1;
          if (5 < (ushort)(uVar10 - 0x61)) goto LAB_140059cc0;
          iVar15 = uVar16 - 0x57;
        }
        while( true ) {
          plVar2 = local_68;
          if (local_94 < (ushort)iVar17) {
            bVar20 = 1;
          }
          else {
            uVar7 = (ushort)iVar17 * (short)local_80;
            iVar17 = (uint)uVar7 + iVar15;
            iVar19 = iVar19 + 1;
            bVar20 = bVar20 | 0xffff - iVar15 < (int)(uint)uVar7;
          }
          uVar7 = (ushort)iVar17;
          psVar13 = (short *)local_68[3];
          if ((short *)local_68[2] < psVar13) {
            psVar12 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar12;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar12 = (short *)plVar2[2];
            psVar13 = (short *)plVar2[3];
          }
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar12 < psVar13) {
            sVar8 = *psVar12;
          }
          else {
            sVar8 = (**(code **)(*plVar2 + 0x48))(plVar2);
          }
          if (sVar8 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar22 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar22)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar9 = *(short *)local_78[2];
            }
            else {
              sVar9 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar9 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar22 = sVar9 == -1;
          }
          if (bVar22 == (sVar8 == -1)) {
            cVar6 = cVar5;
            bVar1 = 1;
            goto LAB_140059a5e;
          }
          if (local_68 == (longlong *)0x0) goto LAB_140059cd8;
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar10 = *(ushort *)local_68[2];
          }
          else {
            uVar10 = (**(code **)(*local_68 + 0x48))();
          }
          uVar16 = (uint)uVar10;
          if (uVar10 != 0xffff) break;
          local_68 = (longlong *)0x0;
          if (local_a0 < 0xb) goto LAB_140059cd8;
LAB_140059cc0:
          uVar7 = (ushort)iVar17;
          if (5 < (ushort)((short)uVar16 - 0x41U)) goto LAB_140059cd8;
          iVar15 = uVar16 - 0x37;
        }
      } while( true );
    }
    uVar7 = 0;
    cVar6 = '\0';
    bVar1 = cVar5;
  }
  else {
    if ((bool)cVar5 == false) {
      bVar20 = 0;
      iVar18 = 0;
      do {
        uVar7 = (ushort)iVar18;
        cVar6 = *(char *)(lVar11 + 0x20);
        sVar8 = (short)uVar16;
        if ((cVar6 == '\0') || (*(short *)(lVar11 + 0x4a) != sVar8)) {
          psVar13 = (short *)(lVar11 + 0x9c);
          uVar14 = local_a0;
          if (*(short *)(lVar11 + 0x48) == sVar8 || local_a0 == 0) goto LAB_140059cd8;
          while (sVar8 != *psVar13) {
            uVar14 = uVar14 - 1;
            psVar13 = psVar13 + 1;
            if (uVar14 == 0) {
              cVar6 = '\0';
              bVar1 = 0;
              goto LAB_140059a5e;
            }
          }
          iVar17 = (int)((longlong)psVar13 - (lVar11 + 0x9c) >> 1);
          if (0xf < iVar17) {
            iVar17 = iVar17 + -6;
          }
          bVar3 = bVar1;
          if (uVar7 <= local_94) {
            iVar18 = (uint)(ushort)(uVar7 * (short)local_80) + iVar17;
            iVar19 = iVar19 + 1;
            bVar3 = bVar20 | 0xffff - iVar17 < (int)(uint)(ushort)(uVar7 * (short)local_80);
          }
        }
        else {
          if (iVar19 == 0) {
            bVar1 = 0;
            goto LAB_140059a5e;
          }
          std::string::push_back((string *)local_50,(char)iVar19);
          iVar19 = 0;
          bVar3 = bVar20;
        }
        bVar20 = bVar3;
        plVar2 = local_68;
        uVar7 = (ushort)iVar18;
        psVar13 = (short *)local_68[3];
        if ((short *)local_68[2] < psVar13) {
          psVar12 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar12;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar12 = (short *)plVar2[2];
          psVar13 = (short *)plVar2[3];
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar12 < psVar13) {
          sVar8 = *psVar12;
        }
        else {
          sVar8 = (**(code **)(*plVar2 + 0x48))(plVar2);
        }
        if (sVar8 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar22 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar22)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar9 = *(short *)local_78[2];
          }
          else {
            sVar9 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar9 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar22 = sVar9 == -1;
        }
        cVar6 = cVar5;
        if (bVar22 == (sVar8 == -1)) goto LAB_140059a5e;
        if (local_68 == (longlong *)0x0) {
          uVar16 = 0xffffffff;
        }
        else {
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar16 = (uint)*(ushort *)local_68[2];
          }
          else {
            uVar16 = (**(code **)(*local_68 + 0x48))();
          }
          if ((short)uVar16 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
      } while( true );
    }
    uVar7 = 0;
    bVar20 = 0;
    cVar6 = '\0';
    bVar1 = cVar5;
  }
LAB_140059a5e:
  cVar5 = cVar6;
  if (local_50[0][-3] != 0) goto LAB_140059ced;
LAB_140059a70:
  if ((iVar19 != 0) || (bVar4)) {
LAB_140059d31:
    if (cVar5 == '\0') {
      if (bVar20 == 0) {
        if (bVar23) {
          uVar7 = -uVar7;
        }
        *param_7 = uVar7;
      }
      else {
        *param_7 = 0xffff;
        *param_6 = 4;
      }
      goto LAB_140059aa0;
    }
  }
  goto LAB_140059a83;
LAB_140059cd8:
  bVar1 = 0;
  if (local_50[0][-3] == 0) goto LAB_140059a70;
LAB_140059ced:
  std::string::push_back((string *)local_50,(char)iVar19);
  cVar6 = __verify_grouping(*(longlong *)(lVar11 + 0x10),*(longlong *)(lVar11 + 0x18),
                            (undefined8 *)local_50);
  if (cVar6 == '\0') {
    *param_6 = 4;
  }
  if (((iVar19 != 0) || (bVar4)) || (local_50[0][-3] != 0)) goto LAB_140059d31;
LAB_140059a83:
  *param_7 = 0;
  *param_6 = 4;
LAB_140059aa0:
  if (bVar1 != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_extract_int<long
// long>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::_M_extract_int<long_long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  longlong *plVar1;
  byte bVar2;
  bool bVar3;
  char cVar4;
  char cVar5;
  ushort uVar6;
  short sVar7;
  short sVar8;
  longlong lVar9;
  ulonglong uVar10;
  short *psVar11;
  short *psVar12;
  ulonglong uVar13;
  int iVar14;
  uint uVar15;
  ulonglong uVar16;
  ulonglong uVar17;
  int iVar18;
  int iVar19;
  byte bVar20;
  uint uVar21;
  bool bVar22;
  ulonglong local_b0;
  byte local_8a;
  bool local_89;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  uVar21 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar21 == 0x40) {
    iVar18 = 8;
LAB_14005a238:
    bVar3 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (bVar3) {
      local_89 = false;
      uVar15 = 0;
      iVar19 = 0;
      bVar3 = false;
      cVar4 = true;
    }
    else {
LAB_14005a257:
      uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      uVar15 = (uint)uVar6;
      if ((*(ushort *)(lVar9 + 0x94) == uVar6) || (*(ushort *)(lVar9 + 0x96) == uVar6)) {
        local_89 = *(ushort *)(lVar9 + 0x94) == uVar6;
        cVar4 = *(char *)(lVar9 + 0x20);
        if (cVar4 != '\0') {
          if ((*(ushort *)(lVar9 + 0x4a) != uVar6) && (*(ushort *)(lVar9 + 0x48) != uVar6))
          goto LAB_14005a56e;
          goto LAB_14005a288;
        }
        if (*(ushort *)(lVar9 + 0x48) == uVar6) goto LAB_14005a288;
LAB_14005a56e:
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        cVar4 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (!(bool)cVar4) {
          uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
          uVar15 = (uint)uVar6;
          cVar4 = *(char *)(lVar9 + 0x20);
          goto LAB_14005a288;
        }
        iVar19 = 0;
        bVar3 = false;
      }
      else {
        local_89 = false;
        cVar4 = *(char *)(lVar9 + 0x20);
LAB_14005a288:
        iVar19 = 0;
        bVar3 = false;
        while (((plVar1 = local_68, sVar7 = (short)uVar15, cVar4 == '\0' ||
                (*(short *)(lVar9 + 0x4a) != sVar7)) && (*(short *)(lVar9 + 0x48) != sVar7))) {
          if (*(short *)(lVar9 + 0x9c) == sVar7) {
            bVar3 = (bool)(bVar3 ^ 1U | iVar18 == 10);
            if (!bVar3) goto LAB_14005a2bb;
            bVar22 = iVar18 == 8;
            if (bVar22 || uVar21 == 0) {
              iVar19 = 0;
              iVar18 = 8;
              bVar3 = bVar22 || uVar21 == 0;
            }
            else {
              iVar19 = iVar19 + 1;
            }
          }
          else {
            if (!bVar3) break;
LAB_14005a2bb:
            if ((*(short *)(lVar9 + 0x98) != sVar7) && (*(short *)(lVar9 + 0x9a) != sVar7)) {
              cVar4 = false;
              bVar3 = true;
              goto LAB_14005a364;
            }
            cVar4 = uVar21 == 0 || iVar18 == 0x10;
            if (uVar21 != 0 && iVar18 != 0x10) {
              bVar3 = true;
              goto LAB_14005a36e;
            }
            iVar19 = 0;
            iVar18 = 0x10;
            bVar3 = false;
          }
          if ((short *)local_68[2] < (short *)local_68[3]) {
            psVar12 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar12;
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if (psVar12 < (short *)local_68[3]) goto LAB_14005a324;
LAB_14005a820:
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar12 = (short *)plVar1[2];
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if ((short *)plVar1[3] <= psVar12) goto LAB_14005a820;
LAB_14005a324:
            sVar7 = *psVar12;
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar22 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar22)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar22 = sVar8 == -1;
          }
          if ((sVar7 == -1) == bVar22) {
            cVar4 = true;
            goto LAB_14005a364;
          }
          uVar15 = 0xffff;
          if (local_68 != (longlong *)0x0) {
            if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
              uVar6 = *(ushort *)local_68[2];
            }
            else {
              uVar6 = (**(code **)(*local_68 + 0x48))();
            }
            uVar15 = (uint)uVar6;
            if (uVar6 == 0xffff) {
              local_68 = (longlong *)0x0;
            }
          }
          if (!bVar3) break;
          cVar4 = *(char *)(lVar9 + 0x20);
        }
        cVar4 = false;
      }
LAB_14005a364:
      if (iVar18 == 0x10) goto LAB_14005a5dc;
    }
LAB_14005a36e:
    local_b0 = (ulonglong)iVar18;
    iVar14 = iVar18;
  }
  else {
    iVar18 = 10;
    if (uVar21 != 8) goto LAB_14005a238;
    iVar18 = 0x10;
    cVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!(bool)cVar4) goto LAB_14005a257;
    local_89 = false;
    uVar15 = 0;
    iVar19 = 0;
    bVar3 = false;
LAB_14005a5dc:
    local_b0 = 0x16;
    iVar14 = 0x10;
    iVar18 = 0x16;
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar9 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar13 = (ulonglong)iVar14;
  uVar10 = (ulonglong)local_89 + 0x7fffffffffffffff;
  local_8a = *(byte *)(lVar9 + 200);
  if (local_8a == 0) {
    bVar20 = 0;
    if ((bool)cVar4 == false) {
      uVar17 = 0;
      do {
        uVar6 = (ushort)uVar15;
        if (local_b0 < 0xb) {
          if ((uVar6 < 0x30) || ((ushort)((short)iVar18 + 0x30U) <= uVar6)) goto LAB_14005a738;
LAB_14005a413:
          iVar14 = uVar15 - 0x30;
        }
        else {
          if ((ushort)(uVar6 - 0x30) < 10) goto LAB_14005a413;
          if (5 < (ushort)(uVar6 - 0x61)) goto LAB_14005a720;
          iVar14 = uVar15 - 0x57;
        }
        while( true ) {
          plVar1 = local_68;
          if (uVar10 / uVar13 < uVar17) {
            bVar20 = 1;
          }
          else {
            uVar16 = uVar17 * uVar13;
            uVar17 = uVar16 + (longlong)iVar14;
            iVar19 = iVar19 + 1;
            bVar20 = bVar20 | uVar10 - (longlong)iVar14 < uVar16;
          }
          psVar12 = (short *)local_68[3];
          if ((short *)local_68[2] < psVar12) {
            psVar11 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar11;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar11 = (short *)plVar1[2];
            psVar12 = (short *)plVar1[3];
          }
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar11 < psVar12) {
            sVar7 = *psVar11;
          }
          else {
            sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar22 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar22)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar8 = *(short *)local_78[2];
            }
            else {
              sVar8 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar8 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar22 = sVar8 == -1;
          }
          if (bVar22 == (sVar7 == -1)) {
            local_8a = 1;
            cVar5 = cVar4;
            goto LAB_14005a4b6;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14005a738;
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar6 = *(ushort *)local_68[2];
          }
          else {
            uVar6 = (**(code **)(*local_68 + 0x48))();
          }
          uVar15 = (uint)uVar6;
          if (uVar6 != 0xffff) break;
          local_68 = (longlong *)0x0;
          if (local_b0 < 0xb) goto LAB_14005a738;
LAB_14005a720:
          if (5 < (ushort)((short)uVar15 - 0x41U)) goto LAB_14005a738;
          iVar14 = uVar15 - 0x37;
        }
      } while( true );
    }
    uVar17 = 0;
    cVar5 = '\0';
    local_8a = cVar4;
  }
  else {
    if ((bool)cVar4 == false) {
      bVar20 = 0;
      uVar17 = 0;
      do {
        cVar5 = *(char *)(lVar9 + 0x20);
        sVar7 = (short)uVar15;
        if ((cVar5 == '\0') || (*(short *)(lVar9 + 0x4a) != sVar7)) {
          psVar12 = (short *)(lVar9 + 0x9c);
          uVar16 = local_b0;
          if (*(short *)(lVar9 + 0x48) == sVar7 || local_b0 == 0) goto LAB_14005a738;
          while (sVar7 != *psVar12) {
            uVar16 = uVar16 - 1;
            psVar12 = psVar12 + 1;
            if (uVar16 == 0) {
              local_8a = 0;
              cVar5 = '\0';
              goto LAB_14005a4b6;
            }
          }
          iVar18 = (int)((longlong)psVar12 - (lVar9 + 0x9c) >> 1);
          if (0xf < iVar18) {
            iVar18 = iVar18 + -6;
          }
          bVar2 = local_8a;
          if (uVar17 <= uVar10 / uVar13) {
            uVar16 = uVar17 * uVar13;
            uVar17 = uVar16 + (longlong)iVar18;
            iVar19 = iVar19 + 1;
            bVar2 = bVar20 | uVar10 - (longlong)iVar18 < uVar16;
          }
        }
        else {
          if (iVar19 == 0) {
            local_8a = 0;
            goto LAB_14005a4b6;
          }
          std::string::push_back((string *)local_50,(char)iVar19);
          iVar19 = 0;
          bVar2 = bVar20;
        }
        bVar20 = bVar2;
        plVar1 = local_68;
        psVar12 = (short *)local_68[3];
        if ((short *)local_68[2] < psVar12) {
          psVar11 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar11;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar12 = (short *)plVar1[3];
          psVar11 = (short *)plVar1[2];
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar11 < psVar12) {
          sVar7 = *psVar11;
        }
        else {
          sVar7 = (**(code **)(*plVar1 + 0x48))(plVar1);
        }
        if (sVar7 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar22 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar22)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar8 = *(short *)local_78[2];
          }
          else {
            sVar8 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar8 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar22 = sVar8 == -1;
        }
        cVar5 = cVar4;
        if (bVar22 == (sVar7 == -1)) goto LAB_14005a4b6;
        if (local_68 == (longlong *)0x0) {
          uVar15 = 0xffffffff;
        }
        else {
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar15 = (uint)*(ushort *)local_68[2];
          }
          else {
            uVar15 = (**(code **)(*local_68 + 0x48))();
          }
          if ((short)uVar15 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
      } while( true );
    }
    uVar17 = 0;
    bVar20 = 0;
    cVar5 = '\0';
    local_8a = cVar4;
  }
LAB_14005a4b6:
  cVar4 = cVar5;
  if (local_50[0][-3] != 0) goto LAB_14005a750;
LAB_14005a4d0:
  if ((iVar19 != 0) || (bVar3)) {
LAB_14005a79a:
    if (cVar4 == '\0') {
      if (bVar20 == 0) {
        uVar10 = -uVar17;
        if (local_89 == false) {
          uVar10 = uVar17;
        }
        *param_7 = uVar10;
      }
      else {
        uVar10 = 0x7fffffffffffffff;
        if (local_89 != false) {
          uVar10 = 0x8000000000000000;
        }
        *param_7 = uVar10;
        *param_6 = 4;
      }
      goto LAB_14005a500;
    }
  }
  goto LAB_14005a4e3;
LAB_14005a738:
  local_8a = 0;
  if (local_50[0][-3] == 0) goto LAB_14005a4d0;
LAB_14005a750:
  std::string::push_back((string *)local_50,(char)iVar19);
  cVar5 = __verify_grouping(*(longlong *)(lVar9 + 0x10),*(longlong *)(lVar9 + 0x18),
                            (undefined8 *)local_50);
  if (cVar5 == '\0') {
    *param_6 = 4;
  }
  if (((iVar19 != 0) || (bVar3)) || (local_50[0][-3] != 0)) goto LAB_14005a79a;
LAB_14005a4e3:
  *param_7 = 0;
  *param_6 = 4;
LAB_14005a500:
  if (local_8a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_extract_int<unsigned long
// long>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::_M_extract_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined1 auVar1 [16];
  longlong *plVar2;
  byte bVar3;
  bool bVar4;
  char cVar5;
  char cVar6;
  ushort uVar7;
  short sVar8;
  short sVar9;
  longlong lVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  short *psVar13;
  short *psVar14;
  ulonglong uVar15;
  int iVar16;
  uint uVar17;
  ulonglong uVar18;
  int iVar19;
  int iVar20;
  byte bVar21;
  uint uVar22;
  bool bVar23;
  bool bVar24;
  ulonglong local_a8;
  byte local_7a;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar10 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                     ((longlong *)(param_5 + 0xd0));
  uVar22 = *(uint *)(param_5 + 0x18) & 0x4a;
  if (uVar22 == 0x40) {
    iVar19 = 8;
LAB_14005acc8:
    bVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (bVar4) {
      bVar24 = false;
      uVar17 = 0;
      iVar20 = 0;
      bVar4 = false;
      cVar5 = true;
    }
    else {
LAB_14005ace7:
      uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      uVar17 = (uint)uVar7;
      if ((*(ushort *)(lVar10 + 0x94) == uVar7) || (*(ushort *)(lVar10 + 0x96) == uVar7)) {
        bVar24 = *(ushort *)(lVar10 + 0x94) == uVar7;
        cVar5 = *(char *)(lVar10 + 0x20);
        if (cVar5 != '\0') {
          if ((*(ushort *)(lVar10 + 0x4a) != uVar7) && (*(ushort *)(lVar10 + 0x48) != uVar7))
          goto LAB_14005afde;
          goto LAB_14005ad18;
        }
        if (*(ushort *)(lVar10 + 0x48) == uVar7) goto LAB_14005ad18;
LAB_14005afde:
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        cVar5 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (!(bool)cVar5) {
          uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
          uVar17 = (uint)uVar7;
          cVar5 = *(char *)(lVar10 + 0x20);
          goto LAB_14005ad18;
        }
        iVar20 = 0;
        bVar4 = false;
      }
      else {
        bVar24 = false;
        cVar5 = *(char *)(lVar10 + 0x20);
LAB_14005ad18:
        iVar20 = 0;
        bVar4 = false;
        while (((plVar2 = local_68, sVar8 = (short)uVar17, cVar5 == '\0' ||
                (*(short *)(lVar10 + 0x4a) != sVar8)) && (*(short *)(lVar10 + 0x48) != sVar8))) {
          if (*(short *)(lVar10 + 0x9c) == sVar8) {
            bVar4 = (bool)(bVar4 ^ 1U | iVar19 == 10);
            if (!bVar4) goto LAB_14005ad4b;
            bVar23 = iVar19 == 8;
            if (bVar23 || uVar22 == 0) {
              iVar20 = 0;
              iVar19 = 8;
              bVar4 = bVar23 || uVar22 == 0;
            }
            else {
              iVar20 = iVar20 + 1;
            }
          }
          else {
            if (!bVar4) break;
LAB_14005ad4b:
            if ((*(short *)(lVar10 + 0x98) != sVar8) && (*(short *)(lVar10 + 0x9a) != sVar8)) {
              cVar5 = false;
              bVar4 = true;
              goto LAB_14005adf4;
            }
            cVar5 = uVar22 == 0 || iVar19 == 0x10;
            if (uVar22 != 0 && iVar19 != 0x10) {
              bVar4 = true;
              goto LAB_14005adfe;
            }
            iVar20 = 0;
            iVar19 = 0x10;
            bVar4 = false;
          }
          if ((short *)local_68[2] < (short *)local_68[3]) {
            psVar14 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar14;
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if (psVar14 < (short *)local_68[3]) goto LAB_14005adb4;
LAB_14005b260:
            sVar8 = (**(code **)(*plVar2 + 0x48))(plVar2);
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar14 = (short *)plVar2[2];
            uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
            if ((short *)plVar2[3] <= psVar14) goto LAB_14005b260;
LAB_14005adb4:
            sVar8 = *psVar14;
          }
          if (sVar8 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar23 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar23)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar9 = *(short *)local_78[2];
            }
            else {
              sVar9 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar9 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar23 = sVar9 == -1;
          }
          if (bVar23 == (sVar8 == -1)) {
            cVar5 = true;
            goto LAB_14005adf4;
          }
          uVar17 = 0xffff;
          if (local_68 != (longlong *)0x0) {
            if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
              uVar7 = *(ushort *)local_68[2];
            }
            else {
              uVar7 = (**(code **)(*local_68 + 0x48))();
            }
            uVar17 = (uint)uVar7;
            if (uVar7 == 0xffff) {
              local_68 = (longlong *)0x0;
            }
          }
          if (!bVar4) break;
          cVar5 = *(char *)(lVar10 + 0x20);
        }
        cVar5 = false;
      }
LAB_14005adf4:
      if (iVar19 == 0x10) goto LAB_14005b04c;
    }
LAB_14005adfe:
    local_a8 = (ulonglong)iVar19;
    iVar16 = iVar19;
  }
  else {
    iVar19 = 10;
    if (uVar22 != 8) goto LAB_14005acc8;
    iVar19 = 0x10;
    cVar5 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!(bool)cVar5) goto LAB_14005ace7;
    bVar24 = false;
    uVar17 = 0;
    iVar20 = 0;
    bVar4 = false;
LAB_14005b04c:
    local_a8 = 0x16;
    iVar16 = 0x10;
    iVar19 = 0x16;
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar10 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  uVar15 = (ulonglong)iVar16;
  auVar1._8_8_ = 0;
  auVar1._0_8_ = uVar15;
  uVar11 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar1,0);
  local_7a = *(byte *)(lVar10 + 200);
  if (local_7a == 0) {
    bVar21 = 0;
    if ((bool)cVar5 == false) {
      uVar12 = 0;
      do {
        uVar7 = (ushort)uVar17;
        if (local_a8 < 0xb) {
          if ((uVar7 < 0x30) || ((ushort)((short)iVar19 + 0x30U) <= uVar7)) goto LAB_14005b1a8;
LAB_14005ae8d:
          iVar16 = uVar17 - 0x30;
        }
        else {
          if ((ushort)(uVar7 - 0x30) < 10) goto LAB_14005ae8d;
          if (5 < (ushort)(uVar7 - 0x61)) goto LAB_14005b190;
          iVar16 = uVar17 - 0x57;
        }
        while( true ) {
          plVar2 = local_68;
          if (uVar11 < uVar12) {
            bVar21 = 1;
          }
          else {
            uVar18 = uVar12 * uVar15;
            uVar12 = (longlong)iVar16 + uVar18;
            iVar20 = iVar20 + 1;
            bVar21 = bVar21 | CARRY8((longlong)iVar16,uVar18);
          }
          psVar14 = (short *)local_68[3];
          if ((short *)local_68[2] < psVar14) {
            psVar13 = (short *)local_68[2] + 1;
            local_68[2] = (longlong)psVar13;
          }
          else {
            (**(code **)(*local_68 + 0x50))(local_68);
            psVar13 = (short *)plVar2[2];
            psVar14 = (short *)plVar2[3];
          }
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar13 < psVar14) {
            sVar8 = *psVar13;
          }
          else {
            sVar8 = (**(code **)(*plVar2 + 0x48))(plVar2);
          }
          if (sVar8 == -1) {
            local_68 = (longlong *)0x0;
          }
          bVar23 = (short)uStack_70 == -1;
          if ((local_78 != (longlong *)0x0) && (bVar23)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar9 = *(short *)local_78[2];
            }
            else {
              sVar9 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar9 == -1) {
              local_78 = (longlong *)0x0;
            }
            bVar23 = sVar9 == -1;
          }
          if (bVar23 == (sVar8 == -1)) {
            local_7a = 1;
            cVar6 = cVar5;
            goto LAB_14005af28;
          }
          if (local_68 == (longlong *)0x0) goto LAB_14005b1a8;
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar7 = *(ushort *)local_68[2];
          }
          else {
            uVar7 = (**(code **)(*local_68 + 0x48))();
          }
          uVar17 = (uint)uVar7;
          if (uVar7 != 0xffff) break;
          local_68 = (longlong *)0x0;
          if (local_a8 < 0xb) goto LAB_14005b1a8;
LAB_14005b190:
          if (5 < (ushort)((short)uVar17 - 0x41U)) goto LAB_14005b1a8;
          iVar16 = uVar17 - 0x37;
        }
      } while( true );
    }
    uVar12 = 0;
    cVar6 = '\0';
    local_7a = cVar5;
  }
  else {
    if ((bool)cVar5 == false) {
      bVar21 = 0;
      uVar12 = 0;
      do {
        cVar6 = *(char *)(lVar10 + 0x20);
        sVar8 = (short)uVar17;
        if ((cVar6 == '\0') || (*(short *)(lVar10 + 0x4a) != sVar8)) {
          psVar14 = (short *)(lVar10 + 0x9c);
          uVar18 = local_a8;
          if (*(short *)(lVar10 + 0x48) == sVar8 || local_a8 == 0) goto LAB_14005b1a8;
          while (sVar8 != *psVar14) {
            uVar18 = uVar18 - 1;
            psVar14 = psVar14 + 1;
            if (uVar18 == 0) {
              local_7a = 0;
              cVar6 = '\0';
              goto LAB_14005af28;
            }
          }
          iVar19 = (int)((longlong)psVar14 - (lVar10 + 0x9c) >> 1);
          if (0xf < iVar19) {
            iVar19 = iVar19 + -6;
          }
          bVar3 = local_7a;
          if (uVar12 <= uVar11) {
            uVar18 = uVar12 * uVar15;
            uVar12 = (longlong)iVar19 + uVar18;
            iVar20 = iVar20 + 1;
            bVar3 = bVar21 | CARRY8((longlong)iVar19,uVar18);
          }
        }
        else {
          if (iVar20 == 0) {
            local_7a = 0;
            goto LAB_14005af28;
          }
          std::string::push_back((string *)local_50,(char)iVar20);
          iVar20 = 0;
          bVar3 = bVar21;
        }
        bVar21 = bVar3;
        plVar2 = local_68;
        psVar14 = (short *)local_68[3];
        if ((short *)local_68[2] < psVar14) {
          psVar13 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar13;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar14 = (short *)plVar2[3];
          psVar13 = (short *)plVar2[2];
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar13 < psVar14) {
          sVar8 = *psVar13;
        }
        else {
          sVar8 = (**(code **)(*plVar2 + 0x48))(plVar2);
        }
        if (sVar8 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar23 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar23)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar9 = *(short *)local_78[2];
          }
          else {
            sVar9 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar9 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar23 = sVar9 == -1;
        }
        cVar6 = cVar5;
        if (bVar23 == (sVar8 == -1)) goto LAB_14005af28;
        if (local_68 == (longlong *)0x0) {
          uVar17 = 0xffffffff;
        }
        else {
          if ((ushort *)local_68[2] < (ushort *)local_68[3]) {
            uVar17 = (uint)*(ushort *)local_68[2];
          }
          else {
            uVar17 = (**(code **)(*local_68 + 0x48))();
          }
          if ((short)uVar17 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
      } while( true );
    }
    uVar12 = 0;
    bVar21 = 0;
    cVar6 = '\0';
    local_7a = cVar5;
  }
LAB_14005af28:
  cVar5 = cVar6;
  if (local_50[0][-3] != 0) goto LAB_14005b1bd;
LAB_14005af40:
  cVar5 = cVar6;
  if ((iVar20 != 0) || (bVar4)) {
LAB_14005b201:
    if (cVar5 == '\0') {
      if (bVar21 == 0) {
        if (bVar24) {
          uVar12 = -uVar12;
        }
        *param_7 = uVar12;
      }
      else {
        *param_7 = 0xffffffffffffffff;
        *param_6 = 4;
      }
      goto LAB_14005af70;
    }
  }
  goto LAB_14005af53;
LAB_14005b1a8:
  local_7a = 0;
  cVar6 = cVar5;
  if (local_50[0][-3] == 0) goto LAB_14005af40;
LAB_14005b1bd:
  std::string::push_back((string *)local_50,(char)iVar20);
  cVar6 = __verify_grouping(*(longlong *)(lVar10 + 0x10),*(longlong *)(lVar10 + 0x18),
                            (undefined8 *)local_50);
  if (cVar6 == '\0') {
    *param_6 = 4;
  }
  if (((iVar20 != 0) || (bVar4)) || (local_50[0][-3] != 0)) goto LAB_14005b201;
LAB_14005af53:
  *param_7 = 0;
  *param_6 = 4;
LAB_14005af70:
  if (local_7a != 0) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_float(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, std::string&) const

undefined8 *
std::num_get<>::_M_extract_float
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,undefined4 *param_6,string *param_7)

{
  ulonglong uVar1;
  byte bVar2;
  int iVar3;
  longlong *plVar4;
  bool bVar5;
  char cVar6;
  short sVar7;
  short sVar8;
  short sVar9;
  longlong lVar10;
  longlong lVar11;
  short *psVar12;
  undefined1 uVar13;
  char cVar14;
  longlong lVar15;
  byte bVar16;
  ulonglong *puVar17;
  int iVar18;
  bool bVar19;
  bool local_92;
  byte local_91;
  longlong *local_78;
  undefined8 uStack_70;
  longlong *local_68;
  undefined8 uStack_60;
  ulonglong *local_50 [2];
  
  local_68 = (longlong *)*param_3;
  uStack_60 = param_3[1];
  local_78 = (longlong *)*param_4;
  uStack_70 = param_4[1];
  lVar10 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                     ((longlong *)(param_5 + 0xd0));
  bVar5 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
  if (bVar5) {
    sVar7 = 0;
    iVar18 = 0;
    bVar16 = 0;
    local_92 = bVar5;
  }
  else {
    sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
    cVar6 = *(char *)(lVar10 + 0x20);
    if (*(short *)(lVar10 + 0x96) == sVar7) {
      if (cVar6 == '\0') {
        cVar14 = '+';
        sVar8 = *(short *)(lVar10 + 0x48);
        goto joined_r0x00014005c233;
      }
LAB_14005c177:
      if ((*(short *)(lVar10 + 0x4a) == sVar7) || (*(short *)(lVar10 + 0x48) == sVar7))
      goto LAB_14005bf2d;
      cVar14 = (*(short *)(lVar10 + 0x96) != sVar7) * '\x02' + '+';
    }
    else {
      if (*(short *)(lVar10 + 0x94) != sVar7) goto LAB_14005bf2d;
      if (cVar6 != '\0') goto LAB_14005c177;
      cVar14 = '-';
      sVar8 = *(short *)(lVar10 + 0x48);
joined_r0x00014005c233:
      if (sVar8 == sVar7) goto LAB_14005bf2d;
    }
    std::string::push_back(param_7,cVar14);
    _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_68);
    uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
    local_92 = istreambuf_iterator<>::equal
                         ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
    if (!local_92) {
      sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
      cVar6 = *(char *)(lVar10 + 0x20);
LAB_14005bf2d:
      bVar16 = 0;
      iVar18 = 0;
      do {
        if ((((cVar6 != '\0') && (local_92 = bVar5, *(short *)(lVar10 + 0x4a) == sVar7)) ||
            (local_92 = bVar5, *(short *)(lVar10 + 0x48) == sVar7)) ||
           (*(short *)(lVar10 + 0x9c) != sVar7)) goto LAB_14005b710;
        if (bVar16 == 0) {
          lVar11 = *(longlong *)param_7;
          lVar15 = *(longlong *)(lVar11 + -0x18);
          uVar1 = lVar15 + 1;
          if (*(ulonglong *)(lVar11 + -0x10) < uVar1) {
LAB_14005c02d:
            std::string::reserve(param_7,uVar1);
          }
          else {
            if (_CRT_MT == 0) {
              iVar3 = *(int *)(lVar11 + -8);
            }
            else {
              iVar3 = *(int *)(lVar11 + -8);
            }
            if (0 < iVar3) goto LAB_14005c02d;
          }
          *(undefined1 *)(*(longlong *)param_7 + *(longlong *)(*(longlong *)param_7 + -0x18)) = 0x30
          ;
          lVar11 = *(longlong *)param_7;
          *(undefined4 *)(lVar11 + -8) = 0;
          *(ulonglong *)(lVar11 + -0x18) = uVar1;
          *(undefined1 *)(lVar11 + 1 + lVar15) = 0;
        }
        plVar4 = local_68;
        iVar18 = iVar18 + 1;
        if ((short *)local_68[2] < (short *)local_68[3]) {
          psVar12 = (short *)local_68[2] + 1;
          local_68[2] = (longlong)psVar12;
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if ((short *)local_68[3] <= psVar12) goto LAB_14005c0d0;
LAB_14005bf9b:
          sVar8 = *psVar12;
        }
        else {
          (**(code **)(*local_68 + 0x50))(local_68);
          psVar12 = (short *)plVar4[2];
          uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
          if (psVar12 < (short *)plVar4[3]) goto LAB_14005bf9b;
LAB_14005c0d0:
          sVar8 = (**(code **)(*plVar4 + 0x48))(plVar4);
        }
        if (sVar8 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar19 = (short)uStack_70 == -1;
        if ((local_78 != (longlong *)0x0) && (bVar19)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar9 = *(short *)local_78[2];
          }
          else {
            sVar9 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar9 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar19 = sVar9 == -1;
        }
        if ((sVar8 == -1) == bVar19) goto code_r0x00014005bfd0;
        sVar7 = -1;
        if (local_68 != (longlong *)0x0) {
          if ((short *)local_68[2] < (short *)local_68[3]) {
            sVar7 = *(short *)local_68[2];
          }
          else {
            sVar7 = (**(code **)(*local_68 + 0x48))();
          }
          if (sVar7 == -1) {
            local_68 = (longlong *)0x0;
          }
        }
        cVar6 = *(char *)(lVar10 + 0x20);
        bVar16 = 1;
      } while( true );
    }
    bVar16 = 0;
    iVar18 = 0;
  }
  goto LAB_14005b710;
code_r0x00014005be26:
  cVar6 = (*(short *)(lVar10 + 0x96) != sVar7) * '\x02' + '+';
LAB_14005bc9a:
  std::string::push_back(param_7,cVar6);
LAB_14005b9ec:
  plVar4 = local_68;
  if ((short *)local_68[2] < (short *)local_68[3]) {
    psVar12 = (short *)local_68[2] + 1;
    local_68[2] = (longlong)psVar12;
    uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
    if ((short *)local_68[3] <= psVar12) {
LAB_14005bdd8:
      sVar7 = (**(code **)(*plVar4 + 0x48))(plVar4);
      goto joined_r0x00014005ba24;
    }
  }
  else {
    (**(code **)(*local_68 + 0x50))(local_68);
    uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
    psVar12 = (short *)plVar4[2];
    if ((short *)plVar4[3] <= psVar12) goto LAB_14005bdd8;
  }
  sVar7 = *psVar12;
joined_r0x00014005ba24:
  if (sVar7 == -1) {
    local_68 = (longlong *)0x0;
  }
  bVar5 = (short)uStack_70 == -1;
  if ((local_78 != (longlong *)0x0) && (bVar5)) {
    if ((short *)local_78[2] < (short *)local_78[3]) {
      sVar8 = *(short *)local_78[2];
    }
    else {
      sVar8 = (**(code **)(*local_78 + 0x48))();
    }
    if (sVar8 == -1) {
      local_78 = (longlong *)0x0;
    }
    bVar5 = sVar8 == -1;
  }
  if ((sVar7 == -1) == bVar5) goto LAB_14005ba5b;
  if (local_68 == (longlong *)0x0) {
    cVar6 = *(char *)(lVar10 + 0x20);
    sVar7 = -1;
  }
  else {
    if ((short *)local_68[2] < (short *)local_68[3]) {
      sVar7 = *(short *)local_68[2];
    }
    else {
      sVar7 = (**(code **)(*local_68 + 0x48))();
    }
    if (sVar7 == -1) {
      local_68 = (longlong *)0x0;
    }
    cVar6 = *(char *)(lVar10 + 0x20);
  }
  goto LAB_14005b940;
LAB_14005c1f3:
  puVar17 = local_50[0];
  if (local_50[0][-3] == 0) goto LAB_14005bab3;
  goto LAB_14005ba91;
code_r0x00014005bfd0:
  local_92 = true;
  bVar16 = 1;
LAB_14005b710:
  local_50[0] = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar10 + 0x20) != '\0') {
    std::string::reserve((string *)local_50,0x20);
  }
  bVar2 = *(byte *)(lVar10 + 200);
  if (bVar2 == 0) {
    if (local_92 == false) {
      local_91 = 0;
LAB_14005b75e:
      if (9 < (ushort)(sVar7 - 0x30U)) goto LAB_14005b865;
      lVar11 = *(longlong *)param_7;
      lVar15 = *(longlong *)(lVar11 + -0x18);
      uVar1 = lVar15 + 1;
      if (uVar1 <= *(ulonglong *)(lVar11 + -0x10)) {
        if (_CRT_MT == 0) {
          iVar3 = *(int *)(lVar11 + -8);
        }
        else {
          iVar3 = *(int *)(lVar11 + -8);
        }
        if (iVar3 < 1) goto LAB_14005b7a1;
      }
      std::string::reserve(param_7,uVar1);
LAB_14005b7a1:
      *(char *)(*(longlong *)param_7 + *(longlong *)(*(longlong *)param_7 + -0x18)) = (char)sVar7;
      lVar11 = *(longlong *)param_7;
      *(undefined4 *)(lVar11 + -8) = 0;
      *(ulonglong *)(lVar11 + -0x18) = uVar1;
      *(undefined1 *)(lVar11 + 1 + lVar15) = 0;
      bVar16 = 1;
LAB_14005b7c4:
      plVar4 = local_68;
      if ((short *)local_68[2] < (short *)local_68[3]) {
        psVar12 = (short *)local_68[2] + 1;
        local_68[2] = (longlong)psVar12;
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if ((short *)local_68[3] <= psVar12) goto LAB_14005bd60;
LAB_14005b7f5:
        sVar7 = *psVar12;
      }
      else {
        (**(code **)(*local_68 + 0x50))(local_68);
        psVar12 = (short *)plVar4[2];
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        if (psVar12 < (short *)plVar4[3]) goto LAB_14005b7f5;
LAB_14005bd60:
        sVar7 = (**(code **)(*plVar4 + 0x48))(plVar4);
      }
      if (sVar7 == -1) {
        local_68 = (longlong *)0x0;
      }
      bVar5 = (short)uStack_70 == -1;
      if ((local_78 != (longlong *)0x0) && (bVar5)) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar8 = *(short *)local_78[2];
        }
        else {
          sVar8 = (**(code **)(*local_78 + 0x48))();
        }
        if (sVar8 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar5 = sVar8 == -1;
      }
      if (bVar5 == (sVar7 == -1)) goto LAB_14005ba5b;
      if (local_68 != (longlong *)0x0) {
        if ((short *)local_68[2] < (short *)local_68[3]) {
          sVar7 = *(short *)local_68[2];
        }
        else {
          sVar7 = (**(code **)(*local_68 + 0x48))();
        }
        if (sVar7 != -1) goto LAB_14005b75e;
        local_68 = (longlong *)0x0;
      }
      sVar7 = -1;
LAB_14005b865:
      if ((*(short *)(lVar10 + 0x48) == sVar7) && (local_92 == false && local_91 == 0)) {
        local_92 = true;
        std::string::push_back(param_7,0x2e);
        local_91 = 0;
      }
      else {
        if (((*(short *)(lVar10 + 0xb8) != sVar7) && (*(short *)(lVar10 + 0xc4) != sVar7)) ||
           (bVar16 = bVar16 & (local_91 ^ 1), bVar16 == 0)) goto LAB_14005ba5b;
        std::string::push_back(param_7,0x65);
        if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
          local_68[2] = local_68[2] + 2;
        }
        else {
          (**(code **)(*local_68 + 0x50))();
        }
        uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
        bVar5 = istreambuf_iterator<>::equal
                          ((istreambuf_iterator<> *)&local_68,(longlong *)&local_78);
        if (bVar5) goto LAB_14005c1f3;
        sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_68);
        local_91 = bVar16;
        if (*(short *)(lVar10 + 0x96) == sVar7) {
          uVar13 = 0x2b;
        }
        else {
          uVar13 = 0x2d;
          if (sVar7 != *(short *)(lVar10 + 0x94)) goto LAB_14005b75e;
        }
        std::string::push_back(param_7,uVar13);
      }
      goto LAB_14005b7c4;
    }
LAB_14005c287:
    puVar17 = local_50[0];
    if (local_50[0][-3] == 0) goto LAB_14005bab3;
LAB_14005ba7b:
    std::string::push_back((string *)local_50,(char)iVar18);
  }
  else {
    if (local_92 != false) goto LAB_14005c287;
    local_91 = 0;
    cVar6 = *(char *)(lVar10 + 0x20);
LAB_14005b940:
    uVar13 = (undefined1)iVar18;
    if (cVar6 == '\0') goto LAB_14005b94f;
    while (*(short *)(lVar10 + 0x4a) != sVar7) {
LAB_14005b94f:
      if (*(short *)(lVar10 + 0x48) == sVar7) {
        if (local_91 != 0 || local_92 != false) goto LAB_14005c1f3;
        if (local_50[0][-3] != 0) {
          std::string::push_back((string *)local_50,uVar13);
        }
        lVar11 = *(longlong *)param_7;
        lVar15 = *(longlong *)(lVar11 + -0x18);
        uVar1 = lVar15 + 1;
        if (*(ulonglong *)(lVar11 + -0x10) < uVar1) {
LAB_14005bb4a:
          std::string::reserve(param_7,uVar1);
LAB_14005bb55:
          lVar11 = *(longlong *)param_7;
          lVar15 = *(longlong *)(lVar11 + -0x18);
        }
        else {
          if (_CRT_MT != 0) {
            if (0 < *(int *)(lVar11 + -8)) goto LAB_14005bb4a;
            goto LAB_14005bb55;
          }
          if (0 < *(int *)(lVar11 + -8)) goto LAB_14005bb4a;
        }
        *(undefined1 *)(lVar11 + lVar15) = 0x2e;
        lVar11 = *(longlong *)param_7;
        *(undefined4 *)(lVar11 + -8) = 0;
        *(ulonglong *)(lVar11 + -0x18) = uVar1;
        *(undefined1 *)(lVar11 + uVar1) = 0;
        local_91 = 0;
        local_92 = (bool)bVar2;
        goto LAB_14005b9ec;
      }
      psVar12 = (short *)(lVar10 + 0x9c);
      do {
        if (sVar7 == *psVar12) {
          lVar11 = *(longlong *)param_7;
          lVar15 = *(longlong *)(lVar11 + -0x18);
          uVar1 = lVar15 + 1;
          if (*(ulonglong *)(lVar11 + -0x10) < uVar1) {
LAB_14005b9b4:
            std::string::reserve(param_7,uVar1);
          }
          else {
            if (_CRT_MT == 0) {
              iVar3 = *(int *)(lVar11 + -8);
            }
            else {
              iVar3 = *(int *)(lVar11 + -8);
            }
            if (0 < iVar3) goto LAB_14005b9b4;
          }
          iVar18 = iVar18 + 1;
          *(char *)(*(longlong *)param_7 + *(longlong *)(*(longlong *)param_7 + -0x18)) =
               (char)((longlong)psVar12 - (lVar10 + 0x9c) >> 1) + '0';
          lVar11 = *(longlong *)param_7;
          *(undefined4 *)(lVar11 + -8) = 0;
          *(ulonglong *)(lVar11 + -0x18) = uVar1;
          *(undefined1 *)(lVar11 + 1 + lVar15) = 0;
          bVar16 = bVar2;
          goto LAB_14005b9ec;
        }
        psVar12 = psVar12 + 1;
      } while ((short *)(lVar10 + 0xb0) != psVar12);
      if ((*(short *)(lVar10 + 0xb8) != sVar7) && (*(short *)(lVar10 + 0xc4) != sVar7))
      goto LAB_14005ba5b;
      bVar16 = bVar16 & (local_91 ^ 1);
      if (bVar16 == 0) goto LAB_14005ba5b;
      if ((local_50[0][-3] != 0) && (local_92 == false)) {
        std::string::push_back((string *)local_50,uVar13);
      }
      std::string::push_back(param_7,0x65);
      if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
        local_68[2] = local_68[2] + 2;
      }
      else {
        (**(code **)(*local_68 + 0x50))();
      }
      uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
      bVar5 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78)
      ;
      if (bVar5) goto LAB_14005c1f3;
      sVar7 = (short)uStack_60;
      if ((local_68 != (longlong *)0x0) && ((short)uStack_60 == -1)) {
        if ((short *)local_68[2] < (short *)local_68[3]) {
          sVar7 = *(short *)local_68[2];
        }
        else {
          sVar7 = (**(code **)(*local_68 + 0x48))();
        }
        if (sVar7 == -1) {
          local_68 = (longlong *)0x0;
        }
      }
      cVar6 = *(char *)(lVar10 + 0x20);
      local_91 = bVar16;
      if (*(short *)(lVar10 + 0x96) == sVar7) {
        if (cVar6 != '\0') goto LAB_14005be10;
        if (*(short *)(lVar10 + 0x48) != sVar7) {
          cVar6 = '+';
          goto LAB_14005bc9a;
        }
        goto LAB_14005b94f;
      }
      if (*(short *)(lVar10 + 0x94) != sVar7) goto LAB_14005b940;
      if (cVar6 == '\0') {
        if (sVar7 != *(short *)(lVar10 + 0x48)) {
          cVar6 = '-';
          goto LAB_14005bc9a;
        }
        goto LAB_14005b94f;
      }
LAB_14005be10:
      if ((*(short *)(lVar10 + 0x4a) != sVar7) && (*(short *)(lVar10 + 0x48) != sVar7))
      goto code_r0x00014005be26;
    }
    if (local_92 != false || local_91 != 0) goto LAB_14005c1f3;
    local_92 = false;
    if (iVar18 != 0) {
      std::string::push_back((string *)local_50,uVar13);
      local_91 = 0;
      iVar18 = 0;
      goto LAB_14005b9ec;
    }
    std::string::_M_mutate(param_7,0,*(longlong *)(*(longlong *)param_7 + -0x18),0);
    local_91 = 0;
LAB_14005ba5b:
    puVar17 = local_50[0];
    if (local_50[0][-3] == 0) goto LAB_14005bab3;
    if ((local_92 == false) && (local_91 == 0)) goto LAB_14005ba7b;
  }
LAB_14005ba91:
  puVar17 = local_50[0];
  cVar6 = __verify_grouping(*(longlong *)(lVar10 + 0x10),*(longlong *)(lVar10 + 0x18),local_50);
  if (cVar6 == '\0') {
    *param_6 = 4;
  }
LAB_14005bab3:
  *param_1 = local_68;
  param_1[1] = uStack_60;
  std::string::_Rep::_M_dispose(puVar17 + -3);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, void*&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ulonglong *param_7)

{
  uint uVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  ulonglong local_40;
  ulonglong local_30 [2];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  local_68 = *param_4;
  local_60 = param_4[1];
  if (*(code **)(*param_2 + 0x60) == do_get) {
    uVar1 = *(uint *)(param_5 + 0x18);
    *(uint *)(param_5 + 0x18) = uVar1 & 0xffffffb5 | 8;
    local_58 = uVar2;
    local_50 = uVar3;
    _M_extract_int<>(&local_48,param_2,&local_58,&local_68,param_5,param_6,local_30);
    *(uint *)(param_5 + 0x18) = uVar1;
    *param_1 = local_48;
    param_1[1] = uVar3 & 0xffffffffffff0000 | local_40 & 0xffff;
    *param_7 = local_30[0];
    return param_1;
  }
  local_58 = local_68;
  local_50 = local_60;
  local_48 = uVar2;
  local_40 = uVar3;
  (**(code **)(*param_2 + 0x60))(param_1,param_2,&local_48,&local_58,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, bool&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, double&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x50))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long double&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x58))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, float&) const

undefined8
std::num_get<>::get(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x48))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x28) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))();
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x18) == do_get) {
    _M_extract_int<long>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x30) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))();
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ushort *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x20) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))();
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x38) == do_get) {
    _M_extract_int<long_long>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))();
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::get(undefined8 *param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
                   longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_38;
  undefined8 local_30;
  undefined8 local_28;
  undefined8 uStack_20;
  
  local_28 = *param_3;
  uStack_20 = param_3[1];
  local_38 = *param_4;
  local_30 = param_4[1];
  if (*(code **)(*param_2 + 0x40) == do_get) {
    _M_extract_int<>(param_1,param_2,&local_28,&local_38,param_5,param_6,param_7);
    return param_1;
  }
  (**(code **)(*param_2 + 0x40))();
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, void*&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_68;
  undefined8 local_60;
  undefined8 local_58;
  ulonglong local_50;
  undefined8 local_48;
  ushort local_40;
  ulonglong local_30 [2];
  
  local_58 = *param_3;
  local_50 = param_3[1];
  local_68 = *param_4;
  uVar1 = *(uint *)(param_5 + 0x18);
  local_60 = param_4[1];
  *(uint *)(param_5 + 0x18) = uVar1 & 0xffffffb5 | 8;
  uVar2 = local_50 & 0xffffffffffff0000;
  _M_extract_int<>(&local_48,param_2,&local_58,&local_68,param_5,param_6,local_30);
  *(uint *)(param_5 + 0x18) = uVar1;
  *param_1 = local_48;
  param_1[1] = uVar2 | local_40;
  *param_7 = local_30[0];
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, bool&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,byte *param_7)

{
  bool bVar1;
  short sVar2;
  short sVar3;
  longlong lVar4;
  bool bVar5;
  longlong *plVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  byte bVar9;
  bool bVar10;
  bool bVar11;
  bool bVar12;
  bool bVar13;
  bool bVar14;
  bool bVar15;
  longlong *local_a8;
  undefined8 local_a0;
  longlong *local_98;
  ulonglong local_90;
  longlong *local_88;
  undefined2 local_80;
  longlong *local_78;
  undefined8 local_70;
  longlong *local_68;
  ulonglong uStack_60;
  uint local_4c [3];
  
  local_98 = (longlong *)*param_3;
  local_90 = param_3[1];
  local_a8 = (longlong *)*param_4;
  local_a0 = param_4[1];
  local_78 = local_a8;
  local_70 = local_a0;
  local_68 = local_98;
  uStack_60 = local_90;
  if ((*(byte *)(param_5 + 0x18) & 1) == 0) {
    local_4c[0] = 0xffffffff;
    _M_extract_int<long>(&local_88,param_2,&local_98,&local_a8,param_5,param_6,local_4c);
    local_68 = local_88;
    uStack_60 = CONCAT62(uStack_60._2_6_,local_80);
    if (local_4c[0] < 2) {
      *param_7 = (byte)local_4c[0];
      *param_7 = *param_7 & 1;
    }
    else {
      *param_7 = 1;
      *param_6 = 4;
      bVar1 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_68,(longlong *)&local_78)
      ;
      if (bVar1) {
        *param_6 = *param_6 | 2;
      }
    }
    goto LAB_14005cb17;
  }
  lVar4 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_5 + 0xd0));
  bVar1 = *(longlong *)(lVar4 + 0x40) == 0;
  bVar10 = *(longlong *)(lVar4 + 0x30) == 0;
  if (*(longlong *)(lVar4 + 0x40) == 0 && *(longlong *)(lVar4 + 0x30) == 0) {
LAB_14005ce18:
    *param_7 = 0;
  }
  else {
    bVar11 = (short)local_70 == -1;
    bVar15 = true;
    bVar14 = true;
    uVar7 = uStack_60 & 0xffff;
    uVar8 = 0;
    plVar6 = local_68;
    do {
      sVar3 = (short)uVar7;
      bVar12 = sVar3 == -1;
      bVar5 = bVar12;
      if ((plVar6 != (longlong *)0x0) && (bVar12)) {
        if ((short *)plVar6[2] < (short *)plVar6[3]) {
          sVar2 = *(short *)plVar6[2];
        }
        else {
          sVar2 = (**(code **)(*plVar6 + 0x48))(plVar6);
        }
        if (sVar2 == -1) {
          local_68 = (longlong *)0x0;
        }
        bVar5 = sVar2 == -1;
      }
      bVar13 = bVar11;
      if ((local_78 != (longlong *)0x0) && (bVar11)) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar2 = *(short *)local_78[2];
        }
        else {
          sVar2 = (**(code **)(*local_78 + 0x48))();
        }
        if (sVar2 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar13 = sVar2 == -1;
      }
      if (bVar13 == bVar5) {
        bVar9 = 1;
        break;
      }
      if ((local_68 != (longlong *)0x0) && (bVar12)) {
        if ((short *)local_68[2] < (short *)local_68[3]) {
          sVar3 = *(short *)local_68[2];
        }
        else {
          sVar3 = (**(code **)(*local_68 + 0x48))();
        }
        if (sVar3 == -1) {
          local_68 = (longlong *)0x0;
        }
      }
      plVar6 = local_68;
      if (!bVar1) {
        bVar14 = *(short *)(*(longlong *)(lVar4 + 0x38) + uVar8 * 2) == sVar3;
      }
      if ((bool)((bVar14 ^ 1U) & bVar10)) {
        bVar9 = 0;
        if (bVar15) goto LAB_14005cd7a;
        goto LAB_14005ce18;
      }
      if (!bVar10) {
        bVar15 = *(short *)(*(longlong *)(lVar4 + 0x28) + uVar8 * 2) == sVar3;
      }
      if ((bool)((bVar15 ^ 1U) & bVar1)) {
        if (!bVar14) goto LAB_14005ce18;
        bVar9 = 0;
        if (uVar8 != *(ulonglong *)(lVar4 + 0x40)) goto LAB_14005cd89;
        bVar15 = false;
        bVar9 = 0;
        goto LAB_14005ce87;
      }
      bVar5 = (bool)(bVar14 | bVar15);
      if (!bVar5) goto LAB_14005ce18;
      uVar8 = uVar8 + 1;
      if ((ulonglong)local_68[2] < (ulonglong)local_68[3]) {
        local_68[2] = local_68[2] + 2;
      }
      else {
        (**(code **)(*local_68 + 0x50))(local_68);
      }
      uStack_60 = CONCAT62(uStack_60._2_6_,0xffff);
      bVar1 = bVar5;
      if ((!bVar14) || (bVar1 = *(ulonglong *)(lVar4 + 0x40) <= uVar8, bVar15)) {
        bVar10 = *(ulonglong *)(lVar4 + 0x30) <= uVar8;
        bVar15 = bVar5;
        bVar5 = (bool)(bVar1 & bVar10);
      }
      else {
        bVar10 = true;
        bVar5 = bVar1;
      }
      uVar7 = 0xffffffff;
      bVar9 = 0;
    } while (!bVar5);
    if ((bVar14) && (*(ulonglong *)(lVar4 + 0x40) == uVar8)) {
LAB_14005ce87:
      if (uVar8 != 0) {
        *param_7 = 0;
        if ((!bVar15) || (*(ulonglong *)(lVar4 + 0x30) != uVar8)) {
LAB_14005ceb0:
          *param_6 = (uint)bVar9 * 2;
          goto LAB_14005cb17;
        }
        goto LAB_14005ce23;
      }
    }
    else if (bVar15) {
LAB_14005cd7a:
      if ((*(ulonglong *)(lVar4 + 0x30) == uVar8) && (uVar8 != 0)) {
        *param_7 = 1;
        goto LAB_14005ceb0;
      }
    }
LAB_14005cd89:
    *param_7 = 0;
    if (bVar9 != 0) {
      *param_6 = 6;
      goto LAB_14005cb17;
    }
  }
LAB_14005ce23:
  *param_6 = 4;
LAB_14005cb17:
  *param_1 = local_68;
  param_1[1] = uStack_60;
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, double&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,double *param_7)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  int iVar6;
  short sVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  plVar4 = (longlong *)*param_4;
  lVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  std::string::reserve((string *)&local_58,0x20);
  local_88 = plVar4;
  local_80 = lVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_float(&local_68,param_2,&local_78,&local_88,param_5,param_6,(string *)&local_58);
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<double>((char *)local_58,param_7,param_6);
  bVar9 = (short)local_60 == -1;
  plVar8 = local_68;
  if (local_68 != (longlong *)0x0 && bVar9) {
    if ((short *)local_68[2] < (short *)local_68[3]) {
      sVar7 = *(short *)local_68[2];
    }
    else {
      sVar7 = (**(code **)(*local_68 + 0x48))(local_68);
    }
    plVar8 = (longlong *)0x0;
    if (sVar7 != -1) {
      plVar8 = local_68;
    }
    bVar9 = sVar7 == -1;
  }
  bVar10 = (short)lVar5 == -1;
  if ((plVar4 != (longlong *)0x0) && (bVar10)) {
    if ((short *)plVar4[2] < (short *)plVar4[3]) {
      sVar7 = *(short *)plVar4[2];
    }
    else {
      sVar7 = (**(code **)(*plVar4 + 0x48))(plVar4);
    }
    bVar10 = sVar7 == -1;
  }
  if (bVar10 == bVar9) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar8;
  param_1[1] = uVar3 & 0xffffffffffff0000 | local_60 & 0xffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long double&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,float10 *param_7)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  int iVar6;
  short sVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  plVar4 = (longlong *)*param_4;
  lVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  std::string::reserve((string *)&local_58,0x20);
  local_88 = plVar4;
  local_80 = lVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_float(&local_68,param_2,&local_78,&local_88,param_5,param_6,(string *)&local_58);
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<>((char *)local_58,param_7,param_6);
  bVar9 = (short)local_60 == -1;
  plVar8 = local_68;
  if (local_68 != (longlong *)0x0 && bVar9) {
    if ((short *)local_68[2] < (short *)local_68[3]) {
      sVar7 = *(short *)local_68[2];
    }
    else {
      sVar7 = (**(code **)(*local_68 + 0x48))(local_68);
    }
    plVar8 = (longlong *)0x0;
    if (sVar7 != -1) {
      plVar8 = local_68;
    }
    bVar9 = sVar7 == -1;
  }
  bVar10 = (short)lVar5 == -1;
  if ((plVar4 != (longlong *)0x0) && (bVar10)) {
    if ((short *)plVar4[2] < (short *)plVar4[3]) {
      sVar7 = *(short *)plVar4[2];
    }
    else {
      sVar7 = (**(code **)(*plVar4 + 0x48))(plVar4);
    }
    bVar10 = sVar7 == -1;
  }
  if (bVar10 == bVar9) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar8;
  param_1[1] = uVar3 & 0xffffffffffff0000 | local_60 & 0xffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, float&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,float *param_7)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  longlong lVar5;
  int iVar6;
  short sVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  plVar4 = (longlong *)*param_4;
  lVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  std::string::reserve((string *)&local_58,0x20);
  local_88 = plVar4;
  local_80 = lVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  _M_extract_float(&local_68,param_2,&local_78,&local_88,param_5,param_6,(string *)&local_58);
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<float>((char *)local_58,param_7,param_6);
  bVar9 = (short)local_60 == -1;
  plVar8 = local_68;
  if (local_68 != (longlong *)0x0 && bVar9) {
    if ((short *)local_68[2] < (short *)local_68[3]) {
      sVar7 = *(short *)local_68[2];
    }
    else {
      sVar7 = (**(code **)(*local_68 + 0x48))(local_68);
    }
    plVar8 = (longlong *)0x0;
    if (sVar7 != -1) {
      plVar8 = local_68;
    }
    bVar9 = sVar7 == -1;
  }
  bVar10 = (short)lVar5 == -1;
  if ((plVar4 != (longlong *)0x0) && (bVar10)) {
    if ((short *)plVar4[2] < (short *)plVar4[3]) {
      sVar7 = *(short *)plVar4[2];
    }
    else {
      sVar7 = (**(code **)(*plVar4 + 0x48))(plVar4);
    }
    bVar10 = sVar7 == -1;
  }
  if (bVar10 == bVar9) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar8;
  param_1[1] = uVar3 & 0xffffffffffff0000 | local_60 & 0xffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned int&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<long>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned short&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ushort *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, long long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<long_long>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, unsigned long long&) const

undefined8 *
std::num_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,ulonglong *param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  _M_extract_int<>(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_group_int(char
// const*, unsigned long long, char, std::ios_base&, char*, char*, int&) const

void __thiscall
std::num_put<>::_M_group_int
          (undefined8 param_1_00,byte *param_2,longlong param_3,undefined1 param_4,
          undefined8 param_5,undefined1 *param_6,longlong param_7,int *param_8)

{
  undefined1 *puVar1;
  
  puVar1 = __add_grouping<char>(param_6,param_4,param_2,param_3,param_7,*param_8 + param_7);
  *param_8 = (int)puVar1 - (int)param_6;
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> >
// >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&,
// char, long) const

undefined8 *
std::num_put<>::_M_insert_int<long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,uint param_6)

{
  undefined1 uVar1;
  longlong *plVar2;
  undefined8 uVar3;
  code *pcVar4;
  byte *pbVar5;
  int iVar6;
  longlong lVar7;
  undefined1 *puVar8;
  uint uVar9;
  ctype<char> *pcVar10;
  ctype<char> *pcVar11;
  char cVar12;
  undefined1 *puVar13;
  undefined1 *puVar14;
  longlong lVar15;
  uint uVar16;
  longlong lVar17;
  bool bVar18;
  bool bVar19;
  undefined8 uStack_c0;
  undefined1 auStack_b8 [24];
  undefined8 uStack_a0;
  longlong lStack_90;
  undefined1 local_88 [2];
  ctype<char> acStack_86 [18];
  undefined1 local_74 [20];
  uint local_60;
  undefined4 local_5c;
  undefined1 *local_58;
  ctype<char> *local_50;
  
  plVar2 = (longlong *)*param_3;
  uVar3 = param_3[1];
  local_5c = param_5;
  uStack_a0 = 0x14005d8f8;
  lVar7 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar16 = *(uint *)(param_4 + 0x18);
  puVar13 = auStack_b8;
  puVar14 = auStack_b8;
  local_58 = local_88;
  local_60 = uVar16 & 0x4a;
  bVar18 = local_60 != 0x40;
  bVar19 = local_60 != 8;
  uVar9 = param_6;
  if (((int)param_6 < 1) && (uVar9 = -param_6, !bVar18 || !bVar19)) {
    uVar9 = param_6;
  }
  local_50 = (ctype<char> *)CONCAT44(local_50._4_4_,uVar16);
  uStack_c0 = 0x14005d952;
  iVar6 = __int_to_char<>(local_74,uVar9,lVar7 + 0x4a,uVar16,bVar18 && bVar19);
  pcVar10 = (ctype<char> *)(local_58 + (0x14 - iVar6));
  if (*(char *)(lVar7 + 0x20) == '\0') {
    uVar16 = (uint)local_50;
    if (bVar18 && bVar19) goto LAB_14005d97e;
LAB_14005dabb:
    pcVar11 = pcVar10;
    if (((uVar16 & 0x200) != 0) && (param_6 != 0)) {
      if (local_60 == 0x40) {
        iVar6 = iVar6 + 1;
        pcVar11 = pcVar10 + -1;
        *pcVar11 = *(ctype<char> *)(lVar7 + 0x4e);
      }
      else {
        iVar6 = iVar6 + 2;
        pcVar11 = pcVar10 + -2;
        pcVar10[-1] = *(ctype<char> *)(lVar7 + 0x4c + (ulonglong)(uVar16 >> 0xe & 1));
        *pcVar11 = *(ctype<char> *)(lVar7 + 0x4e);
      }
    }
LAB_14005d990:
    lVar17 = *(longlong *)(param_4 + 0x10);
    lVar15 = (longlong)iVar6;
    puVar13 = puVar14;
    if (lVar17 <= lVar15) goto LAB_14005d99c;
  }
  else {
    local_58 = (undefined1 *)CONCAT44(local_58._4_4_,(uint)local_50);
    uStack_c0 = 0x14005da70;
    uVar1 = *(undefined1 *)(lVar7 + 0x49);
    lVar17 = *(longlong *)(lVar7 + 0x18);
    lVar15 = -((longlong)(iVar6 + 1) * 2 + 0xfU & 0xfffffffffffffff0);
    puVar13 = auStack_b8 + lVar15;
    puVar14 = auStack_b8 + lVar15;
    pbVar5 = *(byte **)(lVar7 + 0x10);
    *(ctype<char> **)((longlong)&lStack_90 + lVar15) = pcVar10 + iVar6;
    *(ctype<char> **)(acStack_86 + lVar15 + -0x12) = pcVar10;
    local_50 = acStack_86 + lVar15;
    *(undefined8 *)(auStack_b8 + lVar15 + -8) = 0x14005daa1;
    puVar8 = __add_grouping<char>
                       (acStack_86 + lVar15,uVar1,pbVar5,lVar17,
                        *(longlong *)(acStack_86 + lVar15 + -0x12),
                        *(longlong *)((longlong)&lStack_90 + lVar15));
    iVar6 = (int)puVar8 - (int)local_50;
    pcVar10 = local_50;
    uVar16 = (uint)local_58;
    if (!bVar18 || !bVar19) goto LAB_14005dabb;
LAB_14005d97e:
    puVar14 = puVar13;
    if ((int)param_6 < 0) {
      iVar6 = iVar6 + 1;
      pcVar10[-1] = *(ctype<char> *)(lVar7 + 0x4a);
      pcVar11 = pcVar10 + -1;
      goto LAB_14005d990;
    }
    pcVar11 = pcVar10;
    if ((uVar16 & 0x800) == 0) goto LAB_14005d990;
    lVar17 = *(longlong *)(param_4 + 0x10);
    pcVar11 = pcVar10 + -1;
    lVar15 = (longlong)(iVar6 + 1);
    *pcVar11 = *(ctype<char> *)(lVar7 + 0x4b);
    if (lVar17 <= lVar15) goto LAB_14005d99c;
  }
  *(undefined8 *)(puVar13 + -8) = 0x14005da08;
  lVar7 = -(lVar17 + 0xfU & 0xfffffffffffffff0);
  cVar12 = (char)local_5c;
  *(longlong *)(puVar13 + lVar7 + 0x28) = lVar15;
  lVar15 = (longlong)(int)lVar17;
  *(longlong *)(puVar13 + lVar7 + 0x20) = lVar17;
  *(undefined8 *)(puVar13 + lVar7 + -8) = 0x14005da31;
  __pad<>::_S_pad(param_4,cVar12,(ctype<char> *)(puVar13 + lVar7 + 0x30),pcVar11,
                  *(longlong *)(puVar13 + lVar7 + 0x20),*(size_t *)(puVar13 + lVar7 + 0x28));
  pcVar11 = (ctype<char> *)(puVar13 + lVar7 + 0x30);
  puVar13 = puVar13 + lVar7;
LAB_14005d99c:
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar12 = (char)uVar3;
  if (cVar12 == '\0') {
    pcVar4 = *(code **)(*plVar2 + 0x60);
    *(undefined8 *)(puVar13 + -8) = 0x14005d9b8;
    lVar7 = (*pcVar4)(plVar2,pcVar11,lVar15);
    if (lVar15 != lVar7) {
      cVar12 = '\x01';
    }
  }
  *param_1 = plVar2;
  *(char *)(param_1 + 1) = cVar12;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<unsigned
// long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned
// long) const

undefined8 *
std::num_put<>::_M_insert_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,uint param_6)

{
  undefined1 uVar1;
  uint uVar2;
  longlong *plVar3;
  undefined8 uVar4;
  code *pcVar5;
  byte *pbVar6;
  longlong lVar7;
  int iVar8;
  longlong lVar9;
  undefined1 *puVar10;
  ctype<char> *pcVar11;
  ctype<char> *pcVar12;
  char cVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  longlong lVar16;
  undefined8 uStack_b0;
  undefined1 auStack_a8 [24];
  undefined8 uStack_90;
  longlong lStack_80;
  ctype<char> local_78 [20];
  undefined1 local_64 [16];
  uint local_54;
  undefined4 local_50;
  char local_49;
  
  plVar3 = (longlong *)*param_3;
  uVar4 = param_3[1];
  local_50 = param_5;
  uStack_90 = 0x14005db44;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar2 = *(uint *)(param_4 + 0x18);
  puVar14 = auStack_a8;
  puVar15 = auStack_a8;
  local_54 = uVar2 & 0x4a;
  local_49 = local_54 != 0x40 && local_54 != 8;
  uStack_b0 = 0x14005db8d;
  iVar8 = __int_to_char<>(local_64,param_6,lVar9 + 0x4a,uVar2,local_49);
  pcVar11 = local_78 + (0x14 - iVar8);
  if (*(char *)(lVar9 + 0x20) != '\0') {
    uStack_b0 = 0x14005dc1b;
    lVar16 = *(longlong *)(lVar9 + 0x18);
    pbVar6 = *(byte **)(lVar9 + 0x10);
    lVar7 = -((longlong)(iVar8 + 1) * 2 + 0xfU & 0xfffffffffffffff0);
    puVar14 = auStack_a8 + lVar7;
    puVar15 = auStack_a8 + lVar7;
    uVar1 = *(undefined1 *)(lVar9 + 0x49);
    *(ctype<char> **)((longlong)&lStack_80 + lVar7) = pcVar11 + iVar8;
    pcVar12 = local_78 + lVar7 + 2;
    *(ctype<char> **)(local_78 + lVar7 + -0x10) = pcVar11;
    *(undefined8 *)(auStack_a8 + lVar7 + -8) = 0x14005dc47;
    puVar10 = __add_grouping<char>
                        (pcVar12,uVar1,pbVar6,lVar16,*(longlong *)(local_78 + lVar7 + -0x10),
                         *(longlong *)((longlong)&lStack_80 + lVar7));
    iVar8 = (int)puVar10 - (int)pcVar12;
    pcVar11 = pcVar12;
  }
  pcVar12 = pcVar11;
  if (((local_49 == '\0') && (puVar14 = puVar15, (uVar2 & 0x200) != 0)) && (param_6 != 0)) {
    if (local_54 == 0x40) {
      iVar8 = iVar8 + 1;
      pcVar12 = pcVar11 + -1;
      *pcVar12 = *(ctype<char> *)(lVar9 + 0x4e);
    }
    else {
      iVar8 = iVar8 + 2;
      pcVar12 = pcVar11 + -2;
      pcVar11[-1] = *(ctype<char> *)(lVar9 + 0x4c + (ulonglong)(uVar2 >> 0xe & 1));
      *pcVar12 = *(ctype<char> *)(lVar9 + 0x4e);
    }
  }
  lVar9 = *(longlong *)(param_4 + 0x10);
  lVar16 = (longlong)iVar8;
  pcVar11 = pcVar12;
  puVar15 = puVar14;
  if (lVar16 < lVar9) {
    *(undefined8 *)(puVar14 + -8) = 0x14005dcad;
    lVar7 = -(lVar9 + 0xfU & 0xfffffffffffffff0);
    puVar15 = puVar14 + lVar7;
    cVar13 = (char)local_50;
    *(longlong *)(puVar14 + lVar7 + 0x28) = lVar16;
    pcVar11 = (ctype<char> *)(puVar14 + lVar7 + 0x30);
    lVar16 = (longlong)(int)lVar9;
    *(longlong *)(puVar14 + lVar7 + 0x20) = lVar9;
    *(undefined8 *)(puVar14 + lVar7 + -8) = 0x14005dcd6;
    __pad<>::_S_pad(param_4,cVar13,pcVar11,pcVar12,*(longlong *)(puVar14 + lVar7 + 0x20),
                    *(size_t *)(puVar14 + lVar7 + 0x28));
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar13 = (char)uVar4;
  if (cVar13 == '\0') {
    pcVar5 = *(code **)(*plVar3 + 0x60);
    *(undefined8 *)(puVar15 + -8) = 0x14005dbde;
    lVar9 = (*pcVar5)(plVar3,pcVar11,lVar16);
    if (lVar16 != lVar9) {
      cVar13 = '\x01';
    }
  }
  *param_1 = plVar3;
  *(char *)(param_1 + 1) = cVar13;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long
// long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long long)
// const

undefined8 *
std::num_put<>::_M_insert_int<long_long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,ulonglong param_6)

{
  undefined1 uVar1;
  longlong *plVar2;
  undefined8 uVar3;
  code *pcVar4;
  byte *pbVar5;
  int iVar6;
  longlong lVar7;
  undefined1 *puVar8;
  ulonglong uVar9;
  ctype<char> *pcVar10;
  ctype<char> *pcVar11;
  char cVar12;
  undefined1 *puVar13;
  undefined1 *puVar14;
  longlong lVar15;
  uint uVar16;
  longlong lVar17;
  bool bVar18;
  bool bVar19;
  undefined8 uStack_d0;
  undefined1 auStack_c8 [32];
  longlong lStack_a0;
  undefined1 local_98 [2];
  ctype<char> acStack_96 [38];
  undefined1 local_70 [16];
  uint local_60;
  undefined4 local_5c;
  undefined1 *local_58;
  ctype<char> *local_50;
  
  plVar2 = (longlong *)*param_3;
  uVar3 = param_3[1];
  local_5c = param_5;
  lStack_a0 = 0x14005dd38;
  lVar7 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar16 = *(uint *)(param_4 + 0x18);
  puVar13 = auStack_c8;
  puVar14 = auStack_c8;
  local_60 = uVar16 & 0x4a;
  bVar18 = local_60 != 0x40;
  bVar19 = local_60 != 8;
  uVar9 = param_6;
  if (((longlong)param_6 < 1) && (uVar9 = -param_6, !bVar18 || !bVar19)) {
    uVar9 = param_6;
  }
  local_50 = (ctype<char> *)CONCAT44(local_50._4_4_,uVar16);
  uStack_d0 = 0x14005dd93;
  local_58 = local_98;
  iVar6 = __int_to_char<>(local_70,uVar9,lVar7 + 0x4a,uVar16,bVar18 && bVar19);
  pcVar10 = (ctype<char> *)(local_58 + (0x28 - iVar6));
  if (*(char *)(lVar7 + 0x20) == '\0') {
    uVar16 = (uint)local_50;
    if (bVar18 && bVar19) goto LAB_14005ddbf;
LAB_14005defb:
    pcVar11 = pcVar10;
    if (((uVar16 & 0x200) != 0) && (param_6 != 0)) {
      if (local_60 == 0x40) {
        iVar6 = iVar6 + 1;
        pcVar11 = pcVar10 + -1;
        *pcVar11 = *(ctype<char> *)(lVar7 + 0x4e);
      }
      else {
        iVar6 = iVar6 + 2;
        pcVar11 = pcVar10 + -2;
        pcVar10[-1] = *(ctype<char> *)(lVar7 + 0x4c + (ulonglong)(uVar16 >> 0xe & 1));
        *pcVar11 = *(ctype<char> *)(lVar7 + 0x4e);
      }
    }
LAB_14005ddd1:
    lVar17 = *(longlong *)(param_4 + 0x10);
    lVar15 = (longlong)iVar6;
    puVar13 = puVar14;
    if (lVar17 <= lVar15) goto LAB_14005dddd;
  }
  else {
    local_58 = (undefined1 *)CONCAT44(local_58._4_4_,(uint)local_50);
    uStack_d0 = 0x14005deb0;
    uVar1 = *(undefined1 *)(lVar7 + 0x49);
    lVar17 = *(longlong *)(lVar7 + 0x18);
    lVar15 = -((longlong)(iVar6 + 1) * 2 + 0xfU & 0xfffffffffffffff0);
    puVar13 = auStack_c8 + lVar15;
    puVar14 = auStack_c8 + lVar15;
    pbVar5 = *(byte **)(lVar7 + 0x10);
    *(ctype<char> **)(local_98 + lVar15 + -8) = pcVar10 + iVar6;
    *(ctype<char> **)(acStack_96 + lVar15 + -0x12) = pcVar10;
    local_50 = acStack_96 + lVar15;
    *(undefined8 *)(auStack_c8 + lVar15 + -8) = 0x14005dee1;
    puVar8 = __add_grouping<char>
                       (acStack_96 + lVar15,uVar1,pbVar5,lVar17,
                        *(longlong *)(acStack_96 + lVar15 + -0x12),
                        *(longlong *)(local_98 + lVar15 + -8));
    iVar6 = (int)puVar8 - (int)local_50;
    pcVar10 = local_50;
    uVar16 = (uint)local_58;
    if (!bVar18 || !bVar19) goto LAB_14005defb;
LAB_14005ddbf:
    puVar14 = puVar13;
    if ((longlong)param_6 < 0) {
      iVar6 = iVar6 + 1;
      pcVar10[-1] = *(ctype<char> *)(lVar7 + 0x4a);
      pcVar11 = pcVar10 + -1;
      goto LAB_14005ddd1;
    }
    pcVar11 = pcVar10;
    if ((uVar16 & 0x800) == 0) goto LAB_14005ddd1;
    lVar17 = *(longlong *)(param_4 + 0x10);
    pcVar11 = pcVar10 + -1;
    lVar15 = (longlong)(iVar6 + 1);
    *pcVar11 = *(ctype<char> *)(lVar7 + 0x4b);
    if (lVar17 <= lVar15) goto LAB_14005dddd;
  }
  *(undefined8 *)(puVar13 + -8) = 0x14005de48;
  lVar7 = -(lVar17 + 0xfU & 0xfffffffffffffff0);
  cVar12 = (char)local_5c;
  *(longlong *)(puVar13 + lVar7 + 0x28) = lVar15;
  lVar15 = (longlong)(int)lVar17;
  *(longlong *)(puVar13 + lVar7 + 0x20) = lVar17;
  *(undefined8 *)(puVar13 + lVar7 + -8) = 0x14005de71;
  __pad<>::_S_pad(param_4,cVar12,(ctype<char> *)(puVar13 + lVar7 + 0x30),pcVar11,
                  *(longlong *)(puVar13 + lVar7 + 0x20),*(size_t *)(puVar13 + lVar7 + 0x28));
  pcVar11 = (ctype<char> *)(puVar13 + lVar7 + 0x30);
  puVar13 = puVar13 + lVar7;
LAB_14005dddd:
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar12 = (char)uVar3;
  if (cVar12 == '\0') {
    pcVar4 = *(code **)(*plVar2 + 0x60);
    *(undefined8 *)(puVar13 + -8) = 0x14005ddf9;
    lVar7 = (*pcVar4)(plVar2,pcVar11,lVar15);
    if (lVar15 != lVar7) {
      cVar12 = '\x01';
    }
  }
  *param_1 = plVar2;
  *(char *)(param_1 + 1) = cVar12;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<unsigned long
// long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned
// long long) const

undefined8 *
std::num_put<>::_M_insert_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,ulonglong param_6)

{
  undefined1 uVar1;
  uint uVar2;
  longlong *plVar3;
  undefined8 uVar4;
  code *pcVar5;
  byte *pbVar6;
  longlong lVar7;
  int iVar8;
  longlong lVar9;
  undefined1 *puVar10;
  ctype<char> *pcVar11;
  ctype<char> *pcVar12;
  char cVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  longlong lVar16;
  undefined8 uStack_c0;
  undefined1 auStack_b8 [32];
  undefined8 uStack_90;
  ctype<char> local_88 [40];
  undefined1 local_60 [12];
  uint local_54;
  undefined4 local_50;
  char local_49;
  
  plVar3 = (longlong *)*param_3;
  uVar4 = param_3[1];
  local_50 = param_5;
  uStack_90 = 0x14005df84;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar2 = *(uint *)(param_4 + 0x18);
  puVar14 = auStack_b8;
  puVar15 = auStack_b8;
  local_54 = uVar2 & 0x4a;
  local_49 = local_54 != 0x40 && local_54 != 8;
  uStack_c0 = 0x14005dfce;
  iVar8 = __int_to_char<>(local_60,param_6,lVar9 + 0x4a,uVar2,local_49);
  pcVar11 = local_88 + (0x28 - iVar8);
  if (*(char *)(lVar9 + 0x20) != '\0') {
    uStack_c0 = 0x14005e05b;
    lVar16 = *(longlong *)(lVar9 + 0x18);
    pbVar6 = *(byte **)(lVar9 + 0x10);
    lVar7 = -((longlong)(iVar8 + 1) * 2 + 0xfU & 0xfffffffffffffff0);
    puVar14 = auStack_b8 + lVar7;
    puVar15 = auStack_b8 + lVar7;
    uVar1 = *(undefined1 *)(lVar9 + 0x49);
    *(ctype<char> **)(local_88 + lVar7 + -8) = pcVar11 + iVar8;
    pcVar12 = local_88 + lVar7 + 2;
    *(ctype<char> **)(local_88 + lVar7 + -0x10) = pcVar11;
    *(undefined8 *)(auStack_b8 + lVar7 + -8) = 0x14005e087;
    puVar10 = __add_grouping<char>
                        (pcVar12,uVar1,pbVar6,lVar16,*(longlong *)(local_88 + lVar7 + -0x10),
                         *(longlong *)(local_88 + lVar7 + -8));
    iVar8 = (int)puVar10 - (int)pcVar12;
    pcVar11 = pcVar12;
  }
  pcVar12 = pcVar11;
  if (((local_49 == '\0') && (puVar14 = puVar15, (uVar2 & 0x200) != 0)) && (param_6 != 0)) {
    if (local_54 == 0x40) {
      iVar8 = iVar8 + 1;
      pcVar12 = pcVar11 + -1;
      *pcVar12 = *(ctype<char> *)(lVar9 + 0x4e);
    }
    else {
      iVar8 = iVar8 + 2;
      pcVar12 = pcVar11 + -2;
      pcVar11[-1] = *(ctype<char> *)(lVar9 + 0x4c + (ulonglong)(uVar2 >> 0xe & 1));
      *pcVar12 = *(ctype<char> *)(lVar9 + 0x4e);
    }
  }
  lVar9 = *(longlong *)(param_4 + 0x10);
  lVar16 = (longlong)iVar8;
  pcVar11 = pcVar12;
  puVar15 = puVar14;
  if (lVar16 < lVar9) {
    *(undefined8 *)(puVar14 + -8) = 0x14005e0ed;
    lVar7 = -(lVar9 + 0xfU & 0xfffffffffffffff0);
    puVar15 = puVar14 + lVar7;
    cVar13 = (char)local_50;
    *(longlong *)(puVar14 + lVar7 + 0x28) = lVar16;
    pcVar11 = (ctype<char> *)(puVar14 + lVar7 + 0x30);
    lVar16 = (longlong)(int)lVar9;
    *(longlong *)(puVar14 + lVar7 + 0x20) = lVar9;
    *(undefined8 *)(puVar14 + lVar7 + -8) = 0x14005e116;
    __pad<>::_S_pad(param_4,cVar13,pcVar11,pcVar12,*(longlong *)(puVar14 + lVar7 + 0x20),
                    *(size_t *)(puVar14 + lVar7 + 0x28));
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar13 = (char)uVar4;
  if (cVar13 == '\0') {
    pcVar5 = *(code **)(*plVar3 + 0x60);
    *(undefined8 *)(puVar15 + -8) = 0x14005e01f;
    lVar9 = (*pcVar5)(plVar3,pcVar11,lVar16);
    if (lVar16 != lVar9) {
      cVar13 = '\x01';
    }
  }
  *param_1 = plVar3;
  *(char *)(param_1 + 1) = cVar13;
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_group_float(char
// const*, unsigned long long, char, char const*, char*, char*, int&) const

void __thiscall
std::num_put<>::_M_group_float
          (undefined8 param_1_00,byte *param_2,longlong param_3,undefined1 param_4,void *param_5,
          undefined1 *param_6,longlong param_7,int *param_8)

{
  undefined1 *puVar1;
  int iVar2;
  int iVar3;
  
  if (param_5 != (void *)0x0) {
    iVar3 = (int)param_5 - (int)param_7;
    puVar1 = __add_grouping<char>(param_6,param_4,param_2,param_3,param_7,iVar3 + param_7);
    iVar2 = 0;
    if ((longlong)(*param_8 - iVar3) != 0) {
      memcpy(puVar1,param_5,(longlong)(*param_8 - iVar3));
      iVar2 = *param_8 - iVar3;
    }
    *param_8 = iVar2 + ((int)puVar1 - (int)param_6);
    return;
  }
  puVar1 = __add_grouping<char>(param_6,param_4,param_2,param_3,param_7,*param_8 + param_7);
  *param_8 = (int)puVar1 - (int)param_6;
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> >
// >::_M_insert_float<double>(std::ostreambuf_iterator<char, std::char_traits<char> >,
// std::ios_base&, char, char, double) const

void std::num_put<>::_M_insert_float<double>
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
               undefined4 param_5,char param_6,longlong param_7)

{
  int iVar1;
  ctype<char> *pcVar2;
  ctype<char> *pcVar3;
  undefined1 uVar4;
  longlong *plVar5;
  code *pcVar6;
  byte *pbVar7;
  longlong lVar8;
  longlong lVar9;
  void *pvVar10;
  size_t sVar11;
  ctype<char> *pcVar12;
  char cVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  char *_Src;
  char *pcVar17;
  ctype<char> *pcVar18;
  longlong lVar19;
  size_t _Size;
  bool bVar20;
  undefined8 uStack_120;
  undefined1 auStack_118 [32];
  longlong local_f8 [4];
  char local_d8 [56];
  char *local_a0;
  ctype<char> *local_98;
  undefined4 local_8c;
  undefined8 local_88;
  ctype<char> *local_80;
  int local_74;
  longlong local_70;
  char local_68 [40];
  
  local_88 = param_3[1];
  plVar5 = (longlong *)*param_3;
  local_8c = param_5;
  local_f8[1] = 0x14005e26c;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  lVar19 = *(longlong *)(param_4 + 8);
  if (lVar19 < 0) {
    lVar19 = 6;
  }
  local_f8[1] = 0x14005e28e;
  __num_base::_S_format_float(param_4,local_68,param_6);
  puVar14 = auStack_118;
  _Src = local_d8;
  if ((~*(uint *)(param_4 + 0x18) & 0x104) == 0) {
    uStack_120 = 0x14005e56d;
    local_70 = locale::facet::_S_get_c_locale();
    local_f8[0] = param_7;
    uStack_120 = 0x14005e58f;
    local_74 = __convert_from_v(&local_70,_Src,0x2d,local_68);
    if (0x2c < local_74) {
      iVar1 = local_74 + 1;
      uStack_120 = 0x14005e5af;
      lVar19 = -((longlong)iVar1 + 0xfU & 0xfffffffffffffff0);
      puVar14 = auStack_118 + lVar19;
      *(undefined8 *)(auStack_118 + lVar19 + -8) = 0x14005e5b7;
      local_70 = locale::facet::_S_get_c_locale();
      _Src = local_d8 + lVar19;
      *(longlong *)((longlong)local_f8 + lVar19) = param_7;
      *(undefined8 *)(auStack_118 + lVar19 + -8) = 0x14005e5d7;
      local_74 = __convert_from_v(&local_70,_Src,iVar1,local_68);
    }
  }
  else {
    uStack_120 = 0x14005e2ac;
    local_70 = locale::facet::_S_get_c_locale();
    local_f8[1] = param_7;
    uStack_120 = 0x14005e2d3;
    local_f8[0] = lVar19;
    local_74 = __convert_from_v(&local_70,_Src,0x2d,local_68);
    puVar14 = auStack_118;
    if (0x2c < local_74) {
      local_80 = (ctype<char> *)CONCAT44(local_80._4_4_,local_74 + 1);
      uStack_120 = 0x14005e410;
      lVar8 = -((longlong)(local_74 + 1) + 0xfU & 0xfffffffffffffff0);
      puVar14 = auStack_118 + lVar8;
      *(undefined8 *)(auStack_118 + lVar8 + -8) = 0x14005e418;
      local_70 = locale::facet::_S_get_c_locale();
      _Src = local_d8 + lVar8;
      *(longlong *)((longlong)local_f8 + lVar8) = lVar19;
      *(longlong *)((longlong)local_f8 + lVar8 + 8) = param_7;
      iVar1 = (int)local_80;
      *(undefined8 *)(auStack_118 + lVar8 + -8) = 0x14005e43e;
      local_74 = __convert_from_v(&local_70,_Src,iVar1,local_68);
    }
  }
  *(undefined8 *)(puVar14 + -8) = 0x14005e2eb;
  lVar19 = locale::id::_M_id((id *)&ctype<char>::id);
  iVar1 = local_74;
  pcVar12 = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar19 * 8);
  if (pcVar12 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    *(undefined8 *)(puVar14 + -8) = 0x14005e638;
    __throw_bad_cast();
  }
  _Size = (size_t)local_74;
  *(undefined8 *)(puVar14 + -8) = 0x14005e31a;
  lVar19 = -(_Size + 0xf & 0xfffffffffffffff0);
  puVar15 = puVar14 + lVar19;
  puVar16 = puVar14 + lVar19;
  pcVar17 = _Src + _Size;
  pcVar2 = (ctype<char> *)(puVar14 + lVar19 + 0x40);
  local_80 = pcVar2;
  if (pcVar12[0x38] == (ctype<char>)0x1) {
LAB_14005e351:
    if (pcVar17 != _Src) {
      *(undefined8 *)(puVar14 + lVar19 + -8) = 0x14005e368;
      memcpy(pcVar2,_Src,_Size);
      goto LAB_14005e368;
    }
LAB_14005e621:
    if (*(char *)(lVar9 + 0x20) != '\0') goto LAB_14005e488;
    _Size = 0;
LAB_14005e398:
    lVar19 = *(longlong *)(param_4 + 0x10);
    sVar11 = _Size;
    if (lVar19 <= (longlong)_Size) goto LAB_14005e3a8;
  }
  else {
    if (pcVar12[0x38] == (ctype<char>)0x0) {
      local_a0 = pcVar17;
      local_98 = pcVar12;
      *(undefined8 *)(puVar14 + lVar19 + -8) = 0x14005e5ed;
      ctype<char>::_M_widen_init(pcVar12);
      pcVar12 = local_98;
      pcVar17 = local_a0;
    }
    pcVar6 = *(code **)(*(longlong *)pcVar12 + 0x38);
    if (pcVar6 == ctype<char>::do_widen) goto LAB_14005e351;
    *(undefined8 *)(puVar14 + lVar19 + -8) = 0x14005e618;
    (*pcVar6)();
    if (_Size == 0) goto LAB_14005e621;
LAB_14005e368:
    *(undefined8 *)(puVar14 + lVar19 + -8) = 0x14005e378;
    pvVar10 = memchr(_Src,0x2e,_Size);
    if (pvVar10 == (void *)0x0) {
      if ((*(char *)(lVar9 + 0x20) == '\0') ||
         ((2 < iVar1 && ((('9' < _Src[1] || (9 < (byte)(_Src[2] - 0x30U))) || (_Src[1] < '0'))))))
      goto LAB_14005e398;
LAB_14005e488:
      pcVar12 = (ctype<char> *)0x0;
    }
    else {
      pcVar12 = pcVar2 + ((longlong)pvVar10 - (longlong)_Src);
      *pcVar12 = *(ctype<char> *)(lVar9 + 0x48);
      if (*(char *)(lVar9 + 0x20) == '\0') goto LAB_14005e398;
    }
    *(undefined8 *)(puVar14 + lVar19 + -8) = 0x14005e498;
    lVar8 = -(_Size * 2 + 0xf & 0xfffffffffffffff0);
    puVar16 = puVar14 + lVar8 + lVar19;
    puVar15 = puVar14 + lVar8 + lVar19;
    pcVar3 = (ctype<char> *)(puVar14 + lVar8 + lVar19 + 0x40);
    bVar20 = (*_Src - 0x2bU & 0xfd) == 0;
    pcVar18 = pcVar3;
    if (bVar20) {
      *pcVar3 = *pcVar2;
      local_74 = iVar1 + -1;
      local_80 = (ctype<char> *)(puVar14 + lVar19 + 0x41);
      pcVar18 = (ctype<char> *)(puVar14 + lVar8 + lVar19 + 0x41);
    }
    pbVar7 = *(byte **)(lVar9 + 0x10);
    uVar4 = *(undefined1 *)(lVar9 + 0x49);
    lVar9 = *(longlong *)(lVar9 + 0x18);
    *(int **)(puVar14 + lVar8 + lVar19 + 0x38) = &local_74;
    pcVar2 = local_80;
    *(ctype<char> **)(puVar14 + lVar8 + lVar19 + 0x20) = pcVar12;
    *(ctype<char> **)(puVar14 + lVar8 + lVar19 + 0x28) = pcVar18;
    *(ctype<char> **)(puVar14 + lVar8 + lVar19 + 0x30) = pcVar2;
    *(undefined8 *)(puVar14 + lVar8 + lVar19 + -8) = 0x14005e505;
    _M_group_float(param_2,pbVar7,lVar9,uVar4,*(void **)(puVar14 + lVar8 + lVar19 + 0x20),
                   *(undefined1 **)(puVar14 + lVar8 + lVar19 + 0x28),
                   *(longlong *)(puVar14 + lVar8 + lVar19 + 0x30),
                   *(int **)(puVar14 + lVar8 + lVar19 + 0x38));
    local_74 = (uint)bVar20 + local_74;
    lVar19 = *(longlong *)(param_4 + 0x10);
    local_80 = pcVar3;
    _Size = (size_t)local_74;
    sVar11 = _Size;
    if (lVar19 <= (longlong)_Size) goto LAB_14005e3a8;
  }
  *(undefined8 *)(puVar16 + -8) = 0x14005e531;
  cVar13 = (char)local_8c;
  lVar9 = -(lVar19 + 0xfU & 0xfffffffffffffff0);
  puVar15 = puVar16 + lVar9;
  _Size = (size_t)(int)lVar19;
  *(size_t *)(puVar16 + lVar9 + 0x28) = sVar11;
  *(longlong *)(puVar16 + lVar9 + 0x20) = lVar19;
  pcVar12 = local_80;
  *(undefined8 *)(puVar16 + lVar9 + -8) = 0x14005e559;
  __pad<>::_S_pad(param_4,cVar13,(ctype<char> *)(puVar16 + lVar9 + 0x40),pcVar12,
                  *(longlong *)(puVar16 + lVar9 + 0x20),*(size_t *)(puVar16 + lVar9 + 0x28));
  local_80 = (ctype<char> *)(puVar16 + lVar9 + 0x40);
  local_74 = (int)lVar19;
LAB_14005e3a8:
  pcVar12 = local_80;
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar13 = (char)local_88;
  if (cVar13 == '\0') {
    pcVar6 = *(code **)(*plVar5 + 0x60);
    *(undefined8 *)(puVar15 + -8) = 0x14005e3cb;
    sVar11 = (*pcVar6)(plVar5,pcVar12,_Size);
    if (_Size != sVar11) {
      cVar13 = '\x01';
    }
  }
  *param_1 = plVar5;
  *(char *)(param_1 + 1) = cVar13;
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_float<long
// double>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, char, long
// double) const

void std::num_put<>::_M_insert_float<>
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
               undefined4 param_5,char param_6,undefined1 (*param_7) [10])

{
  int iVar1;
  ctype<char> cVar2;
  undefined1 uVar3;
  code *pcVar4;
  byte *pbVar5;
  longlong lVar6;
  longlong *plVar7;
  longlong lVar8;
  longlong lVar9;
  void *pvVar10;
  size_t sVar11;
  ctype<char> *pcVar12;
  char cVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  char *_Src;
  char *pcVar17;
  ctype<char> *pcVar18;
  undefined1 (*pauVar19) [10];
  ctype<char> *_Dst;
  ctype<char> *pcVar20;
  size_t _Size;
  bool bVar21;
  undefined8 uStack_130;
  undefined1 auStack_128 [32];
  undefined1 (*local_108 [4]) [10];
  char local_e8 [64];
  char *local_a8;
  undefined4 local_9c;
  undefined1 local_98 [10];
  undefined8 local_88;
  longlong *local_80;
  undefined1 local_78 [2] [10];
  int local_64;
  longlong local_60;
  char local_58 [24];
  
  _Src = local_e8;
  local_80 = (longlong *)*param_3;
  local_88 = param_3[1];
  local_9c = param_5;
  local_98 = *param_7;
  local_108[3] = (undefined1 (*) [10])0x14005e69a;
  lVar8 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  pauVar19 = *(undefined1 (**) [10])(param_4 + 8);
  if ((longlong)pauVar19 < 0) {
    pauVar19 = (undefined1 (*) [10])0x6;
  }
  local_108[3] = (undefined1 (*) [10])0x14005e6bc;
  __num_base::_S_format_float(param_4,local_58,param_6);
  puVar14 = auStack_128;
  if ((~*(uint *)(param_4 + 0x18) & 0x104) == 0) {
    uStack_130 = 0x14005e995;
    local_60 = locale::facet::_S_get_c_locale();
    local_78[0] = local_98;
    uStack_130 = 0x14005e9c0;
    local_108[0] = local_78;
    local_64 = __convert_from_v(&local_60,local_e8,0x36,local_58);
    if (0x35 < local_64) {
      iVar1 = local_64 + 1;
      uStack_130 = 0x14005e9e0;
      lVar9 = -((longlong)iVar1 + 0xfU & 0xfffffffffffffff0);
      puVar14 = auStack_128 + lVar9;
      *(undefined8 *)(auStack_128 + lVar9 + -8) = 0x14005e9e8;
      local_60 = locale::facet::_S_get_c_locale();
      _Src = local_e8 + lVar9;
      local_78[0] = local_98;
      *(undefined1 (**) [10])((longlong)local_108 + lVar9) = local_78;
      *(undefined8 *)(auStack_128 + lVar9 + -8) = 0x14005ea0d;
      local_64 = __convert_from_v(&local_60,_Src,iVar1,local_58);
    }
  }
  else {
    uStack_130 = 0x14005e6da;
    local_60 = locale::facet::_S_get_c_locale();
    local_78[0] = local_98;
    uStack_130 = 0x14005e70a;
    local_108[0] = pauVar19;
    local_108[1] = local_78;
    local_64 = __convert_from_v(&local_60,local_e8,0x36,local_58);
    puVar14 = auStack_128;
    _Src = local_e8;
    if (0x35 < local_64) {
      local_a8 = (char *)CONCAT44(local_a8._4_4_,local_64 + 1);
      uStack_130 = 0x14005e848;
      lVar9 = -((longlong)(local_64 + 1) + 0xfU & 0xfffffffffffffff0);
      puVar14 = auStack_128 + lVar9;
      *(undefined8 *)(auStack_128 + lVar9 + -8) = 0x14005e850;
      local_60 = locale::facet::_S_get_c_locale();
      _Src = local_e8 + lVar9;
      local_78[0] = local_98;
      *(undefined1 (**) [10])((longlong)local_108 + lVar9 + 8) = local_78;
      *(undefined1 (**) [10])((longlong)local_108 + lVar9) = pauVar19;
      iVar1 = (int)local_a8;
      *(undefined8 *)(auStack_128 + lVar9 + -8) = 0x14005e87b;
      local_64 = __convert_from_v(&local_60,_Src,iVar1,local_58);
    }
  }
  *(undefined8 *)(puVar14 + -8) = 0x14005e722;
  lVar9 = locale::id::_M_id((id *)&ctype<char>::id);
  iVar1 = local_64;
  pcVar12 = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar9 * 8);
  if (pcVar12 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    *(undefined **)(puVar14 + -8) = &UNK_14005ea70;
    __throw_bad_cast();
  }
  _Size = (size_t)local_64;
  *(undefined8 *)(puVar14 + -8) = 0x14005e751;
  lVar9 = -(_Size + 0xf & 0xfffffffffffffff0);
  puVar15 = puVar14 + lVar9;
  puVar16 = puVar14 + lVar9;
  pcVar17 = _Src + _Size;
  _Dst = (ctype<char> *)(puVar14 + lVar9 + 0x40);
  if (pcVar12[0x38] == (ctype<char>)0x1) {
LAB_14005e787:
    if (pcVar17 != _Src) {
      *(undefined8 *)(puVar14 + lVar9 + -8) = 0x14005e79e;
      memcpy(_Dst,_Src,_Size);
      goto LAB_14005e79e;
    }
LAB_14005ea59:
    if (*(char *)(lVar8 + 0x20) != '\0') goto LAB_14005e8c0;
    _Size = 0;
LAB_14005e7cf:
    lVar8 = *(longlong *)(param_4 + 0x10);
    pcVar20 = _Dst;
    if (lVar8 <= (longlong)_Size) goto LAB_14005e7dc;
  }
  else {
    if (pcVar12[0x38] == (ctype<char>)0x0) {
      local_98._0_8_ = pcVar12;
      local_a8 = pcVar17;
      *(undefined8 *)(puVar14 + lVar9 + -8) = 0x14005ea25;
      ctype<char>::_M_widen_init(pcVar12);
      pcVar12 = (ctype<char> *)local_98._0_8_;
      pcVar17 = local_a8;
    }
    pcVar4 = *(code **)(*(longlong *)pcVar12 + 0x38);
    if (pcVar4 == ctype<char>::do_widen) goto LAB_14005e787;
    *(undefined8 *)(puVar14 + lVar9 + -8) = 0x14005ea50;
    (*pcVar4)();
    if (_Size == 0) goto LAB_14005ea59;
LAB_14005e79e:
    *(undefined8 *)(puVar14 + lVar9 + -8) = 0x14005e7ae;
    pvVar10 = memchr(_Src,0x2e,_Size);
    if (pvVar10 == (void *)0x0) {
      if ((*(char *)(lVar8 + 0x20) == '\0') ||
         ((2 < iVar1 && ((('9' < _Src[1] || (9 < (byte)(_Src[2] - 0x30U))) || (_Src[1] < '0'))))))
      goto LAB_14005e7cf;
LAB_14005e8c0:
      pcVar12 = (ctype<char> *)0x0;
    }
    else {
      pcVar12 = _Dst + ((longlong)pvVar10 - (longlong)_Src);
      *pcVar12 = *(ctype<char> *)(lVar8 + 0x48);
      if (*(char *)(lVar8 + 0x20) == '\0') goto LAB_14005e7cf;
    }
    *(undefined8 *)(puVar14 + lVar9 + -8) = 0x14005e8d0;
    lVar6 = -(_Size * 2 + 0xf & 0xfffffffffffffff0);
    puVar16 = puVar14 + lVar6 + lVar9;
    puVar15 = puVar14 + lVar6 + lVar9;
    pcVar20 = (ctype<char> *)(puVar14 + lVar6 + lVar9 + 0x40);
    bVar21 = (*_Src - 0x2bU & 0xfd) == 0;
    pcVar18 = pcVar20;
    if (bVar21) {
      cVar2 = *_Dst;
      _Dst = (ctype<char> *)(puVar14 + lVar9 + 0x41);
      local_64 = iVar1 + -1;
      *pcVar20 = cVar2;
      pcVar18 = (ctype<char> *)(puVar14 + lVar6 + lVar9 + 0x41);
    }
    pbVar5 = *(byte **)(lVar8 + 0x10);
    uVar3 = *(undefined1 *)(lVar8 + 0x49);
    lVar8 = *(longlong *)(lVar8 + 0x18);
    *(ctype<char> **)(puVar14 + lVar6 + lVar9 + 0x30) = _Dst;
    *(ctype<char> **)(puVar14 + lVar6 + lVar9 + 0x20) = pcVar12;
    *(int **)(puVar14 + lVar6 + lVar9 + 0x38) = &local_64;
    *(ctype<char> **)(puVar14 + lVar6 + lVar9 + 0x28) = pcVar18;
    *(undefined8 *)(puVar14 + lVar6 + lVar9 + -8) = 0x14005e938;
    _M_group_float(param_2,pbVar5,lVar8,uVar3,*(void **)(puVar14 + lVar6 + lVar9 + 0x20),
                   *(undefined1 **)(puVar14 + lVar6 + lVar9 + 0x28),
                   *(longlong *)(puVar14 + lVar6 + lVar9 + 0x30),
                   *(int **)(puVar14 + lVar6 + lVar9 + 0x38));
    local_64 = (uint)bVar21 + local_64;
    lVar8 = *(longlong *)(param_4 + 0x10);
    _Size = (size_t)local_64;
    if (lVar8 <= (longlong)_Size) goto LAB_14005e7dc;
  }
  *(undefined8 *)(puVar16 + -8) = 0x14005e95d;
  cVar13 = (char)local_9c;
  lVar9 = -(lVar8 + 0xfU & 0xfffffffffffffff0);
  puVar15 = puVar16 + lVar9;
  *(size_t *)(puVar16 + lVar9 + 0x28) = _Size;
  _Size = (size_t)(int)lVar8;
  *(longlong *)(puVar16 + lVar9 + 0x20) = lVar8;
  *(undefined8 *)(puVar16 + lVar9 + -8) = 0x14005e987;
  __pad<>::_S_pad(param_4,cVar13,(ctype<char> *)(puVar16 + lVar9 + 0x40),pcVar20,
                  *(longlong *)(puVar16 + lVar9 + 0x20),*(size_t *)(puVar16 + lVar9 + 0x28));
  pcVar20 = (ctype<char> *)(puVar16 + lVar9 + 0x40);
  local_64 = (int)lVar8;
LAB_14005e7dc:
  plVar7 = local_80;
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar13 = (char)local_88;
  if (cVar13 == '\0') {
    pcVar4 = *(code **)(*local_80 + 0x60);
    *(undefined8 *)(puVar15 + -8) = 0x14005e7fe;
    sVar11 = (*pcVar4)(plVar7,pcVar20,_Size);
    if (_Size != sVar11) {
      cVar13 = '\x01';
    }
  }
  *param_1 = local_80;
  *(char *)(param_1 + 1) = cVar13;
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, void
// const*) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,ulonglong param_6)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_48;
  ulonglong local_40;
  undefined8 local_38;
  ulonglong local_30;
  
  local_48 = *param_3;
  local_40 = param_3[1];
  if (*(code **)(*param_2 + 0x48) == do_put) {
    uVar1 = *(uint *)(param_4 + 0x18);
    *(uint *)(param_4 + 0x18) = uVar1 & 0xffffbfb5 | 0x208;
    uVar2 = local_40 & 0xffffffffffffff00;
    _M_insert_int<>(&local_38,param_2,&local_48,param_4,(int)param_5,param_6);
    *(uint *)(param_4 + 0x18) = uVar1;
    *param_1 = local_38;
    param_1[1] = uVar2 | local_30 & 0xff;
    return param_1;
  }
  local_38 = local_48;
  local_30 = local_40;
  (**(code **)(*param_2 + 0x48))(param_1,param_2,&local_38,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, bool) const

undefined8
std::num_put<>::put(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 param_4,
                   char param_5,undefined1 param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, double)
// const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,longlong param_6)

{
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  if (*(code **)(*param_2 + 0x38) == do_put) {
    _M_insert_float<double>(param_1,param_2,&local_18,param_4,(int)param_5,'\0',param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))(param_1,param_2,&local_18,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long
// double) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,undefined1 (*param_6) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_6;
  if (*(code **)(*param_2 + 0x40) == do_put) {
    _M_insert_float<>(param_1,param_2,&local_18,param_4,(int)param_5,'L',&local_28);
    return param_1;
  }
  (**(code **)(*param_2 + 0x40))(param_1,param_2,&local_18,param_4,(int)param_5,local_28);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,uint param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x18) == do_put) {
    _M_insert_int<long>(param_1,param_2,&local_28,param_4,(int)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned
// long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,uint param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x20) == do_put) {
    _M_insert_int<>(param_1,param_2,&local_28,param_4,(int)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))();
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long long)
// const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,ulonglong param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x28) == do_put) {
    _M_insert_int<long_long>(param_1,param_2,&local_28,param_4,(int)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))();
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned
// long long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   char param_5,ulonglong param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x30) == do_put) {
    _M_insert_int<>(param_1,param_2,&local_28,param_4,(int)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))();
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_pad(char, long
// long, std::ios_base&, char*, char const*, int&) const

void __thiscall
std::num_put<>::_M_pad
          (undefined8 param_1_00,char param_2,longlong param_3,longlong param_4,ctype<char> *param_5
          ,ctype<char> *param_6,int *param_7)

{
  __pad<>::_S_pad(param_4,param_2,param_5,param_6,param_3,(longlong)*param_7);
  *param_7 = (int)param_3;
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, void
// const*) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          ulonglong param_6)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_48;
  ulonglong local_40;
  undefined8 local_38;
  byte local_30;
  
  uVar1 = *(uint *)(param_4 + 0x18);
  local_48 = *param_3;
  local_40 = param_3[1];
  *(uint *)(param_4 + 0x18) = uVar1 & 0xffffbfb5 | 0x208;
  uVar2 = local_40 & 0xffffffffffffff00;
  _M_insert_int<>(&local_38,param_2,&local_48,param_4,(int)param_5,param_6);
  *(uint *)(param_4 + 0x18) = uVar1;
  *param_1 = local_38;
  param_1[1] = uVar2 | local_30;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, bool)
// const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          byte param_6)

{
  uint uVar1;
  code *pcVar2;
  undefined1 *puVar3;
  undefined8 uVar4;
  longlong lVar5;
  undefined1 *puVar6;
  longlong *plVar7;
  size_t _Size;
  size_t sVar8;
  char cVar9;
  undefined7 uVar11;
  undefined8 uVar10;
  longlong lVar12;
  longlong lVar13;
  undefined8 uStackY_100;
  undefined1 auStackY_f8 [32];
  undefined1 auStack_c8 [8];
  undefined1 *local_c0;
  undefined8 local_b8;
  size_t local_b0;
  undefined1 local_80;
  longlong *local_78;
  undefined8 local_70;
  longlong *local_68;
  undefined1 local_60;
  longlong *local_58;
  undefined8 local_50;
  
  puVar6 = auStackY_f8;
  uVar1 = *(uint *)(param_4 + 0x18);
  plVar7 = (longlong *)*param_3;
  uVar10 = param_3[1];
  uVar11 = (undefined7)((ulonglong)uVar10 >> 8);
  if ((uVar1 & 1) == 0) {
    uStackY_100 = 0x14005efb1;
    local_78 = plVar7;
    local_70 = uVar10;
    _M_insert_int<long>(&local_68,param_2,&local_78,param_4,(int)param_5,(uint)param_6);
    uVar10 = CONCAT71(uVar11,local_60);
    plVar7 = local_68;
    goto LAB_14005efc0;
  }
  uStackY_100 = 0x14005efec;
  lVar5 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIcEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  cVar9 = (char)uVar10;
  if (param_6 == 0) {
    lVar13 = (longlong)*(int *)(lVar5 + 0x40);
    lVar12 = *(longlong *)(param_4 + 0x10);
    sVar8 = *(undefined8 *)(lVar5 + 0x38);
    if (lVar12 <= lVar13) goto LAB_14005f09d;
LAB_14005f00a:
    _Size = lVar12 - lVar13;
    uStackY_100 = 0x14005f01e;
    lVar5 = -(_Size + 0xf & 0xfffffffffffffff0);
    puVar6 = auStackY_f8 + lVar5;
    local_c0 = auStack_c8 + lVar5;
    local_b8 = sVar8;
    local_b0 = _Size;
    *(undefined8 *)(auStackY_f8 + lVar5 + -8) = 0x14005f03e;
    memset(auStack_c8 + lVar5,(int)param_5,_Size);
    uVar4 = local_b8;
    puVar3 = local_c0;
    *(undefined8 *)(param_4 + 0x10) = 0;
    lVar12 = (longlong)(int)local_b0;
    if ((uVar1 & 0xb0) == 0x20) {
      local_58 = plVar7;
      local_50 = uVar10;
      *(undefined8 *)(auStackY_f8 + lVar5 + -8) = 0x14005f0ed;
      _text__ZNSt19ostreambuf_iteratorIcSt11char_traitsIcEE6_M_putEPKcx_isra_0
                (&local_58,uVar4,lVar13);
      puVar3 = local_c0;
      local_78 = local_58;
      local_70 = local_50;
      uVar10 = local_70;
      local_70._0_1_ = (undefined1)local_50;
      local_50 = CONCAT71(uVar11,(undefined1)local_70);
      local_70 = uVar10;
      *(undefined8 *)(auStackY_f8 + lVar5 + -8) = 0x14005f11a;
      _text__ZNSt19ostreambuf_iteratorIcSt11char_traitsIcEE6_M_putEPKcx_isra_0
                (&local_58,puVar3,lVar12);
      local_80 = (undefined1)local_50;
      uVar10 = CONCAT71(uVar11,local_80);
      plVar7 = local_58;
      goto LAB_14005efc0;
    }
    local_b0 = local_b8;
    if (cVar9 == '\0') {
      pcVar2 = *(code **)(*plVar7 + 0x60);
      *(undefined8 *)(auStackY_f8 + lVar5 + -8) = 0x14005f073;
      lVar5 = (*pcVar2)(plVar7,puVar3,lVar12);
      sVar8 = local_b0;
      if (lVar12 == lVar5) goto LAB_14005f0ad;
      cVar9 = '\x01';
    }
  }
  else {
    lVar13 = (longlong)*(int *)(lVar5 + 0x30);
    lVar12 = *(longlong *)(param_4 + 0x10);
    sVar8 = *(undefined8 *)(lVar5 + 0x28);
    if (lVar13 < lVar12) goto LAB_14005f00a;
LAB_14005f09d:
    *(undefined8 *)(param_4 + 0x10) = 0;
    if (cVar9 == '\0') {
LAB_14005f0ad:
      pcVar2 = *(code **)(*plVar7 + 0x60);
      *(undefined8 *)(puVar6 + -8) = 0x14005f0bc;
      lVar5 = (*pcVar2)(plVar7,sVar8,lVar13);
      if (lVar13 != lVar5) {
        cVar9 = '\x01';
      }
    }
  }
  uVar10 = CONCAT71(uVar11,cVar9);
LAB_14005efc0:
  *param_1 = plVar7;
  param_1[1] = uVar10;
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, double)
// const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          longlong param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_float<double>(param_1,param_2,&local_18,param_4,(int)param_5,'\0',param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long
// double) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          undefined1 (*param_6) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_6;
  _M_insert_float<>(param_1,param_2,&local_18,param_4,(int)param_5,'L',&local_28);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long)
// const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          uint param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<long>(param_1,param_2,&local_18,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned
// long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          uint param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<>(param_1,param_2,&local_18,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long
// long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          ulonglong param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<long_long>(param_1,param_2,&local_18,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, unsigned
// long long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          ulonglong param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<>(param_1,param_2,&local_18,param_4,(int)param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_group_int(char const*, unsigned long long, wchar_t, std::ios_base&, wchar_t*, wchar_t*,
// int&) const

void __thiscall
std::num_put<>::_M_group_int
          (undefined8 param_1_00,byte *param_2,longlong param_3,undefined2 param_4,
          undefined8 param_5,undefined2 *param_6,longlong param_7,int *param_8)

{
  undefined2 *puVar1;
  
  puVar1 = __add_grouping<wchar_t>
                     (param_6,param_4,param_2,param_3,param_7,param_7 + (longlong)*param_8 * 2);
  *param_8 = (int)((longlong)puVar1 - (longlong)param_6 >> 1);
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_insert_int<long>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, wchar_t, long) const

undefined8 *
std::num_put<>::_M_insert_int<long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,uint param_6)

{
  undefined2 uVar1;
  longlong *plVar2;
  undefined8 uVar3;
  code *pcVar4;
  byte *pbVar5;
  short sVar6;
  longlong lVar7;
  longlong lVar8;
  undefined2 *puVar9;
  uint uVar10;
  short *psVar11;
  short *psVar12;
  char cVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  longlong lVar16;
  int iVar17;
  bool bVar18;
  bool bVar19;
  undefined8 uStack_d0;
  undefined1 auStack_c8 [32];
  longlong lStack_a0;
  short local_98 [2];
  short asStack_94 [18];
  undefined2 local_70 [6];
  uint local_64;
  short *local_60;
  longlong local_58;
  undefined4 local_50;
  uint local_4c;
  
  plVar2 = (longlong *)*param_3;
  uVar3 = param_3[1];
  local_50 = param_5;
  lStack_a0 = 0x14005f378;
  lVar7 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  puVar14 = auStack_c8;
  puVar15 = auStack_c8;
  local_58 = lVar7 + 0x4c;
  local_4c = *(uint *)(param_4 + 0x18);
  local_64 = local_4c & 0x4a;
  bVar18 = local_64 != 0x40;
  bVar19 = local_64 != 8;
  uVar10 = param_6;
  if (((int)param_6 < 1) && (uVar10 = -param_6, !bVar18 || !bVar19)) {
    uVar10 = param_6;
  }
  uStack_d0 = 0x14005f3d6;
  local_60 = local_98;
  lVar8 = __int_to_char<>(local_70,uVar10,local_58,local_4c,bVar18 && bVar19);
  iVar17 = (int)lVar8;
  psVar12 = local_60 + (0x14 - iVar17);
  if (*(char *)(lVar7 + 0x20) == '\0') {
    if (bVar18 && bVar19) goto LAB_14005f3fe;
LAB_14005f53a:
    psVar11 = psVar12;
    if (((local_4c & 0x200) != 0) && (param_6 != 0)) {
      if (local_64 == 0x40) {
        iVar17 = iVar17 + 1;
        psVar11 = psVar12 + -1;
        *psVar11 = *(short *)(lVar7 + 0x54);
      }
      else {
        iVar17 = iVar17 + 2;
        psVar11 = psVar12 + -2;
        psVar12[-1] = *(short *)(local_58 + 4 + (ulonglong)(local_4c >> 0xe & 1) * 2);
        *psVar11 = *(short *)(lVar7 + 0x54);
      }
    }
LAB_14005f410:
    lVar8 = *(longlong *)(param_4 + 0x10);
    lVar16 = (longlong)iVar17;
    puVar14 = puVar15;
    if (lVar8 <= lVar16) goto LAB_14005f41c;
  }
  else {
    uStack_d0 = 0x14005f4ef;
    pbVar5 = *(byte **)(lVar7 + 0x10);
    uVar1 = *(undefined2 *)(lVar7 + 0x4a);
    lVar8 = *(longlong *)(lVar7 + 0x18);
    lVar16 = -((longlong)(iVar17 + 1) * 4 + 0xfU & 0xfffffffffffffff0);
    puVar14 = auStack_c8 + lVar16;
    puVar15 = auStack_c8 + lVar16;
    *(short **)((longlong)asStack_94 + lVar16 + -0x14) = psVar12;
    *(short **)((longlong)local_98 + lVar16 + -8) = psVar12 + iVar17;
    local_60 = (short *)((longlong)asStack_94 + lVar16);
    *(undefined8 *)(auStack_c8 + lVar16 + -8) = 0x14005f521;
    puVar9 = __add_grouping<wchar_t>
                       ((short *)((longlong)asStack_94 + lVar16),uVar1,pbVar5,lVar8,
                        *(longlong *)((longlong)asStack_94 + lVar16 + -0x14),
                        *(longlong *)((longlong)local_98 + lVar16 + -8));
    iVar17 = (int)((longlong)puVar9 - (longlong)local_60 >> 1);
    psVar12 = local_60;
    if (!bVar18 || !bVar19) goto LAB_14005f53a;
LAB_14005f3fe:
    puVar15 = puVar14;
    if ((int)param_6 < 0) {
      iVar17 = iVar17 + 1;
      psVar12[-1] = *(short *)(lVar7 + 0x4c);
      psVar11 = psVar12 + -1;
      goto LAB_14005f410;
    }
    psVar11 = psVar12;
    if ((local_4c & 0x800) == 0) goto LAB_14005f410;
    lVar8 = *(longlong *)(param_4 + 0x10);
    psVar11 = psVar12 + -1;
    lVar16 = (longlong)(iVar17 + 1);
    *psVar11 = *(short *)(lVar7 + 0x4e);
    if (lVar8 <= lVar16) goto LAB_14005f41c;
  }
  *(undefined8 *)(puVar14 + -8) = 0x14005f489;
  lVar7 = -(lVar8 * 2 + 0xfU & 0xfffffffffffffff0);
  sVar6 = (short)local_50;
  *(longlong *)(puVar14 + lVar7 + 0x28) = lVar16;
  lVar16 = (longlong)(int)lVar8;
  *(longlong *)(puVar14 + lVar7 + 0x20) = lVar8;
  *(undefined8 *)(puVar14 + lVar7 + -8) = 0x14005f4b2;
  __pad<>::_S_pad(param_4,sVar6,(short *)(puVar14 + lVar7 + 0x30),psVar11,
                  *(longlong *)(puVar14 + lVar7 + 0x20),*(longlong *)(puVar14 + lVar7 + 0x28));
  psVar11 = (short *)(puVar14 + lVar7 + 0x30);
  puVar14 = puVar14 + lVar7;
LAB_14005f41c:
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar13 = (char)uVar3;
  if (cVar13 == '\0') {
    pcVar4 = *(code **)(*plVar2 + 0x60);
    *(undefined8 *)(puVar14 + -8) = 0x14005f438;
    lVar7 = (*pcVar4)(plVar2,psVar11,lVar16);
    if (lVar16 != lVar7) {
      cVar13 = '\x01';
    }
  }
  *param_1 = plVar2;
  *(char *)(param_1 + 1) = cVar13;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int<unsigned
// long>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// unsigned long) const

undefined8 *
std::num_put<>::_M_insert_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,uint param_6)

{
  undefined2 uVar1;
  uint uVar2;
  longlong *plVar3;
  undefined8 uVar4;
  code *pcVar5;
  byte *pbVar6;
  longlong lVar7;
  short sVar8;
  longlong lVar9;
  longlong lVar10;
  undefined2 *puVar11;
  short *psVar12;
  short *psVar13;
  char cVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  int iVar17;
  bool bVar18;
  uint uVar19;
  undefined8 uStack_d0;
  undefined1 auStack_c8 [32];
  longlong lStack_a0;
  undefined1 local_98 [4];
  short asStack_94 [18];
  undefined2 local_70 [4];
  longlong local_68;
  undefined4 local_5c;
  undefined1 *local_58;
  short *local_50;
  
  plVar3 = (longlong *)*param_3;
  uVar4 = param_3[1];
  local_5c = param_5;
  lStack_a0 = 0x14005f5d4;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar2 = *(uint *)(param_4 + 0x18);
  puVar15 = auStack_c8;
  puVar16 = auStack_c8;
  local_68 = lVar9 + 0x4c;
  uVar19 = uVar2 & 0x4a;
  bVar18 = uVar19 != 0x40 && uVar19 != 8;
  local_50 = (short *)CONCAT71(local_50._1_7_,bVar18);
  uStack_d0 = 0x14005f625;
  local_58 = local_98;
  lVar10 = __int_to_char<>(local_70,param_6,local_68,uVar2,bVar18);
  iVar17 = (int)lVar10;
  psVar13 = (short *)(local_58 + (longlong)(0x14 - iVar17) * 2);
  cVar14 = (char)local_50;
  if (*(char *)(lVar9 + 0x20) != '\0') {
    local_58 = (undefined1 *)CONCAT71(local_58._1_7_,(char)local_50);
    uStack_d0 = 0x14005f6bb;
    uVar1 = *(undefined2 *)(lVar9 + 0x4a);
    lVar10 = *(longlong *)(lVar9 + 0x18);
    lVar7 = -((longlong)(iVar17 + 1) * 4 + 0xfU & 0xfffffffffffffff0);
    puVar15 = auStack_c8 + lVar7;
    puVar16 = auStack_c8 + lVar7;
    pbVar6 = *(byte **)(lVar9 + 0x10);
    *(short **)(local_98 + lVar7 + -8) = psVar13 + iVar17;
    *(short **)((longlong)asStack_94 + lVar7 + -0x14) = psVar13;
    local_50 = (short *)((longlong)asStack_94 + lVar7);
    *(undefined8 *)(auStack_c8 + lVar7 + -8) = 0x14005f6ed;
    puVar11 = __add_grouping<wchar_t>
                        ((short *)((longlong)asStack_94 + lVar7),uVar1,pbVar6,lVar10,
                         *(longlong *)((longlong)asStack_94 + lVar7 + -0x14),
                         *(longlong *)(local_98 + lVar7 + -8));
    iVar17 = (int)((longlong)puVar11 - (longlong)local_50 >> 1);
    psVar13 = local_50;
    cVar14 = (char)local_58;
  }
  psVar12 = psVar13;
  if (((cVar14 == '\0') && (puVar15 = puVar16, (uVar2 & 0x200) != 0)) && (param_6 != 0)) {
    if (uVar19 == 0x40) {
      iVar17 = iVar17 + 1;
      psVar12 = psVar13 + -1;
      *psVar12 = *(short *)(lVar9 + 0x54);
    }
    else {
      iVar17 = iVar17 + 2;
      psVar12 = psVar13 + -2;
      psVar13[-1] = *(short *)(local_68 + 4 + (ulonglong)(uVar2 >> 0xe & 1) * 2);
      *psVar12 = *(short *)(lVar9 + 0x54);
    }
  }
  lVar9 = *(longlong *)(param_4 + 0x10);
  lVar10 = (longlong)iVar17;
  psVar13 = psVar12;
  puVar16 = puVar15;
  if (lVar10 < lVar9) {
    *(undefined8 *)(puVar15 + -8) = 0x14005f766;
    lVar7 = -(lVar9 * 2 + 0xfU & 0xfffffffffffffff0);
    puVar16 = puVar15 + lVar7;
    sVar8 = (short)local_5c;
    *(longlong *)(puVar15 + lVar7 + 0x28) = lVar10;
    psVar13 = (short *)(puVar15 + lVar7 + 0x30);
    lVar10 = (longlong)(int)lVar9;
    *(longlong *)(puVar15 + lVar7 + 0x20) = lVar9;
    *(undefined8 *)(puVar15 + lVar7 + -8) = 0x14005f78f;
    __pad<>::_S_pad(param_4,sVar8,psVar13,psVar12,*(longlong *)(puVar15 + lVar7 + 0x20),
                    *(longlong *)(puVar15 + lVar7 + 0x28));
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar14 = (char)uVar4;
  if (cVar14 == '\0') {
    pcVar5 = *(code **)(*plVar3 + 0x60);
    *(undefined8 *)(puVar16 + -8) = 0x14005f67b;
    lVar9 = (*pcVar5)(plVar3,psVar13,lVar10);
    if (lVar10 != lVar9) {
      cVar14 = '\x01';
    }
  }
  *param_1 = plVar3;
  *(char *)(param_1 + 1) = cVar14;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int<long
// long>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long long) const

undefined8 *
std::num_put<>::_M_insert_int<long_long>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,ulonglong param_6)

{
  undefined2 uVar1;
  longlong *plVar2;
  undefined8 uVar3;
  code *pcVar4;
  byte *pbVar5;
  short sVar6;
  longlong lVar7;
  longlong lVar8;
  undefined2 *puVar9;
  ulonglong uVar10;
  short *psVar11;
  short *psVar12;
  char cVar13;
  undefined1 *puVar14;
  undefined1 *puVar15;
  longlong lVar16;
  int iVar17;
  bool bVar18;
  bool bVar19;
  undefined8 uStack_f0;
  undefined1 auStack_e8 [32];
  longlong lStack_c0;
  short local_b8 [2];
  short asStack_b4 [10];
  undefined8 uStack_a0;
  undefined2 local_68 [2];
  uint local_64;
  short *local_60;
  longlong local_58;
  undefined4 local_50;
  uint local_4c;
  
  plVar2 = (longlong *)*param_3;
  uVar3 = param_3[1];
  local_50 = param_5;
  uStack_a0 = 0x14005f7e8;
  lVar7 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  puVar14 = auStack_e8;
  puVar15 = auStack_e8;
  local_58 = lVar7 + 0x4c;
  local_60 = local_b8;
  local_4c = *(uint *)(param_4 + 0x18);
  local_64 = local_4c & 0x4a;
  bVar18 = local_64 != 0x40;
  bVar19 = local_64 != 8;
  uVar10 = param_6;
  if (((longlong)param_6 < 1) && (uVar10 = -param_6, !bVar18 || !bVar19)) {
    uVar10 = param_6;
  }
  uStack_f0 = 0x14005f847;
  lVar8 = __int_to_char<>(local_68,uVar10,local_58,local_4c,bVar18 && bVar19);
  iVar17 = (int)lVar8;
  psVar12 = local_60 + (0x28 - iVar17);
  if (*(char *)(lVar7 + 0x20) == '\0') {
    if (bVar18 && bVar19) goto LAB_14005f86f;
LAB_14005f9aa:
    psVar11 = psVar12;
    if (((local_4c & 0x200) != 0) && (param_6 != 0)) {
      if (local_64 == 0x40) {
        iVar17 = iVar17 + 1;
        psVar11 = psVar12 + -1;
        *psVar11 = *(short *)(lVar7 + 0x54);
      }
      else {
        iVar17 = iVar17 + 2;
        psVar11 = psVar12 + -2;
        psVar12[-1] = *(short *)(local_58 + 4 + (ulonglong)(local_4c >> 0xe & 1) * 2);
        *psVar11 = *(short *)(lVar7 + 0x54);
      }
    }
LAB_14005f881:
    lVar8 = *(longlong *)(param_4 + 0x10);
    lVar16 = (longlong)iVar17;
    puVar14 = puVar15;
    if (lVar8 <= lVar16) goto LAB_14005f88d;
  }
  else {
    uStack_f0 = 0x14005f95f;
    pbVar5 = *(byte **)(lVar7 + 0x10);
    uVar1 = *(undefined2 *)(lVar7 + 0x4a);
    lVar8 = *(longlong *)(lVar7 + 0x18);
    lVar16 = -((longlong)(iVar17 + 1) * 4 + 0xfU & 0xfffffffffffffff0);
    puVar14 = auStack_e8 + lVar16;
    puVar15 = auStack_e8 + lVar16;
    *(short **)((longlong)asStack_b4 + lVar16 + -0x14) = psVar12;
    *(short **)((longlong)&lStack_c0 + lVar16) = psVar12 + iVar17;
    local_60 = (short *)((longlong)asStack_b4 + lVar16);
    *(undefined8 *)(auStack_e8 + lVar16 + -8) = 0x14005f991;
    puVar9 = __add_grouping<wchar_t>
                       ((short *)((longlong)asStack_b4 + lVar16),uVar1,pbVar5,lVar8,
                        *(longlong *)((longlong)asStack_b4 + lVar16 + -0x14),
                        *(longlong *)((longlong)&lStack_c0 + lVar16));
    iVar17 = (int)((longlong)puVar9 - (longlong)local_60 >> 1);
    psVar12 = local_60;
    if (!bVar18 || !bVar19) goto LAB_14005f9aa;
LAB_14005f86f:
    puVar15 = puVar14;
    if ((longlong)param_6 < 0) {
      iVar17 = iVar17 + 1;
      psVar12[-1] = *(short *)(lVar7 + 0x4c);
      psVar11 = psVar12 + -1;
      goto LAB_14005f881;
    }
    psVar11 = psVar12;
    if ((local_4c & 0x800) == 0) goto LAB_14005f881;
    lVar8 = *(longlong *)(param_4 + 0x10);
    psVar11 = psVar12 + -1;
    lVar16 = (longlong)(iVar17 + 1);
    *psVar11 = *(short *)(lVar7 + 0x4e);
    if (lVar8 <= lVar16) goto LAB_14005f88d;
  }
  *(undefined8 *)(puVar14 + -8) = 0x14005f8f9;
  lVar7 = -(lVar8 * 2 + 0xfU & 0xfffffffffffffff0);
  sVar6 = (short)local_50;
  *(longlong *)(puVar14 + lVar7 + 0x28) = lVar16;
  lVar16 = (longlong)(int)lVar8;
  *(longlong *)(puVar14 + lVar7 + 0x20) = lVar8;
  *(undefined8 *)(puVar14 + lVar7 + -8) = 0x14005f922;
  __pad<>::_S_pad(param_4,sVar6,(short *)(puVar14 + lVar7 + 0x30),psVar11,
                  *(longlong *)(puVar14 + lVar7 + 0x20),*(longlong *)(puVar14 + lVar7 + 0x28));
  psVar11 = (short *)(puVar14 + lVar7 + 0x30);
  puVar14 = puVar14 + lVar7;
LAB_14005f88d:
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar13 = (char)uVar3;
  if (cVar13 == '\0') {
    pcVar4 = *(code **)(*plVar2 + 0x60);
    *(undefined8 *)(puVar14 + -8) = 0x14005f8a9;
    lVar7 = (*pcVar4)(plVar2,psVar11,lVar16);
    if (lVar16 != lVar7) {
      cVar13 = '\x01';
    }
  }
  *param_1 = plVar2;
  *(char *)(param_1 + 1) = cVar13;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_int<unsigned long
// long>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// unsigned long long) const

undefined8 *
std::num_put<>::_M_insert_int<>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined4 param_5,ulonglong param_6)

{
  undefined2 uVar1;
  uint uVar2;
  longlong *plVar3;
  undefined8 uVar4;
  code *pcVar5;
  byte *pbVar6;
  longlong lVar7;
  short sVar8;
  longlong lVar9;
  longlong lVar10;
  undefined2 *puVar11;
  short *psVar12;
  short *psVar13;
  char cVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  int iVar17;
  bool bVar18;
  uint uVar19;
  undefined8 uStack_f0;
  undefined1 auStack_e8 [32];
  longlong lStack_c0;
  undefined1 local_b8 [4];
  short asStack_b4 [10];
  undefined8 uStack_a0;
  longlong local_68;
  undefined4 local_5c;
  undefined1 *local_58;
  short *local_50;
  
  plVar3 = (longlong *)*param_3;
  uVar4 = param_3[1];
  local_5c = param_5;
  uStack_a0 = 0x14005fa44;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar2 = *(uint *)(param_4 + 0x18);
  puVar15 = auStack_e8;
  puVar16 = auStack_e8;
  local_68 = lVar9 + 0x4c;
  local_58 = local_b8;
  uVar19 = uVar2 & 0x4a;
  bVar18 = uVar19 != 0x40 && uVar19 != 8;
  local_50 = (short *)CONCAT71(local_50._1_7_,bVar18);
  uStack_f0 = 0x14005fa99;
  lVar10 = __int_to_char<>((undefined2 *)&local_68,param_6,local_68,uVar2,bVar18);
  iVar17 = (int)lVar10;
  psVar13 = (short *)(local_58 + (longlong)(0x28 - iVar17) * 2);
  cVar14 = (char)local_50;
  if (*(char *)(lVar9 + 0x20) != '\0') {
    local_58 = (undefined1 *)CONCAT71(local_58._1_7_,(char)local_50);
    uStack_f0 = 0x14005fb33;
    uVar1 = *(undefined2 *)(lVar9 + 0x4a);
    lVar10 = *(longlong *)(lVar9 + 0x18);
    lVar7 = -((longlong)(iVar17 + 1) * 4 + 0xfU & 0xfffffffffffffff0);
    puVar15 = auStack_e8 + lVar7;
    puVar16 = auStack_e8 + lVar7;
    pbVar6 = *(byte **)(lVar9 + 0x10);
    *(short **)((longlong)&lStack_c0 + lVar7) = psVar13 + iVar17;
    *(short **)((longlong)asStack_b4 + lVar7 + -0x14) = psVar13;
    local_50 = (short *)((longlong)asStack_b4 + lVar7);
    *(undefined8 *)(auStack_e8 + lVar7 + -8) = 0x14005fb65;
    puVar11 = __add_grouping<wchar_t>
                        ((short *)((longlong)asStack_b4 + lVar7),uVar1,pbVar6,lVar10,
                         *(longlong *)((longlong)asStack_b4 + lVar7 + -0x14),
                         *(longlong *)((longlong)&lStack_c0 + lVar7));
    iVar17 = (int)((longlong)puVar11 - (longlong)local_50 >> 1);
    psVar13 = local_50;
    cVar14 = (char)local_58;
  }
  psVar12 = psVar13;
  if (((cVar14 == '\0') && (puVar15 = puVar16, (uVar2 & 0x200) != 0)) && (param_6 != 0)) {
    if (uVar19 == 0x40) {
      iVar17 = iVar17 + 1;
      psVar12 = psVar13 + -1;
      *psVar12 = *(short *)(lVar9 + 0x54);
    }
    else {
      iVar17 = iVar17 + 2;
      psVar12 = psVar13 + -2;
      psVar13[-1] = *(short *)(local_68 + 4 + (ulonglong)(uVar2 >> 0xe & 1) * 2);
      *psVar12 = *(short *)(lVar9 + 0x54);
    }
  }
  lVar9 = *(longlong *)(param_4 + 0x10);
  lVar10 = (longlong)iVar17;
  psVar13 = psVar12;
  puVar16 = puVar15;
  if (lVar10 < lVar9) {
    *(undefined8 *)(puVar15 + -8) = 0x14005fbde;
    lVar7 = -(lVar9 * 2 + 0xfU & 0xfffffffffffffff0);
    puVar16 = puVar15 + lVar7;
    sVar8 = (short)local_5c;
    *(longlong *)(puVar15 + lVar7 + 0x28) = lVar10;
    psVar13 = (short *)(puVar15 + lVar7 + 0x30);
    lVar10 = (longlong)(int)lVar9;
    *(longlong *)(puVar15 + lVar7 + 0x20) = lVar9;
    *(undefined8 *)(puVar15 + lVar7 + -8) = 0x14005fc07;
    __pad<>::_S_pad(param_4,sVar8,psVar13,psVar12,*(longlong *)(puVar15 + lVar7 + 0x20),
                    *(longlong *)(puVar15 + lVar7 + 0x28));
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar14 = (char)uVar4;
  if (cVar14 == '\0') {
    pcVar5 = *(code **)(*plVar3 + 0x60);
    *(undefined8 *)(puVar16 + -8) = 0x14005faef;
    lVar9 = (*pcVar5)(plVar3,psVar13,lVar10);
    if (lVar10 != lVar9) {
      cVar14 = '\x01';
    }
  }
  *param_1 = plVar3;
  *(char *)(param_1 + 1) = cVar14;
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_group_float(char const*, unsigned long long, wchar_t, wchar_t const*, wchar_t*, wchar_t*,
// int&) const

void __thiscall
std::num_put<>::_M_group_float
          (undefined8 param_1_00,byte *param_2,longlong param_3,undefined2 param_4,void *param_5,
          undefined2 *param_6,longlong param_7,int *param_8)

{
  undefined2 *puVar1;
  int iVar2;
  int iVar3;
  
  if (param_5 != (void *)0x0) {
    iVar3 = (int)((longlong)param_5 - param_7 >> 1);
    puVar1 = __add_grouping<wchar_t>
                       (param_6,param_4,param_2,param_3,param_7,param_7 + (longlong)iVar3 * 2);
    iVar2 = 0;
    if ((longlong)(*param_8 - iVar3) != 0) {
      memcpy(puVar1,param_5,(longlong)(*param_8 - iVar3) * 2);
      iVar2 = *param_8 - iVar3;
    }
    *param_8 = iVar2 + (int)((longlong)puVar1 - (longlong)param_6 >> 1);
    return;
  }
  puVar1 = __add_grouping<wchar_t>
                     (param_6,param_4,param_2,param_3,param_7,param_7 + (longlong)*param_8 * 2);
  *param_8 = (int)((longlong)puVar1 - (longlong)param_6 >> 1);
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_insert_float<double>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, wchar_t, char, double) const

void std::num_put<>::_M_insert_float<double>
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
               undefined4 param_5,char param_6,longlong param_7)

{
  int iVar1;
  undefined2 uVar2;
  longlong *plVar3;
  longlong *plVar4;
  code *pcVar5;
  byte *pbVar6;
  longlong lVar7;
  short sVar8;
  longlong lVar9;
  void *pvVar10;
  size_t sVar11;
  short *psVar12;
  short *psVar13;
  char cVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  undefined1 *puVar17;
  char *_Buf;
  longlong lVar18;
  size_t _MaxCount;
  short *psVar19;
  short *psVar20;
  bool bVar21;
  undefined8 uStack_110;
  undefined1 auStack_108 [32];
  longlong local_e8 [4];
  char local_c8 [60];
  undefined4 local_8c;
  short *local_88;
  undefined8 local_80;
  int local_74;
  longlong local_70;
  char local_68 [40];
  
  local_80 = param_3[1];
  plVar3 = (longlong *)*param_3;
  local_8c = param_5;
  local_e8[1] = 0x14005fd6c;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  lVar18 = *(longlong *)(param_4 + 8);
  if (lVar18 < 0) {
    lVar18 = 6;
  }
  local_e8[1] = 0x14005fd8e;
  __num_base::_S_format_float(param_4,local_68,param_6);
  puVar15 = auStack_108;
  _Buf = local_c8;
  if ((~*(uint *)(param_4 + 0x18) & 0x104) == 0) {
    uStack_110 = 0x14006001d;
    local_70 = locale::facet::_S_get_c_locale();
    local_e8[0] = param_7;
    uStack_110 = 0x14006003f;
    local_74 = __convert_from_v(&local_70,_Buf,0x2d,local_68);
    if (0x2c < local_74) {
      iVar1 = local_74 + 1;
      uStack_110 = 0x14006005f;
      lVar18 = -((longlong)iVar1 + 0xfU & 0xfffffffffffffff0);
      puVar15 = auStack_108 + lVar18;
      *(undefined8 *)(auStack_108 + lVar18 + -8) = 0x140060067;
      local_70 = locale::facet::_S_get_c_locale();
      _Buf = local_c8 + lVar18;
      *(longlong *)((longlong)local_e8 + lVar18) = param_7;
      *(undefined8 *)(auStack_108 + lVar18 + -8) = 0x140060087;
      local_74 = __convert_from_v(&local_70,_Buf,iVar1,local_68);
    }
  }
  else {
    uStack_110 = 0x14005fdac;
    local_70 = locale::facet::_S_get_c_locale();
    local_e8[1] = param_7;
    uStack_110 = 0x14005fdd3;
    local_e8[0] = lVar18;
    local_74 = __convert_from_v(&local_70,_Buf,0x2d,local_68);
    puVar15 = auStack_108;
    if (0x2c < local_74) {
      local_88 = (short *)CONCAT44(local_88._4_4_,local_74 + 1);
      uStack_110 = 0x14005fef8;
      lVar7 = -((longlong)(local_74 + 1) + 0xfU & 0xfffffffffffffff0);
      puVar15 = auStack_108 + lVar7;
      *(undefined8 *)(auStack_108 + lVar7 + -8) = 0x14005ff00;
      local_70 = locale::facet::_S_get_c_locale();
      _Buf = local_c8 + lVar7;
      *(longlong *)((longlong)local_e8 + lVar7) = lVar18;
      *(longlong *)((longlong)local_e8 + lVar7 + 8) = param_7;
      iVar1 = (int)local_88;
      *(undefined8 *)(auStack_108 + lVar7 + -8) = 0x14005ff26;
      local_74 = __convert_from_v(&local_70,_Buf,iVar1,local_68);
    }
  }
  *(undefined8 *)(puVar15 + -8) = 0x14005fdeb;
  lVar18 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  iVar1 = local_74;
  plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar18 * 8);
  if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    *(undefined8 *)(puVar15 + -8) = 0x1400600e0;
    __throw_bad_cast();
  }
  _MaxCount = (size_t)local_74;
  *(undefined8 *)(puVar15 + -8) = 0x14005fe1b;
  lVar18 = -(_MaxCount * 2 + 0xf & 0xfffffffffffffff0);
  puVar16 = puVar15 + lVar18;
  puVar17 = puVar15 + lVar18;
  psVar19 = (short *)(puVar15 + lVar18 + 0x40);
  pcVar5 = *(code **)(*plVar4 + 0x58);
  local_88 = psVar19;
  *(undefined8 *)(puVar15 + lVar18 + -8) = 0x14005fe3a;
  (*pcVar5)(plVar4,_Buf,_Buf + _MaxCount,psVar19);
  if (_MaxCount == 0) {
    if (*(char *)(lVar9 + 0x20) == '\0') goto LAB_14005fe7d;
    psVar13 = (short *)0x0;
LAB_14005ff3c:
    *(undefined8 *)(puVar15 + lVar18 + -8) = 0x14005ff4d;
    lVar7 = -(_MaxCount * 4 + 0xf & 0xfffffffffffffff0);
    puVar17 = puVar15 + lVar7 + lVar18;
    puVar16 = puVar15 + lVar7 + lVar18;
    psVar20 = (short *)(puVar15 + lVar7 + lVar18 + 0x40);
    bVar21 = (*_Buf - 0x2bU & 0xfd) == 0;
    psVar12 = psVar20;
    if (bVar21) {
      local_74 = iVar1 + -1;
      psVar19 = local_88 + 1;
      *psVar20 = *local_88;
      psVar12 = (short *)(puVar15 + lVar7 + lVar18 + 0x42);
    }
    pbVar6 = *(byte **)(lVar9 + 0x10);
    uVar2 = *(undefined2 *)(lVar9 + 0x4a);
    lVar9 = *(longlong *)(lVar9 + 0x18);
    *(short **)(puVar15 + lVar7 + lVar18 + 0x30) = psVar19;
    *(short **)(puVar15 + lVar7 + lVar18 + 0x20) = psVar13;
    *(int **)(puVar15 + lVar7 + lVar18 + 0x38) = &local_74;
    *(short **)(puVar15 + lVar7 + lVar18 + 0x28) = psVar12;
    *(undefined8 *)(puVar15 + lVar7 + lVar18 + -8) = 0x14005ffba;
    _M_group_float(param_2,pbVar6,lVar9,uVar2,*(void **)(puVar15 + lVar7 + lVar18 + 0x20),
                   *(undefined2 **)(puVar15 + lVar7 + lVar18 + 0x28),
                   *(longlong *)(puVar15 + lVar7 + lVar18 + 0x30),
                   *(int **)(puVar15 + lVar7 + lVar18 + 0x38));
    local_74 = (uint)bVar21 + local_74;
    lVar18 = *(longlong *)(param_4 + 0x10);
    _MaxCount = (size_t)local_74;
    if (lVar18 <= (longlong)_MaxCount) goto LAB_14005fe8a;
  }
  else {
    *(undefined8 *)(puVar15 + lVar18 + -8) = 0x14005fe53;
    pvVar10 = memchr(_Buf,0x2e,_MaxCount);
    cVar14 = *(char *)(lVar9 + 0x20);
    if (pvVar10 != (void *)0x0) {
      psVar13 = local_88 + ((longlong)pvVar10 - (longlong)_Buf);
      *psVar13 = *(short *)(lVar9 + 0x48);
      if (cVar14 == '\0') goto LAB_14005fe7d;
      goto LAB_14005ff3c;
    }
    if ((cVar14 != '\0') &&
       ((psVar13 = (short *)0x0, iVar1 < 3 ||
        (((_Buf[1] < ':' && ((byte)(_Buf[2] - 0x30U) < 10)) && ('/' < _Buf[1]))))))
    goto LAB_14005ff3c;
LAB_14005fe7d:
    lVar18 = *(longlong *)(param_4 + 0x10);
    psVar20 = psVar19;
    if (lVar18 <= (longlong)_MaxCount) goto LAB_14005fe8a;
  }
  *(undefined8 *)(puVar17 + -8) = 0x14005ffe0;
  sVar8 = (short)local_8c;
  lVar9 = -(lVar18 * 2 + 0xfU & 0xfffffffffffffff0);
  puVar16 = puVar17 + lVar9;
  *(size_t *)(puVar17 + lVar9 + 0x28) = _MaxCount;
  _MaxCount = (size_t)(int)lVar18;
  *(longlong *)(puVar17 + lVar9 + 0x20) = lVar18;
  *(undefined8 *)(puVar17 + lVar9 + -8) = 0x14006000a;
  __pad<>::_S_pad(param_4,sVar8,(short *)(puVar17 + lVar9 + 0x40),psVar20,
                  *(longlong *)(puVar17 + lVar9 + 0x20),*(longlong *)(puVar17 + lVar9 + 0x28));
  psVar20 = (short *)(puVar17 + lVar9 + 0x40);
  local_74 = (int)lVar18;
LAB_14005fe8a:
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar14 = (char)local_80;
  if (cVar14 == '\0') {
    pcVar5 = *(code **)(*plVar3 + 0x60);
    *(undefined8 *)(puVar16 + -8) = 0x14005feac;
    sVar11 = (*pcVar5)(plVar3,psVar20,_MaxCount);
    if (sVar11 != _MaxCount) {
      cVar14 = '\x01';
    }
  }
  *param_1 = plVar3;
  *(char *)(param_1 + 1) = cVar14;
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::num_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::_M_insert_float<long
// double>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// char, long double) const

void std::num_put<>::_M_insert_float<>
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
               undefined4 param_5,char param_6,undefined1 (*param_7) [10])

{
  undefined2 uVar1;
  longlong *plVar2;
  longlong *plVar3;
  code *pcVar4;
  byte *pbVar5;
  longlong lVar6;
  int iVar7;
  short sVar8;
  longlong lVar9;
  longlong lVar10;
  void *pvVar11;
  size_t sVar12;
  undefined2 *puVar13;
  char cVar14;
  undefined1 *puVar15;
  undefined1 *puVar16;
  undefined1 *puVar17;
  char *_Buf;
  short *psVar18;
  undefined1 (*pauVar19) [10];
  size_t _MaxCount;
  short *psVar20;
  short *psVar21;
  bool bVar22;
  undefined8 uStack_130;
  undefined1 auStack_128 [32];
  undefined1 (*local_108 [4]) [10];
  char local_e8 [72];
  longlong *local_a0;
  int local_98;
  undefined4 local_94;
  undefined8 local_90;
  undefined1 local_88 [10];
  undefined1 local_78 [2] [10];
  int local_64;
  longlong local_60;
  char local_58 [24];
  
  _Buf = local_e8;
  local_90 = param_3[1];
  plVar2 = (longlong *)*param_3;
  local_94 = param_5;
  local_88 = *param_7;
  local_108[3] = (undefined1 (*) [10])0x140060146;
  lVar9 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  pauVar19 = *(undefined1 (**) [10])(param_4 + 8);
  if ((longlong)pauVar19 < 0) {
    pauVar19 = (undefined1 (*) [10])0x6;
  }
  local_108[3] = (undefined1 (*) [10])0x140060168;
  __num_base::_S_format_float(param_4,local_58,param_6);
  puVar15 = auStack_128;
  if ((~*(uint *)(param_4 + 0x18) & 0x104) == 0) {
    uStack_130 = 0x140060405;
    local_60 = locale::facet::_S_get_c_locale();
    local_78[0] = local_88;
    uStack_130 = 0x140060430;
    local_108[0] = local_78;
    local_64 = __convert_from_v(&local_60,local_e8,0x36,local_58);
    if (0x35 < local_64) {
      local_a0 = (longlong *)CONCAT44(local_a0._4_4_,local_64 + 1);
      uStack_130 = 0x140060454;
      lVar10 = -((longlong)(local_64 + 1) + 0xfU & 0xfffffffffffffff0);
      puVar15 = auStack_128 + lVar10;
      *(undefined8 *)(auStack_128 + lVar10 + -8) = 0x14006045c;
      local_60 = locale::facet::_S_get_c_locale();
      _Buf = local_e8 + lVar10;
      local_78[0] = local_88;
      *(undefined1 (**) [10])((longlong)local_108 + lVar10) = local_78;
      iVar7 = (int)local_a0;
      *(undefined8 *)(auStack_128 + lVar10 + -8) = 0x140060482;
      local_64 = __convert_from_v(&local_60,_Buf,iVar7,local_58);
    }
  }
  else {
    uStack_130 = 0x140060186;
    local_60 = locale::facet::_S_get_c_locale();
    local_a0 = &local_60;
    local_78[0] = local_88;
    uStack_130 = 0x1400601ba;
    local_108[0] = pauVar19;
    local_108[1] = local_78;
    local_64 = __convert_from_v(local_a0,local_e8,0x36,local_58);
    puVar15 = auStack_128;
    _Buf = local_e8;
    if (0x35 < local_64) {
      local_98 = local_64 + 1;
      uStack_130 = 0x1400602d8;
      lVar10 = -((longlong)local_98 + 0xfU & 0xfffffffffffffff0);
      puVar15 = auStack_128 + lVar10;
      *(undefined8 *)(auStack_128 + lVar10 + -8) = 0x1400602e0;
      local_60 = locale::facet::_S_get_c_locale();
      _Buf = local_e8 + lVar10;
      local_78[0] = local_88;
      *(undefined1 (**) [10])((longlong)local_108 + lVar10 + 8) = local_78;
      *(undefined1 (**) [10])((longlong)local_108 + lVar10) = pauVar19;
      iVar7 = local_98;
      plVar3 = local_a0;
      *(undefined8 *)(auStack_128 + lVar10 + -8) = 0x14006030c;
      local_64 = __convert_from_v(plVar3,_Buf,iVar7,local_58);
    }
  }
  *(undefined8 *)(puVar15 + -8) = 0x1400601d2;
  lVar10 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  iVar7 = local_64;
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar10 * 8);
  if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    *(undefined **)(puVar15 + -8) = &UNK_1400604e0;
    __throw_bad_cast();
  }
  _MaxCount = (size_t)local_64;
  *(undefined8 *)(puVar15 + -8) = 0x140060202;
  lVar10 = -(_MaxCount * 2 + 0xf & 0xfffffffffffffff0);
  puVar16 = puVar15 + lVar10;
  puVar17 = puVar15 + lVar10;
  psVar20 = (short *)(puVar15 + lVar10 + 0x40);
  local_88._0_8_ = psVar20;
  pcVar4 = *(code **)(*plVar3 + 0x58);
  *(undefined8 *)(puVar15 + lVar10 + -8) = 0x140060221;
  (*pcVar4)(plVar3,_Buf,_Buf + _MaxCount,psVar20);
  if (_MaxCount == 0) {
    if (*(char *)(lVar9 + 0x20) == '\0') goto LAB_140060264;
    puVar13 = (undefined2 *)0x0;
LAB_140060324:
    *(undefined8 *)(puVar15 + lVar10 + -8) = 0x140060335;
    lVar6 = -(_MaxCount * 4 + 0xf & 0xfffffffffffffff0);
    puVar17 = puVar15 + lVar6 + lVar10;
    puVar16 = puVar15 + lVar6 + lVar10;
    psVar21 = (short *)(puVar15 + lVar6 + lVar10 + 0x40);
    bVar22 = (*_Buf - 0x2bU & 0xfd) == 0;
    psVar18 = psVar21;
    if (bVar22) {
      local_64 = iVar7 + -1;
      psVar20 = (short *)(local_88._0_8_ + 2);
      *psVar21 = *(short *)local_88._0_8_;
      psVar18 = (short *)(puVar15 + lVar6 + lVar10 + 0x42);
    }
    pbVar5 = *(byte **)(lVar9 + 0x10);
    uVar1 = *(undefined2 *)(lVar9 + 0x4a);
    lVar9 = *(longlong *)(lVar9 + 0x18);
    *(short **)(puVar15 + lVar6 + lVar10 + 0x30) = psVar20;
    *(undefined2 **)(puVar15 + lVar6 + lVar10 + 0x20) = puVar13;
    *(int **)(puVar15 + lVar6 + lVar10 + 0x38) = &local_64;
    *(short **)(puVar15 + lVar6 + lVar10 + 0x28) = psVar18;
    *(undefined8 *)(puVar15 + lVar6 + lVar10 + -8) = 0x1400603a2;
    _M_group_float(param_2,pbVar5,lVar9,uVar1,*(void **)(puVar15 + lVar6 + lVar10 + 0x20),
                   *(undefined2 **)(puVar15 + lVar6 + lVar10 + 0x28),
                   *(longlong *)(puVar15 + lVar6 + lVar10 + 0x30),
                   *(int **)(puVar15 + lVar6 + lVar10 + 0x38));
    local_64 = (uint)bVar22 + local_64;
    lVar9 = *(longlong *)(param_4 + 0x10);
    _MaxCount = (size_t)local_64;
    if (lVar9 <= (longlong)_MaxCount) goto LAB_140060271;
  }
  else {
    *(undefined8 *)(puVar15 + lVar10 + -8) = 0x14006023a;
    pvVar11 = memchr(_Buf,0x2e,_MaxCount);
    cVar14 = *(char *)(lVar9 + 0x20);
    if (pvVar11 != (void *)0x0) {
      puVar13 = (undefined2 *)(local_88._0_8_ + ((longlong)pvVar11 - (longlong)_Buf) * 2);
      *puVar13 = *(undefined2 *)(lVar9 + 0x48);
      if (cVar14 == '\0') goto LAB_140060264;
      goto LAB_140060324;
    }
    if ((cVar14 != '\0') &&
       ((puVar13 = (undefined2 *)0x0, iVar7 < 3 ||
        (((_Buf[1] < ':' && ((byte)(_Buf[2] - 0x30U) < 10)) && ('/' < _Buf[1]))))))
    goto LAB_140060324;
LAB_140060264:
    lVar9 = *(longlong *)(param_4 + 0x10);
    psVar21 = psVar20;
    if (lVar9 <= (longlong)_MaxCount) goto LAB_140060271;
  }
  *(undefined8 *)(puVar17 + -8) = 0x1400603c8;
  sVar8 = (short)local_94;
  lVar10 = -(lVar9 * 2 + 0xfU & 0xfffffffffffffff0);
  puVar16 = puVar17 + lVar10;
  *(size_t *)(puVar17 + lVar10 + 0x28) = _MaxCount;
  _MaxCount = (size_t)(int)lVar9;
  *(longlong *)(puVar17 + lVar10 + 0x20) = lVar9;
  *(undefined8 *)(puVar17 + lVar10 + -8) = 0x1400603f2;
  __pad<>::_S_pad(param_4,sVar8,(short *)(puVar17 + lVar10 + 0x40),psVar21,
                  *(longlong *)(puVar17 + lVar10 + 0x20),*(longlong *)(puVar17 + lVar10 + 0x28));
  psVar21 = (short *)(puVar17 + lVar10 + 0x40);
  local_64 = (int)lVar9;
LAB_140060271:
  *(undefined8 *)(param_4 + 0x10) = 0;
  cVar14 = (char)local_90;
  if (cVar14 == '\0') {
    pcVar4 = *(code **)(*plVar2 + 0x60);
    *(undefined8 *)(puVar16 + -8) = 0x140060293;
    sVar12 = (*pcVar4)(plVar2,psVar21,_MaxCount);
    if (sVar12 != _MaxCount) {
      cVar14 = '\x01';
    }
  }
  *param_1 = plVar2;
  *(char *)(param_1 + 1) = cVar14;
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// void const*) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,ulonglong param_6)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_48;
  ulonglong local_40;
  undefined8 local_38;
  ulonglong local_30;
  
  local_48 = *param_3;
  local_40 = param_3[1];
  if (*(code **)(*param_2 + 0x48) == do_put) {
    uVar1 = *(uint *)(param_4 + 0x18);
    *(uint *)(param_4 + 0x18) = uVar1 & 0xffffbfb5 | 0x208;
    uVar2 = local_40 & 0xffffffffffffff00;
    _M_insert_int<>(&local_38,param_2,&local_48,param_4,(uint)param_5,param_6);
    *(uint *)(param_4 + 0x18) = uVar1;
    *param_1 = local_38;
    param_1[1] = uVar2 | local_30 & 0xff;
    return param_1;
  }
  local_38 = local_48;
  local_30 = local_40;
  (**(code **)(*param_2 + 0x48))(param_1,param_2,&local_38,param_4,(uint)param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// bool) const

undefined8
std::num_put<>::put(undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 param_4,
                   undefined2 param_5,undefined1 param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,param_4,param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// double) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,longlong param_6)

{
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  if (*(code **)(*param_2 + 0x38) == do_put) {
    _M_insert_float<double>(param_1,param_2,&local_18,param_4,(uint)param_5,'\0',param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x38))(param_1,param_2,&local_18,param_4,(uint)param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long double) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,undefined1 (*param_6) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_6;
  if (*(code **)(*param_2 + 0x40) == do_put) {
    _M_insert_float<>(param_1,param_2,&local_18,param_4,(uint)param_5,'L',&local_28);
    return param_1;
  }
  (**(code **)(*param_2 + 0x40))(param_1,param_2,&local_18,param_4,(uint)param_5,local_28);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,uint param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x18) == do_put) {
    _M_insert_int<long>(param_1,param_2,&local_28,param_4,(uint)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x18))();
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// unsigned long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,uint param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x20) == do_put) {
    _M_insert_int<>(param_1,param_2,&local_28,param_4,(uint)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))();
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,ulonglong param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x28) == do_put) {
    _M_insert_int<long_long>(param_1,param_2,&local_28,param_4,(uint)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))();
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// unsigned long long) const

undefined8 *
std::num_put<>::put(undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
                   ushort param_5,ulonglong param_6)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x30) == do_put) {
    _M_insert_int<>(param_1,param_2,&local_28,param_4,(uint)param_5,param_6);
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))();
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_pad(wchar_t, long long, std::ios_base&, wchar_t*, wchar_t const*, int&) const

void __thiscall
std::num_put<>::_M_pad
          (undefined8 param_1_00,short param_2,longlong param_3,longlong param_4,short *param_5,
          short *param_6,int *param_7)

{
  __pad<>::_S_pad(param_4,param_2,param_5,param_6,param_3,(longlong)*param_7);
  *param_7 = (int)param_3;
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// void const*) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,ulonglong param_6)

{
  uint uVar1;
  ulonglong uVar2;
  undefined8 local_48;
  ulonglong local_40;
  undefined8 local_38;
  byte local_30;
  
  uVar1 = *(uint *)(param_4 + 0x18);
  local_48 = *param_3;
  local_40 = param_3[1];
  *(uint *)(param_4 + 0x18) = uVar1 & 0xffffbfb5 | 0x208;
  uVar2 = local_40 & 0xffffffffffffff00;
  _M_insert_int<>(&local_38,param_2,&local_48,param_4,(uint)param_5,param_6);
  *(uint *)(param_4 + 0x18) = uVar1;
  *param_1 = local_38;
  param_1[1] = uVar2 | local_30;
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// bool) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,uint param_5,
          byte param_6)

{
  undefined2 *puVar1;
  code *pcVar2;
  uint uVar3;
  longlong lVar4;
  ulonglong uVar5;
  longlong lVar6;
  undefined2 uVar7;
  undefined1 *puVar8;
  longlong lVar9;
  longlong *plVar10;
  undefined8 uVar11;
  ulonglong uVar12;
  undefined7 uVar13;
  longlong lVar14;
  char cVar15;
  undefined8 uStackY_d0;
  undefined1 auStackY_c8 [32];
  undefined2 auStack_98 [2];
  uint local_94;
  undefined8 local_90;
  longlong *local_68;
  undefined8 local_60;
  longlong *local_58;
  undefined1 local_50;
  
  puVar8 = auStackY_c8;
  plVar10 = (longlong *)*param_3;
  local_60 = param_3[1];
  uVar13 = (undefined7)((ulonglong)local_60 >> 8);
  if ((*(uint *)(param_4 + 0x18) & 1) == 0) {
    uStackY_d0 = 0x140060a29;
    local_68 = plVar10;
    _M_insert_int<long>(&local_58,param_2,&local_68,param_4,param_5 & 0xffff,(uint)param_6);
    uVar11 = CONCAT71(uVar13,local_50);
    plVar10 = local_58;
    goto LAB_140060a38;
  }
  local_94 = param_5;
  local_90 = CONCAT44(local_90._4_4_,*(uint *)(param_4 + 0x18));
  uStackY_d0 = 0x140060a6b;
  lVar4 = _text__ZNKSt11__use_cacheISt16__numpunct_cacheIwEEclERKSt6locale_isra_0
                    ((longlong *)(param_4 + 0xd0));
  uVar3 = (uint)local_90;
  cVar15 = (char)local_60;
  if (param_6 == 0) {
    lVar14 = (longlong)*(int *)(lVar4 + 0x40);
    lVar9 = *(longlong *)(param_4 + 0x10);
    uVar11 = *(undefined8 *)(lVar4 + 0x38);
    if (lVar14 < lVar9) goto LAB_140060a96;
LAB_140060b63:
    *(undefined8 *)(param_4 + 0x10) = 0;
    if (cVar15 == '\0') {
LAB_140060b20:
      pcVar2 = *(code **)(*plVar10 + 0x60);
      *(undefined8 *)(puVar8 + -8) = 0x140060b2f;
      lVar4 = (*pcVar2)(plVar10,uVar11,lVar14);
      if (lVar14 != lVar4) {
        cVar15 = '\x01';
      }
    }
  }
  else {
    lVar14 = (longlong)*(int *)(lVar4 + 0x30);
    lVar9 = *(longlong *)(param_4 + 0x10);
    uVar11 = *(undefined8 *)(lVar4 + 0x28);
    if (lVar9 <= lVar14) goto LAB_140060b63;
LAB_140060a96:
    uVar12 = lVar9 - lVar14;
    uStackY_d0 = 0x140060aa7;
    lVar4 = -(uVar12 * 2 + 0xf & 0xfffffffffffffff0);
    puVar8 = auStackY_c8 + lVar4;
    uVar5 = 0;
    puVar1 = (undefined2 *)((longlong)auStack_98 + lVar4);
    uVar7 = (undefined2)local_94;
    if ((uVar12 & 1) == 0) {
LAB_140060ad0:
      do {
        puVar1[uVar5] = uVar7;
        *(undefined2 *)((longlong)auStack_98 + uVar5 * 2 + lVar4 + 2) = uVar7;
        uVar5 = uVar5 + 2;
      } while (uVar12 != uVar5);
    }
    else {
      *puVar1 = uVar7;
      uVar5 = 1;
      if (uVar12 != 1) goto LAB_140060ad0;
    }
    *(undefined8 *)(param_4 + 0x10) = 0;
    lVar9 = (longlong)(int)uVar12;
    if ((uVar3 & 0xb0) == 0x20) {
      if (cVar15 == '\0') {
        pcVar2 = *(code **)(*plVar10 + 0x60);
        *(undefined8 *)(auStackY_c8 + lVar4 + -8) = 0x140060b8b;
        lVar6 = (*pcVar2)(plVar10,uVar11,lVar14);
        if (lVar14 == lVar6) {
          pcVar2 = *(code **)(*plVar10 + 0x60);
          *(undefined8 *)(auStackY_c8 + lVar4 + -8) = 0x140060b9f;
          lVar4 = (*pcVar2)(plVar10,puVar1,lVar9);
          uVar11 = CONCAT71(uVar13,lVar9 != lVar4);
          goto LAB_140060a38;
        }
LAB_140060bb3:
        cVar15 = '\x01';
      }
    }
    else if (cVar15 == '\0') {
      pcVar2 = *(code **)(*plVar10 + 0x60);
      local_90 = uVar11;
      *(undefined8 *)(auStackY_c8 + lVar4 + -8) = 0x140060b13;
      lVar4 = (*pcVar2)(plVar10,puVar1,lVar9);
      uVar11 = local_90;
      if (lVar9 == lVar4) goto LAB_140060b20;
      goto LAB_140060bb3;
    }
  }
  uVar11 = CONCAT71(uVar13,cVar15);
LAB_140060a38:
  *param_1 = plVar10;
  param_1[1] = uVar11;
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// double) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,longlong param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_float<double>(param_1,param_2,&local_18,param_4,(uint)param_5,'\0',param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long double) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,undefined1 (*param_6) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_6;
  _M_insert_float<>(param_1,param_2,&local_18,param_4,(uint)param_5,'L',&local_28);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,uint param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<long>(param_1,param_2,&local_18,param_4,(uint)param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// unsigned long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,uint param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<>(param_1,param_2,&local_18,param_4,(uint)param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// long long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,ulonglong param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<long_long>(param_1,param_2,&local_18,param_4,(uint)param_5,param_6);
  return param_1;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// unsigned long long) const

undefined8 *
std::num_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          ushort param_5,ulonglong param_6)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  _M_insert_int<>(param_1,param_2,&local_18,param_4,(uint)param_5,param_6);
  return param_1;
}



// std::bad_cast::what() const

char * std::bad_cast::what(void)

{
  return "std::bad_cast";
}



// std::ios_base::failure::what() const

undefined8 __thiscall std::ios_base::failure::what(failure *this)

{
  return *(undefined8 *)(this + 8);
}



// std::ios_base::failure[abi:cxx11]::what() const

undefined8 __thiscall std::ios_base::failure[abi:cxx11]::what(failure_abi_cxx11_ *this)

{
  return *(undefined8 *)(this + 8);
}



// std::messages<char>::_M_convert_to_char(std::string const&) const

undefined8 __thiscall
std::messages<char>::_M_convert_to_char(undefined8 param_1_00,undefined8 *param_2)

{
  return *param_2;
}



// std::messages<char>::_M_convert_from_char(char*) const

undefined8 * std::messages<char>::_M_convert_from_char(undefined8 *param_1)

{
  ulonglong *puVar1;
  
  puVar1 = std::string::_S_construct(0,'\0');
  *param_1 = puVar1;
  return param_1;
}



// std::messages<char>::get(int, int, int, std::string const&) const

undefined8 std::messages<char>::get(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))(param_1);
  return param_1;
}



// std::messages<char>::open(std::string const&, std::locale const&) const

undefined8 std::messages<char>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140060e30. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::messages<char>::open(std::string const&, std::locale const&, char const*) const

undefined8 std::messages<char>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140060e60. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::messages<char>::close(int) const

void std::messages<char>::close(longlong *param_1)

{
  if (*(code **)(*param_1 + 0x20) == do_close) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140060e88. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x20))();
  return;
}



// std::messages<char>::do_get(int, int, int, std::string const&) const

longlong * std::messages<char>::do_get(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *in_stack_00000030;
  undefined1 local_9;
  
  lVar1 = *in_stack_00000030;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *param_1 = (longlong)plVar2;
    return param_1;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *param_1 = lVar1;
    return param_1;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *param_1 = lVar1;
  return param_1;
}



// std::messages<char>::do_open(std::string const&, std::locale const&) const

undefined8 std::messages<char>::do_open(void)

{
  return 0;
}



// std::messages<char>::do_close(int) const

void std::messages<char>::do_close(void)

{
  return;
}



// std::messages<wchar_t>::_M_convert_to_char(std::wstring const&) const

undefined8 __thiscall
std::messages<wchar_t>::_M_convert_to_char(undefined8 param_1_00,undefined8 *param_2)

{
  return *param_2;
}



// std::messages<wchar_t>::_M_convert_from_char(char*) const

undefined8 * std::messages<wchar_t>::_M_convert_from_char(undefined8 *param_1)

{
  ulonglong *puVar1;
  
  puVar1 = std::wstring::_S_construct(0,0);
  *param_1 = puVar1;
  return param_1;
}



// std::messages<wchar_t>::get(int, int, int, std::wstring const&) const

undefined8 std::messages<wchar_t>::get(undefined8 param_1,longlong *param_2)

{
  (**(code **)(*param_2 + 0x18))(param_1);
  return param_1;
}



// std::messages<wchar_t>::open(std::string const&, std::locale const&) const

undefined8 std::messages<wchar_t>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140060fc0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::messages<wchar_t>::open(std::string const&, std::locale const&, char const*) const

undefined8 std::messages<wchar_t>::open(longlong *param_1)

{
  undefined8 uVar1;
  
  if (*(code **)(*param_1 + 0x10) == do_open) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140060ff0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*param_1 + 0x10))();
  return uVar1;
}



// std::messages<wchar_t>::close(int) const

void std::messages<wchar_t>::close(longlong *param_1)

{
  if (*(code **)(*param_1 + 0x20) == do_close) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140061018. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x20))();
  return;
}



// std::messages<wchar_t>::do_get(int, int, int, std::wstring const&) const

longlong * std::messages<wchar_t>::do_get(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *in_stack_00000030;
  undefined1 local_9;
  
  lVar1 = *in_stack_00000030;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::wstring::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *param_1 = (longlong)plVar2;
    return param_1;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *param_1 = lVar1;
    return param_1;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *param_1 = lVar1;
  return param_1;
}



// std::messages<wchar_t>::do_open(std::string const&, std::locale const&) const

undefined8 std::messages<wchar_t>::do_open(void)

{
  return 0;
}



// std::messages<wchar_t>::do_close(int) const

void std::messages<wchar_t>::do_close(void)

{
  return;
}



// std::numpunct<char>::do_grouping() const

undefined8 * std::numpunct<char>::do_grouping(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::numpunct<char>::do_truename() const

undefined8 * std::numpunct<char>::do_truename(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x28);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::numpunct<char>::do_falsename() const

undefined8 * std::numpunct<char>::do_falsename(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x38);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::numpunct<char>::decimal_point() const

ulonglong __thiscall std::numpunct<char>::decimal_point(numpunct<char> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x48);
  }
                    // WARNING: Could not recover jumptable at 0x0001400611d0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::numpunct<char>::thousands_sep() const

ulonglong __thiscall std::numpunct<char>::thousands_sep(numpunct<char> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(byte *)(*(longlong *)(this + 0x10) + 0x49);
  }
                    // WARNING: Could not recover jumptable at 0x000140061200. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::numpunct<char>::do_decimal_point() const

undefined1 __thiscall std::numpunct<char>::do_decimal_point(numpunct<char> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x48);
}



// std::numpunct<char>::do_thousands_sep() const

undefined1 __thiscall std::numpunct<char>::do_thousands_sep(numpunct<char> *this)

{
  return *(undefined1 *)(*(longlong *)(this + 0x10) + 0x49);
}



// std::numpunct<char>::grouping() const

undefined8 * std::numpunct<char>::grouping(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x20) == do_grouping) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::numpunct<char>::truename() const

undefined8 * std::numpunct<char>::truename(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x28) == do_truename) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x28);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))(param_1);
  return param_1;
}



// std::numpunct<char>::falsename() const

undefined8 * std::numpunct<char>::falsename(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x30) == do_falsename) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x38);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))(param_1);
  return param_1;
}



// std::numpunct<wchar_t>::do_grouping() const

undefined8 * std::numpunct<wchar_t>::do_grouping(undefined8 *param_1,longlong param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  _Str = *(char **)(*(longlong *)(param_2 + 0x10) + 0x10);
  if (_Str != (char *)0x0) {
    sVar1 = strlen(_Str);
    pcVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (_Str,(longlong)pcVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::numpunct<wchar_t>::do_truename() const

undefined8 * std::numpunct<wchar_t>::do_truename(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x28);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::numpunct<wchar_t>::do_falsename() const

undefined8 * std::numpunct<wchar_t>::do_falsename(undefined8 *param_1,longlong param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  _Str = *(wchar_t **)(*(longlong *)(param_2 + 0x10) + 0x38);
  if (_Str != (wchar_t *)0x0) {
    sVar1 = wcslen(_Str);
    pwVar3 = _Str + sVar1;
  }
  puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                     (_Str,(longlong)pwVar3);
  *param_1 = puVar2;
  return param_1;
}



// std::numpunct<wchar_t>::decimal_point() const

ulonglong __thiscall std::numpunct<wchar_t>::decimal_point(numpunct<wchar_t> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_decimal_point) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x48);
  }
                    // WARNING: Could not recover jumptable at 0x000140061490. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::numpunct<wchar_t>::thousands_sep() const

ulonglong __thiscall std::numpunct<wchar_t>::thousands_sep(numpunct<wchar_t> *this)

{
  ulonglong uVar1;
  
  if (*(code **)(*(longlong *)this + 0x18) == do_thousands_sep) {
    return (ulonglong)*(ushort *)(*(longlong *)(this + 0x10) + 0x4a);
  }
                    // WARNING: Could not recover jumptable at 0x0001400614c0. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x18))();
  return uVar1;
}



// std::numpunct<wchar_t>::do_decimal_point() const

undefined2 __thiscall std::numpunct<wchar_t>::do_decimal_point(numpunct<wchar_t> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x48);
}



// std::numpunct<wchar_t>::do_thousands_sep() const

undefined2 __thiscall std::numpunct<wchar_t>::do_thousands_sep(numpunct<wchar_t> *this)

{
  return *(undefined2 *)(*(longlong *)(this + 0x10) + 0x4a);
}



// std::numpunct<wchar_t>::grouping() const

undefined8 * std::numpunct<wchar_t>::grouping(undefined8 *param_1,longlong *param_2)

{
  char *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  if (*(code **)(*param_2 + 0x20) == do_grouping) {
    pcVar3 = (char *)0xffffffffffffffff;
    _Str = *(char **)(param_2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar1 = strlen(_Str);
      pcVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (_Str,(longlong)pcVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::numpunct<wchar_t>::truename() const

undefined8 * std::numpunct<wchar_t>::truename(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x28) == do_truename) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x28);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x28))(param_1);
  return param_1;
}



// std::numpunct<wchar_t>::falsename() const

undefined8 * std::numpunct<wchar_t>::falsename(undefined8 *param_1,longlong *param_2)

{
  wchar_t *_Str;
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  if (*(code **)(*param_2 + 0x30) == do_falsename) {
    pwVar3 = (wchar_t *)0xfffffffffffffffe;
    _Str = *(wchar_t **)(param_2[2] + 0x38);
    if (_Str != (wchar_t *)0x0) {
      sVar1 = wcslen(_Str);
      pwVar3 = _Str + sVar1;
    }
    puVar2 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (_Str,(longlong)pwVar3);
    *param_1 = puVar2;
    return param_1;
  }
  (**(code **)(*param_2 + 0x30))(param_1);
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::date_order() const

undefined8 __thiscall std::time_get<>::date_order(time_get<> *this)

{
  undefined8 uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_date_order) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140061660. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_date(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::time_get<>::do_get_date
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          istreambuf_iterator<> *param_5,uint *param_6,string *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  int iVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              ((char *)&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(istreambuf_iterator<> **)(plVar7[2] + 0x10),(istreambuf_iterator<> *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_time(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::time_get<>::do_get_time
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          istreambuf_iterator<> *param_5,uint *param_6,string *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  int iVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_4c = 0;
    local_54 = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              ((char *)&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(istreambuf_iterator<> **)(plVar7[2] + 0x20),(istreambuf_iterator<> *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_year(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::time_get<>::do_get_year
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  ctype<char> *this;
  int iVar1;
  uint uVar2;
  longlong lVar3;
  ulonglong uVar4;
  longlong *plVar5;
  bool bVar6;
  bool bVar7;
  longlong *local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  longlong *local_78;
  int local_70;
  longlong *local_68;
  undefined8 uStack_60;
  longlong *local_58;
  undefined8 uStack_50;
  int local_40;
  uint local_3c;
  
  local_58 = (longlong *)*param_3;
  uStack_50 = param_3[1];
  local_68 = (longlong *)*param_4;
  uStack_60 = param_4[1];
  local_3c = 0;
  lVar3 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar3 * 8);
  if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_88 = local_58;
  uStack_80 = uStack_50;
  local_98 = local_68;
  uStack_90 = uStack_60;
  _M_extract_num(&local_78,param_2,&local_88,&local_98,&local_40,0,99,2,param_5,&local_3c);
  local_58 = local_78;
  uStack_50 = CONCAT44(uStack_50._4_4_,local_70);
  if (local_3c == 0) {
    uVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
    iVar1 = local_40;
    if ((char)uVar4 != '\0') {
LAB_140061bda:
      if (iVar1 < 0x45) {
        iVar1 = iVar1 + 100;
        local_40 = iVar1;
      }
      local_70 = (int)uStack_50;
LAB_140061bf7:
      *(int *)(param_7 + 0x14) = iVar1;
      goto LAB_140061b54;
    }
    uVar4 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_58);
    uVar2 = ctype<char>::narrow(this,(ulonglong)(uint)(int)(char)uVar4,(ctype<char>)0x2a);
    if (9 < (byte)((char)uVar2 - 0x30U)) goto LAB_140061bda;
    _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_58);
    uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
    iVar1 = (char)uVar2 + -0x30 + iVar1 * 10;
    local_40 = iVar1;
    uVar4 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
    if ((char)uVar4 != '\0') {
LAB_140061d14:
      iVar1 = iVar1 + -0x76c;
      local_70 = (int)uStack_50;
      local_40 = iVar1;
      goto LAB_140061bf7;
    }
    uVar4 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_58);
    uVar2 = ctype<char>::narrow(this,(ulonglong)(uint)(int)(char)uVar4,(ctype<char>)0x2a);
    plVar5 = local_58;
    if (9 < (byte)((char)uVar2 - 0x30U)) {
      goto LAB_140061d14;
    }
    _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(local_58);
    uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
    local_40 = (char)uVar2 + -0x79c + iVar1 * 10;
    *(int *)(param_7 + 0x14) = local_40;
  }
  else {
    *param_6 = *param_6 | 4;
LAB_140061b54:
    bVar6 = local_70 == -1;
    if ((local_58 == (longlong *)0x0) || (plVar5 = local_58, !bVar6)) goto LAB_140061b62;
  }
  if ((ulonglong)plVar5[3] <= (ulonglong)plVar5[2]) {
    iVar1 = (**(code **)(*plVar5 + 0x48))();
    if (iVar1 == -1) {
      local_58 = (longlong *)0x0;
      bVar6 = true;
      goto LAB_140061b62;
    }
  }
  bVar6 = false;
LAB_140061b62:
  bVar7 = (int)uStack_60 == -1;
  if ((local_68 != (longlong *)0x0) && (bVar7)) {
    bVar7 = false;
    if ((ulonglong)local_68[3] <= (ulonglong)local_68[2]) {
      iVar1 = (**(code **)(*local_68 + 0x48))();
      bVar7 = iVar1 == -1;
    }
  }
  if (bVar6 == bVar7) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_58;
  param_1[1] = uStack_50;
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_weekday(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::time_get<>::get_weekday
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x28))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::do_date_order()
// const

undefined8 std::time_get<>::do_date_order(void)

{
  return 0;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_monthname(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::time_get<>::get_monthname
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x30))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_num(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, int&, int, int, unsigned long long,
// std::ios_base&, std::_Ios_Iostate&) const

undefined8 *
std::time_get<>::_M_extract_num
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          int *param_5,int param_6,int param_7,ulonglong param_8,longlong param_9,uint *param_10)

{
  char cVar1;
  byte bVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  longlong *plVar5;
  char cVar6;
  int iVar7;
  uint uVar8;
  longlong lVar9;
  ulonglong uVar10;
  longlong *plVar11;
  ulonglong uVar12;
  longlong *plVar13;
  int iVar14;
  ulonglong uVar15;
  bool bVar16;
  bool bVar17;
  bool bVar18;
  
  uVar3 = param_3[1];
  uVar4 = param_4[1];
  plVar11 = (longlong *)*param_3;
  plVar13 = (longlong *)*param_4;
  uVar12 = uVar3 & 0xffffffff;
  lVar9 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar5 = *(longlong **)(*(longlong *)(*(longlong *)(param_9 + 0xd0) + 8) + lVar9 * 8);
  if (plVar5 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  bVar16 = (int)uVar4 == -1;
  iVar14 = 0;
  uVar15 = 0;
  while( true ) {
    bVar17 = (uint)uVar12 == 0xffffffff;
    bVar18 = bVar17;
    if (plVar11 != (longlong *)0x0 && bVar17) {
      if ((ulonglong)plVar11[2] < (ulonglong)plVar11[3]) {
        bVar18 = false;
      }
      else {
        iVar7 = (**(code **)(*plVar11 + 0x48))(plVar11);
        bVar18 = iVar7 == -1;
        if (bVar18) {
          plVar11 = (longlong *)0x0;
        }
      }
    }
    if ((plVar13 == (longlong *)0x0) || (!bVar16)) {
      bVar18 = (bool)(bVar18 ^ bVar16);
    }
    else if (((ulonglong)plVar13[3] <= (ulonglong)plVar13[2]) &&
            (iVar7 = (**(code **)(*plVar13 + 0x48))(plVar13), iVar7 == -1)) {
      bVar18 = (bool)(bVar18 ^ 1);
      plVar13 = (longlong *)0x0;
    }
    if ((param_8 <= uVar15) || (!bVar18)) break;
    if ((plVar11 == (longlong *)0x0) || (!bVar17)) {
      uVar8 = (uint)uVar12 & 0xff;
      uVar10 = uVar12;
    }
    else if ((byte *)plVar11[2] < (byte *)plVar11[3]) {
      bVar2 = *(byte *)plVar11[2];
      uVar10 = (ulonglong)bVar2;
      uVar8 = (uint)bVar2;
    }
    else {
      uVar8 = (**(code **)(*plVar11 + 0x48))(plVar11);
      if (uVar8 == 0xffffffff) {
        uVar8 = 0xff;
        uVar10 = 0xffffffff;
        plVar11 = (longlong *)0x0;
      }
      else {
        uVar10 = (ulonglong)uVar8;
        uVar8 = uVar8 & 0xff;
      }
    }
    cVar6 = (char)uVar10;
    cVar1 = *(char *)((longlong)plVar5 + (longlong)(int)uVar8 + 0x139);
    if (cVar1 == '\0') {
      if (*(code **)(*plVar5 + 0x40) != ctype<char>::do_narrow) {
        cVar6 = (**(code **)(*plVar5 + 0x40))(plVar5,(int)cVar6,0x2a);
      }
      if (cVar6 == '*') break;
      *(char *)((longlong)plVar5 + (longlong)(int)uVar8 + 0x139) = cVar6;
      cVar1 = cVar6;
    }
    if (9 < (byte)(cVar1 - 0x30U)) break;
    iVar14 = cVar1 + -0x30 + iVar14 * 10;
    if (param_7 < iVar14) goto LAB_140061ff7;
    if ((ulonglong)plVar11[2] < (ulonglong)plVar11[3]) {
      plVar11[2] = plVar11[2] + 1;
    }
    else {
      (**(code **)(*plVar11 + 0x50))(plVar11);
    }
    uVar15 = uVar15 + 1;
    uVar12 = 0xffffffff;
  }
  if ((uVar15 != 0 && param_6 <= iVar14) && (iVar14 <= param_7)) {
    *param_5 = iVar14;
    goto LAB_140062002;
  }
LAB_140061ff7:
  *param_10 = *param_10 | 4;
LAB_140062002:
  param_1[1] = uVar3 & 0xffffffff00000000 | uVar12;
  *param_1 = plVar11;
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_weekday(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::time_get<>::do_get_weekday
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_118;
  longlong local_110;
  undefined8 local_108;
  ulonglong local_100;
  longlong *local_f8;
  ulonglong local_f0;
  int local_e0;
  uint local_dc;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_dc = 0;
    uStack_a0 = *(undefined8 *)(lVar5 + 0x58);
    local_98 = *(undefined8 *)(lVar5 + 0x60);
    uStack_90 = *(undefined8 *)(lVar5 + 0x68);
    local_88 = *(undefined8 *)(lVar5 + 0x70);
    uStack_80 = *(undefined8 *)(lVar5 + 0x78);
    local_78 = *(undefined8 *)(lVar5 + 0x80);
    uStack_70 = *(undefined8 *)(lVar5 + 0x88);
    local_d8 = *(undefined8 *)(lVar5 + 0x90);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x98);
    local_c8 = *(undefined8 *)(lVar5 + 0xa0);
    uStack_c0 = *(undefined8 *)(lVar5 + 0xa8);
    local_b8 = *(undefined8 *)(lVar5 + 0xb0);
    uStack_b0 = *(undefined8 *)(lVar5 + 0xb8);
    local_a8 = *(undefined8 *)(lVar5 + 0xc0);
    local_118 = plVar3;
    local_110 = lVar4;
    local_108 = uVar1;
    local_100 = uVar2;
    _M_extract_wday_or_month
              (&local_f8,param_2,&local_108,&local_118,&local_e0,(longlong)&local_d8,7,param_5,
               &local_dc);
    if (local_dc == 0) {
      *(int *)(param_7 + 0x18) = local_e0;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (int)local_f0 == -1;
    plVar8 = local_f8;
    if ((local_f8 != (longlong *)0x0 && bVar9) &&
       (bVar9 = false, (ulonglong)local_f8[3] <= (ulonglong)local_f8[2])) {
      iVar6 = (**(code **)(*local_f8 + 0x48))(local_f8);
      plVar8 = (longlong *)0x0;
      bVar9 = iVar6 == -1;
      if (!bVar9) {
        plVar8 = local_f8;
      }
    }
    bVar10 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar10)) &&
       (bVar10 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar10 = iVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_f0 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_name(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, int&, char const**, unsigned long long,
// std::ios_base&, std::_Ios_Iostate&) const

void std::time_get<>::_M_extract_name
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
               undefined4 *param_5,longlong param_6,ulonglong param_7,longlong param_8,uint *param_9
               )

{
  longlong *plVar1;
  code *pcVar2;
  longlong **pplVar3;
  istreambuf_iterator<> *piVar4;
  ulonglong *puVar5;
  char cVar6;
  undefined1 uVar7;
  char cVar8;
  undefined4 uVar9;
  int iVar10;
  longlong lVar11;
  ulonglong uVar12;
  size_t sVar13;
  ulonglong *puVar14;
  ulonglong *puVar15;
  uint uVar16;
  longlong *plVar17;
  ulonglong uVar18;
  uint uVar19;
  ulonglong uVar20;
  char *pcVar21;
  ulonglong uVar22;
  ulonglong uVar23;
  bool bVar24;
  bool bVar25;
  bool bVar26;
  undefined8 auStack_e0 [5];
  ulonglong local_b8;
  longlong **local_b0;
  ulonglong local_a8;
  istreambuf_iterator<> *local_a0;
  ulonglong *local_98;
  longlong local_90;
  char local_82;
  char local_81;
  ulonglong *local_80;
  ulonglong *local_78;
  ulonglong local_70;
  longlong *local_68;
  undefined8 uStack_60;
  longlong *local_58;
  undefined8 uStack_50;
  
  local_58 = (longlong *)*param_3;
  uStack_50 = param_3[1];
  local_68 = (longlong *)*param_4;
  uStack_60 = param_4[1];
  auStack_e0[0] = 0x140062544;
  lVar11 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar11 * 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    auStack_e0[0] = 0x140062da8;
    __throw_bad_cast();
  }
  auStack_e0[0] = 0x140062572;
  local_b0 = &local_68;
  local_a0 = (istreambuf_iterator<> *)&local_58;
  auStack_e0[param_7 * -2] = 0x140062592;
  uVar12 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
  piVar4 = local_a0;
  if ((char)uVar12 == '\0') {
    auStack_e0[param_7 * -2] = 0x1400625c6;
    uVar12 = istreambuf_iterator<>::_M_get(piVar4);
    pcVar2 = *(code **)(*plVar1 + 0x20);
    auStack_e0[param_7 * -2] = 0x1400625d6;
    cVar6 = (*pcVar2)(plVar1,(int)(char)uVar12);
    pcVar2 = *(code **)(*plVar1 + 0x10);
    auStack_e0[param_7 * -2] = 0x1400625e4;
    uVar7 = (*pcVar2)(plVar1,(int)(char)uVar12);
    if (param_7 != 0) {
      local_80 = &local_b8 + param_7 * -2 + param_7;
      local_70 = CONCAT71(local_70._1_7_,uVar7);
      uVar12 = 0;
      uVar20 = 0;
      local_78 = &local_b8 + param_7 * -2;
      do {
        while( true ) {
          uVar18 = uVar12;
          cVar8 = **(char **)(param_6 + uVar18 * 8);
          pcVar2 = *(code **)(*plVar1 + 0x20);
          auStack_e0[param_7 * -2] = 0x140062640;
          cVar8 = (*pcVar2)(plVar1,(int)cVar8);
          if (cVar6 != cVar8) break;
LAB_140062645:
          pcVar21 = *(char **)(param_6 + uVar18 * 8);
          auStack_e0[param_7 * -2] = 0x140062657;
          sVar13 = strlen(pcVar21);
          local_80[uVar20] = sVar13;
          uVar23 = uVar20 + 1;
          local_78[uVar20] = uVar18;
          uVar12 = uVar18 + 1;
          uVar20 = uVar23;
          if (param_7 == uVar18 + 1) goto LAB_140062674;
        }
        cVar8 = **(char **)(param_6 + uVar18 * 8);
        pcVar2 = *(code **)(*plVar1 + 0x10);
        auStack_e0[param_7 * -2] = 0x140062621;
        cVar8 = (*pcVar2)(plVar1,(int)cVar8);
        if ((char)local_70 == cVar8) goto LAB_140062645;
        uVar12 = uVar18 + 1;
      } while (param_7 != uVar18 + 1);
LAB_140062674:
      puVar5 = local_78;
      if (1 < uVar20) {
        local_90 = uVar20 * 8;
        local_70 = 0;
        uVar12 = *local_80;
        local_98 = local_80 + 1;
        local_a8 = uVar18 + 1;
LAB_1400626b8:
        puVar14 = local_98;
        uVar18 = uVar12;
        if (((int)(ulonglong *)((longlong)local_80 + local_90) - (int)local_98 & 8U) == 0)
        goto LAB_1400626f8;
        uVar18 = *local_98;
        puVar14 = local_80;
        if (uVar12 <= *local_98) {
          uVar18 = uVar12;
        }
        while (puVar14 = puVar14 + 2, (ulonglong *)((longlong)local_80 + local_90) != puVar14) {
LAB_1400626f8:
          if (*puVar14 < uVar18) {
            uVar18 = *puVar14;
          }
          if (puVar14[1] < uVar18) {
            uVar18 = puVar14[1];
          }
        }
        local_70 = local_70 + 1;
        if ((ulonglong)local_58[2] < (ulonglong)local_58[3]) {
          local_58[2] = local_58[2] + 1;
          pplVar3 = local_b0;
          piVar4 = local_a0;
        }
        else {
          pcVar2 = *(code **)(*local_58 + 0x50);
          auStack_e0[param_7 * -2] = 0x140062a46;
          (*pcVar2)();
          pplVar3 = local_b0;
          piVar4 = local_a0;
        }
        uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
        local_b0 = pplVar3;
        local_a0 = piVar4;
        if (local_70 == uVar18) {
          auStack_e0[param_7 * -2] = 0x140062a67;
          uVar23 = istreambuf_iterator<>::equal(piVar4,(longlong *)pplVar3);
          local_b8 = CONCAT71(local_b8._1_7_,(char)uVar23);
          if ((char)uVar23 == '\0') {
            auStack_e0[param_7 * -2] = 0x140062a7a;
            uVar23 = istreambuf_iterator<>::_M_get(piVar4);
            pcVar2 = *(code **)(*plVar1 + 0x20);
            auStack_e0[param_7 * -2] = 0x140062a87;
            uVar7 = (*pcVar2)(plVar1,(int)(char)uVar23);
            uVar22 = 0;
            local_78 = (ulonglong *)CONCAT71(local_78._1_7_,uVar7);
            auStack_e0[param_7 * -2] = 0x140062a94;
            uVar23 = istreambuf_iterator<>::_M_get(piVar4);
            pcVar2 = *(code **)(*plVar1 + 0x10);
            auStack_e0[param_7 * -2] = 0x140062aa1;
            local_81 = (*pcVar2)(plVar1,(int)(char)uVar23);
            puVar14 = local_80;
            local_82 = (char)local_b8;
            local_b8 = uVar12;
            do {
              if (uVar18 < puVar14[uVar22]) {
                pcVar21 = (char *)(*(longlong *)(param_6 + puVar5[uVar22] * 8) + uVar18);
                cVar6 = *pcVar21;
                pcVar2 = *(code **)(*plVar1 + 0x20);
                auStack_e0[param_7 * -2] = 0x140062ae3;
                cVar6 = (*pcVar2)(plVar1,(int)cVar6);
                if ((char)local_78 != cVar6) {
                  cVar6 = *pcVar21;
                  pcVar2 = *(code **)(*plVar1 + 0x10);
                  auStack_e0[param_7 * -2] = 0x140062af9;
                  cVar6 = (*pcVar2)(plVar1,(int)cVar6);
                  if (local_81 != cVar6) goto LAB_140062b02;
                }
                uVar12 = local_b8;
                cVar6 = '\x01';
                break;
              }
LAB_140062b02:
              uVar22 = uVar22 + 1;
              uVar12 = local_b8;
              cVar6 = local_82;
            } while (uVar22 != uVar20);
          }
          else {
            cVar6 = '\0';
          }
          puVar14 = local_80;
          uVar23 = 0;
          lVar11 = local_90;
          do {
            if ((uVar12 == uVar18) == (bool)cVar6) {
              uVar20 = uVar20 - 1;
              lVar11 = uVar20 * 8;
              puVar5[uVar23] = puVar5[uVar20];
              local_80[uVar23] = local_80[uVar20];
              if (uVar20 <= uVar23) goto LAB_140062b69;
            }
            else {
              uVar23 = uVar23 + 1;
              if (uVar20 <= uVar23) goto LAB_140062b69;
            }
            uVar12 = local_80[uVar23];
          } while( true );
        }
        goto LAB_140062746;
      }
      local_70 = 0;
LAB_1400628cb:
      plVar17 = local_58;
      if (uVar20 == 1) {
        auStack_e0[param_7 * -2] = 0x1400628de;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar17);
        uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
        uVar18 = local_70 + 1;
LAB_1400628ed:
        uVar12 = *puVar5;
LAB_1400628f1:
        local_70 = *(longlong *)(param_6 + uVar12 * 8);
        local_78 = (ulonglong *)*local_80;
        local_80 = (ulonglong *)uVar12;
        if (uVar18 < local_78) {
          bVar24 = (int)uStack_60 == -1;
          plVar17 = local_58;
          uVar19 = (uint)uStack_50;
          do {
            bVar26 = uVar19 == 0xffffffff;
            bVar25 = plVar17 != (longlong *)0x0 && bVar26;
            cVar6 = bVar26;
            if (bVar25) {
              if ((ulonglong)plVar17[3] <= (ulonglong)plVar17[2]) {
                pcVar2 = *(code **)(*plVar17 + 0x48);
                local_81 = bVar25;
                auStack_e0[param_7 * -2] = 0x140062d22;
                iVar10 = (*pcVar2)(plVar17);
                if (iVar10 == -1) {
                  local_58 = (longlong *)0x0;
                  cVar6 = local_81;
                  goto LAB_14006294b;
                }
              }
              cVar6 = '\0';
            }
LAB_14006294b:
            bVar25 = bVar24;
            if (local_68 != (longlong *)0x0 && bVar24) {
              if ((ulonglong)local_68[3] <= (ulonglong)local_68[2]) {
                pcVar2 = *(code **)(*local_68 + 0x48);
                local_81 = cVar6;
                auStack_e0[param_7 * -2] = 0x140062d45;
                iVar10 = (*pcVar2)();
                cVar6 = local_81;
                if (iVar10 == -1) {
                  local_68 = (longlong *)0x0;
                  bVar25 = true;
                  goto LAB_140062964;
                }
              }
              if (cVar6 == '\0') goto LAB_140062c9d;
            }
            else {
LAB_140062964:
              if ((bool)cVar6 == bVar25) goto LAB_140062c9d;
            }
            cVar6 = *(char *)(local_70 + uVar18);
            pcVar2 = *(code **)(*plVar1 + 0x20);
            auStack_e0[param_7 * -2] = 0x14006297e;
            cVar6 = (*pcVar2)(plVar1,(int)cVar6);
            plVar17 = local_58;
            if ((local_58 == (longlong *)0x0) || (!bVar26)) {
              cVar8 = (char)uVar19;
            }
            else if ((char *)local_58[2] < (char *)local_58[3]) {
              cVar8 = *(char *)local_58[2];
            }
            else {
              pcVar2 = *(code **)(*local_58 + 0x48);
              auStack_e0[param_7 * -2] = 0x140062d68;
              iVar10 = (*pcVar2)(plVar17);
              cVar8 = (char)iVar10;
              if (iVar10 == -1) {
                local_58 = (longlong *)0x0;
                plVar17 = (longlong *)0x0;
              }
            }
            pcVar2 = *(code **)(*plVar1 + 0x20);
            auStack_e0[param_7 * -2] = 0x1400629a1;
            cVar8 = (*pcVar2)(plVar1,(int)cVar8);
            if (cVar8 != cVar6) {
              cVar6 = *(char *)(local_70 + uVar18);
              pcVar2 = *(code **)(*plVar1 + 0x10);
              auStack_e0[param_7 * -2] = 0x1400629b7;
              cVar6 = (*pcVar2)(plVar1,(int)cVar6);
              if ((plVar17 != (longlong *)0x0) && (bVar26)) {
                if ((byte *)plVar17[2] < (byte *)plVar17[3]) {
                  uVar19 = (uint)*(byte *)plVar17[2];
                }
                else {
                  pcVar2 = *(code **)(*plVar17 + 0x48);
                  auStack_e0[param_7 * -2] = 0x140062d8b;
                  uVar19 = (*pcVar2)(plVar17);
                  if (uVar19 == 0xffffffff) {
                    local_58 = (longlong *)0x0;
                  }
                }
              }
              pcVar2 = *(code **)(*plVar1 + 0x10);
              auStack_e0[param_7 * -2] = 0x1400629d5;
              cVar8 = (*pcVar2)(plVar1,(int)(char)uVar19);
              plVar17 = local_58;
              if (cVar8 != cVar6) goto LAB_140062c9d;
            }
            if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
              plVar17[2] = plVar17[2] + 1;
            }
            else {
              pcVar2 = *(code **)(*plVar17 + 0x50);
              auStack_e0[param_7 * -2] = 0x140062ccf;
              (*pcVar2)(plVar17);
            }
            uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
            uVar18 = uVar18 + 1;
            uVar19 = 0xffffffff;
          } while (local_78 != (ulonglong *)uVar18);
          uVar9 = SUB84(local_80,0);
        }
        else {
LAB_140062c9d:
          uVar9 = SUB84(local_80,0);
          if (local_78 != (ulonglong *)uVar18) goto LAB_140062596;
        }
        *param_5 = uVar9;
        goto LAB_1400625a0;
      }
    }
  }
LAB_140062596:
  *param_9 = *param_9 | 4;
LAB_1400625a0:
  *param_1 = local_58;
  param_1[1] = uStack_50;
  return;
LAB_140062b69:
  local_90 = lVar11;
  if (cVar6 == '\0') {
    if (uVar20 != 2) {
      if (uVar20 != 1) goto LAB_140062596;
      goto LAB_1400628ed;
    }
    if ((local_a8 & 1) != 0) goto LAB_140062596;
    uVar12 = *puVar5;
    uVar20 = local_a8 >> 1;
    if (uVar12 < uVar20) {
      if (uVar20 + uVar12 == puVar5[1]) goto LAB_1400628f1;
      goto LAB_140062596;
    }
    if (uVar12 - uVar20 != puVar5[1]) goto LAB_140062596;
    *puVar5 = uVar12 - uVar20;
    *puVar14 = puVar14[1];
    uVar12 = *puVar5;
    goto LAB_1400628f1;
  }
  uVar18 = *local_80;
  if (1 < uVar20) {
    puVar14 = (ulonglong *)((longlong)local_80 + lVar11);
    puVar15 = local_98;
    if (((int)puVar14 - (int)local_98 & 8U) != 0) {
      if (*local_98 < uVar18) {
        uVar18 = *local_98;
      }
      puVar15 = local_80 + 2;
      if (puVar14 == puVar15) goto LAB_140062746;
    }
    do {
      if (*puVar15 < uVar18) {
        uVar18 = *puVar15;
      }
      if (puVar15[1] < uVar18) {
        uVar18 = puVar15[1];
      }
      puVar15 = puVar15 + 2;
    } while (puVar14 != puVar15);
  }
LAB_140062746:
  if (uVar18 <= local_70) goto LAB_1400628cb;
  uVar19 = (uint)uStack_50;
  bVar24 = (uint)uStack_50 == 0xffffffff;
  cVar6 = bVar24;
  if (local_58 != (longlong *)0x0 && bVar24) {
    if ((ulonglong)local_58[3] <= (ulonglong)local_58[2]) {
      local_78 = (ulonglong *)CONCAT71(local_78._1_7_,bVar24);
      pcVar2 = *(code **)(*local_58 + 0x48);
      auStack_e0[param_7 * -2] = 0x140062c09;
      iVar10 = (*pcVar2)();
      cVar6 = (char)local_78;
      if (iVar10 == -1) {
        local_58 = (longlong *)0x0;
        bVar24 = true;
        goto LAB_14006276d;
      }
    }
    bVar24 = false;
  }
LAB_14006276d:
  bVar25 = (int)uStack_60 == -1;
  if (local_68 != (longlong *)0x0 && bVar25) {
    if ((ulonglong)local_68[3] <= (ulonglong)local_68[2]) {
      local_78 = (ulonglong *)CONCAT71(local_78._1_7_,cVar6);
      pcVar2 = *(code **)(*local_68 + 0x48);
      auStack_e0[param_7 * -2] = 0x140062c2c;
      iVar10 = (*pcVar2)();
      cVar6 = (char)local_78;
      if (iVar10 == -1) {
        local_68 = (longlong *)0x0;
        bVar25 = true;
        goto LAB_140062788;
      }
    }
    if (bVar24 == false) goto LAB_1400628cb;
  }
  else {
LAB_140062788:
    if (bVar24 == bVar25) goto LAB_1400628cb;
  }
  plVar17 = local_58;
  uVar16 = uVar19;
  if ((local_58 == (longlong *)0x0) || (cVar6 == '\0')) {
LAB_1400627a3:
    pcVar2 = *(code **)(*plVar1 + 0x20);
    auStack_e0[param_7 * -2] = 0x1400627b0;
    uVar7 = (*pcVar2)(plVar1,(int)(char)uVar16);
    local_78 = (ulonglong *)CONCAT71(local_78._1_7_,uVar7);
  }
  else {
    if ((char *)local_58[2] < (char *)local_58[3]) {
      cVar6 = *(char *)local_58[2];
    }
    else {
      pcVar2 = *(code **)(*local_58 + 0x48);
      auStack_e0[param_7 * -2] = 0x140062cfe;
      iVar10 = (*pcVar2)(plVar17);
      cVar6 = (char)iVar10;
      if (iVar10 == -1) {
        local_58 = (longlong *)0x0;
        uVar16 = 0xffffffff;
        goto LAB_1400627a3;
      }
    }
    pcVar2 = *(code **)(*plVar1 + 0x20);
    auStack_e0[param_7 * -2] = 0x14006288e;
    uVar7 = (*pcVar2)(plVar1,(int)cVar6);
    local_78 = (ulonglong *)CONCAT71(local_78._1_7_,uVar7);
    if ((byte *)plVar17[2] < (byte *)plVar17[3]) {
      uVar19 = (uint)*(byte *)plVar17[2];
    }
    else {
      pcVar2 = *(code **)(*plVar17 + 0x48);
      auStack_e0[param_7 * -2] = 0x140062cdd;
      uVar19 = (*pcVar2)(plVar17);
      if (uVar19 == 0xffffffff) {
        local_58 = (longlong *)0x0;
      }
    }
  }
  pcVar2 = *(code **)(*plVar1 + 0x10);
  auStack_e0[param_7 * -2] = 0x1400627c1;
  local_81 = (*pcVar2)(plVar1,(int)(char)uVar19);
  if (uVar20 == 0) goto LAB_140062596;
  uVar12 = 0;
  do {
    while( true ) {
      pcVar21 = (char *)(local_70 + *(longlong *)(param_6 + puVar5[uVar12] * 8));
      cVar6 = *pcVar21;
      pcVar2 = *(code **)(*plVar1 + 0x20);
      auStack_e0[param_7 * -2] = 0x140062844;
      cVar6 = (*pcVar2)(plVar1,(int)cVar6);
      if (cVar6 != (char)local_78) break;
LAB_140062849:
      uVar12 = uVar12 + 1;
      if (uVar20 <= uVar12) goto LAB_140062852;
    }
    cVar6 = *pcVar21;
    pcVar2 = *(code **)(*plVar1 + 0x10);
    auStack_e0[param_7 * -2] = 0x1400627ee;
    cVar6 = (*pcVar2)(plVar1,(int)cVar6);
    if (local_81 == cVar6) goto LAB_140062849;
    uVar20 = uVar20 - 1;
    puVar5[uVar12] = puVar5[uVar20];
    local_80[uVar12] = local_80[uVar20];
    local_90 = uVar20 * 8;
  } while (uVar12 < uVar20);
LAB_140062852:
  if (uVar20 < 2) goto LAB_1400628cb;
  uVar12 = *local_80;
  goto LAB_1400626b8;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get_monthname(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8 *
std::time_get<>::do_get_monthname
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  int iVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_1a8;
  longlong local_1a0;
  undefined8 local_198;
  ulonglong local_190;
  longlong *local_188;
  ulonglong local_180;
  int local_170;
  uint local_16c;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<char>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_16c = 0;
    local_108 = *(undefined8 *)(lVar5 + 200);
    uStack_100 = *(undefined8 *)(lVar5 + 0xd0);
    local_f8 = *(undefined8 *)(lVar5 + 0xd8);
    uStack_f0 = *(undefined8 *)(lVar5 + 0xe0);
    local_e8 = *(undefined8 *)(lVar5 + 0xe8);
    uStack_e0 = *(undefined8 *)(lVar5 + 0xf0);
    local_d8 = *(undefined8 *)(lVar5 + 0xf8);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x100);
    local_c8 = *(undefined8 *)(lVar5 + 0x108);
    uStack_c0 = *(undefined8 *)(lVar5 + 0x110);
    local_b8 = *(undefined8 *)(lVar5 + 0x118);
    uStack_b0 = *(undefined8 *)(lVar5 + 0x120);
    local_128 = *(undefined8 *)(lVar5 + 0x168);
    uStack_120 = *(undefined8 *)(lVar5 + 0x170);
    local_118 = *(undefined8 *)(lVar5 + 0x178);
    uStack_110 = *(undefined8 *)(lVar5 + 0x180);
    local_158 = *(undefined8 *)(lVar5 + 0x138);
    uStack_150 = *(undefined8 *)(lVar5 + 0x140);
    local_148 = *(undefined8 *)(lVar5 + 0x148);
    uStack_140 = *(undefined8 *)(lVar5 + 0x150);
    local_138 = *(undefined8 *)(lVar5 + 0x158);
    uStack_130 = *(undefined8 *)(lVar5 + 0x160);
    local_168 = *(undefined8 *)(lVar5 + 0x128);
    uStack_160 = *(undefined8 *)(lVar5 + 0x130);
    local_1a8 = plVar3;
    local_1a0 = lVar4;
    local_198 = uVar1;
    local_190 = uVar2;
    _M_extract_wday_or_month
              (&local_188,param_2,&local_198,&local_1a8,&local_170,(longlong)&local_168,0xc,param_5,
               &local_16c);
    if (local_16c == 0) {
      *(int *)(param_7 + 0x10) = local_170;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (int)local_180 == -1;
    plVar8 = local_188;
    if ((local_188 != (longlong *)0x0 && bVar9) &&
       (bVar9 = false, (ulonglong)local_188[3] <= (ulonglong)local_188[2])) {
      iVar6 = (**(code **)(*local_188 + 0x48))(local_188);
      plVar8 = (longlong *)0x0;
      bVar9 = iVar6 == -1;
      if (!bVar9) {
        plVar8 = local_188;
      }
    }
    bVar10 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar10)) &&
       (bVar10 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar10 = iVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_180 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_via_format(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*,
// char const*) const

char * std::time_get<>::_M_extract_via_format
                 (char *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
                 istreambuf_iterator<> *param_5,uint *param_6,string *param_7,
                 istreambuf_iterator<> *param_8)

{
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_14;
  undefined4 local_c;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  local_38 = *param_4;
  uStack_30 = param_4[1];
  local_14 = 0;
  local_c = 0;
  _M_extract_via_format
            (param_1,param_2,&local_28,&local_38,param_5,param_6,param_7,param_8,
             (istreambuf_iterator<> *)&local_14);
  return param_1;
}



// WARNING: Control flow encountered bad instruction data
// WARNING: Instruction at (ram,0x00014006b9e0) overlaps instruction at (ram,0x00014006b9de)
// 
// WARNING: Removing unreachable block (ram,0x0001400c5d96)
// WARNING: Removing unreachable block (ram,0x0001400c5d98)
// WARNING: Removing unreachable block (ram,0x0001400c5d9b)
// WARNING: Removing unreachable block (ram,0x0001400c5db3)
// WARNING: Removing unreachable block (ram,0x0001400c5e2b)
// WARNING: Removing unreachable block (ram,0x0001400c5dc2)
// WARNING: Removing unreachable block (ram,0x0001400c5dca)
// WARNING: Removing unreachable block (ram,0x0001400c5dd2)
// WARNING: Removing unreachable block (ram,0x0001400c5dd4)
// WARNING: Removing unreachable block (ram,0x0001400c5e3d)
// WARNING: Removing unreachable block (ram,0x0001400c5e08)
// WARNING: Removing unreachable block (ram,0x0001400c5d2d)
// WARNING: Removing unreachable block (ram,0x0001400c60c5)
// WARNING: Removing unreachable block (ram,0x0001400c5f54)
// WARNING: Removing unreachable block (ram,0x0001400c5f56)
// WARNING: Removing unreachable block (ram,0x0001400c5fbb)
// WARNING: Removing unreachable block (ram,0x0001400c5fbd)
// WARNING: Removing unreachable block (ram,0x0001400c5fbf)
// WARNING: Removing unreachable block (ram,0x0001400c6028)
// WARNING: Removing unreachable block (ram,0x0001400c6080)
// WARNING: Removing unreachable block (ram,0x0001400c6095)
// WARNING: Removing unreachable block (ram,0x0001400c6109)
// WARNING: Removing unreachable block (ram,0x0001400c6097)
// WARNING: Removing unreachable block (ram,0x0001400c60fc)
// WARNING: Removing unreachable block (ram,0x0001400c6099)
// WARNING: Removing unreachable block (ram,0x0001400c609b)
// WARNING: Removing unreachable block (ram,0x0001400c5f7b)
// WARNING: Removing unreachable block (ram,0x0001400c5f80)
// WARNING: Removing unreachable block (ram,0x0001400c5fee)
// WARNING: Removing unreachable block (ram,0x0001400c5fe5)
// WARNING: Removing unreachable block (ram,0x0001400c5fe7)
// WARNING: Removing unreachable block (ram,0x0001400c605e)
// WARNING: Removing unreachable block (ram,0x0001400c6060)
// WARNING: Removing unreachable block (ram,0x0001400c5fec)
// WARNING: Removing unreachable block (ram,0x0001400c5ff5)
// WARNING: Removing unreachable block (ram,0x0001400c5ffa)
// WARNING: Removing unreachable block (ram,0x0001400c5fff)
// WARNING: Removing unreachable block (ram,0x0001400c6063)
// WARNING: Removing unreachable block (ram,0x0001400c606e)
// WARNING: Removing unreachable block (ram,0x0001400c6071)
// WARNING: Removing unreachable block (ram,0x0001400c6073)
// WARNING: Removing unreachable block (ram,0x0001400c60e5)
// WARNING: Removing unreachable block (ram,0x0001400c5d94)
// WARNING: Removing unreachable block (ram,0x0001400c604c)
// WARNING: Removing unreachable block (ram,0x0001400c604e)
// WARNING: Removing unreachable block (ram,0x0001400c6050)
// WARNING: Removing unreachable block (ram,0x0001400c5e86)
// WARNING: Removing unreachable block (ram,0x0001400c5e88)
// WARNING: Removing unreachable block (ram,0x0001400c6088)
// WARNING: Removing unreachable block (ram,0x0001400c608a)
// WARNING: Removing unreachable block (ram,0x0001400c60b3)
// WARNING: Removing unreachable block (ram,0x0001400c5ea4)
// WARNING: Removing unreachable block (ram,0x0001400c6098)
// WARNING: Removing unreachable block (ram,0x0001400c5f9e)
// WARNING: Removing unreachable block (ram,0x0001400c600c)
// WARNING: Removing unreachable block (ram,0x0001400c5fa3)
// WARNING: Removing unreachable block (ram,0x0001400c5fb1)
// WARNING: Removing unreachable block (ram,0x0001400c601d)
// WARNING: Removing unreachable block (ram,0x0001400c5e83)
// WARNING: Removing unreachable block (ram,0x0001400c5e85)
// WARNING: Removing unreachable block (ram,0x0001400c5ebc)
// WARNING: Removing unreachable block (ram,0x0001400c5e9c)
// WARNING: Removing unreachable block (ram,0x0001400c5eb4)
// WARNING: Removing unreachable block (ram,0x0001400c5ec1)
// WARNING: Removing unreachable block (ram,0x0001400c5f1d)
// WARNING: Removing unreachable block (ram,0x0001400c607b)
// WARNING: Removing unreachable block (ram,0x0001400c607d)
// WARNING: Removing unreachable block (ram,0x0001400c602d)
// WARNING: Removing unreachable block (ram,0x0001400c602b)
// WARNING: Removing unreachable block (ram,0x0001400c5fd6)
// WARNING: Removing unreachable block (ram,0x0001400c5fd8)
// WARNING: Removing unreachable block (ram,0x0001400c5f5d)
// WARNING: Removing unreachable block (ram,0x0001400c5f62)
// WARNING: Removing unreachable block (ram,0x0001400c5fd4)
// WARNING: Removing unreachable block (ram,0x0001400c604a)
// WARNING: Removing unreachable block (ram,0x0001400c6124)
// WARNING: Removing unreachable block (ram,0x0001400c60c3)
// WARNING: Removing unreachable block (ram,0x0001400c6036)
// WARNING: Removing unreachable block (ram,0x0001400c5e0d)
// WARNING: Removing unreachable block (ram,0x0001400c5e44)
// WARNING: Removing unreachable block (ram,0x0001400c5e24)
// WARNING: Removing unreachable block (ram,0x0001400c5e46)
// WARNING: Removing unreachable block (ram,0x0001400c5e48)
// WARNING: Removing unreachable block (ram,0x0001400c5e68)
// WARNING: Removing unreachable block (ram,0x0001400c609e)
// WARNING: Removing unreachable block (ram,0x0001400c60a4)
// WARNING: Removing unreachable block (ram,0x0001400c611f)
// WARNING: Removing unreachable block (ram,0x0001400c60b6)
// WARNING: Removing unreachable block (ram,0x0001400c60bb)
// WARNING: Removing unreachable block (ram,0x0001400c60c4)
// WARNING: Removing unreachable block (ram,0x0001400c60d0)
// WARNING: Removing unreachable block (ram,0x0001400c60f2)
// WARNING: Removing unreachable block (ram,0x0001400c60d2)
// WARNING: Removing unreachable block (ram,0x0001400c613f)
// WARNING: Removing unreachable block (ram,0x0001400c5f99)
// WARNING: Removing unreachable block (ram,0x0001400c6016)
// WARNING: Removing unreachable block (ram,0x0001400c612d)
// WARNING: Removing unreachable block (ram,0x0001400c60eb)
// WARNING: Removing unreachable block (ram,0x0001400c6152)
// WARNING: Removing unreachable block (ram,0x0001400c60e8)
// WARNING: Removing unreachable block (ram,0x0001400c6074)
// WARNING: Removing unreachable block (ram,0x0001400c607a)
// WARNING: Type propagation algorithm not settling
// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_via_format(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*,
// char const*, std::__time_get_state&) const

char * std::time_get<>::_M_extract_via_format
                 (char *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
                 istreambuf_iterator<> *param_5,uint *param_6,string *param_7,
                 istreambuf_iterator<> *param_8,istreambuf_iterator<> *param_9)

{
  int *piVar1;
  undefined8 *puVar2;
  code *pcVar3;
  undefined8 uVar4;
  undefined1 *puVar5;
  undefined1 *puVar6;
  char cVar7;
  char cVar8;
  ctype<char> cVar9;
  ctype<char> cVar10;
  byte bVar11;
  int iVar12;
  uint uVar13;
  uint uVar14;
  int iVar15;
  uint uVar16;
  ulonglong uVar17;
  __timepunct<char> *this;
  longlong lVar18;
  istreambuf_iterator<> *piVar19;
  ulonglong uVar20;
  char *pcVar21;
  byte *pbVar23;
  void *pvVar24;
  istreambuf_iterator<> *piVar25;
  __moneypunct_cache<char,false> *this_00;
  istreambuf_iterator<> *piVar26;
  __moneypunct_cache<char,true> *this_01;
  ctype<char> cVar28;
  string *psVar29;
  undefined1 uVar30;
  uint *puVar31;
  longlong lVar32;
  undefined1 *puVar33;
  undefined1 *puVar34;
  undefined1 *puVar35;
  undefined1 *puVar36;
  undefined1 *puVar38;
  undefined8 *puVar39;
  undefined8 *puVar40;
  undefined8 *puVar41;
  longlong *plVar42;
  ulonglong *puVar43;
  istreambuf_iterator<> *piVar44;
  istreambuf_iterator<> iVar45;
  istreambuf_iterator<> *piVar46;
  undefined4 *puVar47;
  ulonglong **ppuVar48;
  char *pcVar49;
  bool bVar50;
  istreambuf_iterator<> *piVar51;
  ctype<char> *pcVar52;
  undefined **this_02;
  undefined2 in_CS;
  bool bVar53;
  bool bVar54;
  byte bVar55;
  undefined1 auStackY_208 [32];
  string *in_stack_fffffffffffffe28;
  undefined4 uVar57;
  string *psVar56;
  istreambuf_iterator<> *in_stack_fffffffffffffe30;
  istreambuf_iterator<> *in_stack_fffffffffffffe38;
  istreambuf_iterator<> *in_stack_fffffffffffffe40;
  ulonglong uStack_1b8;
  istreambuf_iterator<> **local_1b0;
  code *local_1a8;
  undefined8 local_1a0;
  undefined8 local_190;
  undefined8 uStack_188;
  ulonglong **local_180;
  istreambuf_iterator<> *local_178;
  ulonglong uStack_170;
  ulonglong *local_168;
  undefined8 uStack_160;
  ulonglong *local_158;
  ulonglong *local_150;
  istreambuf_iterator<> *local_148;
  ulonglong uStack_140;
  ulonglong *local_138;
  ulonglong uStack_130;
  uint local_120;
  uint local_11c;
  char *local_118;
  char *pcStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  char *local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  char *local_d8;
  uint *puStack_d0;
  string *local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  ulonglong uVar22;
  byte *pbVar27;
  undefined1 *puVar37;
  
  puVar34 = auStackY_208;
  puVar38 = auStackY_208;
  puVar33 = auStackY_208;
  puVar35 = auStackY_208;
  local_138 = (ulonglong *)*param_3;
  uStack_130 = param_3[1];
  local_148 = (istreambuf_iterator<> *)*param_4;
  uStack_140 = param_4[1];
  uVar17 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if (((uVar17 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar42 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar17 * 8),
      plVar42 != (longlong *)0x0)) &&
     (this = (__timepunct<char> *)
             __dynamic_cast(plVar42,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<char>::typeinfo,0),
     this != (__timepunct<char> *)0x0)) {
    lVar18 = locale::id::_M_id((id *)&ctype<char>::id);
    this_02 = *(undefined ***)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar18 * 8);
    if ((ctype<char> *)this_02 != (ctype<char> *)0x0) {
      uVar17 = 0;
      piVar46 = (istreambuf_iterator<> *)0x0;
      piVar51 = (istreambuf_iterator<> *)&local_138;
      piVar19 = (istreambuf_iterator<> *)strlen((char *)param_8);
      local_1b0 = &local_148;
      local_120 = 0;
      local_1a8 = ctype<char>::do_narrow;
      do {
        uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)local_1b0);
        bVar50 = (bool)(piVar46 < piVar19 & ((byte)uVar20 ^ 1));
        if (bVar50 == false) {
          if ((piVar46 != piVar19) || ((int)uVar17 != 0)) {
LAB_140063629:
            *param_6 = *param_6 | 4;
          }
          *(ulonglong **)param_1 = local_138;
          *(ulonglong *)(param_1 + 8) = uStack_130;
          return param_1;
        }
        if ((int)uVar17 != 0) goto LAB_140063629;
        pcVar52 = (ctype<char> *)(param_8 + (longlong)piVar46);
        cVar10 = *pcVar52;
        cVar9 = *(ctype<char> *)((longlong)this_02 + (ulonglong)(byte)cVar10 + 0x139);
        if (cVar9 == (ctype<char>)0x0) {
          cVar9 = cVar10;
          if (*(code **)((longlong)*this_02 + 0x40) != ctype<char>::do_narrow) {
            local_1a0 = (istreambuf_iterator<> **)CONCAT71(local_1a0._1_7_,bVar50);
            cVar9 = (ctype<char>)(**(code **)((longlong)*this_02 + 0x40))(this_02,(int)(char)cVar10)
            ;
          }
          if (cVar9 != (ctype<char>)0x0) {
            *(ctype<char> *)((longlong)this_02 + (ulonglong)(byte)cVar10 + 0x139) = cVar9;
            goto LAB_1400633b0;
          }
LAB_1400633b9:
          piVar44 = piVar46;
          if ((*(byte *)(*(longlong *)((longlong)this_02 + 0x30) + (ulonglong)(byte)*pcVar52 * 2) &
              0x20) != 0) {
            ppuVar48 = (ulonglong **)(uStack_130 & 0xffffffff);
            bVar54 = (int)uStack_140 == -1;
            bVar55 = (int)uStack_130 == -1;
            bVar11 = bVar55;
            if ((local_138 != (ulonglong *)0x0) && ((bool)bVar55)) goto LAB_1400634f3;
LAB_140063489:
            do {
              bVar53 = bVar54;
              if (local_148 != (istreambuf_iterator<> *)0x0 && bVar54) {
                if (*(ulonglong *)(local_148 + 0x18) <= *(ulonglong *)(local_148 + 0x10)) {
                  local_180 = (ulonglong **)CONCAT71(local_180._1_7_,bVar55);
                  uStack_188._0_5_ = CONCAT14(bVar11,(uint)uStack_188);
                  local_1a0 = (istreambuf_iterator<> **)CONCAT71(local_1a0._1_7_,bVar50);
                  iVar12 = (**(code **)(*(longlong *)local_148 + 0x48))();
                  bVar55 = (byte)local_180;
                  local_190 = ppuVar48;
                  bVar11 = (byte)uStack_188._4_1_;
                  if (iVar12 == -1) {
                    local_148 = (istreambuf_iterator<> *)0x0;
                    bVar53 = true;
                    goto LAB_1400634a0;
                  }
                }
                bVar53 = false;
              }
LAB_1400634a0:
              if ((bool)bVar11 == bVar53) goto LAB_14006342a;
              if ((local_138 == (ulonglong *)0x0) || (bVar55 == 0)) {
LAB_1400634b7:
                puVar43 = local_138;
                if ((*(byte *)(*(longlong *)((longlong)this_02 + 0x30) +
                              ((ulonglong)ppuVar48 & 0xff) * 2) & 0x20) == 0) goto LAB_14006342a;
                pbVar23 = (byte *)local_138[2];
                if (pbVar23 < (byte *)local_138[3]) goto LAB_1400634e0;
                local_1a0 = (istreambuf_iterator<> **)CONCAT71(local_1a0._1_7_,bVar50);
                (**(code **)(*local_138 + 0x50))(local_138);
                uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
                if (puVar43[3] <= puVar43[2]) goto LAB_1400635d5;
              }
              else {
                pbVar23 = (byte *)local_138[2];
                if ((byte *)local_138[3] <= pbVar23) {
                  local_1a0 = (istreambuf_iterator<> **)CONCAT71(local_1a0._1_7_,bVar50);
                  uVar13 = (**(code **)(*local_138 + 0x48))(local_138);
                  ppuVar48 = (ulonglong **)(ulonglong)uVar13;
                  if (uVar13 == 0xffffffff) {
                    local_138 = (ulonglong *)0x0;
                  }
                  goto LAB_1400634b7;
                }
                if ((*(byte *)(*(longlong *)((longlong)this_02 + 0x30) + (ulonglong)*pbVar23 * 2) &
                    0x20) == 0) goto LAB_14006342a;
LAB_1400634e0:
                uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
                local_138[2] = (ulonglong)(pbVar23 + 1);
LAB_1400634f3:
                puVar43 = local_138;
                if (local_138[3] <= local_138[2]) {
LAB_1400635d5:
                  local_1a0 = (istreambuf_iterator<> **)CONCAT71(local_1a0._1_7_,bVar50);
                  iVar12 = (**(code **)(*puVar43 + 0x48))(puVar43);
                  if (iVar12 == -1) {
                    local_138 = (ulonglong *)0x0;
                    ppuVar48 = (ulonglong **)0xffffffff;
                    bVar55 = bVar50;
                    bVar11 = bVar50;
                    goto LAB_140063489;
                  }
                }
              }
              ppuVar48 = (ulonglong **)0xffffffff;
              bVar55 = bVar50;
              bVar11 = false;
            } while( true );
          }
          cVar7 = (**(code **)((longlong)*this_02 + 0x20))(this_02,(int)(char)*pcVar52);
          uVar20 = istreambuf_iterator<>::_M_get(piVar51);
          cVar8 = (**(code **)((longlong)*this_02 + 0x20))(this_02,(int)(char)uVar20);
          if (cVar7 != cVar8) {
            cVar7 = (**(code **)((longlong)*this_02 + 0x10))(this_02,(int)(char)*pcVar52);
            uVar20 = istreambuf_iterator<>::_M_get(piVar51);
            cVar8 = (**(code **)((longlong)*this_02 + 0x10))(this_02,(int)(char)uVar20);
            if (cVar7 != cVar8) {
              local_120 = 4;
              uVar17 = 4;
              goto LAB_14006342a;
            }
          }
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_138);
          uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
          goto LAB_14006342a;
        }
LAB_1400633b0:
        if (cVar9 != (ctype<char>)0x25) goto LAB_1400633b9;
        lVar18 = 0;
        piVar44 = piVar46 + 1;
        psVar29 = (string *)this_02;
        uVar13 = ctype<char>::narrow((ctype<char> *)this_02,
                                     (ulonglong)(uint)(int)(char)(param_8 + 1)[(longlong)piVar46],
                                     (ctype<char>)0x0);
        local_11c = 0;
        if (((char)uVar13 == 'E') || ((char)uVar13 == 'O')) {
          lVar18 = 0;
          piVar44 = piVar46 + 2;
          psVar29 = (string *)this_02;
          uVar13 = ctype<char>::narrow((ctype<char> *)this_02,
                                       (ulonglong)(uint)(int)(char)(param_8 + 2)[(longlong)piVar46],
                                       (ctype<char>)0x0);
          uVar13 = uVar13 - 0x25;
          if ((byte)uVar13 < 0x55) goto LAB_140063592;
switchD_1400635a3_caseD_1:
          local_120 = 4;
          uVar17 = 4;
          goto LAB_14006342a;
        }
        uVar13 = uVar13 - 0x25;
        if (0x54 < (byte)uVar13) goto switchD_1400635a3_caseD_1;
LAB_140063592:
        puVar31 = &switchD_1400635a3::caseD_5f;
        pcVar21 = (char *)((longlong)&switchD_1400635a3::caseD_5f +
                          (longlong)(int)(&switchD_1400635a3::caseD_5f)[uVar13 & 0xff]);
        bVar55 = (byte)pcVar21;
        uVar57 = (undefined4)((ulonglong)in_stack_fffffffffffffe28 >> 0x20);
        piVar26 = piVar44;
        piVar25 = in_stack_fffffffffffffe40;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
        switch(uVar13 & 0xff) {
        case 0:
          uVar20 = istreambuf_iterator<>::_M_get(piVar51);
          if (*(ctype<char> *)((longlong)this_02 + 0x38) == (ctype<char>)0x0) {
            uVar22 = _text__ZNKSt5ctypeIcE5widenEc_part_0((ctype<char> *)this_02,0x25);
            cVar10 = SUB81(uVar22,0);
          }
          else {
            cVar10 = *(ctype<char> *)((longlong)this_02 + 0x5e);
          }
          if (SUB81(uVar20,0) != cVar10) goto switchD_1400635a3_caseD_1;
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_138);
          uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
          break;
        default:
          goto switchD_1400635a3_caseD_1;
        case 0x1c:
        case 0x3c:
          lVar18 = *(longlong *)(this + 0x10);
          local_108 = *(undefined8 *)(lVar18 + 0x68);
          uStack_100 = *(undefined8 *)(lVar18 + 0x70);
          local_f8 = *(char **)(lVar18 + 0x78);
          uStack_f0 = *(undefined8 *)(lVar18 + 0x80);
          local_e8 = *(undefined8 *)(lVar18 + 0x88);
          uStack_e0 = *(undefined8 *)(lVar18 + 0x90);
          local_d8 = *(char **)(lVar18 + 0x98);
          puStack_d0 = *(uint **)(lVar18 + 0xa0);
          local_c8 = *(string **)(lVar18 + 0xa8);
          uStack_c0 = *(undefined8 *)(lVar18 + 0xb0);
          local_b8 = *(undefined8 *)(lVar18 + 0xb8);
          uStack_b0 = *(undefined8 *)(lVar18 + 0xc0);
          local_118 = *(char **)(lVar18 + 0x58);
          pcStack_110 = *(char **)(lVar18 + 0x60);
          in_stack_fffffffffffffe38 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)0xe;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe30 = param_5;
          _M_extract_name(&local_158,param_2,&local_168,&local_178,&local_11c,(longlong)&local_118,
                          0xe,(longlong)param_5,(uint *)in_stack_fffffffffffffe38);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(int *)(param_7 + 0x18) = (int)local_11c % 7;
            *param_9 = (istreambuf_iterator<>)((byte)*param_9 | 2);
          }
          break;
        case 0x1d:
        case 0x3d:
        case 0x43:
          __timepunct<char>::_M_months(this,&local_118);
          __timepunct<char>::_M_months_abbreviated(this,&local_b8);
          in_stack_fffffffffffffe38 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)0x18;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe30 = param_5;
          _M_extract_name(&local_158,param_2,&local_168,&local_178,&local_11c,(longlong)&local_118,
                          0x18,(longlong)param_5,(uint *)in_stack_fffffffffffffe38);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(int *)(param_7 + 0x10) = (int)local_11c % 0xc;
            *(ushort *)param_9 = *(ushort *)param_9 | 0x408;
          }
          break;
        case 0x1e:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,99);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,99,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(ushort *)param_9 = *(ushort *)param_9 | 0x480;
            *(uint *)(param_9 + 4) = local_11c;
          }
          break;
        case 0x1f:
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)&local_118;
          _text__ZNKSt5ctypeIcE5widenEPKcS2_Pc_isra_0
                    ((ctype<char> *)this_02,"%m/%d/%y","%H:%M",in_stack_fffffffffffffe30);
          goto LAB_140063f5f;
        case 0x23:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x17);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,0x17,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 8) = local_11c;
            *param_9 = (istreambuf_iterator<>)((byte)*param_9 & 0xfe);
          }
          break;
        case 0x24:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0xc);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,1,0xc,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(int *)(param_7 + 8) = (int)local_11c % 0xc;
            *param_9 = (istreambuf_iterator<>)((byte)*param_9 | 1);
          }
          break;
        case 0x28:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x3b);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,0x3b,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 4) = local_11c;
          }
          break;
        case 0x2d:
          pcVar49 = "%H:%M:%S";
          pcVar21 = "%H:%M";
          goto LAB_1400641fb;
        case 0x2e:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x3c);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,0x3c,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)param_7 = local_11c;
          }
          break;
        case 0x2f:
          pcVar49 = "";
          pcVar21 = "%H:%M:%S";
LAB_1400641fb:
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)&local_118;
          _text__ZNKSt5ctypeIcE5widenEPKcS2_Pc_isra_0
                    ((ctype<char> *)this_02,pcVar21,pcVar49,in_stack_fffffffffffffe30);
          piVar25 = in_stack_fffffffffffffe40;
          goto LAB_14006412f;
        case 0x30:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x35);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,0x35,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            local_1a0 = (istreambuf_iterator<> **)CONCAT44(local_1a0._4_4_,*(uint *)param_9);
            *(uint *)param_9 = (local_11c & 0x3f) << 0x10 | 0x20 | *(uint *)param_9 & 0xffc0ffdf;
          }
          break;
        case 0x32:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x35);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,0x35,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            local_1a0 = (istreambuf_iterator<> **)CONCAT44(local_1a0._4_4_,*(uint *)param_9);
            *(uint *)param_9 = (local_11c & 0x3f) << 0x10 | 0x40 | *(uint *)param_9 & 0xffc0ffbf;
          }
          break;
        case 0x33:
          in_stack_fffffffffffffe30 = *(istreambuf_iterator<> **)(*(longlong *)(this + 0x10) + 0x20)
          ;
          goto LAB_14006412f;
        case 0x34:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,9999);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x4;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,9999,4,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 0x14) = local_11c - 0x76c;
            local_1a0 = (istreambuf_iterator<> **)CONCAT71(local_1a0._1_7_,param_9[1]);
            param_9[1] = (istreambuf_iterator<>)((byte)param_9[1] & 0xf9 | 4);
          }
          break;
        case 0x35:
          uVar17 = istreambuf_iterator<>::_M_get(piVar51);
          if ((*(byte *)(*(longlong *)((longlong)this_02 + 0x30) + (uVar17 & 0xff) * 2) & 1) == 0)
          goto switchD_1400635a3_caseD_1;
          piVar25 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)0xe;
          local_180 = &local_158;
          local_1a0 = &local_178;
          local_190 = &local_168;
          local_178 = local_148;
          uStack_170 = uStack_140;
          local_168 = local_138;
          uStack_160 = uStack_130;
          in_stack_fffffffffffffe30 = param_5;
          in_stack_fffffffffffffe38 = piVar25;
          _M_extract_name(local_180,param_2,local_190,local_1a0,(undefined4 *)&local_118,
                          (longlong)&__timepunct_cache<char>::_S_timezones,0xe,(longlong)param_5,
                          (uint *)piVar25);
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)local_1b0);
          uVar17 = (ulonglong)local_120;
          if (((char)uVar20 != '\0') || (local_120 != 0 || (int)local_118 != 0)) break;
          uVar20 = istreambuf_iterator<>::_M_get(piVar51);
          uStack_188 = (istreambuf_iterator<> *)CONCAT44((int)uVar20,(uint)uStack_188);
          if (*(ctype<char> *)((longlong)this_02 + 0x38) == (ctype<char>)0x0) {
            uVar20 = _text__ZNKSt5ctypeIcE5widenEc_part_0((ctype<char> *)this_02,0x2d);
            cVar10 = SUB81(uVar20,0);
          }
          else {
            cVar10 = *(ctype<char> *)((longlong)this_02 + 0x66);
          }
          if (uStack_188._4_1_ != cVar10) {
            uVar20 = istreambuf_iterator<>::_M_get(piVar51);
            uStack_188 = (istreambuf_iterator<> *)CONCAT44((int)uVar20,(uint)uStack_188);
            if (*(ctype<char> *)((longlong)this_02 + 0x38) == (ctype<char>)0x0) {
              uVar20 = _text__ZNKSt5ctypeIcE5widenEc_part_0((ctype<char> *)this_02,0x2b);
              cVar10 = SUB81(uVar20,0);
            }
            else {
              cVar10 = *(ctype<char> *)((longlong)this_02 + 100);
            }
            if (uStack_188._4_1_ != cVar10) break;
          }
          ppuVar48 = local_180;
          uVar57 = (undefined4)((ulonglong)in_stack_fffffffffffffe28 >> 0x20);
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          _M_extract_num(local_180,param_2,local_190,local_1a0,(int *)&local_118,0,0x17,2,
                         (longlong)param_5,(uint *)piVar25);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_138 = local_158;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x3b);
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          local_178 = local_148;
          uStack_170 = uStack_140;
          local_168 = local_158;
          uStack_160 = uStack_130;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(ppuVar48,param_2,local_190,local_1a0,(int *)&local_118,0,0x3b,2,
                         (longlong)param_5,(uint *)piVar25);
          goto LAB_140064173;
        case 0x3e:
          in_stack_fffffffffffffe30 = *(istreambuf_iterator<> **)(*(longlong *)(this + 0x10) + 0x30)
          ;
LAB_140063f5f:
          in_stack_fffffffffffffe28 = param_7;
          in_stack_fffffffffffffe38 = param_9;
          local_178 = local_148;
          uStack_170 = uStack_140;
          local_168 = local_138;
          uStack_160 = uStack_130;
          _M_extract_via_format
                    ((char *)&local_158,param_2,&local_168,&local_178,param_5,&local_120,param_7,
                     in_stack_fffffffffffffe30,param_9);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            param_9[1] = (istreambuf_iterator<>)((byte)param_9[1] | 4);
          }
          break;
        case 0x3f:
        case 0x40:
          uVar17 = istreambuf_iterator<>::_M_get(piVar51);
          uVar57 = (undefined4)((ulonglong)in_stack_fffffffffffffe28 >> 0x20);
          if ((*(byte *)(*(longlong *)((longlong)this_02 + 0x30) + (uVar17 & 0xff) * 2) & 0x20) != 0
             ) {
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_138)
            ;
            uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
          }
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x1f);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,1,0x1f,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 0xc) = local_11c;
            *(ushort *)param_9 = *(ushort *)param_9 | 0x410;
          }
          break;
        case 0x45:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0x16e);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x3;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,1,0x16e,3,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 0x1c) = local_11c - 1;
            *param_9 = (istreambuf_iterator<>)((byte)*param_9 | 4);
          }
          break;
        case 0x48:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,0xc);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,1,0xc,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 0x10) = local_11c - 1;
            *param_9 = (istreambuf_iterator<>)((byte)*param_9 | 8);
          }
          break;
        case 0x49:
        case 0x4f:
          while ((uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)local_1b0),
                 (char)uVar20 == '\0' &&
                 (uVar20 = istreambuf_iterator<>::_M_get(piVar51),
                 (*(byte *)(*(longlong *)((longlong)this_02 + 0x30) + (uVar20 & 0xff) * 2) & 0x20)
                 != 0))) {
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_138)
            ;
            uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
          }
          break;
        case 0x4b:
          local_118 = *(char **)(*(longlong *)(this + 0x10) + 0x40);
          pcStack_110 = *(char **)(*(longlong *)(this + 0x10) + 0x48);
          if ((*local_118 != '\0') && (*pcStack_110 != '\0')) {
            in_stack_fffffffffffffe38 = (istreambuf_iterator<> *)&local_120;
            in_stack_fffffffffffffe28 = (string *)0x2;
            local_168 = local_138;
            uStack_160 = uStack_130;
            local_178 = local_148;
            uStack_170 = uStack_140;
            in_stack_fffffffffffffe30 = param_5;
            _M_extract_name(&local_158,param_2,&local_168,&local_178,&local_11c,(longlong)&local_118
                            ,2,(longlong)param_5,(uint *)in_stack_fffffffffffffe38);
            uVar17 = (ulonglong)local_120;
            local_138 = local_158;
            uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
            if ((local_120 == 0) && (local_11c != 0)) {
              param_9[1] = (istreambuf_iterator<>)((byte)param_9[1] | 1);
            }
          }
          break;
        case 0x4d:
          in_stack_fffffffffffffe30 = *(istreambuf_iterator<> **)(*(longlong *)(this + 0x10) + 0x50)
          ;
          goto LAB_14006412f;
        case 0x52:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,6);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x1;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,6,1,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            *(uint *)(param_7 + 0x18) = local_11c;
            *param_9 = (istreambuf_iterator<>)((byte)*param_9 | 2);
          }
          break;
        case 0x53:
          in_stack_fffffffffffffe30 = *(istreambuf_iterator<> **)(*(longlong *)(this + 0x10) + 0x10)
          ;
LAB_14006412f:
          in_stack_fffffffffffffe28 = param_7;
          in_stack_fffffffffffffe38 = param_9;
          local_178 = local_148;
          uStack_170 = uStack_140;
          local_168 = local_138;
          uStack_160 = uStack_130;
          _M_extract_via_format
                    ((char *)&local_158,param_2,&local_168,&local_178,param_5,&local_120,param_7,
                     in_stack_fffffffffffffe30,param_9);
LAB_140064173:
          uVar17 = (ulonglong)local_120;
          local_138 = local_158;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          in_stack_fffffffffffffe40 = piVar25;
          break;
        case 0x54:
          in_stack_fffffffffffffe40 = (istreambuf_iterator<> *)&local_120;
          in_stack_fffffffffffffe28 = (string *)CONCAT44(uVar57,99);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)0x2;
          local_168 = local_138;
          uStack_160 = uStack_130;
          local_178 = local_148;
          uStack_170 = uStack_140;
          in_stack_fffffffffffffe38 = param_5;
          _M_extract_num(&local_158,param_2,&local_168,&local_178,(int *)&local_11c,0,99,2,
                         (longlong)param_5,(uint *)in_stack_fffffffffffffe40);
          local_138 = local_158;
          uVar17 = (ulonglong)local_120;
          uStack_130 = CONCAT44(uStack_130._4_4_,local_150._0_4_);
          if (local_120 == 0) {
            param_9[1] = (istreambuf_iterator<>)((byte)param_9[1] | 6);
            uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)local_1b0);
            uVar13 = local_11c;
            if ((char)uVar20 == '\0') {
              uVar20 = istreambuf_iterator<>::_M_get(piVar51);
              uVar14 = ctype<char>::narrow((ctype<char> *)this_02,(ulonglong)(uint)(int)(char)uVar20
                                           ,(ctype<char>)0x2a);
              if (9 < (byte)((char)uVar14 - 0x30U)) goto LAB_1400640cd;
              _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                        ((longlong *)local_138);
              uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
              uVar13 = (char)uVar14 + -0x30 + uVar13 * 10;
              local_11c = uVar13;
              uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)local_1b0);
              if ((char)uVar20 == '\0') {
                uVar20 = istreambuf_iterator<>::_M_get(piVar51);
                uVar14 = ctype<char>::narrow((ctype<char> *)this_02,
                                             (ulonglong)(uint)(int)(char)uVar20,(ctype<char>)0x2a);
                if ((byte)((char)uVar14 - 0x30U) < 10) {
                  _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                            ((longlong *)local_138);
                  uStack_130 = CONCAT44(uStack_130._4_4_,0xffffffff);
                  uVar13 = uVar13 * 10 + -0x30 + (int)(char)uVar14;
                }
              }
              uVar13 = uVar13 - 0x76c;
              param_9[1] = (istreambuf_iterator<>)((byte)param_9[1] & 0xfd);
            }
            else {
LAB_1400640cd:
              if ((int)uVar13 < 0x45) {
                uVar13 = uVar13 + 100;
              }
            }
            *(uint *)(param_7 + 0x14) = uVar13;
          }
          break;
        case 0x55:
          piVar26 = (istreambuf_iterator<> *)((ulonglong)pcVar21 & 0xffffffffffffff90);
          *piVar26 = (istreambuf_iterator<>)((char)*piVar26 + (char)piVar26);
          piVar25 = piVar26 + -0x75;
          iVar45 = *piVar25;
          cVar28 = SUB81(psVar29,0);
          *piVar25 = (istreambuf_iterator<>)((char)*piVar25 + (char)cVar28);
          pbVar23 = (byte *)(lVar18 + 0x3b);
          bVar50 = CARRY1(*pbVar23,(byte)cVar28) ||
                   CARRY1(*pbVar23 + (char)cVar28,CARRY1((byte)iVar45,(byte)cVar28));
          *pbVar23 = *pbVar23 + (char)cVar28 + CARRY1((byte)iVar45,(byte)cVar28);
          cVar10 = *(ctype<char> *)this_02;
          cVar9 = *(ctype<char> *)this_02;
          *(char *)this_02 = ((char)cVar9 - (char)cVar28) - bVar50;
          piVar25 = (istreambuf_iterator<> *)
                    (ulonglong)
                    ((int)psVar29 +
                    (uint)((byte)cVar10 < (byte)cVar28 ||
                          (byte)((char)cVar9 - (char)cVar28) < bVar50));
          *piVar26 = (istreambuf_iterator<>)((char)*piVar26 + (char)piVar26);
LAB_14006d12f:
          *(istreambuf_iterator<> **)(piVar25 + 0x10) = piVar26 + 1;
LAB_14006d137:
          uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
          piVar46 = piVar46 + 1;
LAB_14006d146:
          psVar29 = (string *)param_8;
          uVar20 = istreambuf_iterator<>::equal(param_8,(longlong *)piVar51);
          if (((char)uVar20 == '\x01') || (piVar19 <= piVar46)) {
            if (piVar46 == piVar19) goto LAB_14006d215;
          }
          else {
            uVar20 = uStack_170 & 0xffffffff;
            psVar29 = (string *)local_178;
            if ((local_178 != (istreambuf_iterator<> *)0x0) && ((int)uStack_170 == -1)) {
              piVar26 = *(istreambuf_iterator<> **)(local_178 + 0x10);
              if (piVar26 < *(istreambuf_iterator<> **)(local_178 + 0x18)) {
                piVar25 = local_178;
                if (*piVar26 != piVar46[*(longlong *)(piVar44 + 0x28)]) goto LAB_14006d198;
                goto LAB_14006d12f;
              }
              uVar20 = (**(code **)(*(longlong *)local_178 + 0x48))();
              if ((int)uVar20 == -1) {
                local_178 = (istreambuf_iterator<> *)0x0;
              }
            }
            if (piVar46[*(longlong *)(piVar44 + 0x28)] == SUB81(uVar20,0))
            goto code_r0x00014006d119;
          }
LAB_14006d198:
          if (piVar46 == (istreambuf_iterator<> *)0x0) {
            local_190 = (ulonglong **)CONCAT44(*(uint *)(local_d8 + 0x18),(undefined4)local_190);
            piVar51 = (istreambuf_iterator<> *)
                      (ulonglong)((*(uint *)(local_d8 + 0x18) >> 9 ^ 1) & 1);
LAB_14006c910:
            bVar55 = (byte)piVar51;
            iVar12 = (int)pcVar52;
            pcVar52 = pcVar52 + 1;
            if ((iVar12 + 1 < 4 & bVar55) != 0) {
LAB_14006c8ba:
              if (4 < (byte)pcVar52[(longlong)local_1a8]) goto LAB_14006d215;
              pcVar21 = (char *)((longlong)&switchD_14006c8dd::caseD_a +
                                (longlong)
                                (int)(&switchD_14006c8dd::caseD_a)
                                     [(byte)pcVar52[(longlong)local_1a8]]);
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
              switch(pcVar52[(longlong)local_1a8]) {
              case (ctype<char>)0x0:
switchD_14006c8dd_caseD_0:
                piVar51 = (istreambuf_iterator<> *)0x1;
                break;
              case (ctype<char>)0x1:
                puVar31 = (uint *)&uStack_188;
                param_8 = (istreambuf_iterator<> *)&local_178;
                piVar26 = piVar44;
switchD_1400635a3_caseD_59:
                *pcVar21 = *pcVar21;
                pcVar21[-0x73] = pcVar21[-0x73] + (char)psVar29;
                piVar44 = piVar26 + 1;
                pcVar21 = (char *)(CONCAT71((int7)((ulonglong)pcVar21 >> 8),*piVar26) &
                                  0xffffffffffffff90);
                *pcVar21 = *pcVar21 + (char)pcVar21;
                pcVar21 = (char *)((longlong)psVar29 * 5 + -0x1e);
                *pcVar21 = *pcVar21 + (char)psVar29;
                uVar20 = istreambuf_iterator<>::equal(param_8,(longlong *)puVar31);
                if (((char)uVar20 == '\0') &&
                   (uVar20 = istreambuf_iterator<>::_M_get(param_8),
                   ((byte)local_1b0[6][(uVar20 & 0xff) * 2] & 0x20) != 0)) {
                  _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                            ((longlong *)local_178);
                  uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
                  goto switchD_14006c8dd_caseD_0;
                }
                piVar51 = (istreambuf_iterator<> *)0x0;
                break;
              case (ctype<char>)0x2:
                pcVar21 = local_d8;
code_r0x00014006c938:
                if ((((pcVar21[0x19] & 2U) != 0) || (1 < uStack_1b8)) || ((int)pcVar52 == 0))
                goto LAB_14006d0f8;
                if (pcVar52 != (ctype<char> *)0x1) {
                  if (pcVar52 != (ctype<char> *)0x2) goto LAB_14006c96b;
                  if ((uStack_160._7_1_ != '\x04') &&
                     ((uStack_160._7_1_ != '\x03' || (local_190._3_1_ == '\0'))))
                  goto LAB_14006d215;
                  goto LAB_14006d0f8;
                }
                if ((local_190._3_1_ != '\0') ||
                   ((uStack_160._4_1_ == '\x03' || (uStack_160._6_1_ == '\x01'))))
                goto LAB_14006d0f8;
LAB_14006d215:
                piVar51 = (istreambuf_iterator<> *)0x1;
                goto LAB_14006c910;
              case (ctype<char>)0x3:
                if (*(longlong *)(piVar44 + 0x40) == 0) {
                  if (*(longlong *)(piVar44 + 0x50) != 0) goto LAB_14006d2c8;
LAB_14006c906:
                  param_8 = (istreambuf_iterator<> *)&local_178;
                  piVar51 = (istreambuf_iterator<> *)(ulonglong)(local_190._3_1_ ^ 1);
                  goto LAB_14006c910;
                }
                param_8 = (istreambuf_iterator<> *)&local_178;
                psVar29 = (string *)param_8;
                uVar20 = istreambuf_iterator<>::equal(param_8,&uStack_188);
                if (((char)uVar20 == '\0') &&
                   (psVar29 = (string *)param_8, uVar20 = istreambuf_iterator<>::_M_get(param_8),
                   **(char **)(piVar44 + 0x38) == (char)uVar20)) {
                  uStack_1b8 = *(ulonglong *)(piVar44 + 0x40);
                  psVar29 = (string *)local_178;
                  _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                            ((longlong *)local_178);
                  uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
                  piVar51 = (istreambuf_iterator<> *)0x1;
                  goto LAB_14006c910;
                }
                if (*(longlong *)(piVar44 + 0x50) == 0) {
                  if (*(longlong *)(piVar44 + 0x40) == 0) goto LAB_14006c906;
                }
                else {
LAB_14006d2c8:
                  param_8 = (istreambuf_iterator<> *)&local_178;
                  psVar29 = (string *)param_8;
                  uVar20 = istreambuf_iterator<>::equal(param_8,&uStack_188);
                  if (((char)uVar20 == '\0') &&
                     (psVar29 = (string *)param_8, uVar20 = istreambuf_iterator<>::_M_get(param_8),
                     **(char **)(piVar44 + 0x48) == (char)uVar20)) {
                    uStack_1b8 = *(ulonglong *)(piVar44 + 0x50);
                    psVar29 = (string *)local_178;
                    _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                              ((longlong *)local_178);
                    local_190 = (ulonglong **)CONCAT53(local_190._3_5_,0x10000);
                    piVar51 = (istreambuf_iterator<> *)0x1;
                    uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
                    goto LAB_14006c910;
                  }
                  if ((*(longlong *)(piVar44 + 0x40) == 0) || (*(longlong *)(piVar44 + 0x50) != 0))
                  goto LAB_14006c906;
                }
                param_8 = (istreambuf_iterator<> *)&local_178;
                local_190 = (ulonglong **)CONCAT53(local_190._3_5_,0x10000);
                piVar51 = (istreambuf_iterator<> *)0x1;
                goto LAB_14006c910;
              case (ctype<char>)0x4:
                goto switchD_14006c8dd_caseD_4;
              case (ctype<char>)0x5:
                *pcVar21 = *pcVar21 + (byte)pcVar21;
                    // WARNING: Bad instruction - Truncating control flow here
                halt_baddata();
              case (ctype<char>)0x6:
                goto switchD_14006c8dd_caseD_6;
              case (ctype<char>)0x7:
                *psVar29 = (string)0x44;
                bVar55 = (byte)pcVar21 & (byte)((ulonglong)pcVar21 >> 8);
                puVar38 = auStackY_208;
                goto code_r0x00014006b9e1;
              case (ctype<char>)0x8:
                pbVar23 = (byte *)((longlong)&UINT_1400c5c38 +
                                  (longlong)
                                  (int)(&switchD_14006c8dd::caseD_a)
                                       [(byte)pcVar52[(longlong)local_1a8]] + 1);
                *pbVar23 = *pbVar23 ^ (byte)psVar29;
                uVar20 = (ulonglong)((int)pcVar21 + 0x5a32a);
                goto code_r0x00014006b98a;
              case (ctype<char>)0x9:
                goto LAB_14006bc8a;
              default:
                    // WARNING: Bad instruction - Truncating control flow here
                halt_baddata();
              }
              bVar55 = (byte)piVar51;
              if (pcVar52 != (ctype<char> *)0x3) {
                param_8 = (istreambuf_iterator<> *)(uStack_170 & 0xffffffff);
                piVar19 = (istreambuf_iterator<> *)
                          CONCAT71((int7)((ulonglong)piVar19 >> 8),(int)uStack_170 == -1);
                piVar25 = local_178;
                if ((local_178 != (istreambuf_iterator<> *)0x0) && ((int)uStack_170 == -1))
                goto LAB_14006cff6;
                this_02 = (undefined **)((ulonglong)piVar19 & 0xffffffff);
                while( true ) {
                  bVar50 = (int)local_180 == -1;
                  psVar29 = (string *)uStack_188;
                  if (((uStack_188 != (istreambuf_iterator<> *)0x0) && (bVar50)) &&
                     (bVar50 = false,
                     *(ulonglong *)(uStack_188 + 0x18) <= *(ulonglong *)(uStack_188 + 0x10))) {
                    iVar12 = (**(code **)(*(longlong *)uStack_188 + 0x48))();
                    bVar50 = iVar12 == -1;
                    if (bVar50) {
                      uStack_188 = (istreambuf_iterator<> *)0x0;
                    }
                  }
                  piVar46 = piVar25;
                  if (SUB81(piVar19,0) == bVar50) break;
                  piVar46 = local_178;
                  if ((local_178 == (istreambuf_iterator<> *)0x0) || ((char)this_02 == '\0')) {
LAB_14006cfb6:
                    piVar25 = local_178;
                    param_8 = (istreambuf_iterator<> *)((ulonglong)param_8 & 0xff);
                    if (((byte)local_1b0[6][(longlong)param_8 * 2] & 0x20) == 0) break;
                    pbVar23 = *(byte **)(local_178 + 0x10);
                    if (pbVar23 < *(byte **)(local_178 + 0x18)) goto LAB_14006cfe3;
                    (**(code **)(*(longlong *)local_178 + 0x50))(local_178);
                    uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
                  }
                  else {
                    pbVar23 = *(byte **)(local_178 + 0x10);
                    if (*(byte **)(local_178 + 0x18) <= pbVar23) {
                      psVar29 = (string *)local_178;
                      uVar13 = (**(code **)(*(longlong *)local_178 + 0x48))();
                      param_8 = (istreambuf_iterator<> *)(ulonglong)uVar13;
                      if (uVar13 == 0xffffffff) {
                        local_178 = (istreambuf_iterator<> *)0x0;
                      }
                      goto LAB_14006cfb6;
                    }
                    psVar29 = (string *)(ulonglong)*pbVar23;
                    if (((byte)local_1b0[6][(longlong)psVar29 * 2] & 0x20) == 0) break;
LAB_14006cfe3:
                    uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
                    *(byte **)(local_178 + 0x10) = pbVar23 + 1;
                    piVar25 = local_178;
                  }
LAB_14006cff6:
                  this_02 = (undefined **)0x1;
                  param_8 = (istreambuf_iterator<> *)0xffffffff;
                  piVar19 = (istreambuf_iterator<> *)0x0;
                  if (*(ulonglong *)(piVar25 + 0x18) <= *(ulonglong *)(piVar25 + 0x10)) {
                    iVar12 = (**(code **)(*(longlong *)piVar25 + 0x48))(piVar25);
                    piVar19 = (istreambuf_iterator<> *)(ulonglong)(iVar12 == -1);
                    if (iVar12 == -1) {
                      local_178 = (istreambuf_iterator<> *)0x0;
                    }
                    this_02 = (undefined **)0x1;
                    param_8 = (istreambuf_iterator<> *)0xffffffff;
                  }
                }
                goto LAB_14006c910;
              }
            }
            uVar13 = (uint)uVar17;
            bVar11 = 1 < uStack_1b8 & bVar55;
            uVar20 = (ulonglong)bVar11;
            if (bVar11 == 0) {
              if (bVar55 == 0) goto LAB_14006cec9;
LAB_14006c96b:
              uVar13 = (uint)uVar17;
              uVar17 = local_150[-3];
              goto joined_r0x00014006c978;
            }
            if (local_190._2_1_ == '\0') {
              lVar18 = *(longlong *)(piVar44 + 0x38);
            }
            else {
              lVar18 = *(longlong *)(piVar44 + 0x48);
            }
            uVar17 = 1;
            cVar7 = (int)uStack_170 == -1;
            iVar12 = (int)uStack_170;
            bVar50 = (bool)cVar7;
            if ((local_178 != (istreambuf_iterator<> *)0x0) && (piVar46 = local_178, (bool)cVar7))
            goto LAB_14006cb97;
            goto LAB_14006cb10;
          }
          goto LAB_14006ca00;
        case 0x56:
          *psVar29 = (string)((byte)*(id *)psVar29 ^ bVar55);
          *pcVar21 = *pcVar21 + bVar55;
          goto code_r0x00014006c938;
        case 0x57:
          goto code_r0x00014006c7b9;
        case 0x58:
          lVar18 = locale::id::_M_id((id *)psVar29);
          local_1b0 = *(istreambuf_iterator<> ***)
                       (*(longlong *)(*(longlong *)(local_d8 + 0xd0) + 8) + lVar18 * 8);
          if (local_1b0 == (istreambuf_iterator<> **)0x0) {
                    // WARNING: Subroutine does not return
            __throw_bad_cast();
          }
code_r0x00014006c7b9:
          lVar18 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
          piVar46 = (istreambuf_iterator<> *)
                    (*(longlong *)(*(longlong *)(local_d8 + 0xd0) + 0x18) + lVar18 * 8);
          piVar44 = *(istreambuf_iterator<> **)piVar46;
          if (piVar44 == (istreambuf_iterator<> *)0x0) {
            this_01 = operator_new(0x70);
            *(undefined4 *)(this_01 + 8) = 0;
            *(undefined ***)this_01 = &PTR____moneypunct_cache_1400dddf0;
            *(undefined8 *)(this_01 + 0x10) = 0;
            *(undefined8 *)(this_01 + 0x18) = 0;
            this_01[0x20] = (__moneypunct_cache<char,true>)0x0;
            *(undefined2 *)(this_01 + 0x21) = 0;
            *(undefined8 *)(this_01 + 0x28) = 0;
            *(undefined8 *)(this_01 + 0x30) = 0;
            *(undefined8 *)(this_01 + 0x38) = 0;
            *(undefined8 *)(this_01 + 0x40) = 0;
            *(undefined8 *)(this_01 + 0x48) = 0;
            *(undefined8 *)(this_01 + 0x50) = 0;
            *(undefined4 *)(this_01 + 0x58) = 0;
            *(undefined8 *)(this_01 + 0x5c) = 0;
            this_01[0x6f] = (__moneypunct_cache<char,true>)0x0;
            __moneypunct_cache<char,true>::_M_cache(this_01,(longlong *)(local_d8 + 0xd0));
            locale::_Impl::_M_install_cache(*(_Impl **)(local_d8 + 0xd0),(longlong *)this_01,lVar18)
            ;
            piVar44 = *(istreambuf_iterator<> **)piVar46;
          }
          in_stack_fffffffffffffe40 = piVar44 + 100;
          if (*(longlong *)(piVar44 + 0x40) == 0) {
            bVar50 = false;
          }
          else {
            bVar50 = *(longlong *)(piVar44 + 0x50) != 0;
          }
          psVar29 = (string *)&local_150;
          local_158 = std::string::_S_construct(0,'\0');
          if (piVar44[0x20] != (istreambuf_iterator<>)0x0) {
            std::string::reserve((string *)&local_158,0x20);
          }
          local_150 = std::string::_S_construct(0,'\0');
          in_stack_fffffffffffffe28 = psVar29;
          std::string::reserve(psVar29,0x20);
          in_stack_fffffffffffffe38 = piVar44 + 0x65;
          pcVar52 = (ctype<char> *)0x0;
          uVar17 = 0;
          local_1a0 = (istreambuf_iterator<> **)0x0;
          uStack_160 = CONCAT44(*(uint *)(piVar44 + 0x60),(undefined4)uStack_160);
          local_1a8 = (code *)((longlong)&uStack_160 + 4);
          in_stack_fffffffffffffe30 = (istreambuf_iterator<> *)&local_158;
          uStack_1b8 = 0;
          local_190 = (ulonglong **)((ulonglong)bVar50 << 0x18);
          goto LAB_14006c8ba;
        case 0x59:
          goto switchD_1400635a3_caseD_59;
        case 0x5a:
          goto switchD_1400635a3_caseD_5a;
        case 0x5b:
          puVar33 = auStackY_208;
          if (psVar29 != (string *)0x1 && pcVar21 != (char *)0x0) {
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          goto code_r0x00014006b9e3;
        case 0x5c:
          piVar46 = (istreambuf_iterator<> *)
                    (*(longlong *)(*(longlong *)(local_d8 + 0xd0) + 0x18) + uVar17 * 8);
          piVar44 = *(istreambuf_iterator<> **)piVar46;
          if (piVar44 == (istreambuf_iterator<> *)0x0) {
            this_00 = operator_new(0x70);
            *(undefined4 *)(this_00 + 8) = 0;
            *(undefined ***)this_00 = &PTR____moneypunct_cache_1400dddd0;
            *(undefined8 *)(this_00 + 0x10) = 0;
            *(undefined8 *)(this_00 + 0x18) = 0;
            this_00[0x20] = (__moneypunct_cache<char,false>)0x0;
            *(undefined2 *)(this_00 + 0x21) = 0;
            *(undefined8 *)(this_00 + 0x28) = 0;
            *(undefined8 *)(this_00 + 0x30) = 0;
            *(undefined8 *)(this_00 + 0x38) = 0;
            *(undefined8 *)(this_00 + 0x40) = 0;
            *(undefined8 *)(this_00 + 0x48) = 0;
            *(undefined8 *)(this_00 + 0x50) = 0;
            *(undefined4 *)(this_00 + 0x58) = 0;
            *(undefined8 *)(this_00 + 0x5c) = 0;
            this_00[0x6f] = (__moneypunct_cache<char,false>)0x0;
            __moneypunct_cache<char,false>::_M_cache(this_00,(longlong *)(local_d8 + 0xd0));
            locale::_Impl::_M_install_cache(*(_Impl **)(local_d8 + 0xd0),(longlong *)this_00,uVar17)
            ;
            piVar44 = *(istreambuf_iterator<> **)piVar46;
          }
          psVar29 = (string *)&local_150;
          local_158 = std::string::_S_construct(0,'\0');
          if (piVar44[0x20] != (istreambuf_iterator<>)0x0) {
            std::string::reserve((string *)&local_158,0x20);
          }
          local_150 = std::string::_S_construct(0,'\0');
          std::string::reserve(psVar29,0x20);
          pcVar52 = (ctype<char> *)0x0;
          uVar17 = 0;
          uStack_160 = CONCAT44(*(uint *)(piVar44 + 0x60),(undefined4)uStack_160);
          goto LAB_14006b97a;
        case 0x5d:
                    // WARNING: Bad instruction - Truncating control flow here
          halt_baddata();
        case 0x5e:
          goto switchD_1400635a3_caseD_5e;
        case 0x5f:
        case 0x60:
        case 0x61:
          out(0xf9,bVar55);
                    // WARNING: Could not emulate address calculation at 0x0001400c5b5b
                    // WARNING: Treating indirect jump as call
          pcVar21 = (char *)(*(code *)(ulonglong)
                                      *(uint *)((longlong)&UINT_1400c5b30 +
                                               (longlong)
                                               (int)(&switchD_1400635a3::caseD_5f)[uVar13 & 0xff] +
                                               3))();
          return pcVar21;
        }
LAB_14006342a:
        piVar46 = piVar44 + 1;
      } while( true );
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
code_r0x00014006d119:
  piVar26 = *(istreambuf_iterator<> **)(local_178 + 0x10);
  piVar25 = local_178;
  if (piVar26 < *(istreambuf_iterator<> **)(local_178 + 0x18)) goto LAB_14006d12f;
  (**(code **)(*(longlong *)local_178 + 0x50))();
  goto LAB_14006d137;
code_r0x00014006b9e1:
  puVar33 = puVar38;
  if (bVar55 == 0) goto code_r0x00014006b9e3;
LAB_14006b97a:
  uVar20 = *(ulonglong *)(puVar38 + 0x60);
  puVar33 = puVar38;
  puVar35 = puVar38;
  if (4 < (byte)pcVar52[uVar20]) goto LAB_14006c2d5;
code_r0x00014006b98a:
  cVar10 = pcVar52[uVar20];
  puVar31 = &switchD_14006b99d::caseD_5;
  lVar18 = (longlong)(int)(&switchD_14006b99d::caseD_5)[(byte)cVar10];
  bVar50 = SCARRY8(lVar18,0x1400c5cc0);
  pbVar23 = (byte *)((longlong)&switchD_14006b99d::caseD_5 + lVar18);
  puVar38 = puVar35;
  puVar33 = puVar35;
  puVar5 = puVar35;
  puVar34 = puVar35;
  puVar6 = puVar35;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(cVar10) {
  case (ctype<char>)0x0:
switchD_14006b99d_caseD_0:
    piVar51 = (istreambuf_iterator<> *)0x1;
    puVar33 = puVar35;
    goto LAB_14006bb6e;
  case (ctype<char>)0x1:
switchD_14006b99d_caseD_1:
    puVar35 = puVar6;
    *(undefined8 *)(puVar35 + -8) = 0x14006bb63;
    uVar20 = istreambuf_iterator<>::equal
                       ((istreambuf_iterator<> *)(puVar35 + 0x90),(longlong *)(puVar35 + 0x80));
    if ((char)uVar20 == '\0') {
      *(undefined8 *)(puVar35 + -8) = 0x14006c2f8;
      uVar20 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)(puVar35 + 0x90));
      if ((*(byte *)(*(longlong *)(*(longlong *)(puVar35 + 0x58) + 0x30) + (uVar20 & 0xff) * 2) &
          0x20) != 0) {
        *(undefined **)(puVar35 + -8) = &UNK_14006c31b;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                  (*(longlong **)(puVar35 + 0x90));
        *(undefined4 *)(puVar35 + 0x98) = 0xffffffff;
        goto switchD_14006b99d_caseD_0;
      }
    }
    piVar51 = (istreambuf_iterator<> *)0x0;
    puVar33 = puVar35;
LAB_14006bb6e:
    bVar55 = (byte)piVar51;
    if (pcVar52 == (ctype<char> *)0x3) goto LAB_14006bb78;
    uVar20 = (ulonglong)*(uint *)(puVar33 + 0x98);
    piVar46 = *(istreambuf_iterator<> **)(puVar33 + 0x90);
    bVar54 = *(uint *)(puVar33 + 0x98) == 0xffffffff;
    bVar50 = bVar54;
    if ((piVar46 != (istreambuf_iterator<> *)0x0) && (bVar54)) goto LAB_14006c0b6;
    while( true ) {
      psVar29 = *(string **)(puVar33 + 0x80);
      bVar53 = *(int *)(puVar33 + 0x88) == -1;
      if ((psVar29 != (string *)0x0) &&
         ((bVar53 &&
          (bVar53 = false, *(ulonglong *)(psVar29 + 0x18) <= *(ulonglong *)(psVar29 + 0x10))))) {
        pcVar3 = *(code **)(*(longlong *)psVar29 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006c116;
        iVar12 = (*pcVar3)();
        bVar53 = iVar12 == -1;
        if (bVar53) {
          *(undefined8 *)(puVar33 + 0x80) = 0;
        }
      }
      if (bVar54 == bVar53) break;
      piVar46 = *(istreambuf_iterator<> **)(puVar33 + 0x90);
      if ((piVar46 == (istreambuf_iterator<> *)0x0) || (!bVar50)) {
LAB_14006c076:
        if ((*(byte *)(*(longlong *)(*(longlong *)(puVar33 + 0x58) + 0x30) + (uVar20 & 0xff) * 2) &
            0x20) == 0) break;
        piVar46 = *(istreambuf_iterator<> **)(puVar33 + 0x90);
        pbVar23 = *(byte **)(piVar46 + 0x10);
        if (pbVar23 < *(byte **)(piVar46 + 0x18)) goto LAB_14006c0a3;
        pcVar3 = *(code **)(*(longlong *)piVar46 + 0x50);
        *(undefined8 *)(puVar33 + -8) = 0x14006c171;
        (*pcVar3)(piVar46);
        *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
      }
      else {
        pbVar23 = *(byte **)(piVar46 + 0x10);
        if (*(byte **)(piVar46 + 0x18) <= pbVar23) {
          pcVar3 = *(code **)(*(longlong *)piVar46 + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006c627;
          psVar29 = (string *)piVar46;
          uVar13 = (*pcVar3)();
          uVar20 = (ulonglong)uVar13;
          if (uVar13 == 0xffffffff) {
            *(undefined8 *)(puVar33 + 0x90) = 0;
          }
          goto LAB_14006c076;
        }
        psVar29 = (string *)(ulonglong)*pbVar23;
        if ((*(byte *)(*(longlong *)(*(longlong *)(puVar33 + 0x58) + 0x30) + (longlong)psVar29 * 2)
            & 0x20) == 0) break;
LAB_14006c0a3:
        *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
        *(byte **)(piVar46 + 0x10) = pbVar23 + 1;
      }
LAB_14006c0b6:
      uVar20 = 0xffffffff;
      bVar54 = false;
      bVar50 = true;
      if (*(ulonglong *)(piVar46 + 0x18) <= *(ulonglong *)(piVar46 + 0x10)) {
        pcVar3 = *(code **)(*(longlong *)piVar46 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006c0db;
        iVar12 = (*pcVar3)(piVar46);
        bVar54 = iVar12 == -1;
        if (bVar54) {
          *(undefined8 *)(puVar33 + 0x90) = 0;
        }
        uVar20 = 0xffffffff;
        bVar50 = true;
      }
    }
    break;
  case (ctype<char>)0x2:
switchD_14006b99d_caseD_2:
    if ((((*(byte *)(*(longlong *)(puVar34 + 0x130) + 0x19) & 2) == 0) &&
        (*(ulonglong *)(puVar34 + 0x50) < 2)) && ((int)pcVar52 != 0)) {
      puVar33 = puVar34;
      if (pcVar52 == (ctype<char> *)0x1) {
        if ((puVar34[0x7b] != '\0') || ((puVar34[0xac] == '\x03' || (puVar34[0xae] == '\x01'))))
        goto LAB_14006c1b8;
      }
      else {
        if (pcVar52 != (ctype<char> *)0x2) goto LAB_14006ba2b;
        if ((puVar34[0xaf] == '\x04') || ((puVar34[0xaf] == '\x03' && (puVar34[0x7b] != '\0'))))
        goto LAB_14006c1b8;
      }
    }
    else {
LAB_14006c1b8:
      piVar19 = *(istreambuf_iterator<> **)(piVar44 + 0x30);
      piVar46 = (istreambuf_iterator<> *)0x0;
      piVar51 = (istreambuf_iterator<> *)(puVar34 + 0x80);
      param_8 = (istreambuf_iterator<> *)(puVar34 + 0x90);
      while( true ) {
        *(undefined8 *)(puVar34 + -8) = 0x14006c211;
        psVar29 = (string *)param_8;
        uVar20 = istreambuf_iterator<>::equal(param_8,(longlong *)piVar51);
        puVar33 = puVar34;
        if (((char)uVar20 == '\x01') || (piVar19 <= piVar46)) break;
        psVar29 = *(string **)(puVar34 + 0x90);
        pcVar21 = (char *)(ulonglong)*(uint *)(puVar34 + 0x98);
        if ((psVar29 == (string *)0x0) || (*(uint *)(puVar34 + 0x98) != 0xffffffff)) {
switchD_1400635a3_caseD_5a:
          piVar26 = piVar44 + 1;
          pcVar21 = (char *)(CONCAT71((int7)((ulonglong)pcVar21 >> 8),*piVar44) & 0xffffffffffffff90
                            );
          *pcVar21 = *pcVar21 + (char)SUB81(pcVar21,0);
          uVar17 = CONCAT71((int7)(uVar17 >> 8),(char)uVar17 + (char)((ulonglong)psVar29 >> 8));
          piVar25 = piVar44 + 0x29;
          puVar33 = puVar34;
          piVar44 = piVar26;
          if (piVar46[*(longlong *)piVar25] != SUB81(pcVar21,0)) goto LAB_14006c258;
          psVar29 = *(string **)(puVar34 + 0x90);
          piVar25 = *(istreambuf_iterator<> **)(psVar29 + 0x10);
          if (piVar25 < *(istreambuf_iterator<> **)(psVar29 + 0x18)) goto LAB_14006c1ef;
          pcVar3 = *(code **)(*(longlong *)psVar29 + 0x50);
          *(undefined8 *)(puVar34 + -8) = 0x14006c2c6;
          (*pcVar3)();
        }
        else {
          piVar25 = *(istreambuf_iterator<> **)(psVar29 + 0x10);
          if (*(istreambuf_iterator<> **)(psVar29 + 0x18) <= piVar25) {
            pcVar3 = *(code **)(*(longlong *)psVar29 + 0x48);
            *(undefined8 *)(puVar34 + -8) = 0x14006c66f;
            pcVar21 = (char *)(*pcVar3)();
            if ((int)pcVar21 == -1) {
              *(undefined8 *)(puVar34 + 0x90) = 0;
            }
            goto switchD_1400635a3_caseD_5a;
          }
          if (*piVar25 != piVar46[*(longlong *)(piVar44 + 0x28)]) goto LAB_14006c258;
LAB_14006c1ef:
          *(istreambuf_iterator<> **)(psVar29 + 0x10) = piVar25 + 1;
        }
        *(undefined4 *)(puVar34 + 0x98) = 0xffffffff;
        piVar46 = piVar46 + 1;
      }
      if (piVar46 != piVar19) {
LAB_14006c258:
        if (piVar46 == (istreambuf_iterator<> *)0x0) {
          uVar13 = *(uint *)(*(longlong *)(puVar33 + 0x130) + 0x18);
          *(uint *)(puVar33 + 0x7c) = uVar13;
          piVar51 = (istreambuf_iterator<> *)(ulonglong)((uVar13 >> 9 ^ 1) & 1);
          piVar46 = (istreambuf_iterator<> *)0x0;
          break;
        }
        goto LAB_14006bac0;
      }
    }
LAB_14006c2d5:
    piVar51 = (istreambuf_iterator<> *)0x1;
    break;
  case (ctype<char>)0x3:
switchD_14006b99d_caseD_3:
    puVar33 = puVar5;
    if (*(longlong *)(piVar44 + 0x40) == 0) {
      if (*(longlong *)(piVar44 + 0x50) != 0) {
LAB_14006c388:
        piVar51 = (istreambuf_iterator<> *)(puVar33 + 0x90);
        *(undefined8 *)(puVar33 + -8) = 0x14006c393;
        psVar29 = (string *)piVar51;
        uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)(puVar33 + 0x80));
        if ((char)uVar20 == '\0') {
          *(undefined8 *)(puVar33 + -8) = 0x14006c49f;
          uVar20 = istreambuf_iterator<>::_M_get(piVar51);
          psVar29 = (string *)piVar51;
          if (**(char **)(piVar44 + 0x48) == (char)uVar20) {
            psVar29 = *(string **)(puVar33 + 0x90);
            *(undefined8 *)(puVar33 + 0x50) = *(undefined8 *)(piVar44 + 0x50);
            *(undefined8 *)(puVar33 + -8) = 0x14006c4c1;
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)psVar29);
            puVar33[0x7a] = 1;
            piVar51 = (istreambuf_iterator<> *)0x1;
            *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
            break;
          }
        }
        if ((*(longlong *)(piVar44 + 0x40) != 0) && (*(longlong *)(piVar44 + 0x50) == 0))
        goto LAB_14006c375;
      }
LAB_14006b9c6:
      piVar51 = (istreambuf_iterator<> *)(ulonglong)((byte)puVar33[0x7b] ^ 1);
    }
    else {
      piVar51 = (istreambuf_iterator<> *)(puVar33 + 0x90);
      *(undefined8 *)(puVar33 + -8) = 0x14006c35b;
      psVar29 = (string *)piVar51;
      uVar20 = istreambuf_iterator<>::equal(piVar51,(longlong *)(puVar33 + 0x80));
      if ((char)uVar20 == '\0') {
        *(undefined8 *)(puVar33 + -8) = 0x14006c45f;
        uVar20 = istreambuf_iterator<>::_M_get(piVar51);
        psVar29 = (string *)piVar51;
        if (**(char **)(piVar44 + 0x38) == (char)uVar20) {
          psVar29 = *(string **)(puVar33 + 0x90);
          *(undefined8 *)(puVar33 + 0x50) = *(undefined8 *)(piVar44 + 0x40);
          *(undefined8 *)(puVar33 + -8) = 0x14006c481;
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)psVar29);
          *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
          piVar51 = (istreambuf_iterator<> *)0x1;
          break;
        }
      }
      if (*(longlong *)(piVar44 + 0x50) != 0) goto LAB_14006c388;
      if (*(longlong *)(piVar44 + 0x40) == 0) goto LAB_14006b9c6;
LAB_14006c375:
      puVar33[0x7a] = 1;
      piVar51 = (istreambuf_iterator<> *)0x1;
    }
    break;
  case (ctype<char>)0x4:
switchD_14006b99d_caseD_4:
    plVar42 = *(longlong **)(puVar33 + 0x90);
    piVar46 = (istreambuf_iterator<> *)(ulonglong)*(uint *)(puVar33 + 0x98);
    while( true ) {
      bVar54 = (int)piVar46 == -1;
      bVar50 = bVar54;
      if (((plVar42 != (longlong *)0x0) && (bVar54)) &&
         (bVar50 = false, (ulonglong)plVar42[3] <= (ulonglong)plVar42[2])) {
        pcVar3 = *(code **)(*plVar42 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006bedb;
        iVar12 = (*pcVar3)(plVar42);
        bVar50 = iVar12 == -1;
        if (bVar50) {
          *(undefined8 *)(puVar33 + 0x90) = 0;
        }
      }
      psVar29 = *(string **)(puVar33 + 0x80);
      bVar53 = *(int *)(puVar33 + 0x88) == -1;
      if (((psVar29 != (string *)0x0) && (bVar53)) &&
         (bVar53 = false, *(ulonglong *)(psVar29 + 0x18) <= *(ulonglong *)(psVar29 + 0x10))) {
        pcVar3 = *(code **)(*(longlong *)psVar29 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006bf16;
        iVar12 = (*pcVar3)();
        bVar53 = iVar12 == -1;
        if (bVar53) {
          *(undefined8 *)(puVar33 + 0x80) = 0;
        }
      }
      if (bVar50 == bVar53) break;
      plVar42 = *(longlong **)(puVar33 + 0x90);
      if ((plVar42 != (longlong *)0x0) && (bVar54)) {
        if ((byte *)plVar42[2] < (byte *)plVar42[3]) {
          piVar46 = (istreambuf_iterator<> *)(ulonglong)*(byte *)plVar42[2];
        }
        else {
          pcVar3 = *(code **)(*plVar42 + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006c4e6;
          uVar13 = (*pcVar3)();
          piVar46 = (istreambuf_iterator<> *)(ulonglong)uVar13;
          if (uVar13 == 0xffffffff) {
            *(undefined8 *)(puVar33 + 0x90) = 0;
          }
        }
      }
      psVar29 = *(string **)(puVar33 + 0x40);
      iVar45 = SUB81(piVar46,0);
      *(undefined8 *)(puVar33 + -8) = 0x14006bdd8;
      pvVar24 = memchr(psVar29,(int)(char)iVar45,10);
      iVar12 = (int)uVar17;
      if (pvVar24 == (void *)0x0) {
        if (piVar44[0x21] == iVar45) {
          if (puVar33[0x6b] != '\0') goto LAB_14006bf70;
          psVar29 = (string *)(ulonglong)*(uint *)(piVar44 + 0x58);
          if ((int)*(uint *)(piVar44 + 0x58) < 1) break;
          *(int *)(puVar33 + 0x6c) = iVar12;
          uVar17 = 0;
          puVar33[0x6b] = 1;
        }
        else {
          if ((piVar44[0x20] == (istreambuf_iterator<>)0x0) || (piVar44[0x22] != iVar45)) break;
          if (puVar33[0x6b] != '\0') {
LAB_14006bf70:
            piVar51 = (istreambuf_iterator<> *)(ulonglong)(byte)puVar33[0x6b];
            goto LAB_14006bf76;
          }
          if (iVar12 == 0) {
            piVar51 = (istreambuf_iterator<> *)0x0;
            goto LAB_14006bf76;
          }
          lVar18 = *(longlong *)(puVar33 + 0xb0);
          lVar32 = *(longlong *)(lVar18 + -0x18);
          uVar20 = lVar32 + 1;
          if (*(ulonglong *)(lVar18 + -0x10) < uVar20) {
LAB_14006be45:
            *(undefined8 *)(puVar33 + -8) = 0x14006be52;
            std::string::reserve(*(string **)(puVar33 + 0x38),uVar20);
          }
          else {
            if (_CRT_MT == 0) {
              iVar12 = *(int *)(lVar18 + -8);
            }
            else {
              iVar12 = *(int *)(lVar18 + -8);
            }
            if (0 < iVar12) goto LAB_14006be45;
          }
          *(char *)(*(longlong *)(puVar33 + 0xb0) +
                   *(longlong *)(*(longlong *)(puVar33 + 0xb0) + -0x18)) = (char)uVar17;
          lVar18 = *(longlong *)(puVar33 + 0xb0);
          uVar17 = 0;
          *(undefined4 *)(lVar18 + -8) = 0;
          *(ulonglong *)(lVar18 + -0x18) = uVar20;
          *(undefined1 *)(lVar18 + 1 + lVar32) = 0;
        }
      }
      else {
        uVar30 = money_base::_S_atoms[(longlong)pvVar24 - *(longlong *)(puVar33 + 0x48)];
        lVar18 = *(longlong *)(puVar33 + 0xb8);
        lVar32 = *(longlong *)(lVar18 + -0x18);
        uVar20 = lVar32 + 1;
        if (*(ulonglong *)(lVar18 + -0x10) < uVar20) {
LAB_14006bd07:
          *(undefined8 *)(puVar33 + -8) = 0x14006bd14;
          std::string::reserve(*(string **)(puVar33 + 0x30),uVar20);
        }
        else {
          if (_CRT_MT == 0) {
            iVar15 = *(int *)(lVar18 + -8);
          }
          else {
            iVar15 = *(int *)(lVar18 + -8);
          }
          if (0 < iVar15) goto LAB_14006bd07;
        }
        uVar17 = (ulonglong)(iVar12 + 1);
        *(undefined1 *)
         (*(longlong *)(puVar33 + 0xb8) + *(longlong *)(*(longlong *)(puVar33 + 0xb8) + -0x18)) =
             uVar30;
        lVar18 = *(longlong *)(puVar33 + 0xb8);
        *(undefined4 *)(lVar18 + -8) = 0;
        *(ulonglong *)(lVar18 + -0x18) = uVar20;
        *(undefined1 *)(lVar18 + 1 + lVar32) = 0;
      }
      plVar42 = *(longlong **)(puVar33 + 0x90);
      if ((ulonglong)plVar42[2] < (ulonglong)plVar42[3]) {
        plVar42[2] = plVar42[2] + 1;
      }
      else {
        pcVar3 = *(code **)(*plVar42 + 0x50);
        *(undefined8 *)(puVar33 + -8) = 0x14006bf5a;
        (*pcVar3)(plVar42);
      }
      *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
      piVar46 = (istreambuf_iterator<> *)0xffffffff;
    }
    piVar51 = (istreambuf_iterator<> *)0x1;
LAB_14006bf76:
    if (*(longlong *)(*(longlong *)(puVar33 + 0xb8) + -0x18) == 0) goto LAB_14006bf89;
    break;
  default:
    do {
      if (bVar50) {
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d24) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
        cVar7 = 'H';
        s_random_device__rdseed_failed_1400c5d1a[10] = 'H';
        bVar11 = (byte)((ulonglong)pbVar23 >> 8);
        iVar45 = SUB81((ulonglong)psVar29 >> 8,0);
        out(*piVar44,0x5cc0);
        bVar55 = *(byte *)(longlong)(int)(uint)pbVar23;
        cVar8 = bVar11 - bVar55;
        if (bVar55 <= bVar11) {
          out(*(undefined4 *)(piVar44 + 1),0x5cc0);
          out(piVar44[5],0x5cc0);
          s_random_device__rdseed_failed_1400c5d1a[10] = cVar7;
          *pbVar23 = *pbVar23 + (char)pbVar23;
                    // WARNING: Bad instruction - Truncating control flow here
          halt_baddata();
        }
        if (cVar8 == '\0') {
          *(istreambuf_iterator<> *)(psVar29 + 0x73) =
               (istreambuf_iterator<>)
               ((byte)*(istreambuf_iterator<> *)(psVar29 + 0x73) & (byte)iVar45);
          bRam000000014035d479 = bRam000000014035d479 & bVar11;
          s_random_device__rdseed_failed_1400c5d1a[10] = cVar7;
        }
        else {
          if ((POPCOUNT(cVar8) & 1U) == 0) {
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          *psVar29 = (string)((char)*(istreambuf_iterator<> *)psVar29 - (char)iVar45);
          s_random_device__rdseed_failed_1400c5d1a[10] = cVar7;
          *pbVar23 = *pbVar23 & (byte)iVar45;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
          if (*pbVar23 != 0) {
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          puVar38 = (undefined1 *)(ulonglong)(uint)(*(int *)(uVar17 + 0x68) * 0x20736920);
          pbVar23 = (byte *)(ulonglong)((uint)pbVar23 & 0x29757a);
        }
        bVar55 = (byte)((ulonglong)pbVar23 >> 8);
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
        s_random_device__rdseed_failed_1400c5d1a[7] = bVar55 + 'd';
        if (bVar55 < 0x9c) {
                    // WARNING: Bad instruction - Truncating control flow here
          halt_baddata();
        }
        uVar13 = *(uint *)(piVar46 + 0x73);
        uVar17 = (ulonglong)uVar13;
        uVar14 = *(uint *)(piVar44 + 0x68);
        puVar47 = *(undefined4 **)(puVar38 + 8);
        piVar46 = piVar44 + 2;
        out(piVar44[1],0x5cc0);
        *pbVar23 = *pbVar23 & (byte)iVar45;
        if (*pbVar23 != 0) {
          uVar30 = in(0x5cc0);
          *(undefined1 *)puVar47 = uVar30;
                    // WARNING: Bad instruction - Truncating control flow here
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
          halt_baddata();
        }
        puVar39 = (undefined8 *)(ulonglong)(uint)(*(int *)(uVar17 + 0x68) * 0x20736920);
        uVar16 = (uint)pbVar23 & 0x2029757a;
        pbVar27 = (byte *)(ulonglong)uVar16;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
        uVar20 = (ulonglong)(uVar14 * 0x74613a3a);
        if (0x6968741f < uVar16) {
                    // WARNING: Bad instruction - Truncating control flow here
          halt_baddata();
        }
        if ((POPCOUNT(uVar16 + 0x96978be0 & 0xff) & 1U) != 0) {
          *psVar29 = (string)((char)*(istreambuf_iterator<> *)psVar29 - (char)iVar45);
          *pbVar27 = *pbVar27 & (byte)iVar45;
          if (*pbVar27 != 0) {
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
                    // WARNING: Bad instruction - Truncating control flow here
          halt_baddata();
        }
        bVar11 = (byte)(uVar16 >> 8);
        bVar55 = (byte)(uVar13 >> 8);
        if ((byte)iVar45 < (byte)*(istreambuf_iterator<> *)(psVar29 + 0x6e)) {
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
          s_random_device__rdseed_failed_1400c5d1a[7] = bVar11 + 'd';
          bVar50 = false;
          bVar54 = false;
                    // WARNING: Bad instruction - Truncating control flow here
          if (0x9b < bVar11) {
code_r0x0001400c6084:
            bVar55 = (byte)((uint)*(undefined4 *)((longlong)puVar47 + 0x73) >> 8);
code_r0x0001400c6087:
            if (bVar50) {
              if (!bVar54) {
                *(uint *)pbVar27 = *(int *)pbVar27 - uVar16;
code_r0x0001400c60ff:
                *pbVar27 = *pbVar27 + (char)pbVar27;
                    // WARNING: Could not recover jumptable at 0x0001400c6107. Too many branches
                    // WARNING: Treating indirect jump as call
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                pcVar21 = (char *)(*(code *)(ulonglong)*(uint *)(pbVar27 + -0x7f000542))();
                return pcVar21;
              }
              goto code_r0x0001400c6173;
            }
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
            if ((longlong)(int)((longlong)*(int *)(piVar46 + 0x67) * 0x535f3a3a) !=
                (longlong)*(int *)(piVar46 + 0x67) * 0x535f3a3a) {
                    // WARNING: Bad instruction - Truncating control flow here
              halt_baddata();
            }
code_r0x0001400c610a:
            *(int *)(pbVar27 + 0x28fffabe) = *(int *)(pbVar27 + 0x28fffabe) + 1;
                    // WARNING: Could not recover jumptable at 0x0001400c610f. Too many branches
                    // WARNING: Treating indirect jump as call
            puVar47 = (undefined4 *)0xb7dcfffa;
            goto code_r0x0001400c6115;
          }
          *psVar29 = (string)((char)*(istreambuf_iterator<> *)psVar29 - (char)iVar45);
          pbVar27 = (byte *)(ulonglong)uVar16;
          *pbVar27 = *pbVar27 & (byte)iVar45;
          if (*pbVar27 == 0) {
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
            pbVar27 = (byte *)(ulonglong)((uint)pbVar23 & 0x29757a);
            goto code_r0x0001400c60ff;
          }
        }
        else {
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
          bVar50 = (byte)(bVar55 - bRam00000000400c5cc0) == '\0';
          bVar54 = (POPCOUNT(bVar55 - bRam00000000400c5cc0) & 1U) == 0;
          uVar20 = (ulonglong)*(uint *)((longlong)puVar47 + 0x6d);
          if (SBORROW1(bVar55,bRam00000000400c5cc0)) {
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          bVar53 = true;
          if (bVar55 < bRam00000000400c5cc0) {
code_r0x0001400c6070:
            if (!bVar53) goto code_r0x0001400c6115;
          }
          else {
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
            s_random_device__rdseed_failed_1400c5d1a[7] = bVar11 + 'd';
            bVar50 = false;
            bVar54 = false;
                    // WARNING: Bad instruction - Truncating control flow here
            if (0x9b < bVar11) {
              bVar55 = (byte)((uint)*(undefined4 *)((longlong)puVar47 + 0x73) >> 8);
              uVar17 = (longlong)*(int *)(piVar44 + 0x69) * 0x61623a3a;
              uVar20 = uVar17 & 0xffffffff;
                    // WARNING: Bad instruction - Truncating control flow here
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
              if ((longlong)(int)uVar17 == uVar17) goto code_r0x0001400c6087;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
              if ((longlong)(int)((longlong)*(int *)(piVar44 + 0x69) * 0x74733a3a) !=
                  (longlong)*(int *)(piVar44 + 0x69) * 0x74733a3a) goto code_r0x0001400c610a;
              out(*piVar46,0x5cc0);
              *(char *)(longlong)(int)uVar16 = *(char *)(longlong)(int)uVar16 + (char)uVar16;
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
              s_random_device__rdseed_failed_1400c5d1a[7] = bVar11 + 'd';
                    // WARNING: Bad instruction - Truncating control flow here
              if (bVar11 < 0x9c) {
                    // WARNING: Bad instruction - Truncating control flow here
                halt_baddata();
              }
              uVar17 = (ulonglong)*(uint *)((longlong)puVar47 + 0x73);
              uVar22 = (longlong)*(int *)(piVar44 + 0x6a) * 0x6f63203a;
              uVar20 = uVar22 & 0xffffffff;
              bVar50 = (longlong)(int)uVar22 != uVar22;
              out(piVar44[3],0x5cc0);
              if ((!bVar50) || (bVar50)) {
                s_random_device__rdseed_failed_1400c5d1a[7] = bVar11 + 'd';
                    // WARNING: Bad instruction - Truncating control flow here
                halt_baddata();
              }
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
              puVar34 = (undefined1 *)(ulonglong)*(uint *)(psVar29 + uVar20 * 2 + 0x6f);
              out(*puVar34,0x5cc0);
              puVar34[0x73] = puVar34[0x73] & bVar11;
              piVar46 = (istreambuf_iterator<> *)(puVar34 + 5);
              out(*(undefined4 *)(puVar34 + 1),0x5cc0);
              uVar57 = in(0x5cc0);
              *puVar47 = uVar57;
              puVar34[0x7a] = puVar34[0x7a] & (byte)iVar45;
              puVar33 = (undefined1 *)((longlong)puVar47 + 5);
              uVar30 = in(0x5cc0);
              *(undefined1 *)(puVar47 + 1) = uVar30;
              puVar47 = (undefined4 *)((longlong)puVar47 + 6);
              uVar30 = in(0x5cc0);
              *puVar33 = uVar30;
              *(istreambuf_iterator<> *)(psVar29 + 0x73) =
                   (istreambuf_iterator<>)
                   ((byte)*(istreambuf_iterator<> *)(psVar29 + 0x73) & (byte)iVar45);
              pbVar23 = puVar34 + 0x74;
              *pbVar23 = *pbVar23 & (byte)iVar45;
              bVar54 = (POPCOUNT(*pbVar23) & 1U) == 0;
              bVar50 = true;
              if (*pbVar23 == 0) goto code_r0x0001400c6084;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
              uVar30 = in(0x5cc0);
              *(undefined1 *)puVar47 = uVar30;
              uVar22 = (longlong)*(int *)((longlong)pbVar27 * 2 + 0x62) * 0x63697361;
              bVar53 = (longlong)(int)uVar22 != uVar22;
              puVar47 = *(undefined4 **)(uVar22 & 0xffffffff);
              puVar39 = (undefined8 *)(uVar22 & 0xffffffff) + 1;
              bVar50 = false;
              goto code_r0x0001400c6070;
            }
          }
          bVar55 = (byte)(uVar17 >> 8);
          if (!bVar54) {
            *(int *)pbVar27 = *(int *)pbVar27 - (int)puVar39;
            pbVar23 = (byte *)((ulonglong)uVar16 + 0x69 + uVar20 * 2);
            *pbVar23 = *pbVar23 & 0x5c;
code_r0x0001400c6115:
                    // WARNING: Could not recover jumptable at 0x0001400c6117. Too many branches
                    // WARNING: Treating indirect jump as call
            pcVar21 = (char *)(*(code *)(ulonglong)
                                        *(uint *)((longlong)puVar47 +
                                                 (longlong)piVar46 * 4 + -0x487b0006))();
            return pcVar21;
          }
          if (!bVar50) goto code_r0x0001400c6173;
          puVar40 = (undefined8 *)((longlong)puVar39 + -8);
          puVar39 = (undefined8 *)((longlong)puVar39 + -8);
          *puVar40 = *(undefined8 *)(uVar20 + 0x1d);
        }
        *(undefined8 *)((longlong)puVar39 + -8) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x10) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x18) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x20) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x28) = *(undefined8 *)(uVar20 + 0x1d);
        puVar41 = (undefined8 *)((longlong)puVar39 + -0x30);
        puVar39 = (undefined8 *)((longlong)puVar39 + -0x30);
        *puVar41 = *(undefined8 *)(uVar20 + 0x1d);
code_r0x0001400c6173:
        *(undefined8 *)((longlong)puVar39 + -8) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x10) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x18) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x20) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x28) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x30) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x38) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x40) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x48) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x50) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x58) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x60) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x68) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x70) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x78) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x80) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x88) = *(undefined8 *)(uVar20 + 0x1d);
        pcVar3 = *(code **)(psVar29 + -0x410005dd);
        *(undefined8 *)((longlong)puVar39 + -0x90) = 0x1400c61bd;
        lVar18 = (*pcVar3)();
        lVar32 = CONCAT71((int7)((ulonglong)puVar31 >> 8),(byte)puVar31 & bVar55);
        *(int *)(lVar18 + 0x30) = *(int *)(lVar18 + 0x30) + 1;
        *(undefined2 *)((longlong)puVar39 + -0x8c) = in_CS;
        *(undefined4 *)((longlong)puVar39 + -0x90) = 0x400c61c5;
        (*(code *)piVar46)();
        *(undefined8 *)((longlong)puVar39 + -0x90) = *(undefined8 *)(uVar20 + 0x1d);
        *(undefined8 *)((longlong)puVar39 + -0x98) = *(undefined8 *)(uVar20 + 0x1d);
        pcVar3 = *(code **)(lVar32 + 0x31);
        *(undefined8 *)((longlong)puVar39 + -0xa0) = 0x1400c61d6;
        (*pcVar3)();
                    // WARNING: Could not recover jumptable at 0x0001400c61d7. Too many branches
                    // WARNING: Treating indirect jump as call
        pcVar21 = (char *)(**(code **)(psVar29 + 0x2e))();
        return pcVar21;
      }
      piVar1 = (int *)(lVar18 + 0x1710c571e);
      bVar50 = SBORROW4(*piVar1,1);
      *piVar1 = *piVar1 + -1;
      puVar35 = puVar38 + 8;
      puVar36 = puVar38 + 8;
      puVar34 = puVar38 + 8;
      puVar37 = puVar38 + 8;
      puVar33 = puVar38 + 8;
      puVar38 = puVar38 + 8;
      puVar5 = puVar37;
      puVar6 = puVar36;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
      switch(cVar10) {
      case (ctype<char>)0x0:
        goto switchD_14006b99d_caseD_0;
      case (ctype<char>)0x1:
        goto switchD_14006b99d_caseD_1;
      case (ctype<char>)0x2:
        goto switchD_14006b99d_caseD_2;
      case (ctype<char>)0x3:
        goto switchD_14006b99d_caseD_3;
      case (ctype<char>)0x4:
        goto switchD_14006b99d_caseD_4;
      }
    } while( true );
  }
  iVar12 = (int)pcVar52;
  pcVar52 = pcVar52 + 1;
  bVar55 = iVar12 + 1 < 4 & (byte)piVar51;
  puVar38 = puVar33;
  goto code_r0x00014006b9e1;
switchD_14006c8dd_caseD_4:
  piVar46 = (istreambuf_iterator<> *)(uStack_170 & 0xffffffff);
  this_02 = &money_base::_S_atoms;
  param_8 = local_178;
  while( true ) {
    bVar50 = (int)piVar46 == -1;
    piVar51 = (istreambuf_iterator<> *)CONCAT71((int7)((ulonglong)piVar51 >> 8),bVar50);
    if ((param_8 == (istreambuf_iterator<> *)0x0) || (!bVar50)) {
      piVar19 = (istreambuf_iterator<> *)((ulonglong)piVar51 & 0xffffffff);
    }
    else {
      piVar19 = (istreambuf_iterator<> *)0x0;
      if (*(ulonglong *)(param_8 + 0x18) <= *(ulonglong *)(param_8 + 0x10)) {
        iVar12 = (**(code **)(*(longlong *)param_8 + 0x48))(param_8);
        piVar19 = (istreambuf_iterator<> *)(ulonglong)(iVar12 == -1);
        if (iVar12 == -1) {
          local_178 = (istreambuf_iterator<> *)0x0;
        }
      }
    }
    bVar54 = (int)local_180 == -1;
    psVar29 = (string *)uStack_188;
    if (((uStack_188 != (istreambuf_iterator<> *)0x0) && (bVar54)) &&
       (bVar54 = false, *(ulonglong *)(uStack_188 + 0x18) <= *(ulonglong *)(uStack_188 + 0x10))) {
      iVar12 = (**(code **)(*(longlong *)uStack_188 + 0x48))();
      bVar54 = iVar12 == -1;
      if (bVar54) {
        uStack_188 = (istreambuf_iterator<> *)0x0;
      }
    }
    if (SUB81(piVar19,0) == bVar54) break;
    psVar29 = (string *)in_stack_fffffffffffffe38;
    if ((local_178 != (istreambuf_iterator<> *)0x0) && (bVar50)) {
      if (*(byte **)(local_178 + 0x10) < *(byte **)(local_178 + 0x18)) {
        piVar46 = (istreambuf_iterator<> *)(ulonglong)**(byte **)(local_178 + 0x10);
      }
      else {
        uVar13 = (**(code **)(*(longlong *)local_178 + 0x48))();
        piVar46 = (istreambuf_iterator<> *)(ulonglong)uVar13;
        psVar29 = (string *)in_stack_fffffffffffffe38;
        if (uVar13 == 0xffffffff) {
          local_178 = (istreambuf_iterator<> *)0x0;
        }
      }
    }
    iVar45 = SUB81(piVar46,0);
    in_stack_fffffffffffffe38 = (istreambuf_iterator<> *)psVar29;
    pvVar24 = memchr(psVar29,(int)(char)iVar45,10);
    iVar12 = (int)uVar17;
    if (pvVar24 == (void *)0x0) {
      if (piVar44[0x21] == iVar45) {
        if (local_1a0._3_1_ != 0) goto LAB_14006ceb0;
        psVar29 = (string *)(ulonglong)*(uint *)(piVar44 + 0x58);
        if ((int)*(uint *)(piVar44 + 0x58) < 1) break;
        uVar17 = 0;
        local_1a0 = (istreambuf_iterator<> **)CONCAT44(iVar12,0x1000000);
      }
      else {
        if ((piVar44[0x20] == (istreambuf_iterator<>)0x0) || (piVar44[0x22] != iVar45)) break;
        if (local_1a0._3_1_ != 0) {
LAB_14006ceb0:
          piVar51 = (istreambuf_iterator<> *)(ulonglong)local_1a0._3_1_;
          goto LAB_14006ceb6;
        }
        if (iVar12 == 0) {
          piVar51 = (istreambuf_iterator<> *)0x0;
          goto LAB_14006ceb6;
        }
        uVar22 = local_158[-3];
        uVar20 = uVar22 + 1;
        if (local_158[-2] < uVar20) {
LAB_14006cd85:
          std::string::reserve((string *)in_stack_fffffffffffffe30,uVar20);
        }
        else {
          if (_CRT_MT == 0) {
            iVar12 = (int)local_158[-1];
          }
          else {
            iVar12 = (int)local_158[-1];
          }
          if (0 < iVar12) goto LAB_14006cd85;
        }
        *(char *)((longlong)local_158 + local_158[-3]) = (char)uVar17;
        uVar17 = 0;
        *(undefined4 *)(local_158 + -1) = 0;
        local_158[-3] = uVar20;
        *(undefined1 *)((longlong)local_158 + uVar22 + 1) = 0;
      }
    }
    else {
      cVar7 = money_base::_S_atoms[(longlong)pvVar24 - (longlong)in_stack_fffffffffffffe40];
      piVar51 = (istreambuf_iterator<> *)0x0;
      uVar22 = local_150[-3];
      uVar20 = uVar22 + 1;
      if (local_150[-2] < uVar20) {
LAB_14006cc47:
        std::string::reserve(in_stack_fffffffffffffe28,uVar20);
      }
      else {
        if (_CRT_MT == 0) {
          iVar15 = (int)local_150[-1];
        }
        else {
          iVar15 = (int)local_150[-1];
        }
        if (0 < iVar15) goto LAB_14006cc47;
      }
      uVar17 = (ulonglong)(iVar12 + 1);
      *(char *)((longlong)local_150 + local_150[-3]) = cVar7;
      *(undefined4 *)(local_150 + -1) = 0;
      local_150[-3] = uVar20;
      *(char *)((longlong)local_150 + uVar22 + 1) = '\0';
    }
    param_8 = local_178;
    if (*(ulonglong *)(local_178 + 0x10) < *(ulonglong *)(local_178 + 0x18)) {
      *(ulonglong *)(local_178 + 0x10) = *(ulonglong *)(local_178 + 0x10) + 1;
    }
    else {
      (**(code **)(*(longlong *)local_178 + 0x50))(local_178);
    }
    uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
    piVar46 = (istreambuf_iterator<> *)0xffffffff;
  }
  piVar51 = (istreambuf_iterator<> *)0x1;
LAB_14006ceb6:
  if (local_150[-3] == 0) goto LAB_14006cec9;
  goto LAB_14006c910;
LAB_14006d0f8:
  piVar19 = *(istreambuf_iterator<> **)(piVar44 + 0x30);
  piVar46 = (istreambuf_iterator<> *)0x0;
  piVar51 = (istreambuf_iterator<> *)&uStack_188;
  param_8 = (istreambuf_iterator<> *)&local_178;
  goto LAB_14006d146;
LAB_14006cb10:
  if ((uStack_188 == (istreambuf_iterator<> *)0x0) || ((int)local_180 != -1)) {
    bVar50 = (bool)(bVar50 ^ (int)local_180 == -1);
  }
  else if (*(ulonglong *)(uStack_188 + 0x18) <= *(ulonglong *)(uStack_188 + 0x10)) {
    iVar15 = (**(code **)(*(longlong *)uStack_188 + 0x48))();
    bVar50 = (bool)(bVar50 ^ iVar15 == -1);
    if (iVar15 == -1) {
      uStack_188 = (istreambuf_iterator<> *)0x0;
    }
  }
  if ((uStack_1b8 <= uVar17) || (!bVar50)) {
    if (uStack_1b8 == uVar17) {
      uVar17 = local_150[-3];
joined_r0x00014006c978:
      psVar29 = in_stack_fffffffffffffe28;
      if ((1 < uVar17) &&
         (uVar17 = std::string::find_first_not_of(in_stack_fffffffffffffe28,'0',0), uVar17 != 0)) {
        uVar20 = local_150[-3];
        if (uVar17 == 0xffffffffffffffff) {
          uVar17 = uVar20 - 1;
        }
        if (uVar17 <= uVar20) {
          uVar20 = uVar17;
        }
        std::string::_M_mutate(in_stack_fffffffffffffe28,0,uVar20,0);
      }
      psVar56 = psVar29;
      if (local_190._2_1_ != '\0') {
        if (-1 < (int)local_150[-1]) {
          std::string::_M_leak_hard(psVar29);
        }
        psVar56 = psVar29;
        if ((char)*local_150 != '0') {
          std::string::_M_leak(psVar29);
          std::string::_M_replace_aux(psVar29,0,0,1,'-');
          *(undefined4 *)(local_150 + -1) = 0xffffffff;
        }
      }
      if (local_158[-3] != 0) {
        local_1a0._4_1_ = (undefined1)((ushort)local_1a0._3_2_ >> 8);
        uVar30 = (char)uVar13;
        if (local_1a0._3_1_ != '\0') {
          uVar30 = local_1a0._4_1_;
        }
        std::string::push_back((string *)&local_158,uVar30);
        cVar7 = __verify_grouping(*(longlong *)(piVar44 + 0x10),*(longlong *)(piVar44 + 0x18),
                                  (undefined8 *)&local_158);
        if (cVar7 == '\0') {
          *puStack_d0 = *puStack_d0 | 4;
        }
      }
      if (local_1a0._3_1_ == '\0') {
LAB_14006d370:
        piVar51 = (istreambuf_iterator<> *)&uStack_188;
        param_8 = (istreambuf_iterator<> *)&local_178;
        std::string::swap(local_c8,(longlong *)psVar56);
        goto LAB_14006ca0b;
      }
      piVar51 = (istreambuf_iterator<> *)&uStack_188;
      param_8 = (istreambuf_iterator<> *)&local_178;
      if (*(uint *)(piVar44 + 0x58) == uVar13) goto LAB_14006d370;
      goto LAB_14006ca00;
    }
LAB_14006cec9:
    piVar51 = (istreambuf_iterator<> *)&uStack_188;
    param_8 = (istreambuf_iterator<> *)&local_178;
LAB_14006ca00:
    *puStack_d0 = *puStack_d0 | 4;
LAB_14006ca0b:
    uVar17 = istreambuf_iterator<>::equal(param_8,(longlong *)piVar51);
    if ((char)uVar17 != '\0') {
      *puStack_d0 = *puStack_d0 | 2;
    }
    *(istreambuf_iterator<> **)local_f8 = local_178;
    *(ulonglong *)(local_f8 + 8) = uStack_170;
    std::string::_Rep::_M_dispose(local_150 + -3);
    std::string::_Rep::_M_dispose(local_158 + -3);
    return local_f8;
  }
  if ((local_178 != (istreambuf_iterator<> *)0x0) && (cVar7 != '\0')) {
    pcVar21 = *(char **)(local_178 + 0x10);
    if (*(char **)(local_178 + 0x18) <= pcVar21) {
      iVar12 = (**(code **)(*(longlong *)local_178 + 0x48))(local_178);
      if (iVar12 == -1) {
        local_178 = (istreambuf_iterator<> *)0x0;
      }
      goto LAB_14006cb60;
    }
    if (*(char *)(lVar18 + uVar17) == *pcVar21) {
LAB_14006cb80:
      *(char **)(local_178 + 0x10) = pcVar21 + 1;
      piVar46 = local_178;
      goto LAB_14006cb88;
    }
    goto LAB_14006cec9;
  }
LAB_14006cb60:
  piVar46 = local_178;
  if (*(char *)(lVar18 + uVar17) != (char)iVar12) goto LAB_14006cec9;
  pcVar21 = *(char **)(local_178 + 0x10);
  if (pcVar21 < *(char **)(local_178 + 0x18)) goto LAB_14006cb80;
  (**(code **)(*(longlong *)local_178 + 0x50))(local_178);
LAB_14006cb88:
  uStack_170 = CONCAT44(uStack_170._4_4_,0xffffffff);
  uVar17 = uVar17 + 1;
LAB_14006cb97:
  cVar7 = (char)uVar20;
  iVar12 = -1;
  bVar50 = false;
  if (*(ulonglong *)(piVar46 + 0x18) <= *(ulonglong *)(piVar46 + 0x10)) {
    iVar12 = (**(code **)(*(longlong *)piVar46 + 0x48))(piVar46);
    bVar50 = iVar12 == -1;
    if (bVar50) {
      local_178 = (istreambuf_iterator<> *)0x0;
    }
    cVar7 = (char)uVar20;
    iVar12 = -1;
  }
  goto LAB_14006cb10;
code_r0x00014006b9e3:
  bVar55 = (byte)piVar51;
LAB_14006bb78:
  puVar33[0x38] = 1 < *(ulonglong *)(puVar33 + 0x50) & bVar55;
  if (puVar33[0x38] == '\0') {
    if (bVar55 == 0) goto LAB_14006bf89;
LAB_14006ba2b:
    uVar13 = (uint)uVar17;
    uVar17 = *(ulonglong *)(*(longlong *)(puVar33 + 0xb8) + -0x18);
joined_r0x00014006c2b0:
    if (1 < uVar17) {
      psVar29 = *(string **)(puVar33 + 0x30);
      *(undefined8 *)(puVar33 + -8) = 0x14006c3cd;
      uVar17 = std::string::find_first_not_of(psVar29,'0',0);
      if (uVar17 != 0) {
        uVar20 = *(ulonglong *)(*(longlong *)(puVar33 + 0xb8) + -0x18);
        if (uVar17 == 0xffffffffffffffff) {
          uVar17 = uVar20 - 1;
        }
        if (uVar17 <= uVar20) {
          uVar20 = uVar17;
        }
        *(undefined8 *)(puVar33 + -8) = 0x14006c402;
        std::string::_M_mutate(psVar29,0,uVar20,0);
      }
    }
    if (puVar33[0x7a] != '\0') {
      pcVar21 = *(char **)(puVar33 + 0xb8);
      if (-1 < *(int *)(pcVar21 + -8)) {
        *(undefined8 *)(puVar33 + -8) = 0x14006c693;
        std::string::_M_leak_hard(*(string **)(puVar33 + 0x30));
        pcVar21 = *(char **)(puVar33 + 0xb8);
      }
      if (*pcVar21 != '0') {
        psVar29 = *(string **)(puVar33 + 0x30);
        *(undefined8 *)(puVar33 + -8) = 0x14006c5e7;
        std::string::_M_leak(psVar29);
        *(undefined4 *)(puVar33 + 0x20) = 0x2d;
        *(undefined8 *)(puVar33 + -8) = 0x14006c602;
        std::string::_M_replace_aux(psVar29,0,0,1,puVar33[0x20]);
        *(undefined4 *)(*(longlong *)(puVar33 + 0xb8) + -8) = 0xffffffff;
      }
    }
    if (*(longlong *)(*(longlong *)(puVar33 + 0xb0) + -0x18) != 0) {
      uVar30 = (char)uVar13;
      if (puVar33[0x6b] != '\0') {
        uVar30 = puVar33[0x6c];
      }
      *(undefined8 *)(puVar33 + -8) = 0x14006ba78;
      std::string::push_back((string *)(puVar33 + 0xb0),uVar30);
      lVar18 = *(longlong *)(piVar44 + 0x18);
      lVar32 = *(longlong *)(piVar44 + 0x10);
      *(undefined8 *)(puVar33 + -8) = 0x14006ba88;
      cVar7 = __verify_grouping(lVar32,lVar18,(undefined8 *)(puVar33 + 0xb0));
      if (cVar7 == '\0') {
        **(uint **)(puVar33 + 0x138) = **(uint **)(puVar33 + 0x138) | 4;
      }
    }
    if (puVar33[0x6b] == '\0') {
LAB_14006c430:
      piVar51 = (istreambuf_iterator<> *)(puVar33 + 0x80);
      param_8 = (istreambuf_iterator<> *)(puVar33 + 0x90);
      *(undefined8 *)(puVar33 + -8) = 0x14006c452;
      std::string::swap(*(string **)(puVar33 + 0x140),*(longlong **)(puVar33 + 0x30));
      goto LAB_14006bacb;
    }
    piVar51 = (istreambuf_iterator<> *)(puVar33 + 0x80);
    param_8 = (istreambuf_iterator<> *)(puVar33 + 0x90);
    if (*(uint *)(piVar44 + 0x58) == uVar13) goto LAB_14006c430;
  }
  else {
    if (puVar33[0x7a] == '\0') {
      this_02 = *(undefined ***)(piVar44 + 0x38);
    }
    else {
      this_02 = *(undefined ***)(piVar44 + 0x48);
    }
    iVar12 = *(int *)(puVar33 + 0x98);
    plVar42 = *(longlong **)(puVar33 + 0x90);
    param_8 = (istreambuf_iterator<> *)0x1;
    piVar51 = (istreambuf_iterator<> *)(ulonglong)(iVar12 == -1);
    piVar46 = piVar51;
    if ((plVar42 != (longlong *)0x0) && (iVar12 == -1)) goto LAB_14006bc57;
    while( true ) {
      bVar55 = (byte)piVar51;
      uVar13 = (uint)uVar17;
      plVar42 = *(longlong **)(puVar33 + 0x80);
      if ((plVar42 == (longlong *)0x0) || (*(int *)(puVar33 + 0x88) != -1)) {
        bVar55 = bVar55 ^ *(int *)(puVar33 + 0x88) == -1;
      }
      else if ((ulonglong)plVar42[3] <= (ulonglong)plVar42[2]) {
        pcVar3 = *(code **)(*plVar42 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006bfc4;
        iVar15 = (*pcVar3)();
        bVar55 = bVar55 ^ iVar15 == -1;
        if (iVar15 == -1) {
          *(undefined8 *)(puVar33 + 0x80) = 0;
        }
      }
      if ((*(istreambuf_iterator<> **)(puVar33 + 0x50) <= param_8) || (bVar55 == 0)) break;
      plVar42 = *(longlong **)(puVar33 + 0x90);
      if ((plVar42 == (longlong *)0x0) || ((char)piVar46 == '\0')) {
LAB_14006bc20:
        if (*(ctype<char> *)((longlong)this_02 + (longlong)param_8) != SUB41(iVar12,0))
        goto LAB_14006bf89;
        plVar42 = *(longlong **)(puVar33 + 0x90);
        pcVar52 = (ctype<char> *)plVar42[2];
        if (pcVar52 < (ctype<char> *)plVar42[3]) goto LAB_14006bc40;
        pcVar3 = *(code **)(*plVar42 + 0x50);
        *(undefined8 *)(puVar33 + -8) = 0x14006c191;
        (*pcVar3)(plVar42);
      }
      else {
        pcVar52 = (ctype<char> *)plVar42[2];
        if ((ctype<char> *)plVar42[3] <= pcVar52) {
          pcVar3 = *(code **)(*plVar42 + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006c64c;
          iVar12 = (*pcVar3)(plVar42);
          if (iVar12 == -1) {
            *(undefined8 *)(puVar33 + 0x90) = 0;
          }
          goto LAB_14006bc20;
        }
        if (*(ctype<char> *)((longlong)this_02 + (longlong)param_8) != *pcVar52) goto LAB_14006bf89;
LAB_14006bc40:
        plVar42[2] = (longlong)(pcVar52 + 1);
      }
      *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
      param_8 = param_8 + 1;
LAB_14006bc57:
      piVar46 = (istreambuf_iterator<> *)(ulonglong)(byte)puVar33[0x38];
      iVar12 = -1;
      piVar51 = (istreambuf_iterator<> *)0x0;
      if ((ulonglong)plVar42[3] <= (ulonglong)plVar42[2]) {
        pcVar3 = *(code **)(*plVar42 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006bc7d;
        iVar12 = (*pcVar3)(plVar42);
        piVar51 = (istreambuf_iterator<> *)(ulonglong)(iVar12 == -1);
        if (iVar12 == -1) {
          *(undefined8 *)(puVar33 + 0x90) = 0;
        }
LAB_14006bc8a:
        piVar46 = (istreambuf_iterator<> *)(ulonglong)(byte)puVar33[0x38];
        iVar12 = -1;
      }
    }
    if (*(istreambuf_iterator<> **)(puVar33 + 0x50) == param_8) {
      uVar17 = *(ulonglong *)(*(longlong *)(puVar33 + 0xb8) + -0x18);
      goto joined_r0x00014006c2b0;
    }
LAB_14006bf89:
    piVar51 = (istreambuf_iterator<> *)(puVar33 + 0x80);
    param_8 = (istreambuf_iterator<> *)(puVar33 + 0x90);
  }
LAB_14006bac0:
  **(uint **)(puVar33 + 0x138) = **(uint **)(puVar33 + 0x138) | 4;
LAB_14006bacb:
  *(undefined8 *)(puVar33 + -8) = 0x14006bad6;
  uVar17 = istreambuf_iterator<>::equal(param_8,(longlong *)piVar51);
  if ((char)uVar17 != '\0') {
    **(uint **)(puVar33 + 0x138) = **(uint **)(puVar33 + 0x138) | 2;
  }
  puVar2 = *(undefined8 **)(puVar33 + 0x110);
  uVar4 = *(undefined8 *)(puVar33 + 0x98);
  *puVar2 = *(undefined8 *)(puVar33 + 0x90);
  puVar2[1] = uVar4;
  *(undefined8 *)(puVar33 + -8) = 0x14006bb0f;
  std::string::_Rep::_M_dispose((void *)(*(longlong *)(puVar33 + 0xb8) + -0x18));
  *(undefined8 *)(puVar33 + -8) = 0x14006bb25;
  std::string::_Rep::_M_dispose((void *)(*(longlong *)(puVar33 + 0xb0) + -0x18));
  pcVar21 = *(char **)(puVar33 + 0x110);
switchD_14006c8dd_caseD_6:
switchD_1400635a3_caseD_5e:
  return pcVar21;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract_wday_or_month(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, int&, char const**, unsigned long long,
// std::ios_base&, std::_Ios_Iostate&) const

void std::time_get<>::_M_extract_wday_or_month
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
               int *param_5,longlong param_6,longlong param_7,longlong param_8,uint *param_9)

{
  int *piVar1;
  code *pcVar2;
  char *_Str;
  longlong lVar3;
  int iVar4;
  longlong lVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  size_t sVar8;
  bool bVar9;
  char cVar10;
  ulonglong uVar11;
  undefined1 *puVar12;
  int *piVar13;
  size_t *psVar14;
  longlong lVar15;
  char cVar16;
  ulonglong uVar17;
  uint uVar18;
  longlong *plVar19;
  size_t *psVar20;
  bool bVar21;
  char cVar22;
  undefined *puStack_b0;
  undefined1 auStack_a8 [32];
  size_t sStack_88;
  uint local_7c;
  uint local_78;
  char local_71;
  int *local_70;
  longlong *local_68;
  undefined8 uStack_60;
  longlong *local_58;
  undefined8 uStack_50;
  
  local_58 = (longlong *)*param_3;
  uStack_50 = param_3[1];
  local_68 = (longlong *)*param_4;
  uStack_60 = param_4[1];
  puStack_b0 = (undefined *)0x140064e2b;
  lVar5 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar19 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar5 * 8);
  if (plVar19 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    puStack_b0 = &UNK_140065203;
    __throw_bad_cast();
  }
  puStack_b0 = (undefined *)0x140064e65;
  lVar5 = -(param_7 * 8 + 0xfU & 0xfffffffffffffff0);
  puVar12 = auStack_a8 + lVar5;
  piVar1 = (int *)((longlong)&sStack_88 + lVar5);
  *(undefined8 *)(auStack_a8 + lVar5 + -8) = 0x140064e7d;
  uVar6 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
  if ((char)uVar6 == '\0') {
    *(undefined8 *)(auStack_a8 + lVar5 + -8) = 0x14006507f;
    uVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_58);
    lVar3 = param_7 * 2;
    if (lVar3 == 0) {
      uVar11 = 0;
      psVar14 = (size_t *)0x0;
      uVar6 = 0;
      plVar19 = local_58;
      uVar18 = (uint)uStack_50;
    }
    else {
      lVar15 = 0;
      uVar11 = 0;
      do {
        while (**(char **)(param_6 + lVar15 * 8) == (char)uVar6) {
LAB_1400650c4:
          piVar1[uVar11] = (int)lVar15;
          lVar15 = lVar15 + 1;
          uVar11 = uVar11 + 1;
          if (lVar15 == lVar3) goto LAB_1400650d5;
        }
        pcVar2 = *(code **)(*plVar19 + 0x10);
        *(undefined8 *)(auStack_a8 + lVar5 + -8) = 0x1400650aa;
        cVar22 = (*pcVar2)(plVar19);
        if ((char)uVar6 == cVar22) goto LAB_1400650c4;
        lVar15 = lVar15 + 1;
      } while (lVar15 != lVar3);
LAB_1400650d5:
      plVar19 = local_58;
      if (uVar11 == 0) {
        uVar6 = 0;
        psVar14 = (size_t *)0x0;
        puVar12 = auStack_a8 + lVar5;
        uVar18 = (uint)uStack_50;
      }
      else {
        *(undefined8 *)(auStack_a8 + lVar5 + -8) = 0x14006512b;
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(plVar19);
        uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
        *(undefined8 *)(auStack_a8 + lVar5 + -8) = 0x140065143;
        lVar3 = -(uVar11 * 8 + 0xf & 0xfffffffffffffff0);
        puVar12 = auStack_a8 + lVar3 + lVar5;
        local_70 = piVar1 + uVar11;
        psVar14 = (size_t *)((longlong)&sStack_88 + lVar3 + lVar5);
        piVar13 = piVar1;
        psVar20 = psVar14;
        do {
          iVar4 = *piVar13;
          piVar13 = piVar13 + 1;
          _Str = *(char **)(param_6 + (longlong)iVar4 * 8);
          *(undefined8 *)(auStack_a8 + lVar3 + lVar5 + -8) = 0x140065174;
          sVar8 = strlen(_Str);
          *psVar20 = sVar8;
          psVar20 = psVar20 + 1;
        } while (local_70 != piVar13);
        uVar6 = 1;
        uVar18 = 0xffffffff;
      }
    }
  }
  else {
    uVar11 = 0;
    uVar6 = 0;
    psVar14 = (size_t *)0x0;
    puVar12 = auStack_a8 + lVar5;
    plVar19 = local_58;
    uVar18 = (uint)uStack_50;
  }
  bVar21 = (int)uStack_60 == -1;
  do {
    cVar22 = uVar18 == 0xffffffff;
    bVar9 = plVar19 != (longlong *)0x0 && (bool)cVar22;
    cVar10 = cVar22;
    if (bVar9) {
      if ((ulonglong)plVar19[3] <= (ulonglong)plVar19[2]) {
        local_70 = (int *)CONCAT71(local_70._1_7_,cVar22);
        pcVar2 = *(code **)(*plVar19 + 0x48);
        local_78 = uVar18;
        local_71 = bVar9;
        *(undefined8 *)(puVar12 + -8) = 0x140065100;
        iVar4 = (*pcVar2)(plVar19);
        uVar18 = local_78;
        cVar22 = (char)local_70;
        if (iVar4 == -1) {
          local_58 = (longlong *)0x0;
          cVar10 = local_71;
          goto LAB_140064eba;
        }
      }
      cVar10 = '\0';
    }
LAB_140064eba:
    cVar16 = bVar21;
    if (local_68 != (longlong *)0x0 && bVar21) {
      if ((ulonglong)local_68[3] <= (ulonglong)local_68[2]) {
        local_78 = CONCAT31(local_78._1_3_,cVar10);
        local_70 = (int *)CONCAT71(local_70._1_7_,1);
        pcVar2 = *(code **)(*local_68 + 0x48);
        local_7c = uVar18;
        local_71 = cVar22;
        *(undefined8 *)(puVar12 + -8) = 0x1400651c5;
        iVar4 = (*pcVar2)();
        uVar18 = local_7c;
        cVar10 = (char)local_78;
        cVar22 = local_71;
        if (iVar4 == -1) {
          local_68 = (longlong *)0x0;
          cVar16 = (char)local_70;
          goto LAB_140064ed1;
        }
      }
      cVar16 = '\0';
    }
LAB_140064ed1:
    if (cVar10 == cVar16) break;
    if ((local_58 != (longlong *)0x0) && (cVar22 != '\0')) {
      if ((byte *)local_58[2] < (byte *)local_58[3]) {
        uVar18 = (uint)*(byte *)local_58[2];
      }
      else {
        pcVar2 = *(code **)(*local_58 + 0x48);
        *(undefined8 *)(puVar12 + -8) = 0x140065194;
        uVar18 = (*pcVar2)();
        if (uVar18 == 0xffffffff) {
          local_58 = (longlong *)0x0;
        }
      }
    }
    if (uVar11 == 0) goto LAB_140064fa0;
    uVar7 = 0;
    uVar17 = 0;
LAB_140064f0d:
    do {
      if (uVar6 < psVar14[uVar7]) {
        if (*(char *)(*(longlong *)(param_6 + (longlong)piVar1[uVar7] * 8) + uVar6) != (char)uVar18)
        {
          uVar11 = uVar11 - 1;
          piVar1[uVar7] = piVar1[uVar11];
          psVar14[uVar7] = psVar14[uVar11];
          if (uVar11 <= uVar7) break;
          goto LAB_140064f0d;
        }
      }
      else {
        uVar17 = uVar17 + 1;
      }
      uVar7 = uVar7 + 1;
    } while (uVar7 < uVar11);
    plVar19 = local_58;
    if (uVar11 == uVar17) break;
    if ((ulonglong)local_58[2] < (ulonglong)local_58[3]) {
      local_58[2] = local_58[2] + 1;
    }
    else {
      pcVar2 = *(code **)(*local_58 + 0x50);
      *(undefined8 *)(puVar12 + -8) = 0x14006503a;
      (*pcVar2)(plVar19);
    }
    uStack_50 = CONCAT44(uStack_50._4_4_,0xffffffff);
    uVar6 = uVar6 + 1;
    uVar18 = 0xffffffff;
  } while( true );
  if (uVar11 == 1) {
    sVar8 = *psVar14;
joined_r0x000140065052:
    if (sVar8 == uVar6) {
LAB_140065058:
      iVar4 = *piVar1;
      if ((int)param_7 <= iVar4) {
        iVar4 = iVar4 - (int)param_7;
      }
      *param_5 = iVar4;
      goto LAB_140064faa;
    }
  }
  else if (uVar11 == 2) {
    if (*psVar14 != uVar6) {
      sVar8 = psVar14[1];
      goto joined_r0x000140065052;
    }
    goto LAB_140065058;
  }
LAB_140064fa0:
  *param_9 = *param_9 | 4;
LAB_140064faa:
  *param_1 = local_58;
  param_1[1] = uStack_50;
  return;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char const*, char const*)
// const

undefined8 *
std::time_get<>::get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          istreambuf_iterator<> *param_5,uint *param_6,string *param_7,byte *param_8,byte *param_9)

{
  undefined8 uVar1;
  longlong *plVar2;
  char cVar3;
  char cVar4;
  char cVar5;
  byte bVar6;
  byte bVar7;
  int iVar8;
  longlong lVar9;
  byte *pbVar10;
  ulonglong uVar11;
  bool bVar12;
  bool bVar13;
  longlong *plVar14;
  longlong *plVar15;
  ulonglong uVar16;
  bool bVar17;
  bool bVar18;
  bool bVar19;
  bool bVar20;
  int local_c0;
  ulonglong local_b0;
  longlong *local_88;
  undefined8 local_80;
  longlong *local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined2 local_58;
  byte local_56;
  undefined1 local_55;
  undefined8 local_54;
  undefined4 local_4c;
  
  local_b0 = param_3[1];
  plVar14 = (longlong *)*param_3;
  plVar15 = (longlong *)*param_4;
  uVar16 = local_b0 & 0xffffffff;
  uVar1 = param_4[1];
  lVar9 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar9 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  *param_6 = 0;
  local_54 = 0;
  local_4c = 0;
  if (param_8 == param_9) {
LAB_1400655f8:
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    *param_1 = plVar14;
    param_1[1] = local_b0 & 0xffffffff00000000 | uVar16;
    return param_1;
  }
  do {
    bVar17 = (int)uVar16 == -1;
    bVar13 = bVar17;
    if (plVar14 != (longlong *)0x0 && bVar17) {
      if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
        bVar13 = false;
      }
      else {
        iVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
        bVar13 = iVar8 == -1;
        if (bVar13) {
          plVar14 = (longlong *)0x0;
        }
      }
    }
    local_c0 = (int)uVar1;
    bVar18 = local_c0 == -1;
    bVar20 = bVar18;
    if (plVar15 != (longlong *)0x0 && bVar18) {
      if ((ulonglong)plVar15[3] <= (ulonglong)plVar15[2]) {
        iVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
        bVar20 = iVar8 == -1;
        if (bVar20) {
          plVar15 = (longlong *)0x0;
        }
        goto LAB_1400654f5;
      }
      if (bVar13 == false) goto LAB_14006578b;
    }
    else {
LAB_1400654f5:
      if (bVar13 == bVar20) {
LAB_14006578b:
        *param_6 = 6;
        goto LAB_1400655f8;
      }
    }
    bVar7 = *param_8;
    bVar6 = *(byte *)((longlong)plVar2 + (ulonglong)bVar7 + 0x139);
    if (bVar6 == 0) {
      bVar6 = bVar7;
      if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
        bVar6 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar7,0);
      }
      if (bVar6 != 0) {
        *(byte *)((longlong)plVar2 + (ulonglong)bVar7 + 0x139) = bVar6;
        goto LAB_140065536;
      }
LAB_14006553e:
      if ((*(byte *)(plVar2[6] + (ulonglong)*param_8 * 2) & 0x20) != 0) {
        do {
          param_8 = param_8 + 1;
          if (param_9 == param_8) break;
        } while ((*(byte *)(plVar2[6] + (ulonglong)*param_8 * 2) & 0x20) != 0);
        if ((plVar14 != (longlong *)0x0) && (bVar17)) goto LAB_1400656a5;
LAB_14006565f:
        bVar19 = plVar15 != (longlong *)0x0;
        bVar13 = true;
        bVar20 = bVar17;
        do {
          bVar12 = bVar18;
          if (bVar19 && bVar18) {
            if ((ulonglong)plVar15[2] < (ulonglong)plVar15[3]) {
              bVar12 = false;
            }
            else {
              iVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
              if (iVar8 == -1) {
                plVar15 = (longlong *)0x0;
                bVar12 = bVar13;
              }
              else {
                bVar12 = false;
              }
            }
          }
          if (bVar20 == bVar12) goto joined_r0x0001400654af;
          uVar11 = uVar16;
          if ((plVar14 == (longlong *)0x0) || (bVar17 == false)) {
LAB_140065682:
            if ((*(byte *)(plVar2[6] + (uVar11 & 0xff) * 2) & 0x20) == 0)
            goto joined_r0x0001400654af;
            pbVar10 = (byte *)plVar14[2];
            if (pbVar10 < (byte *)plVar14[3]) goto LAB_14006569d;
            (**(code **)(*plVar14 + 0x50))(plVar14);
            if ((ulonglong)plVar14[3] <= (ulonglong)plVar14[2]) goto LAB_140065723;
          }
          else {
            pbVar10 = (byte *)plVar14[2];
            if ((byte *)plVar14[3] <= pbVar10) {
              uVar11 = (**(code **)(*plVar14 + 0x48))(plVar14);
              if ((int)uVar11 == -1) {
                plVar14 = (longlong *)0x0;
              }
              goto LAB_140065682;
            }
            if ((*(byte *)(plVar2[6] + (ulonglong)*pbVar10 * 2) & 0x20) == 0)
            goto joined_r0x0001400654af;
LAB_14006569d:
            plVar14[2] = (longlong)(pbVar10 + 1);
LAB_1400656a5:
            if ((ulonglong)plVar14[3] <= (ulonglong)plVar14[2]) {
LAB_140065723:
              iVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
              if (iVar8 == -1) goto code_r0x000140065738;
            }
          }
          bVar20 = false;
          bVar19 = plVar15 != (longlong *)0x0;
          bVar17 = true;
          uVar16 = 0xffffffff;
          bVar13 = bVar19 && bVar18;
        } while( true );
      }
      cVar5 = (char)uVar16;
      cVar3 = cVar5;
      if ((plVar14 != (longlong *)0x0) && (bVar17)) {
        if ((char *)plVar14[2] < (char *)plVar14[3]) {
          cVar3 = *(char *)plVar14[2];
        }
        else {
          iVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
          cVar3 = (char)iVar8;
          if (iVar8 == -1) {
            cVar3 = -1;
            plVar14 = (longlong *)0x0;
          }
        }
      }
      cVar3 = (**(code **)(*plVar2 + 0x20))(plVar2,(int)cVar3);
      cVar4 = (**(code **)(*plVar2 + 0x20))(plVar2,(int)(char)*param_8);
      if (cVar3 != cVar4) {
        if ((plVar14 != (longlong *)0x0) && (bVar17)) {
          if ((char *)plVar14[2] < (char *)plVar14[3]) {
            cVar5 = *(char *)plVar14[2];
          }
          else {
            iVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
            cVar5 = (char)iVar8;
            if (iVar8 == -1) {
              cVar5 = -1;
              plVar14 = (longlong *)0x0;
            }
          }
        }
        cVar5 = (**(code **)(*plVar2 + 0x10))(plVar2,(int)cVar5);
        cVar3 = (**(code **)(*plVar2 + 0x10))(plVar2,(int)(char)*param_8);
        if (cVar5 != cVar3) {
LAB_1400659c3:
          *param_6 = 4;
          goto LAB_1400655f8;
        }
      }
      if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
        plVar14[2] = plVar14[2] + 1;
      }
      else {
        (**(code **)(*plVar14 + 0x50))(plVar14);
      }
      param_8 = param_8 + 1;
      uVar16 = 0xffffffff;
    }
    else {
LAB_140065536:
      if (bVar6 != 0x25) goto LAB_14006553e;
      pbVar10 = param_8 + 1;
      if (param_9 == pbVar10) goto LAB_1400659c3;
      bVar7 = param_8[1];
      bVar6 = *(byte *)((longlong)plVar2 + (ulonglong)bVar7 + 0x139);
      if (bVar6 == 0) {
        bVar6 = bVar7;
        if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
          bVar6 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar7,0);
        }
        if (bVar6 != 0) {
          *(byte *)((longlong)plVar2 + (ulonglong)bVar7 + 0x139) = bVar6;
          goto LAB_14006532a;
        }
LAB_140065750:
        local_58 = *(undefined2 *)param_8;
        local_56 = 0;
      }
      else {
LAB_14006532a:
        if ((bVar6 != 0x45) && (bVar6 != 0x4f)) goto LAB_140065750;
        pbVar10 = param_8 + 2;
        if (param_9 == pbVar10) goto LAB_1400659c3;
        bVar7 = param_8[2];
        uVar11 = (ulonglong)bVar7;
        if (*(char *)((longlong)plVar2 + uVar11 + 0x139) == '\0') {
          if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
            bVar7 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar7,0);
          }
          if (bVar7 == 0) {
            local_58 = *(undefined2 *)param_8;
            bVar7 = param_8[2];
          }
          else {
            *(byte *)((longlong)plVar2 + uVar11 + 0x139) = bVar7;
            local_58 = *(undefined2 *)param_8;
            bVar7 = param_8[2];
          }
        }
        else {
          local_58 = *(undefined2 *)param_8;
        }
        local_55 = 0;
        local_56 = bVar7;
      }
      local_b0 = local_b0 & 0xffffffff00000000;
      local_70 = local_b0 | uVar16;
      local_88 = plVar15;
      local_80 = uVar1;
      local_78 = plVar14;
      _M_extract_via_format
                ((char *)&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
                 (istreambuf_iterator<> *)&local_58,(istreambuf_iterator<> *)&local_54);
      plVar14 = local_68;
      uVar16 = local_60 & 0xffffffff;
      bVar17 = (int)local_60 == -1;
      if ((local_68 != (longlong *)0x0 && bVar17) &&
         (bVar17 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
        iVar8 = (**(code **)(*local_68 + 0x48))(local_68);
        bVar17 = iVar8 == -1;
        if (bVar17) {
          plVar14 = (longlong *)0x0;
        }
      }
      if ((plVar15 != (longlong *)0x0 && bVar18) &&
         (bVar18 = false, (ulonglong)plVar15[3] <= (ulonglong)plVar15[2])) {
        iVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
        bVar18 = iVar8 == -1;
        if (bVar18) {
          plVar15 = (longlong *)0x0;
        }
      }
      if (bVar17 == bVar18) {
        *param_6 = *param_6 | 2;
      }
      param_8 = pbVar10 + 1;
    }
joined_r0x0001400654af:
    if ((param_9 == param_8) || (*param_6 != 0)) goto LAB_1400655f8;
  } while( true );
code_r0x000140065738:
  bVar17 = true;
  plVar14 = (longlong *)0x0;
  uVar16 = 0xffffffff;
  goto LAB_14006565f;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::time_get<>::get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          istreambuf_iterator<> *param_5,uint *param_6,string *param_7,char param_8,char param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  ctype<char> *this;
  int iVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  char local_91;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ctype<char> local_58;
  char local_57;
  char local_56;
  undefined1 local_55;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
  if (this != (ctype<char> *)0x0) {
    *param_6 = 0;
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      local_58 = (ctype<char>)0x25;
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        local_58 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
      }
    }
    else {
      local_58 = this[0x5e];
    }
    local_91 = param_8;
    local_56 = '\0';
    if (param_9 != '\0') {
      local_55 = 0;
      local_56 = param_8;
      local_91 = param_9;
    }
    local_57 = local_91;
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              ((char *)&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               (istreambuf_iterator<> *)&local_58,(istreambuf_iterator<> *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar8 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::time_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          istreambuf_iterator<> *param_5,uint *param_6,string *param_7,char param_8,char param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  ctype<char> *this;
  int iVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  ctype<char> local_58;
  char local_57;
  char local_56;
  undefined1 local_55;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
  if (this != (ctype<char> *)0x0) {
    *param_6 = 0;
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      local_58 = (ctype<char>)0x25;
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        local_58 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
      }
    }
    else {
      local_58 = this[0x5e];
    }
    local_57 = param_8;
    local_56 = '\0';
    if (param_9 != '\0') {
      local_55 = 0;
      local_57 = param_9;
      local_56 = param_8;
    }
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              ((char *)&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               (istreambuf_iterator<> *)&local_58,(istreambuf_iterator<> *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (int)local_60 == -1;
    plVar7 = local_68;
    if ((local_68 != (longlong *)0x0 && bVar8) &&
       (bVar8 = false, (ulonglong)local_68[3] <= (ulonglong)local_68[2])) {
      iVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      bVar8 = iVar5 == -1;
      if (bVar8) {
        plVar7 = (longlong *)0x0;
      }
    }
    bVar9 = (int)lVar4 == -1;
    if (((plVar3 != (longlong *)0x0) && (bVar9)) &&
       (bVar9 = false, (ulonglong)plVar3[3] <= (ulonglong)plVar3[2])) {
      iVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      bVar9 = iVar5 == -1;
    }
    if (bVar9 == bVar8) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_date(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::time_get<>::get_date
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x20))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_time(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::time_get<>::get_time
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get_year(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*)
// const

undefined8
std::time_get<>::get_year
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x38))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::date_order() const

undefined8 __thiscall std::time_get<>::date_order(time_get<> *this)

{
  undefined8 uVar1;
  
  if (*(code **)(*(longlong *)this + 0x10) == do_date_order) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140066150. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x10))();
  return uVar1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_date(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::time_get<>::do_get_date
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_54 = 0;
    local_4c = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(wchar_t **)(plVar7[2] + 0x10),(uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (short)local_60 == -1;
    plVar7 = local_68;
    if (local_68 != (longlong *)0x0 && bVar8) {
      if ((short *)local_68[2] < (short *)local_68[3]) {
        sVar5 = *(short *)local_68[2];
      }
      else {
        sVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      }
      plVar7 = (longlong *)0x0;
      bVar8 = sVar5 == -1;
      if (!bVar8) {
        plVar7 = local_68;
      }
    }
    bVar9 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar9)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar5 = *(short *)plVar3[2];
      }
      else {
        sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar9 = sVar5 == -1;
    }
    if (bVar8 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_60 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_time(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::time_get<>::do_get_time
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  ulonglong uVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_88;
  longlong local_80;
  undefined8 local_78;
  ulonglong local_70;
  longlong *local_68;
  ulonglong local_60;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar6 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar6 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar6 * 8),
      plVar7 != (longlong *)0x0)) &&
     (plVar7 = __dynamic_cast(plVar7,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar7 != (longlong *)0x0)) {
    local_4c = 0;
    local_54 = 0;
    local_88 = plVar3;
    local_80 = lVar4;
    local_78 = uVar1;
    local_70 = uVar2;
    _M_extract_via_format
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,
               *(wchar_t **)(plVar7[2] + 0x20),(uint *)&local_54);
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    bVar8 = (short)local_60 == -1;
    plVar7 = local_68;
    if (local_68 != (longlong *)0x0 && bVar8) {
      if ((short *)local_68[2] < (short *)local_68[3]) {
        sVar5 = *(short *)local_68[2];
      }
      else {
        sVar5 = (**(code **)(*local_68 + 0x48))(local_68);
      }
      plVar7 = (longlong *)0x0;
      bVar8 = sVar5 == -1;
      if (!bVar8) {
        plVar7 = local_68;
      }
    }
    bVar9 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar9)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar5 = *(short *)plVar3[2];
      }
      else {
        sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar9 = sVar5 == -1;
    }
    if (bVar8 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar7;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_60 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_year(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::time_get<>::do_get_year
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  char cVar1;
  undefined2 uVar2;
  short sVar3;
  longlong lVar4;
  longlong *plVar5;
  int iVar6;
  bool bVar7;
  bool bVar8;
  longlong *local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  longlong *local_78;
  short local_70;
  longlong *local_68;
  undefined8 uStack_60;
  longlong *local_58;
  undefined8 uStack_50;
  int local_40;
  uint local_3c;
  
  local_58 = (longlong *)*param_3;
  uStack_50 = param_3[1];
  local_68 = (longlong *)*param_4;
  uStack_60 = param_4[1];
  local_3c = 0;
  lVar4 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar5 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar4 * 8);
  if (plVar5 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_88 = local_58;
  uStack_80 = uStack_50;
  local_98 = local_68;
  uStack_90 = uStack_60;
  _M_extract_num(&local_78,param_2,&local_88,&local_98,&local_40,0,99,2,param_5,&local_3c);
  local_58 = local_78;
  uStack_50 = CONCAT62(uStack_50._2_6_,local_70);
  if (local_3c == 0) {
    bVar7 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
    iVar6 = local_40;
    if (bVar7) {
LAB_140066712:
      if (iVar6 < 0x45) {
        iVar6 = iVar6 + 100;
      }
      local_70 = (short)uStack_50;
LAB_140066730:
      *(int *)(param_7 + 0x14) = iVar6;
      goto LAB_140066689;
    }
    uVar2 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_58);
    cVar1 = (**(code **)(*plVar5 + 0x60))(plVar5,uVar2,0x2a);
    if (9 < (byte)(cVar1 - 0x30U)) goto LAB_140066712;
    _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_58);
    uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
    iVar6 = cVar1 + -0x30 + iVar6 * 10;
    local_40 = iVar6;
    bVar7 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
    if (bVar7) {
LAB_140066869:
      iVar6 = iVar6 + -0x76c;
      local_70 = (short)uStack_50;
      goto LAB_140066730;
    }
    uVar2 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_58);
    cVar1 = (**(code **)(*plVar5 + 0x60))(plVar5,uVar2,0x2a);
    plVar5 = local_58;
    if (9 < (byte)(cVar1 - 0x30U)) {
      goto LAB_140066869;
    }
    _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_58);
    uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
    *(int *)(param_7 + 0x14) = cVar1 + -0x79c + iVar6 * 10;
  }
  else {
    *param_6 = *param_6 | 4;
LAB_140066689:
    bVar7 = local_70 == -1;
    if ((local_58 == (longlong *)0x0) || (plVar5 = local_58, !bVar7)) goto LAB_140066697;
  }
  if ((short *)plVar5[2] < (short *)plVar5[3]) {
    sVar3 = *(short *)plVar5[2];
  }
  else {
    sVar3 = (**(code **)(*plVar5 + 0x48))();
  }
  bVar7 = false;
  if (sVar3 == -1) {
    local_58 = (longlong *)0x0;
    bVar7 = true;
  }
LAB_140066697:
  bVar8 = (short)uStack_60 == -1;
  if ((local_68 != (longlong *)0x0) && (bVar8)) {
    if ((short *)local_68[2] < (short *)local_68[3]) {
      sVar3 = *(short *)local_68[2];
    }
    else {
      sVar3 = (**(code **)(*local_68 + 0x48))();
    }
    bVar8 = sVar3 == -1;
  }
  if (bVar7 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_58;
  param_1[1] = uStack_50;
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_weekday(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::time_get<>::get_weekday
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x28))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_date_order() const

undefined8 std::time_get<>::do_date_order(void)

{
  return 0;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_monthname(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::time_get<>::get_monthname
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x30))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_num(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, int&, int, int, unsigned long
// long, std::ios_base&, std::_Ios_Iostate&) const

void std::time_get<>::_M_extract_num
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
               int *param_5,int param_6,int param_7,ulonglong param_8,longlong param_9,
               uint *param_10)

{
  ulonglong uVar1;
  undefined8 uVar2;
  longlong *plVar3;
  char cVar4;
  short sVar5;
  longlong lVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  int iVar9;
  longlong *plVar10;
  longlong *plVar11;
  ulonglong uVar12;
  bool bVar13;
  bool bVar14;
  bool bVar15;
  bool bVar16;
  
  uVar1 = param_3[1];
  uVar2 = param_4[1];
  plVar10 = (longlong *)*param_3;
  plVar11 = (longlong *)*param_4;
  lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_9 + 0xd0) + 8) + lVar6 * 8);
  if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  bVar13 = (short)uVar2 == -1;
  uVar8 = 0;
  iVar9 = 0;
  uVar12 = uVar1 & 0xffffffff;
  while( true ) {
    bVar14 = (short)uVar12 == -1;
    bVar15 = plVar10 != (longlong *)0x0;
    if (bVar15 && bVar14) break;
    bVar15 = bVar14;
    if (plVar11 == (longlong *)0x0 || !bVar13) goto LAB_140066a72;
LAB_140066b40:
    bVar16 = plVar11 != (longlong *)0x0;
    if ((short *)plVar11[2] < (short *)plVar11[3]) {
      sVar5 = *(short *)plVar11[2];
    }
    else {
      sVar5 = (**(code **)(*plVar11 + 0x48))(plVar11);
    }
    if (sVar5 == -1) {
      plVar11 = (longlong *)0x0;
    }
    if (bVar15 == (sVar5 == -1 && (bVar16 && bVar13))) goto LAB_140066b70;
LAB_140066a7e:
    if (param_8 <= uVar8) goto LAB_140066b70;
    if ((plVar10 == (longlong *)0x0) || (!bVar14)) {
      uVar7 = uVar12 & 0xffff;
    }
    else {
      if ((ushort *)plVar10[2] < (ushort *)plVar10[3]) {
        uVar7 = (ulonglong)*(ushort *)plVar10[2];
      }
      else {
        uVar7 = (**(code **)(*plVar10 + 0x48))(plVar10);
        uVar7 = uVar7 & 0xffff;
      }
      if ((short)uVar7 == -1) {
        plVar10 = (longlong *)0x0;
      }
    }
    cVar4 = (**(code **)(*plVar3 + 0x60))(plVar3,uVar7,0x2a);
    if (9 < (byte)(cVar4 - 0x30U)) goto LAB_140066b70;
    iVar9 = cVar4 + -0x30 + iVar9 * 10;
    if (param_7 < iVar9) goto LAB_140066b9a;
    if ((ulonglong)plVar10[2] < (ulonglong)plVar10[3]) {
      plVar10[2] = plVar10[2] + 2;
    }
    else {
      (**(code **)(*plVar10 + 0x50))(plVar10);
    }
    uVar8 = uVar8 + 1;
    uVar12 = 0xffffffff;
  }
  if ((short *)plVar10[2] < (short *)plVar10[3]) {
    sVar5 = *(short *)plVar10[2];
  }
  else {
    sVar5 = (**(code **)(*plVar10 + 0x48))(plVar10);
  }
  if (sVar5 == -1) {
    plVar10 = (longlong *)0x0;
  }
  bVar15 = sVar5 == -1 && (bVar15 && bVar14);
  if (plVar11 != (longlong *)0x0 && bVar13) goto LAB_140066b40;
LAB_140066a72:
  if (bVar15 != bVar13) goto LAB_140066a7e;
LAB_140066b70:
  if ((uVar8 != 0 && param_6 <= iVar9) && (iVar9 <= param_7)) {
    *param_5 = iVar9;
    goto LAB_140066ba5;
  }
LAB_140066b9a:
  *param_10 = *param_10 | 4;
LAB_140066ba5:
  *param_1 = plVar10;
  param_1[1] = CONCAT62((int6)(uVar1 >> 0x10),(short)uVar12);
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_weekday(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::time_get<>::do_get_weekday
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  short sVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_118;
  longlong local_110;
  undefined8 local_108;
  ulonglong local_100;
  longlong *local_f8;
  ulonglong local_f0;
  int local_e0;
  uint local_dc;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  undefined8 local_a8;
  undefined8 uStack_a0;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_dc = 0;
    uStack_a0 = *(undefined8 *)(lVar5 + 0x58);
    local_98 = *(undefined8 *)(lVar5 + 0x60);
    uStack_90 = *(undefined8 *)(lVar5 + 0x68);
    local_88 = *(undefined8 *)(lVar5 + 0x70);
    uStack_80 = *(undefined8 *)(lVar5 + 0x78);
    local_78 = *(undefined8 *)(lVar5 + 0x80);
    uStack_70 = *(undefined8 *)(lVar5 + 0x88);
    local_d8 = *(undefined8 *)(lVar5 + 0x90);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x98);
    local_c8 = *(undefined8 *)(lVar5 + 0xa0);
    uStack_c0 = *(undefined8 *)(lVar5 + 0xa8);
    local_b8 = *(undefined8 *)(lVar5 + 0xb0);
    uStack_b0 = *(undefined8 *)(lVar5 + 0xb8);
    local_a8 = *(undefined8 *)(lVar5 + 0xc0);
    local_118 = plVar3;
    local_110 = lVar4;
    local_108 = uVar1;
    local_100 = uVar2;
    _M_extract_wday_or_month
              (&local_f8,param_2,&local_108,&local_118,&local_e0,(longlong)&local_d8,7,param_5,
               &local_dc);
    if (local_dc == 0) {
      *(int *)(param_7 + 0x18) = local_e0;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (short)local_f0 == -1;
    plVar8 = local_f8;
    if (local_f8 != (longlong *)0x0 && bVar9) {
      if ((short *)local_f8[2] < (short *)local_f8[3]) {
        sVar6 = *(short *)local_f8[2];
      }
      else {
        sVar6 = (**(code **)(*local_f8 + 0x48))(local_f8);
      }
      plVar8 = (longlong *)0x0;
      bVar9 = sVar6 == -1;
      if (!bVar9) {
        plVar8 = local_f8;
      }
    }
    bVar10 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar10)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar6 = *(short *)plVar3[2];
      }
      else {
        sVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar10 = sVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_f0 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_name(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, int&, wchar_t const**, unsigned
// long long, std::ios_base&, std::_Ios_Iostate&) const

void std::time_get<>::_M_extract_name
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
               undefined4 *param_5,longlong param_6,ulonglong param_7,longlong param_8,uint *param_9
               )

{
  longlong *plVar1;
  code *pcVar2;
  wchar_t *_Str;
  longlong **pplVar3;
  istreambuf_iterator<> *piVar4;
  ulonglong *puVar5;
  bool bVar6;
  undefined2 uVar7;
  short sVar8;
  short sVar9;
  ushort uVar10;
  undefined4 uVar11;
  uint uVar12;
  longlong lVar13;
  size_t sVar14;
  ulonglong *puVar15;
  ulonglong *puVar16;
  longlong *plVar17;
  ulonglong uVar18;
  ulonglong uVar19;
  char cVar20;
  ulonglong uVar21;
  undefined2 *puVar22;
  ulonglong uVar23;
  ulonglong uVar24;
  bool bVar25;
  bool bVar26;
  undefined8 auStack_f0 [5];
  undefined8 uStack_c8;
  ulonglong local_c0;
  longlong **local_b8;
  ulonglong local_b0;
  istreambuf_iterator<> *local_a8;
  ulonglong *local_a0;
  ulonglong local_98;
  longlong local_90;
  ulonglong *local_88;
  ulonglong *local_80;
  ulonglong local_78;
  ulonglong *local_70;
  longlong *local_68;
  undefined8 uStack_60;
  longlong *local_58;
  ulonglong uStack_50;
  
  local_58 = (longlong *)*param_3;
  uStack_50 = param_3[1];
  local_68 = (longlong *)*param_4;
  uStack_60 = param_4[1];
  auStack_f0[0] = 0x140066fa4;
  lVar13 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar13 * 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    auStack_f0[0] = 0x14006789c;
    __throw_bad_cast();
  }
  auStack_f0[0] = 0x140066fd2;
  local_b8 = &local_68;
  local_a8 = (istreambuf_iterator<> *)&local_58;
  auStack_f0[param_7 * -2] = 0x140066ff2;
  bVar6 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
  piVar4 = local_a8;
  if (!bVar6) {
    auStack_f0[param_7 * -2] = 0x140067026;
    uVar7 = istreambuf_iterator<>::_M_get(piVar4);
    pcVar2 = *(code **)(*plVar1 + 0x40);
    auStack_f0[param_7 * -2] = 0x140067036;
    sVar8 = (*pcVar2)(plVar1,uVar7);
    pcVar2 = *(code **)(*plVar1 + 0x30);
    auStack_f0[param_7 * -2] = 0x140067044;
    uVar7 = (*pcVar2)(plVar1,uVar7);
    if (param_7 != 0) {
      local_80 = &uStack_c8 + param_7 * -2 + param_7;
      local_78 = CONCAT62(local_78._2_6_,uVar7);
      uVar18 = 0;
      uVar24 = 0;
      local_88 = &uStack_c8 + param_7 * -2;
      do {
        while( true ) {
          uVar19 = uVar18;
          pcVar2 = *(code **)(*plVar1 + 0x40);
          auStack_f0[param_7 * -2] = 0x14006708a;
          sVar9 = (*pcVar2)(plVar1);
          if (sVar8 != sVar9) break;
LAB_1400670a6:
          _Str = *(wchar_t **)(param_6 + uVar19 * 8);
          uVar23 = uVar24 + 1;
          local_70 = local_80 + uVar24;
          auStack_f0[param_7 * -2] = 0x1400670c7;
          sVar14 = wcslen(_Str);
          *local_70 = sVar14;
          local_88[uVar24] = uVar19;
          uVar18 = uVar19 + 1;
          uVar24 = uVar23;
          if (param_7 == uVar19 + 1) goto LAB_1400670df;
        }
        pcVar2 = *(code **)(*plVar1 + 0x30);
        auStack_f0[param_7 * -2] = 0x1400670a0;
        sVar9 = (*pcVar2)(plVar1);
        if ((short)local_78 == sVar9) goto LAB_1400670a6;
        uVar18 = uVar19 + 1;
      } while (param_7 != uVar19 + 1);
LAB_1400670df:
      puVar5 = local_88;
      if (1 < uVar24) {
        local_90 = uVar24 * 8;
        uVar18 = *local_80;
        local_a0 = local_80 + 1;
        uVar23 = 0;
        local_b0 = uVar19 + 1;
LAB_140067120:
        puVar15 = local_a0;
        uVar19 = uVar18;
        if (((int)(ulonglong *)((longlong)local_80 + local_90) - (int)local_a0 & 8U) == 0)
        goto LAB_140067160;
        uVar19 = *local_a0;
        puVar15 = local_80;
        if (uVar18 <= *local_a0) {
          uVar19 = uVar18;
        }
        while (puVar15 = puVar15 + 2, (ulonglong *)((longlong)local_80 + local_90) != puVar15) {
LAB_140067160:
          if (*puVar15 < uVar19) {
            uVar19 = *puVar15;
          }
          if (puVar15[1] < uVar19) {
            uVar19 = puVar15[1];
          }
        }
        uVar23 = uVar23 + 1;
        if ((ulonglong)local_58[2] < (ulonglong)local_58[3]) {
          local_58[2] = local_58[2] + 2;
          pplVar3 = local_b8;
          piVar4 = local_a8;
        }
        else {
          pcVar2 = *(code **)(*local_58 + 0x50);
          auStack_f0[param_7 * -2] = 0x14006750e;
          (*pcVar2)();
          pplVar3 = local_b8;
          piVar4 = local_a8;
        }
        uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
        local_b8 = pplVar3;
        local_a8 = piVar4;
        if (uVar23 == uVar19) {
          auStack_f0[param_7 * -2] = 0x140067530;
          bVar6 = istreambuf_iterator<>::equal(piVar4,(longlong *)pplVar3);
          local_98 = CONCAT71(local_98._1_7_,bVar6);
          if (bVar6) {
            cVar20 = '\0';
          }
          else {
            auStack_f0[param_7 * -2] = 0x140067543;
            uVar7 = istreambuf_iterator<>::_M_get(piVar4);
            pcVar2 = *(code **)(*plVar1 + 0x40);
            auStack_f0[param_7 * -2] = 0x140067550;
            uVar7 = (*pcVar2)(plVar1,uVar7);
            uVar21 = 0;
            local_70 = (ulonglong *)CONCAT62(local_70._2_6_,uVar7);
            auStack_f0[param_7 * -2] = 0x14006755f;
            uVar7 = istreambuf_iterator<>::_M_get(piVar4);
            pcVar2 = *(code **)(*plVar1 + 0x30);
            auStack_f0[param_7 * -2] = 0x14006756c;
            uVar7 = (*pcVar2)(plVar1,uVar7);
            puVar15 = local_80;
            local_88 = (ulonglong *)CONCAT62(local_88._2_6_,uVar7);
            local_78 = uVar23 * 2;
            uStack_c8._7_1_ = (char)local_98;
            local_c0 = uVar18;
            local_98 = uVar23;
            do {
              if (uVar19 < puVar15[uVar21]) {
                puVar22 = (undefined2 *)(local_78 + *(longlong *)(param_6 + puVar5[uVar21] * 8));
                uVar7 = *puVar22;
                pcVar2 = *(code **)(*plVar1 + 0x40);
                auStack_f0[param_7 * -2] = 0x1400675be;
                sVar8 = (*pcVar2)(plVar1,uVar7);
                if ((short)local_70 != sVar8) {
                  uVar7 = *puVar22;
                  pcVar2 = *(code **)(*plVar1 + 0x30);
                  auStack_f0[param_7 * -2] = 0x1400675d5;
                  sVar8 = (*pcVar2)(plVar1,uVar7);
                  if ((short)local_88 != sVar8) goto LAB_1400675df;
                }
                uVar18 = local_c0;
                uVar23 = local_98;
                cVar20 = '\x01';
                break;
              }
LAB_1400675df:
              uVar21 = uVar21 + 1;
              uVar18 = local_c0;
              uVar23 = local_98;
              cVar20 = uStack_c8._7_1_;
            } while (uVar21 != uVar24);
          }
          puVar15 = local_80;
          uVar21 = 0;
          lVar13 = local_90;
          do {
            if ((uVar18 == uVar19) == (bool)cVar20) {
              uVar24 = uVar24 - 1;
              lVar13 = uVar24 * 8;
              puVar5[uVar21] = puVar5[uVar24];
              local_80[uVar21] = local_80[uVar24];
              if (uVar24 <= uVar21) goto LAB_140067641;
            }
            else {
              uVar21 = uVar21 + 1;
              if (uVar24 <= uVar21) goto LAB_140067641;
            }
            uVar18 = local_80[uVar21];
          } while( true );
        }
        goto LAB_1400671ae;
      }
      uVar23 = 0;
LAB_14006730e:
      plVar17 = local_58;
      if (uVar24 == 1) {
        uVar19 = uVar23 + 1;
        auStack_f0[param_7 * -2] = 0x140067328;
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar17);
        uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
LAB_140067331:
        uVar18 = *puVar5;
LAB_140067335:
        lVar13 = *(longlong *)(param_6 + uVar18 * 8);
        local_78 = *local_80;
        local_80 = (ulonglong *)uVar18;
        if (uVar19 < local_78) {
          uVar18 = uStack_50 & 0xffff;
          local_70 = (ulonglong *)CONCAT71(local_70._1_7_,(short)uStack_60 == -1);
          plVar17 = local_58;
          do {
            bVar25 = (short)uVar18 == -1;
            bVar6 = bVar25;
            if ((plVar17 != (longlong *)0x0) && (bVar25)) {
              if ((short *)plVar17[2] < (short *)plVar17[3]) {
                sVar8 = *(short *)plVar17[2];
              }
              else {
                pcVar2 = *(code **)(*plVar17 + 0x48);
                auStack_f0[param_7 * -2] = 0x140067819;
                sVar8 = (*pcVar2)(plVar17);
              }
              if (sVar8 == -1) {
                local_58 = (longlong *)0x0;
              }
              bVar6 = sVar8 == -1;
            }
            cVar20 = (char)local_70;
            if ((local_68 != (longlong *)0x0) && ((char)local_70 != '\0')) {
              if ((short *)local_68[2] < (short *)local_68[3]) {
                sVar8 = *(short *)local_68[2];
              }
              else {
                pcVar2 = *(code **)(*local_68 + 0x48);
                auStack_f0[param_7 * -2] = 0x14006780b;
                sVar8 = (*pcVar2)();
              }
              if (sVar8 == -1) {
                local_68 = (longlong *)0x0;
              }
              cVar20 = sVar8 == -1;
            }
            if (bVar6 == (bool)cVar20) goto LAB_1400676ee;
            uVar7 = *(undefined2 *)(lVar13 + uVar19 * 2);
            pcVar2 = *(code **)(*plVar1 + 0x40);
            auStack_f0[param_7 * -2] = 0x1400673a9;
            sVar8 = (*pcVar2)(plVar1,uVar7);
            plVar17 = local_58;
            if ((local_58 == (longlong *)0x0) || (!bVar25)) {
              uVar24 = uVar18 & 0xffff;
            }
            else {
              if ((ushort *)local_58[2] < (ushort *)local_58[3]) {
                uVar10 = *(ushort *)local_58[2];
              }
              else {
                pcVar2 = *(code **)(*local_58 + 0x48);
                auStack_f0[param_7 * -2] = 0x140067827;
                uVar10 = (*pcVar2)(plVar17);
              }
              uVar24 = (ulonglong)uVar10;
              if (uVar10 == 0xffff) {
                local_58 = (longlong *)0x0;
                plVar17 = (longlong *)0x0;
              }
            }
            pcVar2 = *(code **)(*plVar1 + 0x40);
            auStack_f0[param_7 * -2] = 0x1400673ca;
            sVar9 = (*pcVar2)(plVar1,uVar24);
            if (sVar9 != sVar8) {
              uVar7 = *(undefined2 *)(lVar13 + uVar19 * 2);
              pcVar2 = *(code **)(*plVar1 + 0x30);
              auStack_f0[param_7 * -2] = 0x1400673de;
              sVar8 = (*pcVar2)(plVar1,uVar7);
              if ((plVar17 != (longlong *)0x0) && (bVar25)) {
                if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
                  uVar18 = (ulonglong)*(ushort *)plVar17[2];
                }
                else {
                  pcVar2 = *(code **)(*plVar17 + 0x48);
                  auStack_f0[param_7 * -2] = 0x140067838;
                  uVar12 = (*pcVar2)(plVar17);
                  uVar18 = (ulonglong)uVar12;
                }
                if ((short)uVar18 == -1) {
                  local_58 = (longlong *)0x0;
                }
              }
              pcVar2 = *(code **)(*plVar1 + 0x30);
              auStack_f0[param_7 * -2] = 0x1400673fb;
              sVar9 = (*pcVar2)(plVar1,uVar18 & 0xffff);
              plVar17 = local_58;
              if (sVar9 != sVar8) goto LAB_1400676ee;
            }
            if ((ulonglong)plVar17[2] < (ulonglong)plVar17[3]) {
              plVar17[2] = plVar17[2] + 2;
            }
            else {
              pcVar2 = *(code **)(*plVar17 + 0x50);
              auStack_f0[param_7 * -2] = 0x1400677a0;
              (*pcVar2)(plVar17);
            }
            uVar19 = uVar19 + 1;
            uVar18 = 0xffffffff;
            uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
          } while (local_78 != uVar19);
          uVar11 = SUB84(local_80,0);
        }
        else {
LAB_1400676ee:
          uVar11 = SUB84(local_80,0);
          if (uVar19 != local_78) goto LAB_140066ff6;
        }
        *param_5 = uVar11;
        goto LAB_140067000;
      }
    }
  }
LAB_140066ff6:
  *param_9 = *param_9 | 4;
LAB_140067000:
  *param_1 = local_58;
  param_1[1] = uStack_50;
  return;
LAB_140067641:
  local_90 = lVar13;
  if (cVar20 == '\0') {
    if (uVar24 != 2) {
      if (uVar24 != 1) goto LAB_140066ff6;
      goto LAB_140067331;
    }
    if ((local_b0 & 1) != 0) goto LAB_140066ff6;
    uVar18 = *puVar5;
    uVar24 = local_b0 >> 1;
    if (uVar18 < uVar24) {
      if (uVar24 + uVar18 == puVar5[1]) goto LAB_140067335;
      goto LAB_140066ff6;
    }
    if (uVar18 - uVar24 != puVar5[1]) goto LAB_140066ff6;
    *puVar5 = uVar18 - uVar24;
    *puVar15 = puVar15[1];
    uVar18 = *puVar5;
    goto LAB_140067335;
  }
  uVar19 = *local_80;
  if (1 < uVar24) {
    puVar15 = (ulonglong *)((longlong)local_80 + lVar13);
    puVar16 = local_a0;
    if (((int)puVar15 - (int)local_a0 & 8U) != 0) {
      if (*local_a0 < uVar19) {
        uVar19 = *local_a0;
      }
      puVar16 = local_80 + 2;
      if (puVar15 == puVar16) goto LAB_1400671ae;
    }
    do {
      if (*puVar16 < uVar19) {
        uVar19 = *puVar16;
      }
      if (puVar16[1] < uVar19) {
        uVar19 = puVar16[1];
      }
      puVar16 = puVar16 + 2;
    } while (puVar15 != puVar16);
  }
LAB_1400671ae:
  uVar18 = uStack_50;
  if (uVar19 <= uVar23) goto LAB_14006730e;
  uVar19 = uStack_50 & 0xffff;
  bVar25 = (short)uStack_50 == -1;
  bVar6 = bVar25;
  if ((local_58 != (longlong *)0x0) && (bVar25)) {
    if ((short *)local_58[2] < (short *)local_58[3]) {
      sVar8 = *(short *)local_58[2];
    }
    else {
      pcVar2 = *(code **)(*local_58 + 0x48);
      auStack_f0[param_7 * -2] = 0x1400677bc;
      sVar8 = (*pcVar2)();
    }
    if (sVar8 == -1) {
      local_58 = (longlong *)0x0;
    }
    bVar6 = sVar8 == -1;
  }
  bVar26 = (short)uStack_60 == -1;
  plVar17 = local_58;
  if ((local_68 != (longlong *)0x0) && (bVar26)) {
    if ((short *)local_68[2] < (short *)local_68[3]) {
      sVar8 = *(short *)local_68[2];
    }
    else {
      pcVar2 = *(code **)(*local_68 + 0x48);
      auStack_f0[param_7 * -2] = 0x1400677c7;
      sVar8 = (*pcVar2)();
    }
    if (sVar8 == -1) {
      local_68 = (longlong *)0x0;
    }
    bVar26 = sVar8 == -1;
    plVar17 = local_58;
  }
  local_58 = plVar17;
  if (bVar6 == bVar26) goto LAB_14006730e;
  if ((plVar17 == (longlong *)0x0) || (!bVar25)) {
    uVar18 = uVar18 & 0xffff;
  }
  else {
    if ((short *)plVar17[2] < (short *)plVar17[3]) {
      sVar8 = *(short *)plVar17[2];
    }
    else {
      pcVar2 = *(code **)(*plVar17 + 0x48);
      auStack_f0[param_7 * -2] = 0x1400677ae;
      sVar8 = (*pcVar2)(plVar17);
    }
    if (sVar8 != -1) {
      pcVar2 = *(code **)(*plVar1 + 0x40);
      auStack_f0[param_7 * -2] = 0x1400674d5;
      uVar7 = (*pcVar2)(plVar1);
      local_70 = (ulonglong *)CONCAT62(local_70._2_6_,uVar7);
      if ((ushort *)plVar17[2] < (ushort *)plVar17[3]) {
        uVar19 = (ulonglong)*(ushort *)plVar17[2];
      }
      else {
        pcVar2 = *(code **)(*plVar17 + 0x48);
        auStack_f0[param_7 * -2] = 0x1400677d5;
        uVar12 = (*pcVar2)(plVar17);
        uVar19 = (ulonglong)uVar12;
      }
      if ((short)uVar19 == -1) {
        local_58 = (longlong *)0x0;
      }
      goto LAB_14006721f;
    }
    local_58 = (longlong *)0x0;
    uVar18 = 0xffff;
  }
  pcVar2 = *(code **)(*plVar1 + 0x40);
  auStack_f0[param_7 * -2] = 0x14006721b;
  uVar7 = (*pcVar2)(plVar1,uVar18);
  local_70 = (ulonglong *)CONCAT62(local_70._2_6_,uVar7);
LAB_14006721f:
  pcVar2 = *(code **)(*plVar1 + 0x30);
  auStack_f0[param_7 * -2] = 0x14006722c;
  uVar7 = (*pcVar2)(plVar1,uVar19 & 0xffff);
  if (uVar24 == 0) goto LAB_140066ff6;
  local_78 = uVar23 * 2;
  uVar18 = 0;
  local_88 = (ulonglong *)CONCAT62(local_88._2_6_,uVar7);
  local_98 = uVar23;
  do {
    while( true ) {
      puVar22 = (undefined2 *)(local_78 + *(longlong *)(param_6 + puVar5[uVar18] * 8));
      uVar7 = *puVar22;
      pcVar2 = *(code **)(*plVar1 + 0x40);
      auStack_f0[param_7 * -2] = 0x1400672b5;
      sVar8 = (*pcVar2)(plVar1,uVar7);
      if ((short)local_70 != sVar8) break;
LAB_1400672bb:
      uVar18 = uVar18 + 1;
      if (uVar24 <= uVar18) goto LAB_1400672c4;
    }
    uVar7 = *puVar22;
    pcVar2 = *(code **)(*plVar1 + 0x30);
    auStack_f0[param_7 * -2] = 0x14006725e;
    sVar8 = (*pcVar2)(plVar1,uVar7);
    if ((short)local_88 == sVar8) goto LAB_1400672bb;
    uVar24 = uVar24 - 1;
    puVar5[uVar18] = puVar5[uVar24];
    local_80[uVar18] = local_80[uVar24];
    local_90 = uVar24 * 8;
  } while (uVar18 < uVar24);
LAB_1400672c4:
  uVar23 = local_98;
  if (uVar24 < 2) goto LAB_14006730e;
  uVar18 = *local_80;
  goto LAB_140067120;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get_monthname(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8 *
std::time_get<>::do_get_monthname
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,longlong param_7)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  longlong lVar5;
  short sVar6;
  ulonglong uVar7;
  longlong *plVar8;
  bool bVar9;
  bool bVar10;
  longlong *local_1a8;
  longlong local_1a0;
  undefined8 local_198;
  ulonglong local_190;
  longlong *local_188;
  ulonglong local_180;
  int local_170;
  uint local_16c;
  undefined8 local_168;
  undefined8 uStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  uVar7 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar7 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar8 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar7 * 8),
      plVar8 != (longlong *)0x0)) &&
     (plVar8 = __dynamic_cast(plVar8,&locale::facet::typeinfo,
                              (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar8 != (longlong *)0x0)) {
    lVar5 = plVar8[2];
    local_16c = 0;
    local_108 = *(undefined8 *)(lVar5 + 200);
    uStack_100 = *(undefined8 *)(lVar5 + 0xd0);
    local_f8 = *(undefined8 *)(lVar5 + 0xd8);
    uStack_f0 = *(undefined8 *)(lVar5 + 0xe0);
    local_e8 = *(undefined8 *)(lVar5 + 0xe8);
    uStack_e0 = *(undefined8 *)(lVar5 + 0xf0);
    local_d8 = *(undefined8 *)(lVar5 + 0xf8);
    uStack_d0 = *(undefined8 *)(lVar5 + 0x100);
    local_c8 = *(undefined8 *)(lVar5 + 0x108);
    uStack_c0 = *(undefined8 *)(lVar5 + 0x110);
    local_b8 = *(undefined8 *)(lVar5 + 0x118);
    uStack_b0 = *(undefined8 *)(lVar5 + 0x120);
    local_128 = *(undefined8 *)(lVar5 + 0x168);
    uStack_120 = *(undefined8 *)(lVar5 + 0x170);
    local_118 = *(undefined8 *)(lVar5 + 0x178);
    uStack_110 = *(undefined8 *)(lVar5 + 0x180);
    local_158 = *(undefined8 *)(lVar5 + 0x138);
    uStack_150 = *(undefined8 *)(lVar5 + 0x140);
    local_148 = *(undefined8 *)(lVar5 + 0x148);
    uStack_140 = *(undefined8 *)(lVar5 + 0x150);
    local_138 = *(undefined8 *)(lVar5 + 0x158);
    uStack_130 = *(undefined8 *)(lVar5 + 0x160);
    local_168 = *(undefined8 *)(lVar5 + 0x128);
    uStack_160 = *(undefined8 *)(lVar5 + 0x130);
    local_1a8 = plVar3;
    local_1a0 = lVar4;
    local_198 = uVar1;
    local_190 = uVar2;
    _M_extract_wday_or_month
              (&local_188,param_2,&local_198,&local_1a8,&local_170,(longlong)&local_168,0xc,param_5,
               &local_16c);
    if (local_16c == 0) {
      *(int *)(param_7 + 0x10) = local_170;
    }
    else {
      *param_6 = *param_6 | 4;
    }
    bVar9 = (short)local_180 == -1;
    plVar8 = local_188;
    if (local_188 != (longlong *)0x0 && bVar9) {
      if ((short *)local_188[2] < (short *)local_188[3]) {
        sVar6 = *(short *)local_188[2];
      }
      else {
        sVar6 = (**(code **)(*local_188 + 0x48))(local_188);
      }
      plVar8 = (longlong *)0x0;
      bVar9 = sVar6 == -1;
      if (!bVar9) {
        plVar8 = local_188;
      }
    }
    bVar10 = (short)lVar4 == -1;
    if ((plVar3 != (longlong *)0x0) && (bVar10)) {
      if ((short *)plVar3[2] < (short *)plVar3[3]) {
        sVar6 = *(short *)plVar3[2];
      }
      else {
        sVar6 = (**(code **)(*plVar3 + 0x48))(plVar3);
      }
      bVar10 = sVar6 == -1;
    }
    if (bVar10 == bVar9) {
      *param_6 = *param_6 | 2;
    }
    *param_1 = plVar8;
    param_1[1] = uVar2 & 0xffffffffffff0000 | local_180 & 0xffff;
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_via_format(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, wchar_t const*) const

undefined8 *
std::time_get<>::_M_extract_via_format
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,wchar_t *param_8)

{
  undefined8 local_38;
  undefined8 uStack_30;
  undefined8 local_28;
  undefined8 local_20;
  uint local_14 [3];
  
  local_28 = *param_3;
  local_20 = param_3[1];
  local_38 = *param_4;
  uStack_30 = param_4[1];
  local_14[0] = 0;
  local_14[1] = 0;
  local_14[2] = 0;
  _M_extract_via_format
            (param_1,param_2,&local_28,&local_38,param_5,param_6,param_7,param_8,local_14);
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_via_format(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, wchar_t const*, std::__time_get_state&) const

undefined8 *
std::time_get<>::_M_extract_via_format
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,wchar_t *param_8,uint *param_9)

{
  wchar_t *pwVar1;
  longlong *plVar2;
  bool bVar3;
  char cVar4;
  bool bVar5;
  short sVar6;
  undefined2 uVar7;
  short sVar8;
  ulonglong uVar9;
  longlong *plVar10;
  longlong lVar11;
  size_t sVar12;
  longlong *plVar13;
  uint uVar14;
  uint uVar15;
  bool bVar16;
  char cVar17;
  short **ppsVar18;
  longlong *local_1c8;
  undefined8 uStack_1c0;
  longlong *local_1b8;
  undefined8 uStack_1b0;
  longlong *local_1a8;
  undefined2 local_1a0;
  longlong *local_198;
  undefined8 uStack_190;
  longlong *local_188;
  undefined8 uStack_180;
  uint local_170;
  uint local_16c;
  short *local_168;
  short *psStack_160;
  undefined8 local_158;
  undefined8 uStack_150;
  undefined8 local_148;
  undefined8 uStack_140;
  undefined8 local_138;
  undefined8 uStack_130;
  undefined8 local_128;
  undefined8 uStack_120;
  undefined8 local_118;
  undefined8 uStack_110;
  undefined8 local_108;
  undefined8 uStack_100;
  undefined8 local_f8;
  undefined8 uStack_f0;
  undefined8 local_e8;
  undefined8 uStack_e0;
  undefined8 local_d8;
  undefined8 uStack_d0;
  undefined8 local_c8;
  undefined8 uStack_c0;
  undefined8 local_b8;
  undefined8 uStack_b0;
  
  local_188 = (longlong *)*param_3;
  uStack_180 = param_3[1];
  local_198 = (longlong *)*param_4;
  uStack_190 = param_4[1];
  uVar9 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if (((uVar9 < *(ulonglong *)(*(longlong *)(param_5 + 0xd0) + 0x10)) &&
      (plVar10 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + uVar9 * 8),
      plVar10 != (longlong *)0x0)) &&
     (plVar10 = __dynamic_cast(plVar10,&locale::facet::typeinfo,
                               (type_info *)&__timepunct<wchar_t>::typeinfo,0),
     plVar10 != (longlong *)0x0)) {
    lVar11 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar11 * 8);
    if (plVar2 != (longlong *)0x0) {
      uVar14 = 0;
      uVar9 = 0;
      sVar12 = wcslen(param_8);
      local_170 = 0;
      while ((bVar3 = istreambuf_iterator<>::equal
                                ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198),
             uVar9 < sVar12 && (!bVar3))) {
        if (uVar14 != 0) goto LAB_1400680c9;
        pwVar1 = param_8 + uVar9;
        cVar4 = (**(code **)(*plVar2 + 0x60))(plVar2,*pwVar1,0);
        if (cVar4 != '%') {
          cVar4 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20);
          if (cVar4 == '\0') {
            sVar6 = (**(code **)(*plVar2 + 0x40))(plVar2,*pwVar1);
            uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
            sVar8 = (**(code **)(*plVar2 + 0x40))(plVar2,uVar7);
            if (sVar6 != sVar8) {
              sVar6 = (**(code **)(*plVar2 + 0x30))(plVar2,*pwVar1);
              uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
              sVar8 = (**(code **)(*plVar2 + 0x30))(plVar2,uVar7);
              if (sVar6 != sVar8) goto switchD_140067f29_caseD_1;
            }
LAB_140067f50:
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
          }
          else {
            bVar16 = (short)uStack_190 == -1;
            cVar17 = (short)uStack_180 == -1;
            bVar3 = (bool)cVar17;
            if ((local_188 != (longlong *)0x0) && (plVar13 = local_188, (bool)cVar17))
            goto LAB_140068024;
            while( true ) {
              bVar5 = bVar16;
              if ((local_198 != (longlong *)0x0) && (bVar16)) {
                if ((short *)local_198[2] < (short *)local_198[3]) {
                  sVar6 = *(short *)local_198[2];
                }
                else {
                  sVar6 = (**(code **)(*local_198 + 0x48))();
                }
                if (sVar6 == -1) {
                  local_198 = (longlong *)0x0;
                }
                bVar5 = sVar6 == -1;
              }
              if (bVar3 == bVar5) break;
              if ((local_188 != (longlong *)0x0) && (cVar17 != '\0')) {
                if ((short *)local_188[2] < (short *)local_188[3]) {
                  sVar6 = *(short *)local_188[2];
                }
                else {
                  sVar6 = (**(code **)(*local_188 + 0x48))();
                }
                if (sVar6 == -1) {
                  local_188 = (longlong *)0x0;
                }
              }
              cVar17 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20);
              plVar13 = local_188;
              if (cVar17 == '\0') break;
              if ((ulonglong)local_188[2] < (ulonglong)local_188[3]) {
                local_188[2] = local_188[2] + 2;
                uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
              }
              else {
                (**(code **)(*local_188 + 0x50))();
                uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
              }
LAB_140068024:
              if ((short *)plVar13[2] < (short *)plVar13[3]) {
                sVar6 = *(short *)plVar13[2];
              }
              else {
                sVar6 = (**(code **)(*plVar13 + 0x48))();
              }
              if (sVar6 == -1) {
                local_188 = (longlong *)0x0;
              }
              cVar17 = cVar4;
              bVar3 = sVar6 == -1;
            }
          }
          goto LAB_140067ecd;
        }
        cVar4 = (**(code **)(*plVar2 + 0x60))(plVar2,param_8[uVar9 + 1]);
        local_16c = 0;
        if ((cVar4 == 'E') || (cVar4 == 'O')) {
          lVar11 = uVar9 + 2;
          uVar9 = uVar9 + 2;
          cVar4 = (**(code **)(*plVar2 + 0x60))(plVar2,param_8[lVar11]);
        }
        else {
          uVar9 = uVar9 + 1;
        }
        switch(cVar4 + -0x25) {
        case '\0':
          sVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          sVar8 = (**(code **)(*plVar2 + 0x50))(plVar2,0x25);
          if (sVar6 == sVar8) goto LAB_140067f50;
        default:
switchD_140067f29_caseD_1:
          local_170 = 4;
          uVar14 = 4;
          break;
        case '\x1c':
        case '<':
          lVar11 = plVar10[2];
          local_138 = *(undefined8 *)(lVar11 + 0x88);
          uStack_130 = *(undefined8 *)(lVar11 + 0x90);
          local_128 = *(undefined8 *)(lVar11 + 0x98);
          uStack_120 = *(undefined8 *)(lVar11 + 0xa0);
          local_158 = *(undefined8 *)(lVar11 + 0x68);
          uStack_150 = *(undefined8 *)(lVar11 + 0x70);
          local_148 = *(undefined8 *)(lVar11 + 0x78);
          uStack_140 = *(undefined8 *)(lVar11 + 0x80);
          local_118 = *(undefined8 *)(lVar11 + 0xa8);
          uStack_110 = *(undefined8 *)(lVar11 + 0xb0);
          local_108 = *(undefined8 *)(lVar11 + 0xb8);
          uStack_100 = *(undefined8 *)(lVar11 + 0xc0);
          local_168 = *(short **)(lVar11 + 0x58);
          psStack_160 = *(short **)(lVar11 + 0x60);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name(&local_1a8,param_2,&local_1b8,&local_1c8,&local_16c,(longlong)&local_168,
                          0xe,param_5,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[6] = (int)local_16c % 7;
            *(byte *)param_9 = (byte)*param_9 | 2;
          }
          break;
        case '\x1d':
        case '=':
        case 'C':
          lVar11 = plVar10[2];
          local_108 = *(undefined8 *)(lVar11 + 0x128);
          uStack_100 = *(undefined8 *)(lVar11 + 0x130);
          local_f8 = *(undefined8 *)(lVar11 + 0x138);
          uStack_f0 = *(undefined8 *)(lVar11 + 0x140);
          local_e8 = *(undefined8 *)(lVar11 + 0x148);
          uStack_e0 = *(undefined8 *)(lVar11 + 0x150);
          local_d8 = *(undefined8 *)(lVar11 + 0x158);
          uStack_d0 = *(undefined8 *)(lVar11 + 0x160);
          local_c8 = *(undefined8 *)(lVar11 + 0x168);
          uStack_c0 = *(undefined8 *)(lVar11 + 0x170);
          local_b8 = *(undefined8 *)(lVar11 + 0x178);
          uStack_b0 = *(undefined8 *)(lVar11 + 0x180);
          local_128 = *(undefined8 *)(lVar11 + 0x108);
          uStack_120 = *(undefined8 *)(lVar11 + 0x110);
          local_118 = *(undefined8 *)(lVar11 + 0x118);
          uStack_110 = *(undefined8 *)(lVar11 + 0x120);
          local_158 = *(undefined8 *)(lVar11 + 0xd8);
          uStack_150 = *(undefined8 *)(lVar11 + 0xe0);
          local_148 = *(undefined8 *)(lVar11 + 0xe8);
          uStack_140 = *(undefined8 *)(lVar11 + 0xf0);
          local_138 = *(undefined8 *)(lVar11 + 0xf8);
          uStack_130 = *(undefined8 *)(lVar11 + 0x100);
          local_168 = *(short **)(lVar11 + 200);
          psStack_160 = *(short **)(lVar11 + 0xd0);
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name(&local_1a8,param_2,&local_1b8,&local_1c8,&local_16c,(longlong)&local_168,
                          0x18,param_5,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[4] = (int)local_16c % 0xc;
            *(ushort *)param_9 = (ushort)*param_9 | 0x408;
          }
          break;
        case '\x1e':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,99,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            *(ushort *)param_9 = (ushort)*param_9 | 0x480;
            param_9[1] = local_16c;
          }
          break;
        case '\x1f':
          ppsVar18 = &local_168;
          (**(code **)(*plVar2 + 0x58))(plVar2,"%m/%d/%y","%H:%M",ppsVar18);
          goto LAB_1400687d7;
        case '#':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x17,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[2] = local_16c;
            *(byte *)param_9 = (byte)*param_9 & 0xfe;
          }
          break;
        case '$':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0xc,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[2] = (int)local_16c % 0xc;
            *(byte *)param_9 = (byte)*param_9 | 1;
          }
          break;
        case '(':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x3b,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[1] = local_16c;
          }
          break;
        case '-':
          (**(code **)(*plVar2 + 0x58))(plVar2,"%H:%M","%H:%M:%S",&local_168);
          goto LAB_140069649;
        case '.':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x3c,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            *param_7 = local_16c;
          }
          break;
        case '/':
          (**(code **)(*plVar2 + 0x58))(plVar2,"%H:%M:%S",&DAT_1400c6146,&local_168);
LAB_140069649:
          ppsVar18 = &local_168;
          goto LAB_140068d3d;
        case '0':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x35,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            *param_9 = (local_16c & 0x3f) << 0x10 | 0x20 | *param_9 & 0xffc0ffdf;
          }
          break;
        case '2':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,0x35,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            *param_9 = (local_16c & 0x3f) << 0x10 | 0x40 | *param_9 & 0xffc0ffbf;
          }
          break;
        case '3':
          ppsVar18 = *(short ***)(plVar10[2] + 0x20);
          goto LAB_140068d3d;
        case '4':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,9999,4,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[5] = local_16c - 0x76c;
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) & 0xf9 | 4;
          }
          break;
        case '5':
          istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          cVar4 = (**(code **)(*plVar2 + 0x10))(plVar2,1);
          if (cVar4 == '\0') goto switchD_140067f29_caseD_1;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_name(&local_1a8,param_2,&local_1b8,&local_1c8,(undefined4 *)&local_168,
                          (longlong)&__timepunct_cache<wchar_t>::_S_timezones,0xe,param_5,&local_170
                         );
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          bVar3 = istreambuf_iterator<>::equal
                            ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
          uVar14 = local_170;
          if ((bVar3) || (local_170 != 0 || (int)local_168 != 0)) break;
          sVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          sVar8 = (**(code **)(*plVar2 + 0x50))(plVar2,0x2d);
          if (sVar6 != sVar8) {
            sVar6 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
            sVar8 = (**(code **)(*plVar2 + 0x50))(plVar2,0x2b);
            if (sVar6 != sVar8) break;
          }
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_168,0,0x17,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_1a8;
          uStack_1b0 = uStack_180;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_168,0,0x3b,2,param_5
                         ,&local_170);
          goto LAB_140068ac0;
        case '>':
          ppsVar18 = *(short ***)(plVar10[2] + 0x30);
LAB_1400687d7:
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (wchar_t *)ppsVar18,param_9);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 4;
          }
          break;
        case '?':
        case '@':
          uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
          cVar4 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20,uVar7);
          if (cVar4 != '\0') {
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
          }
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0x1f,2,param_5
                         ,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[3] = local_16c;
            *(ushort *)param_9 = (ushort)*param_9 | 0x410;
          }
          break;
        case 'E':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0x16e,3,
                         param_5,&local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[7] = local_16c - 1;
            *(byte *)param_9 = (byte)*param_9 | 4;
          }
          break;
        case 'H':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,1,0xc,2,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[4] = local_16c - 1;
            *(byte *)param_9 = (byte)*param_9 | 8;
          }
          break;
        case 'I':
        case 'O':
          while (bVar3 = istreambuf_iterator<>::equal
                                   ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198),
                !bVar3) {
            istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
            cVar4 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20);
            if (cVar4 == '\0') break;
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
            uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
          }
          break;
        case 'K':
          local_168 = *(short **)(plVar10[2] + 0x40);
          psStack_160 = *(short **)(plVar10[2] + 0x48);
          if ((*local_168 != 0) && (*psStack_160 != 0)) {
            local_1b8 = local_188;
            uStack_1b0 = uStack_180;
            local_1c8 = local_198;
            uStack_1c0 = uStack_190;
            _M_extract_name(&local_1a8,param_2,&local_1b8,&local_1c8,&local_16c,(longlong)&local_168
                            ,2,param_5,&local_170);
            local_188 = local_1a8;
            uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
            uVar14 = local_170;
            if ((local_170 == 0) && (local_16c != 0)) {
              *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 1;
            }
          }
          break;
        case 'M':
          ppsVar18 = *(short ***)(plVar10[2] + 0x50);
          goto LAB_140068d3d;
        case 'R':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,6,1,param_5,
                         &local_170);
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          if (local_170 == 0) {
            param_7[6] = local_16c;
            *(byte *)param_9 = (byte)*param_9 | 2;
          }
          break;
        case 'S':
          ppsVar18 = *(short ***)(plVar10[2] + 0x10);
LAB_140068d3d:
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          _M_extract_via_format
                    (&local_1a8,param_2,&local_1b8,&local_1c8,param_5,&local_170,param_7,
                     (wchar_t *)ppsVar18,param_9);
LAB_140068ac0:
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          uVar14 = local_170;
          break;
        case 'T':
          local_1b8 = local_188;
          uStack_1b0 = uStack_180;
          local_1c8 = local_198;
          uStack_1c0 = uStack_190;
          _M_extract_num(&local_1a8,param_2,&local_1b8,&local_1c8,(int *)&local_16c,0,99,2,param_5,
                         &local_170);
          uVar14 = local_170;
          local_188 = local_1a8;
          uStack_180 = CONCAT62(uStack_180._2_6_,local_1a0);
          if (local_170 == 0) {
            *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) | 6;
            bVar3 = istreambuf_iterator<>::equal
                              ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
            uVar15 = local_16c;
            if (bVar3) {
LAB_140068cd6:
              if ((int)uVar15 < 0x45) {
                uVar15 = uVar15 + 100;
              }
            }
            else {
              uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
              cVar4 = (**(code **)(*plVar2 + 0x60))(plVar2,uVar7);
              if (9 < (byte)(cVar4 - 0x30U)) goto LAB_140068cd6;
              _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
              uVar15 = cVar4 + -0x30 + uVar15 * 10;
              uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
              local_16c = uVar15;
              bVar3 = istreambuf_iterator<>::equal
                                ((istreambuf_iterator<> *)&local_188,(longlong *)&local_198);
              if (!bVar3) {
                uVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_188);
                cVar4 = (**(code **)(*plVar2 + 0x60))(plVar2,uVar7);
                if ((byte)(cVar4 - 0x30U) < 10) {
                  _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_188);
                  uStack_180 = CONCAT62(uStack_180._2_6_,0xffff);
                  uVar15 = uVar15 * 10 + -0x30 + (int)cVar4;
                }
              }
              uVar15 = uVar15 - 0x76c;
              *(byte *)((longlong)param_9 + 1) = *(byte *)((longlong)param_9 + 1) & 0xfd;
            }
            param_7[5] = uVar15;
          }
        }
LAB_140067ecd:
        uVar9 = uVar9 + 1;
      }
      if ((uVar9 != sVar12) || (uVar14 != 0)) {
LAB_1400680c9:
        *param_6 = *param_6 | 4;
      }
      *param_1 = local_188;
      param_1[1] = uStack_180;
      return param_1;
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract_wday_or_month(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, int&, wchar_t const**, unsigned
// long long, std::ios_base&, std::_Ios_Iostate&) const

void std::time_get<>::_M_extract_wday_or_month
               (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
               int *param_5,longlong param_6,longlong param_7,longlong param_8,uint *param_9)

{
  int *piVar1;
  int iVar2;
  code *pcVar3;
  wchar_t *_Str;
  longlong lVar4;
  bool bVar5;
  bool bVar6;
  short sVar7;
  short sVar8;
  longlong lVar9;
  ulonglong uVar10;
  size_t sVar11;
  longlong *plVar12;
  ulonglong uVar13;
  undefined1 *puVar14;
  ulonglong uVar15;
  ulonglong *puVar16;
  longlong lVar17;
  char cVar18;
  ulonglong uVar19;
  char cVar20;
  undefined *puStack_a0;
  undefined1 auStack_98 [32];
  undefined8 uStack_78;
  longlong *local_70;
  longlong *local_68;
  undefined8 uStack_60;
  longlong *local_58;
  undefined8 uStack_50;
  
  local_58 = (longlong *)*param_3;
  uStack_50 = param_3[1];
  local_68 = (longlong *)*param_4;
  uStack_60 = param_4[1];
  puStack_a0 = (undefined *)0x14006998b;
  lVar9 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar12 = *(longlong **)(*(longlong *)(*(longlong *)(param_8 + 0xd0) + 8) + lVar9 * 8);
  if (plVar12 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    puStack_a0 = &UNK_140069d50;
    __throw_bad_cast();
  }
  puStack_a0 = (undefined *)0x1400699c5;
  lVar9 = -(param_7 * 8 + 0xfU & 0xfffffffffffffff0);
  puVar14 = auStack_98 + lVar9;
  piVar1 = (int *)((longlong)&uStack_78 + lVar9);
  *(undefined8 *)(auStack_98 + lVar9 + -8) = 0x1400699dd;
  bVar6 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_58,(longlong *)&local_68);
  if (bVar6) {
    uVar13 = 0;
    uVar15 = 0;
    puVar16 = (ulonglong *)0x0;
    plVar12 = local_58;
    puVar14 = auStack_98 + lVar9;
    sVar7 = (short)uStack_50;
  }
  else {
    *(undefined8 *)(auStack_98 + lVar9 + -8) = 0x140069c14;
    sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_58);
    lVar4 = param_7 * 2;
    if (lVar4 == 0) {
      uVar15 = 0;
      puVar16 = (ulonglong *)0x0;
      uVar13 = 0;
      plVar12 = local_58;
      sVar7 = (short)uStack_50;
    }
    else {
      lVar17 = 0;
      uVar15 = 0;
LAB_140069c49:
      do {
        if (**(short **)(param_6 + lVar17 * 8) != sVar7) {
          pcVar3 = *(code **)(*plVar12 + 0x30);
          *(undefined8 *)(auStack_98 + lVar9 + -8) = 0x140069c3a;
          sVar8 = (*pcVar3)(plVar12);
          if (sVar7 != sVar8) {
            lVar17 = lVar17 + 1;
            if (lVar17 == lVar4) break;
            goto LAB_140069c49;
          }
        }
        piVar1[uVar15] = (int)lVar17;
        lVar17 = lVar17 + 1;
        uVar15 = uVar15 + 1;
      } while (lVar17 != lVar4);
      plVar12 = local_58;
      if (uVar15 == 0) {
        uVar13 = 0;
        puVar16 = (ulonglong *)0x0;
        uVar15 = 0;
        puVar14 = auStack_98 + lVar9;
        sVar7 = (short)uStack_50;
      }
      else {
        local_70 = local_58;
        *(undefined8 *)(auStack_98 + lVar9 + -8) = 0x140069ca2;
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar12);
        uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
        *(undefined8 *)(auStack_98 + lVar9 + -8) = 0x140069cbc;
        plVar12 = local_70;
        uVar13 = 0;
        lVar4 = -(uVar15 * 8 + 0xf & 0xfffffffffffffff0);
        puVar14 = auStack_98 + lVar4 + lVar9;
        puVar16 = (ulonglong *)((longlong)&uStack_78 + lVar4 + lVar9);
        do {
          _Str = *(wchar_t **)(param_6 + (longlong)piVar1[uVar13] * 8);
          *(undefined8 *)(auStack_98 + lVar4 + lVar9 + -8) = 0x140069cde;
          sVar11 = wcslen(_Str);
          puVar16[uVar13] = sVar11;
          uVar13 = uVar13 + 1;
        } while (uVar15 != uVar13);
        uVar15 = 1;
        sVar7 = -1;
      }
    }
  }
  bVar6 = (short)uStack_60 == -1;
  while( true ) {
    cVar20 = sVar7 == -1;
    cVar18 = cVar20;
    if ((plVar12 != (longlong *)0x0) && ((bool)cVar20)) {
      if ((short *)plVar12[2] < (short *)plVar12[3]) {
        sVar8 = *(short *)plVar12[2];
      }
      else {
        local_70 = (longlong *)CONCAT71(local_70._1_7_,1);
        pcVar3 = *(code **)(*plVar12 + 0x48);
        *(undefined8 *)(puVar14 + -8) = 0x140069d15;
        sVar8 = (*pcVar3)();
        cVar20 = (char)local_70;
      }
      if (sVar8 == -1) {
        local_58 = (longlong *)0x0;
      }
      cVar18 = sVar8 == -1;
    }
    bVar5 = bVar6;
    if ((local_68 != (longlong *)0x0) && (bVar6)) {
      if ((short *)local_68[2] < (short *)local_68[3]) {
        sVar8 = *(short *)local_68[2];
      }
      else {
        local_70 = (longlong *)CONCAT71(local_70._1_7_,cVar20);
        pcVar3 = *(code **)(*local_68 + 0x48);
        uStack_78._7_1_ = cVar18;
        *(undefined8 *)(puVar14 + -8) = 0x140069d2b;
        sVar8 = (*pcVar3)();
        cVar18 = uStack_78._7_1_;
        cVar20 = (char)local_70;
      }
      if (sVar8 == -1) {
        local_68 = (longlong *)0x0;
      }
      bVar5 = sVar8 == -1;
    }
    if ((bool)cVar18 == bVar5) break;
    if ((local_58 != (longlong *)0x0) && (cVar20 != '\0')) {
      if ((short *)local_58[2] < (short *)local_58[3]) {
        sVar7 = *(short *)local_58[2];
      }
      else {
        pcVar3 = *(code **)(*local_58 + 0x48);
        *(undefined8 *)(puVar14 + -8) = 0x140069d04;
        sVar7 = (*pcVar3)();
      }
      if (sVar7 == -1) {
        local_58 = (longlong *)0x0;
      }
    }
    if (uVar13 == 0) goto LAB_140069b00;
    uVar10 = 0;
    uVar19 = 0;
LAB_140069a6d:
    do {
      if (uVar15 < puVar16[uVar10]) {
        if (*(short *)(*(longlong *)(param_6 + (longlong)piVar1[uVar10] * 8) + uVar15 * 2) != sVar7)
        {
          uVar13 = uVar13 - 1;
          piVar1[uVar10] = piVar1[uVar13];
          puVar16[uVar10] = puVar16[uVar13];
          if (uVar13 <= uVar10) break;
          goto LAB_140069a6d;
        }
      }
      else {
        uVar19 = uVar19 + 1;
      }
      uVar10 = uVar10 + 1;
    } while (uVar10 < uVar13);
    if (uVar13 == uVar19) break;
    if ((ulonglong)local_58[2] < (ulonglong)local_58[3]) {
      local_58[2] = local_58[2] + 2;
      plVar12 = local_58;
    }
    else {
      local_70 = local_58;
      pcVar3 = *(code **)(*local_58 + 0x50);
      *(undefined8 *)(puVar14 + -8) = 0x140069bca;
      (*pcVar3)();
      plVar12 = local_70;
    }
    uVar15 = uVar15 + 1;
    sVar7 = -1;
    uStack_50 = CONCAT62(uStack_50._2_6_,0xffff);
  }
  if (uVar13 == 1) {
    uVar13 = *puVar16;
joined_r0x000140069be6:
    if (uVar13 == uVar15) {
LAB_140069bec:
      iVar2 = *piVar1;
      if ((int)param_7 <= iVar2) {
        iVar2 = iVar2 - (int)param_7;
      }
      *param_5 = iVar2;
      goto LAB_140069b0a;
    }
  }
  else if (uVar13 == 2) {
    if (*puVar16 != uVar15) {
      uVar13 = puVar16[1];
      goto joined_r0x000140069be6;
    }
    goto LAB_140069bec;
  }
LAB_140069b00:
  *param_9 = *param_9 | 4;
LAB_140069b0a:
  *param_1 = local_58;
  param_1[1] = uStack_50;
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, wchar_t const*, wchar_t const*) const

undefined8 *
std::time_get<>::get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,uint *param_7,undefined4 *param_8,undefined4 *param_9)

{
  undefined8 uVar1;
  longlong *plVar2;
  char cVar3;
  char cVar4;
  bool bVar5;
  short sVar6;
  short sVar7;
  short sVar8;
  uint uVar9;
  longlong lVar10;
  ushort *puVar11;
  ulonglong uVar12;
  bool bVar13;
  longlong *plVar14;
  longlong *plVar15;
  undefined6 uVar16;
  ushort uVar17;
  ulonglong uVar18;
  undefined4 *puVar19;
  char cVar20;
  bool bVar21;
  bool bVar22;
  short local_c0;
  ulonglong local_b8;
  longlong *local_98;
  undefined8 local_90;
  longlong *local_88;
  undefined8 local_80;
  longlong *local_78;
  ulonglong local_70;
  undefined4 local_5c;
  undefined2 local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined4 local_4c;
  
  local_b8 = param_3[1];
  uVar1 = param_4[1];
  plVar14 = (longlong *)*param_3;
  plVar15 = (longlong *)*param_4;
  uVar18 = local_b8 & 0xffffffff;
  sVar7 = (short)uVar18;
  lVar10 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar10 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_54 = 0;
  local_4c = 0;
  *param_6 = 0;
  if (param_8 == param_9) {
LAB_14006a0ad:
    __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
    *param_1 = plVar14;
    param_1[1] = CONCAT62((int6)(local_b8 >> 0x10),sVar7);
    return param_1;
  }
  do {
    sVar7 = (short)uVar18;
    cVar20 = sVar7 == -1;
    bVar22 = (bool)cVar20;
    if (plVar14 != (longlong *)0x0 && (bool)cVar20) {
      if ((short *)plVar14[2] < (short *)plVar14[3]) {
        sVar8 = *(short *)plVar14[2];
      }
      else {
        sVar8 = (**(code **)(*plVar14 + 0x48))(plVar14);
      }
      bVar22 = sVar8 == -1;
      if (bVar22) {
        plVar14 = (longlong *)0x0;
      }
    }
    local_c0 = (short)uVar1;
    bVar21 = local_c0 == -1;
    bVar5 = bVar21;
    if (plVar15 != (longlong *)0x0 && bVar21) {
      if ((short *)plVar15[2] < (short *)plVar15[3]) {
        sVar8 = *(short *)plVar15[2];
      }
      else {
        sVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
      }
      bVar5 = sVar8 == -1;
      if (bVar5) {
        plVar15 = (longlong *)0x0;
      }
    }
    if (bVar22 == bVar5) {
      *param_6 = 6;
      goto LAB_14006a0ad;
    }
    cVar3 = (**(code **)(*plVar2 + 0x60))(plVar2,*(undefined2 *)param_8,0);
    if (cVar3 == '%') {
      puVar19 = (undefined4 *)((longlong)param_8 + 2);
      if (param_9 == puVar19) {
LAB_14006a458:
        *param_6 = 4;
        goto LAB_14006a0ad;
      }
      cVar20 = (**(code **)(*plVar2 + 0x60))(plVar2,*(undefined2 *)((longlong)param_8 + 2),0);
      if ((cVar20 == 'E') || (cVar20 == 'O')) {
        puVar19 = param_8 + 1;
        if (param_9 == puVar19) goto LAB_14006a458;
        (**(code **)(*plVar2 + 0x60))(plVar2,*(undefined2 *)(param_8 + 1),0);
        local_5c = *param_8;
        local_56 = 0;
        local_58 = *(undefined2 *)(param_8 + 1);
      }
      else {
        local_5c = *param_8;
        local_58 = 0;
      }
      uVar16 = (undefined6)(local_b8 >> 0x10);
      local_80 = CONCAT62(uVar16,sVar7);
      local_98 = plVar15;
      local_90 = uVar1;
      local_88 = plVar14;
      _M_extract_via_format
                (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,(wchar_t *)&local_5c,
                 (uint *)&local_54);
      plVar14 = local_78;
      local_b8 = CONCAT62(uVar16,(short)local_70);
      bVar22 = (short)local_70 == -1;
      uVar18 = local_70 & 0xffffffff;
      sVar7 = (short)uVar18;
      if (local_78 != (longlong *)0x0 && bVar22) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar8 = *(short *)local_78[2];
        }
        else {
          sVar8 = (**(code **)(*local_78 + 0x48))(local_78);
        }
        bVar22 = sVar8 == -1;
        if (bVar22) {
          plVar14 = (longlong *)0x0;
        }
        bVar5 = plVar15 != (longlong *)0x0 && bVar21;
      }
      else {
        bVar5 = true;
      }
      if (plVar15 != (longlong *)0x0 && bVar21) {
        if ((short *)plVar15[2] < (short *)plVar15[3]) {
          sVar8 = *(short *)plVar15[2];
        }
        else {
          sVar8 = (**(code **)(*plVar15 + 0x48))(plVar15);
        }
        bVar21 = false;
        if (sVar8 == -1) {
          plVar15 = (longlong *)0x0;
          bVar21 = bVar5;
        }
      }
      if (bVar21 == bVar22) {
        *param_6 = *param_6 | 2;
      }
      param_8 = (undefined4 *)((longlong)puVar19 + 2);
    }
    else {
      cVar3 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20);
      if (cVar3 != '\0') {
        do {
          param_8 = (undefined4 *)((longlong)param_8 + 2);
          if (param_9 == param_8) break;
          cVar4 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20,*(undefined2 *)param_8);
        } while (cVar4 != '\0');
        if ((plVar14 != (longlong *)0x0) && ((bool)cVar20)) goto LAB_14006a1aa;
LAB_14006a151:
        bVar5 = plVar15 != (longlong *)0x0;
        bVar22 = true;
        cVar4 = cVar20;
        do {
          bVar13 = bVar21;
          if (bVar5 && bVar21) {
            if ((short *)plVar15[2] < (short *)plVar15[3]) {
              sVar7 = *(short *)plVar15[2];
            }
            else {
              sVar7 = (**(code **)(*plVar15 + 0x48))(plVar15);
            }
            if (sVar7 == -1) {
              plVar15 = (longlong *)0x0;
              bVar13 = bVar22;
            }
            else {
              bVar13 = false;
            }
          }
          if ((bool)cVar20 == bVar13) goto LAB_140069ed2;
          if ((plVar14 != (longlong *)0x0) && (cVar4 != '\0')) {
            if ((short *)plVar14[2] < (short *)plVar14[3]) {
              sVar7 = *(short *)plVar14[2];
            }
            else {
              sVar7 = (**(code **)(*plVar14 + 0x48))(plVar14);
            }
            if (sVar7 == -1) {
              plVar14 = (longlong *)0x0;
            }
          }
          cVar20 = (**(code **)(*plVar2 + 0x10))(plVar2,0x20);
          if (cVar20 == '\0') goto LAB_140069ed2;
          if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
            plVar14[2] = plVar14[2] + 2;
LAB_14006a1aa:
            puVar11 = (ushort *)plVar14[2];
            if (puVar11 < (ushort *)plVar14[3]) goto LAB_14006a1b8;
LAB_14006a24f:
            uVar9 = (**(code **)(*plVar14 + 0x48))(plVar14);
            uVar18 = (ulonglong)uVar9;
            uVar17 = (ushort)uVar9;
          }
          else {
            (**(code **)(*plVar14 + 0x50))(plVar14);
            puVar11 = (ushort *)plVar14[2];
            if ((ushort *)plVar14[3] <= puVar11) goto LAB_14006a24f;
LAB_14006a1b8:
            uVar17 = *puVar11;
            uVar18 = (ulonglong)uVar17;
          }
          if (uVar17 == 0xffff) goto LAB_14006a270;
          cVar20 = '\0';
          bVar5 = plVar15 != (longlong *)0x0;
          uVar18 = 0xffffffff;
          bVar22 = bVar5 && bVar21;
          cVar4 = cVar3;
        } while( true );
      }
      if ((plVar14 == (longlong *)0x0) || (!(bool)cVar20)) {
        uVar12 = uVar18 & 0xffff;
      }
      else {
        if ((ushort *)plVar14[2] < (ushort *)plVar14[3]) {
          uVar12 = (ulonglong)*(ushort *)plVar14[2];
        }
        else {
          uVar12 = (**(code **)(*plVar14 + 0x48))(plVar14);
          uVar12 = uVar12 & 0xffff;
        }
        if ((short)uVar12 == -1) {
          plVar14 = (longlong *)0x0;
        }
      }
      sVar8 = (**(code **)(*plVar2 + 0x40))(plVar2,uVar12);
      sVar6 = (**(code **)(*plVar2 + 0x40))(plVar2,*(undefined2 *)param_8);
      if (sVar8 != sVar6) {
        if ((plVar14 == (longlong *)0x0) || (!(bool)cVar20)) {
          uVar18 = uVar18 & 0xffff;
        }
        else {
          if ((ushort *)plVar14[2] < (ushort *)plVar14[3]) {
            uVar18 = (ulonglong)*(ushort *)plVar14[2];
          }
          else {
            uVar18 = (**(code **)(*plVar14 + 0x48))(plVar14);
            uVar18 = uVar18 & 0xffff;
          }
          if ((short)uVar18 == -1) {
            plVar14 = (longlong *)0x0;
          }
        }
        sVar8 = (**(code **)(*plVar2 + 0x30))(plVar2,uVar18);
        sVar6 = (**(code **)(*plVar2 + 0x30))(plVar2,*(undefined2 *)param_8);
        if (sVar8 != sVar6) goto LAB_14006a458;
      }
      if ((ulonglong)plVar14[2] < (ulonglong)plVar14[3]) {
        plVar14[2] = plVar14[2] + 2;
      }
      else {
        (**(code **)(*plVar14 + 0x50))(plVar14);
      }
      param_8 = (undefined4 *)((longlong)param_8 + 2);
      uVar18 = 0xffffffff;
LAB_140069ed2:
      sVar7 = (short)uVar18;
    }
    if ((param_9 == param_8) || (sVar7 = (short)uVar18, *param_6 != 0)) goto LAB_14006a0ad;
  } while( true );
LAB_14006a270:
  plVar14 = (longlong *)0x0;
  cVar20 = cVar3;
  goto LAB_14006a151;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::time_get<>::get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7,char param_8,char param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_98;
  longlong local_90;
  undefined8 local_88;
  ulonglong local_80;
  longlong *local_78;
  ulonglong local_70;
  wchar_t local_5c;
  short local_5a;
  short local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
  if (plVar7 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  *param_6 = 0;
  local_5c = (**(code **)(*plVar7 + 0x50))();
  local_5a = (short)param_8;
  local_58 = 0;
  if (param_9 != '\0') {
    local_5a = (short)param_9;
    local_56 = 0;
    local_58 = (short)param_8;
  }
  local_54 = 0;
  local_4c = 0;
  local_98 = plVar3;
  local_90 = lVar4;
  local_88 = uVar1;
  local_80 = uVar2;
  _M_extract_via_format
            (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,&local_5c,
             (uint *)&local_54);
  __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
  bVar8 = (short)local_70 == -1;
  plVar7 = local_78;
  if (local_78 != (longlong *)0x0 && bVar8) {
    if ((short *)local_78[2] < (short *)local_78[3]) {
      sVar5 = *(short *)local_78[2];
    }
    else {
      sVar5 = (**(code **)(*local_78 + 0x48))(local_78);
    }
    bVar8 = sVar5 == -1;
    if (bVar8) {
      plVar7 = (longlong *)0x0;
    }
  }
  bVar9 = (short)lVar4 == -1;
  if ((plVar3 != (longlong *)0x0) && (bVar9)) {
    if ((short *)plVar3[2] < (short *)plVar3[3]) {
      sVar5 = *(short *)plVar3[2];
    }
    else {
      sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
    }
    bVar9 = sVar5 == -1;
  }
  if (bVar9 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar7;
  param_1[1] = uVar2 & 0xffffffffffff0000 | local_70 & 0xffff;
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, char, char) const

undefined8 *
std::time_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong *param_4,
          longlong param_5,uint *param_6,uint *param_7,char param_8,char param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  longlong *plVar3;
  longlong lVar4;
  short sVar5;
  longlong lVar6;
  longlong *plVar7;
  bool bVar8;
  bool bVar9;
  longlong *local_98;
  longlong local_90;
  undefined8 local_88;
  ulonglong local_80;
  longlong *local_78;
  ulonglong local_70;
  wchar_t local_5c;
  short local_5a;
  short local_58;
  undefined2 local_56;
  undefined8 local_54;
  undefined4 local_4c;
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  plVar3 = (longlong *)*param_4;
  lVar4 = param_4[1];
  lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar7 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar6 * 8);
  if (plVar7 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  *param_6 = 0;
  local_5c = (**(code **)(*plVar7 + 0x50))();
  local_5a = (short)param_8;
  local_58 = 0;
  if (param_9 != '\0') {
    local_5a = (short)param_9;
    local_56 = 0;
    local_58 = (short)param_8;
  }
  local_54 = 0;
  local_4c = 0;
  local_98 = plVar3;
  local_90 = lVar4;
  local_88 = uVar1;
  local_80 = uVar2;
  _M_extract_via_format
            (&local_78,param_2,&local_88,&local_98,param_5,param_6,param_7,&local_5c,
             (uint *)&local_54);
  __time_get_state::_M_finalize_state((__time_get_state *)&local_54,(longlong)param_7);
  bVar8 = (short)local_70 == -1;
  plVar7 = local_78;
  if (local_78 != (longlong *)0x0 && bVar8) {
    if ((short *)local_78[2] < (short *)local_78[3]) {
      sVar5 = *(short *)local_78[2];
    }
    else {
      sVar5 = (**(code **)(*local_78 + 0x48))(local_78);
    }
    plVar7 = (longlong *)0x0;
    bVar8 = sVar5 == -1;
    if (!bVar8) {
      plVar7 = local_78;
    }
  }
  bVar9 = (short)lVar4 == -1;
  if ((plVar3 != (longlong *)0x0) && (bVar9)) {
    if ((short *)plVar3[2] < (short *)plVar3[3]) {
      sVar5 = *(short *)plVar3[2];
    }
    else {
      sVar5 = (**(code **)(*plVar3 + 0x48))(plVar3);
    }
    bVar9 = sVar5 == -1;
  }
  if (bVar9 == bVar8) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = plVar7;
  param_1[1] = uVar2 & 0xffffffffffff0000 | local_70 & 0xffff;
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_date(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::time_get<>::get_date
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x20))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_time(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::time_get<>::get_time
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get_year(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*) const

undefined8
std::time_get<>::get_year
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined8 param_5,undefined8 param_6,undefined8 param_7)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x38))(param_1,param_2,&local_18,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, tm const*,
// char const*, char const*) const

undefined8 *
std::time_put<>::put
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,char param_5,
          undefined8 param_6,byte *param_7,byte *param_8)

{
  char cVar1;
  longlong *plVar2;
  byte bVar3;
  byte bVar4;
  int iVar5;
  longlong lVar6;
  byte *pbVar7;
  longlong *plVar8;
  char cVar9;
  ulonglong uVar10;
  int iVar11;
  ulonglong uVar12;
  uint7 uVar13;
  longlong *local_68;
  undefined8 local_60;
  longlong *local_58;
  ulonglong local_50;
  
  uVar12 = param_3[1];
  plVar8 = (longlong *)*param_3;
  uVar10 = uVar12 & 0xffffffff;
  cVar9 = (char)uVar10;
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  plVar2 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar6 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  while (uVar13 = (uint7)(uVar12 >> 8), param_7 != param_8) {
    bVar4 = *param_7;
    bVar3 = *(byte *)((longlong)plVar2 + (ulonglong)bVar4 + 0x139);
    cVar9 = (char)uVar10;
    if (bVar3 == 0) {
      bVar3 = bVar4;
      if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
        bVar3 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar4,0);
      }
      if (bVar3 != 0) {
        *(byte *)((longlong)plVar2 + (ulonglong)bVar4 + 0x139) = bVar3;
        goto LAB_14006ad06;
      }
LAB_14006ad0f:
      pbVar7 = param_7;
      if (cVar9 != '\0') goto LAB_14006accf;
      bVar4 = *param_7;
      if ((byte *)plVar8[6] <= (byte *)plVar8[5]) {
        iVar5 = (**(code **)(*plVar8 + 0x68))(plVar8);
        uVar10 = (ulonglong)(iVar5 == -1);
        goto LAB_14006accf;
      }
      param_7 = param_7 + 1;
      *(byte *)plVar8[5] = bVar4;
      plVar8[5] = plVar8[5] + 1;
    }
    else {
LAB_14006ad06:
      if (bVar3 != 0x25) goto LAB_14006ad0f;
      pbVar7 = param_7 + 1;
      if (param_8 == pbVar7) break;
      bVar4 = param_7[1];
      bVar3 = *(byte *)((longlong)plVar2 + (ulonglong)bVar4 + 0x139);
      if (bVar3 == 0) {
        bVar3 = bVar4;
        if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
          bVar3 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar4,0);
        }
        if (bVar3 != 0) {
          *(byte *)((longlong)plVar2 + (ulonglong)bVar4 + 0x139) = bVar3;
          goto LAB_14006ac04;
        }
        iVar5 = 0;
        iVar11 = 0;
      }
      else {
LAB_14006ac04:
        if ((bVar3 == 0x45) || (bVar3 == 0x4f)) {
          pbVar7 = param_7 + 2;
          if (param_8 == pbVar7) break;
          bVar4 = param_7[2];
          uVar12 = (ulonglong)bVar4;
          iVar11 = (int)(char)bVar3;
          cVar1 = *(char *)((longlong)plVar2 + uVar12 + 0x139);
          iVar5 = (int)cVar1;
          if (cVar1 == '\0') {
            iVar5 = (int)(char)bVar4;
            if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
              bVar4 = (**(code **)(*plVar2 + 0x40))(plVar2,iVar5,0);
              iVar5 = (int)(char)bVar4;
            }
            if (bVar4 != 0) {
              *(byte *)((longlong)plVar2 + uVar12 + 0x139) = bVar4;
            }
          }
        }
        else {
          iVar5 = (int)(char)bVar3;
          iVar11 = 0;
        }
      }
      local_60 = CONCAT71(uVar13,cVar9);
      local_68 = plVar8;
      (**(code **)(*param_2 + 0x10))
                (&local_58,param_2,&local_68,param_4,(int)param_5,param_6,iVar5,iVar11);
      uVar12 = (ulonglong)uVar13 << 8;
      plVar8 = local_58;
      uVar10 = local_50;
LAB_14006accf:
      cVar9 = (char)uVar10;
      param_7 = pbVar7 + 1;
    }
  }
  *param_1 = plVar8;
  param_1[1] = CONCAT71(uVar13,cVar9);
  return param_1;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, tm const*,
// char, char) const

undefined8
std::time_put<>::put
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 param_4,char param_5,
          undefined8 param_6,char param_7,char param_8)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  (**(code **)(*param_2 + 0x10))
            (param_1,param_2,&local_18,param_4,(int)param_5,param_6,(int)param_7,(int)param_8);
  return param_1;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, tm
// const*, char, char) const

undefined8 *
std::time_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined8 param_5,tm *param_6,char param_7,char param_8)

{
  longlong *plVar1;
  undefined8 uVar2;
  ctype<char> *this;
  longlong *plVar3;
  longlong lVar4;
  ulonglong uVar5;
  __timepunct<char> *this_00;
  size_t sVar6;
  size_t sVar7;
  char cVar8;
  char local_d9;
  ctype<char> local_cc;
  char local_cb;
  char local_ca;
  undefined1 local_c9;
  char local_c8 [136];
  
  plVar1 = (longlong *)*param_3;
  uVar2 = param_3[1];
  lVar4 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar4 * 8);
  if (this != (ctype<char> *)0x0) {
    uVar5 = locale::id::_M_id((id *)&__timepunct<char>::id);
    if ((uVar5 < *(ulonglong *)(*(longlong *)(param_4 + 0xd0) + 0x10)) &&
       (plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + uVar5 * 8),
       plVar3 != (longlong *)0x0)) {
      this_00 = (__timepunct<char> *)
                __dynamic_cast(plVar3,&locale::facet::typeinfo,
                               (type_info *)&__timepunct<char>::typeinfo,0);
      if (this_00 != (__timepunct<char> *)0x0) {
        if (this[0x38] == (ctype<char>)0x0) {
          ctype<char>::_M_widen_init(this);
          local_cc = (ctype<char>)0x25;
          if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
            local_cc = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this,0x25);
          }
        }
        else {
          local_cc = this[0x5e];
        }
        local_d9 = param_7;
        local_ca = '\0';
        if (param_8 != '\0') {
          local_c9 = 0;
          local_ca = param_7;
          local_d9 = param_8;
        }
        cVar8 = (char)uVar2;
        local_cb = local_d9;
        __timepunct<char>::_M_put(this_00,local_c8,0x80,(char *)&local_cc,param_6);
        sVar6 = strlen(local_c8);
        if (cVar8 == '\0') {
          sVar7 = (**(code **)(*plVar1 + 0x60))(plVar1,local_c8,sVar6);
          if (sVar6 != sVar7) {
            cVar8 = '\x01';
          }
        }
        *param_1 = plVar1;
        *(char *)(param_1 + 1) = cVar8;
        return param_1;
      }
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, tm
// const*, wchar_t const*, wchar_t const*) const

undefined8 *
std::time_put<>::put
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,longlong param_4,
          undefined2 param_5,undefined8 param_6,short *param_7,short *param_8)

{
  longlong *plVar1;
  char cVar2;
  char cVar3;
  short sVar4;
  longlong lVar5;
  int iVar6;
  short *psVar7;
  char cVar8;
  ulonglong uVar9;
  longlong *plVar10;
  uint7 uVar12;
  ulonglong uVar11;
  longlong *local_68;
  undefined8 local_60;
  longlong *local_58;
  ulonglong local_50;
  
  uVar11 = param_3[1];
  plVar10 = (longlong *)*param_3;
  uVar9 = uVar11 & 0xffffffff;
  cVar8 = (char)uVar9;
  lVar5 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar5 * 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  for (; param_7 != param_8; param_7 = param_7 + 1) {
    while( true ) {
      cVar2 = (**(code **)(*plVar1 + 0x60))(plVar1,*param_7,0);
      cVar8 = (char)uVar9;
      if (cVar2 != '%') break;
      psVar7 = param_7 + 1;
      if (param_8 == psVar7) goto LAB_14006b1f8;
      cVar2 = (**(code **)(*plVar1 + 0x60))(plVar1,param_7[1],0);
      if ((cVar2 == 'E') || (iVar6 = 0, cVar3 = cVar2, cVar2 == 'O')) {
        psVar7 = param_7 + 2;
        if (param_8 == psVar7) goto LAB_14006b1f8;
        cVar3 = (**(code **)(*plVar1 + 0x60))(plVar1,param_7[2],0);
        iVar6 = (int)cVar2;
      }
      uVar12 = (uint7)(uVar11 >> 8);
      local_60 = CONCAT71(uVar12,cVar8);
      param_7 = psVar7 + 1;
      local_68 = plVar10;
      (**(code **)(*param_2 + 0x10))
                (&local_58,param_2,&local_68,param_4,param_5,param_6,(int)cVar3,iVar6);
      uVar11 = (ulonglong)uVar12 << 8;
      uVar9 = local_50;
      plVar10 = local_58;
      cVar8 = (char)local_50;
      if (param_8 == param_7) goto LAB_14006b1f8;
    }
    if (cVar8 == '\0') {
      sVar4 = *param_7;
      psVar7 = (short *)plVar10[5];
      if (psVar7 < (short *)plVar10[6]) {
        *psVar7 = sVar4;
        plVar10[5] = (longlong)(psVar7 + 1);
      }
      else {
        sVar4 = (**(code **)(*plVar10 + 0x68))(plVar10,sVar4);
      }
      uVar9 = (ulonglong)(sVar4 == -1);
    }
    cVar8 = (char)uVar9;
  }
LAB_14006b1f8:
  *param_1 = plVar10;
  param_1[1] = CONCAT71((int7)(uVar11 >> 8),cVar8);
  return param_1;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t, tm
// const*, char, char) const

undefined8
std::time_put<>::put
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 param_4,
          undefined2 param_5,undefined8 param_6,char param_7,char param_8)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  (**(code **)(*param_2 + 0x10))
            (param_1,param_2,&local_18,param_4,param_5,param_6,(int)param_7,(int)param_8);
  return param_1;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&, wchar_t,
// tm const*, char, char) const

undefined8 *
std::time_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined8 param_5,tm *param_6,char param_7,char param_8)

{
  longlong *plVar1;
  undefined8 uVar2;
  longlong *plVar3;
  longlong *plVar4;
  longlong lVar5;
  ulonglong uVar6;
  __timepunct<wchar_t> *this;
  size_t sVar7;
  char cVar8;
  wchar_t local_140;
  short local_13e;
  short local_13c;
  undefined2 local_13a;
  wchar_t local_138 [128];
  
  plVar1 = (longlong *)*param_3;
  uVar2 = param_3[1];
  lVar5 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar3 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar5 * 8);
  if (plVar3 != (longlong *)0x0) {
    uVar6 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
    if ((uVar6 < *(ulonglong *)(*(longlong *)(param_4 + 0xd0) + 0x10)) &&
       (plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + uVar6 * 8),
       plVar4 != (longlong *)0x0)) {
      this = (__timepunct<wchar_t> *)
             __dynamic_cast(plVar4,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<wchar_t>::typeinfo,0);
      if (this != (__timepunct<wchar_t> *)0x0) {
        local_140 = (**(code **)(*plVar3 + 0x50))(plVar3);
        local_13e = (short)param_7;
        local_13c = 0;
        if (param_8 != '\0') {
          local_13e = (short)param_8;
          local_13a = 0;
          local_13c = (short)param_7;
        }
        cVar8 = (char)uVar2;
        __timepunct<wchar_t>::_M_put(this,local_138,0x80,&local_140,param_6);
        sVar7 = wcslen(local_138);
        if (cVar8 == '\0') {
          lVar5 = (**(code **)(*plVar1 + 0x60))(plVar1,local_138,(longlong)(int)sVar7);
          if ((int)sVar7 != lVar5) {
            cVar8 = '\x01';
          }
        }
        *param_1 = plVar1;
        *(char *)(param_1 + 1) = cVar8;
        return param_1;
      }
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::bad_alloc::what() const

char * std::bad_alloc::what(void)

{
  return "std::bad_alloc";
}



// std::ios::exceptions() const

undefined4 __thiscall std::ios::exceptions(ios *this)

{
  return *(undefined4 *)(this + 0x1c);
}



// std::ios::bad() const

uint __thiscall std::ios::bad(ios *this)

{
  return *(uint *)(this + 0x20) & 1;
}



// std::ios::eof() const

uint __thiscall std::ios::eof(ios *this)

{
  return *(uint *)(this + 0x20) >> 1 & 1;
}



// std::ios::tie() const

undefined8 __thiscall std::ios::tie(ios *this)

{
  return *(undefined8 *)(this + 0xd8);
}



// std::ios::fail() const

bool __thiscall std::ios::fail(ios *this)

{
  return ((byte)this[0x20] & 5) != 0;
}



// std::ios::fill() const

ulonglong __thiscall std::ios::fill(ios *this)

{
  ctype<char> *this_00;
  ulonglong uVar1;
  
  if (this[0xe1] != (ios)0x0) {
    return (ulonglong)(byte)this[0xe0];
  }
  this_00 = *(ctype<char> **)(this + 0xf0);
  if (this_00 != (ctype<char> *)0x0) {
    if (this_00[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this_00);
      uVar1 = 0x20;
      if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
        uVar1 = (**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
      }
    }
    else {
      uVar1 = (ulonglong)(byte)this_00[0x59];
    }
    this[0xe0] = SUB81(uVar1,0);
    this[0xe1] = (ios)0x1;
    return uVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::ios::good() const

undefined4 __thiscall std::ios::good(ios *this)

{
  return CONCAT31((int3)((uint)*(int *)(this + 0x20) >> 8),*(int *)(this + 0x20) == 0);
}



// std::ios::rdbuf() const

undefined8 __thiscall std::ios::rdbuf(ios *this)

{
  return *(undefined8 *)(this + 0xe8);
}



// std::ios::widen(char) const

ulonglong __thiscall std::ios::widen(ios *this,uint param_1)

{
  ctype<char> *this_00;
  ulonglong uVar1;
  
  this_00 = *(ctype<char> **)(this + 0xf0);
  if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (this_00[0x38] == (ctype<char>)0x0) {
    ctype<char>::_M_widen_init(this_00);
    uVar1 = (ulonglong)param_1;
    if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
                    // WARNING: Could not recover jumptable at 0x00014006b5c9. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this_00 + 0x30))(this_00,(int)(char)(byte)param_1);
      return uVar1;
    }
  }
  else {
    uVar1 = (ulonglong)(byte)this_00[(ulonglong)(byte)param_1 + 0x39];
  }
  return uVar1;
}



// std::ios::narrow(char, char) const

uint __thiscall std::ios::narrow(ios *this,uint param_2_00,char param_2)

{
  byte bVar1;
  longlong *plVar2;
  uint uVar3;
  byte bVar4;
  
  plVar2 = *(longlong **)(this + 0xf0);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  bVar4 = (byte)param_2_00;
  bVar1 = *(byte *)((longlong)plVar2 + (ulonglong)bVar4 + 0x139);
  uVar3 = (uint)bVar1;
  if (bVar1 == 0) {
    if (*(code **)(*plVar2 + 0x40) != ctype<char>::do_narrow) {
      param_2_00 = (**(code **)(*plVar2 + 0x40))(plVar2,(int)(char)bVar4,(int)param_2);
    }
    uVar3 = param_2_00;
    if (param_2 != (char)param_2_00) {
      *(char *)((longlong)plVar2 + (ulonglong)bVar4 + 0x139) = (char)param_2_00;
    }
  }
  return uVar3;
}



// std::ios::rdstate() const

undefined4 __thiscall std::ios::rdstate(ios *this)

{
  return *(undefined4 *)(this + 0x20);
}



// std::ios::operator void*() const

ios * __thiscall std::ios::operator_cast_to_void_(ios *this)

{
  if (((byte)this[0x20] & 5) != 0) {
    this = (ios *)0x0;
  }
  return this;
}



// std::ios::operator bool() const

bool __thiscall std::ios::operator_cast_to_bool(ios *this)

{
  return ((byte)this[0x20] & 5) == 0;
}



// std::ios::TEMPNAMEPLACEHOLDERVALUE() const

bool __thiscall std::ios::operator!(ios *this)

{
  return ((byte)this[0x20] & 5) != 0;
}



// std::wios::exceptions() const

undefined4 __thiscall std::wios::exceptions(wios *this)

{
  return *(undefined4 *)(this + 0x1c);
}



// std::wios::bad() const

uint __thiscall std::wios::bad(wios *this)

{
  return *(uint *)(this + 0x20) & 1;
}



// std::wios::eof() const

uint __thiscall std::wios::eof(wios *this)

{
  return *(uint *)(this + 0x20) >> 1 & 1;
}



// std::wios::tie() const

undefined8 __thiscall std::wios::tie(wios *this)

{
  return *(undefined8 *)(this + 0xd8);
}



// std::wios::fail() const

bool __thiscall std::wios::fail(wios *this)

{
  return ((byte)this[0x20] & 5) != 0;
}



// std::wios::fill() const

ulonglong __thiscall std::wios::fill(wios *this)

{
  longlong *plVar1;
  ulonglong uVar2;
  
  if (this[0xe2] != (wios)0x0) {
    return (ulonglong)*(ushort *)(this + 0xe0);
  }
  plVar1 = *(longlong **)(this + 0xf0);
  if (plVar1 != (longlong *)0x0) {
    uVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,0x20);
    this[0xe2] = (wios)0x1;
    *(short *)(this + 0xe0) = (short)uVar2;
    return uVar2;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wios::good() const

undefined4 __thiscall std::wios::good(wios *this)

{
  return CONCAT31((int3)((uint)*(int *)(this + 0x20) >> 8),*(int *)(this + 0x20) == 0);
}



// std::wios::rdbuf() const

undefined8 __thiscall std::wios::rdbuf(wios *this)

{
  return *(undefined8 *)(this + 0xe8);
}



// std::wios::widen(char) const

void __thiscall std::wios::widen(wios *this,char param_1)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(this + 0xf0);
  if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014006b77e. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)(*plVar1 + 0x50))(plVar1,(int)param_1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wios::narrow(wchar_t, char) const

void __thiscall std::wios::narrow(wios *this,undefined2 param_1,char param_2)

{
  longlong *plVar1;
  
  plVar1 = *(longlong **)(this + 0xf0);
  if (plVar1 != (longlong *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014006b7b2. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)(*plVar1 + 0x60))(plVar1,param_1,(int)param_2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wios::rdstate() const

undefined4 __thiscall std::wios::rdstate(wios *this)

{
  return *(undefined4 *)(this + 0x20);
}



// std::wios::operator void*() const

wios * __thiscall std::wios::operator_cast_to_void_(wios *this)

{
  if (((byte)this[0x20] & 5) != 0) {
    this = (wios *)0x0;
  }
  return this;
}



// std::wios::operator bool() const

bool __thiscall std::wios::operator_cast_to_bool(wios *this)

{
  return ((byte)this[0x20] & 5) == 0;
}



// std::wios::TEMPNAMEPLACEHOLDERVALUE() const

bool __thiscall std::wios::operator!(wios *this)

{
  return ((byte)this[0x20] & 5) != 0;
}



// std::exception::what() const

char * std::exception::what(void)

{
  return "std::exception";
}



// WARNING: Control flow encountered bad instruction data
// WARNING: Instruction at (ram,0x0001400c5e3e) overlaps instruction at (ram,0x0001400c5e3d)
// 
// WARNING: Removing unreachable block (ram,0x0001400c5d96)
// WARNING: Removing unreachable block (ram,0x0001400c5d98)
// WARNING: Removing unreachable block (ram,0x0001400c5d9b)
// WARNING: Removing unreachable block (ram,0x0001400c5db3)
// WARNING: Removing unreachable block (ram,0x0001400c5e2b)
// WARNING: Removing unreachable block (ram,0x0001400c5dc2)
// WARNING: Removing unreachable block (ram,0x0001400c5dca)
// WARNING: Removing unreachable block (ram,0x0001400c5dd2)
// WARNING: Removing unreachable block (ram,0x0001400c5dd4)
// WARNING: Removing unreachable block (ram,0x0001400c5e3d)
// WARNING: Removing unreachable block (ram,0x0001400c5e08)
// WARNING: Removing unreachable block (ram,0x0001400c5d2d)
// WARNING: Removing unreachable block (ram,0x0001400c60c5)
// WARNING: Removing unreachable block (ram,0x0001400c5f54)
// WARNING: Removing unreachable block (ram,0x0001400c5f56)
// WARNING: Removing unreachable block (ram,0x0001400c5fbb)
// WARNING: Removing unreachable block (ram,0x0001400c5fbd)
// WARNING: Removing unreachable block (ram,0x0001400c5fbf)
// WARNING: Removing unreachable block (ram,0x0001400c6028)
// WARNING: Removing unreachable block (ram,0x0001400c6080)
// WARNING: Removing unreachable block (ram,0x0001400c6095)
// WARNING: Removing unreachable block (ram,0x0001400c6109)
// WARNING: Removing unreachable block (ram,0x0001400c6097)
// WARNING: Removing unreachable block (ram,0x0001400c60fc)
// WARNING: Removing unreachable block (ram,0x0001400c6099)
// WARNING: Removing unreachable block (ram,0x0001400c609b)
// WARNING: Removing unreachable block (ram,0x0001400c5f7b)
// WARNING: Removing unreachable block (ram,0x0001400c5f80)
// WARNING: Removing unreachable block (ram,0x0001400c5fee)
// WARNING: Removing unreachable block (ram,0x0001400c5fe5)
// WARNING: Removing unreachable block (ram,0x0001400c5fe7)
// WARNING: Removing unreachable block (ram,0x0001400c605e)
// WARNING: Removing unreachable block (ram,0x0001400c6060)
// WARNING: Removing unreachable block (ram,0x0001400c5fec)
// WARNING: Removing unreachable block (ram,0x0001400c5ff5)
// WARNING: Removing unreachable block (ram,0x0001400c5ffa)
// WARNING: Removing unreachable block (ram,0x0001400c5fff)
// WARNING: Removing unreachable block (ram,0x0001400c6063)
// WARNING: Removing unreachable block (ram,0x0001400c606e)
// WARNING: Removing unreachable block (ram,0x0001400c6071)
// WARNING: Removing unreachable block (ram,0x0001400c6073)
// WARNING: Removing unreachable block (ram,0x0001400c60e5)
// WARNING: Removing unreachable block (ram,0x0001400c5d94)
// WARNING: Removing unreachable block (ram,0x0001400c604c)
// WARNING: Removing unreachable block (ram,0x0001400c604e)
// WARNING: Removing unreachable block (ram,0x0001400c6050)
// WARNING: Removing unreachable block (ram,0x0001400c5e86)
// WARNING: Removing unreachable block (ram,0x0001400c5e88)
// WARNING: Removing unreachable block (ram,0x0001400c6088)
// WARNING: Removing unreachable block (ram,0x0001400c608a)
// WARNING: Removing unreachable block (ram,0x0001400c60b3)
// WARNING: Removing unreachable block (ram,0x0001400c5ea4)
// WARNING: Removing unreachable block (ram,0x0001400c6098)
// WARNING: Removing unreachable block (ram,0x0001400c5f9e)
// WARNING: Removing unreachable block (ram,0x0001400c600c)
// WARNING: Removing unreachable block (ram,0x0001400c5fa3)
// WARNING: Removing unreachable block (ram,0x0001400c5fb1)
// WARNING: Removing unreachable block (ram,0x0001400c601d)
// WARNING: Removing unreachable block (ram,0x0001400c5e83)
// WARNING: Removing unreachable block (ram,0x0001400c5e85)
// WARNING: Removing unreachable block (ram,0x0001400c5ebc)
// WARNING: Removing unreachable block (ram,0x0001400c5e9c)
// WARNING: Removing unreachable block (ram,0x0001400c5eb4)
// WARNING: Removing unreachable block (ram,0x0001400c5ec1)
// WARNING: Removing unreachable block (ram,0x0001400c5f1d)
// WARNING: Removing unreachable block (ram,0x0001400c607b)
// WARNING: Removing unreachable block (ram,0x0001400c607d)
// WARNING: Removing unreachable block (ram,0x0001400c602d)
// WARNING: Removing unreachable block (ram,0x0001400c602b)
// WARNING: Removing unreachable block (ram,0x0001400c5fd6)
// WARNING: Removing unreachable block (ram,0x0001400c5fd8)
// WARNING: Removing unreachable block (ram,0x0001400c5f5d)
// WARNING: Removing unreachable block (ram,0x0001400c5f62)
// WARNING: Removing unreachable block (ram,0x0001400c5fd4)
// WARNING: Removing unreachable block (ram,0x0001400c604a)
// WARNING: Removing unreachable block (ram,0x0001400c6124)
// WARNING: Removing unreachable block (ram,0x0001400c60c3)
// WARNING: Removing unreachable block (ram,0x0001400c6036)
// WARNING: Removing unreachable block (ram,0x0001400c5e0d)
// WARNING: Removing unreachable block (ram,0x0001400c5e44)
// WARNING: Removing unreachable block (ram,0x0001400c5e24)
// WARNING: Removing unreachable block (ram,0x0001400c5e46)
// WARNING: Removing unreachable block (ram,0x0001400c5e48)
// WARNING: Removing unreachable block (ram,0x0001400c5e68)
// WARNING: Removing unreachable block (ram,0x0001400c609e)
// WARNING: Removing unreachable block (ram,0x0001400c60a4)
// WARNING: Removing unreachable block (ram,0x0001400c611f)
// WARNING: Removing unreachable block (ram,0x0001400c60b6)
// WARNING: Removing unreachable block (ram,0x0001400c60bb)
// WARNING: Removing unreachable block (ram,0x0001400c60c4)
// WARNING: Removing unreachable block (ram,0x0001400c60d0)
// WARNING: Removing unreachable block (ram,0x0001400c60f2)
// WARNING: Removing unreachable block (ram,0x0001400c60d2)
// WARNING: Removing unreachable block (ram,0x0001400c613f)
// WARNING: Removing unreachable block (ram,0x0001400c5f99)
// WARNING: Removing unreachable block (ram,0x0001400c6016)
// WARNING: Removing unreachable block (ram,0x0001400c612d)
// WARNING: Removing unreachable block (ram,0x0001400c60eb)
// WARNING: Removing unreachable block (ram,0x0001400c6152)
// WARNING: Removing unreachable block (ram,0x0001400c60e8)
// WARNING: Removing unreachable block (ram,0x0001400c6074)
// WARNING: Removing unreachable block (ram,0x0001400c607a)
// std::istreambuf_iterator<char, std::char_traits<char> > std::money_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract<false>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// std::string&) const

undefined8
std::money_get<>::_M_extract<false>
          (undefined8 param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5)

{
  int *piVar1;
  undefined4 uVar2;
  undefined8 *puVar3;
  longlong lVar4;
  istreambuf_iterator<> *piVar5;
  string *psVar6;
  code *pcVar7;
  char cVar8;
  ulonglong uVar9;
  undefined1 *puVar10;
  undefined1 *puVar11;
  undefined1 *puVar12;
  undefined1 *puVar13;
  int iVar14;
  int iVar15;
  uint uVar16;
  uint uVar17;
  byte bVar27;
  longlong lVar18;
  longlong lVar19;
  byte *pbVar20;
  char *pcVar21;
  void *pvVar22;
  istreambuf_iterator<> *piVar23;
  ulonglong uVar24;
  __moneypunct_cache<char,false> *this;
  undefined8 uVar26;
  istreambuf_iterator<> iVar29;
  istreambuf_iterator<> *_Buf;
  istreambuf_iterator<> *piVar28;
  undefined1 uVar30;
  uint *puVar31;
  int iVar32;
  undefined1 *puVar33;
  undefined1 *puVar34;
  undefined1 *puVar38;
  undefined8 *puVar39;
  undefined8 *puVar40;
  undefined8 *puVar41;
  ulonglong uVar42;
  longlong *plVar43;
  undefined1 *puVar44;
  code *pcVar45;
  istreambuf_iterator<> *piVar46;
  undefined4 *puVar47;
  byte bVar48;
  undefined2 in_CS;
  bool bVar49;
  bool bVar50;
  char cVar51;
  bool bVar52;
  undefined1 auStack_108 [32];
  char local_e8 [16];
  string *local_d8;
  ulonglong **local_d0;
  undefined1 *local_c8;
  undefined1 *local_c0;
  undefined8 local_b8;
  longlong local_b0;
  undefined4 *local_a8;
  char local_9d;
  undefined4 local_9c;
  undefined1 *local_98;
  char local_8e;
  bool local_8d;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  undefined8 uStack_70;
  undefined1 local_5d;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  byte *pbVar25;
  undefined1 *puVar35;
  undefined1 *puVar36;
  undefined1 *puVar37;
  
  puVar33 = auStack_108;
  local_78 = *param_3;
  uStack_70 = param_3[1];
  local_88 = *param_4;
  uStack_80 = param_4[1];
  lVar18 = locale::id::_M_id((id *)&ctype<char>::id);
  local_b0 = *(longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar18 * 8);
  if (local_b0 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar18 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  piVar46 = (istreambuf_iterator<> *)
            (*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar18 * 8);
  puVar44 = *(undefined1 **)piVar46;
  if (puVar44 == (undefined1 *)0x0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<char,false>)0x0;
    *(undefined2 *)(this + 0x21) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,false>)0x0;
    __moneypunct_cache<char,false>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar18);
    puVar44 = *(undefined1 **)piVar46;
  }
  local_c0 = puVar44 + 100;
  if (*(longlong *)(puVar44 + 0x40) == 0) {
    local_8d = false;
  }
  else {
    local_8d = *(longlong *)(puVar44 + 0x50) != 0;
  }
  local_d8 = (string *)local_50;
  local_58 = std::string::_S_construct(0,'\0');
  if (puVar44[0x20] != '\0') {
    std::string::reserve((string *)&local_58,0x20);
  }
  local_98 = &local_5d;
  local_50[0] = std::string::_S_construct(0,'\0');
  _Buf = (istreambuf_iterator<> *)local_d8;
  std::string::reserve(local_d8,0x20);
  local_9d = 0;
  lVar18 = 0;
  uVar42 = 0;
  local_c8 = puVar44 + 0x65;
  local_9c = 0;
  local_5c = *(undefined4 *)(puVar44 + 0x60);
  local_a8 = &local_5c;
  local_b8 = 0;
  local_8e = 0;
  local_d0 = &local_58;
  do {
    iVar32 = (int)lVar18;
    if (4 < *(byte *)(*(longlong *)(puVar33 + 0x60) + lVar18)) goto LAB_14006c2d5;
    bVar48 = *(byte *)(*(longlong *)(puVar33 + 0x60) + lVar18);
    puVar31 = &switchD_14006b99d::caseD_5;
    lVar19 = (longlong)(int)(&switchD_14006b99d::caseD_5)[bVar48];
    bVar52 = SCARRY8(lVar19,0x1400c5cc0);
    pbVar20 = (byte *)((longlong)&switchD_14006b99d::caseD_5 + lVar19);
    puVar38 = puVar33;
    puVar10 = puVar33;
    puVar11 = puVar33;
    puVar12 = puVar33;
    puVar13 = puVar33;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
    switch(bVar48) {
    case 0:
switchD_14006b99d_caseD_0:
      bVar48 = 1;
      goto LAB_14006bb6e;
    case 1:
switchD_14006b99d_caseD_1:
      puVar33 = puVar13;
      *(undefined8 *)(puVar33 + -8) = 0x14006bb63;
      uVar24 = istreambuf_iterator<>::equal
                         ((istreambuf_iterator<> *)(puVar33 + 0x90),(longlong *)(puVar33 + 0x80));
      if ((char)uVar24 == '\0') {
        *(undefined8 *)(puVar33 + -8) = 0x14006c2f8;
        uVar24 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)(puVar33 + 0x90));
        if ((*(byte *)(*(longlong *)(*(longlong *)(puVar33 + 0x58) + 0x30) + (uVar24 & 0xff) * 2) &
            0x20) != 0) {
          *(undefined **)(puVar33 + -8) = &UNK_14006c31b;
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0
                    (*(longlong **)(puVar33 + 0x90));
          *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
          goto switchD_14006b99d_caseD_0;
        }
      }
      bVar48 = 0;
LAB_14006bb6e:
      if (lVar18 == 3) goto LAB_14006bb78;
      uVar24 = (ulonglong)*(uint *)(puVar33 + 0x98);
      piVar46 = *(istreambuf_iterator<> **)(puVar33 + 0x90);
      bVar50 = *(uint *)(puVar33 + 0x98) == 0xffffffff;
      bVar52 = bVar50;
      if ((piVar46 != (istreambuf_iterator<> *)0x0) && (bVar50)) goto LAB_14006c0b6;
      while( true ) {
        _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x80);
        bVar49 = *(int *)(puVar33 + 0x88) == -1;
        if ((_Buf != (istreambuf_iterator<> *)0x0) &&
           ((bVar49 && (bVar49 = false, *(ulonglong *)(_Buf + 0x18) <= *(ulonglong *)(_Buf + 0x10)))
           )) {
          pcVar45 = *(code **)(*(longlong *)_Buf + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006c116;
          iVar14 = (*pcVar45)();
          bVar49 = iVar14 == -1;
          if (bVar49) {
            *(undefined8 *)(puVar33 + 0x80) = 0;
          }
        }
        if (bVar50 == bVar49) break;
        piVar46 = *(istreambuf_iterator<> **)(puVar33 + 0x90);
        if ((piVar46 == (istreambuf_iterator<> *)0x0) || (!bVar52)) {
LAB_14006c076:
          if ((*(byte *)(*(longlong *)(*(longlong *)(puVar33 + 0x58) + 0x30) + (uVar24 & 0xff) * 2)
              & 0x20) == 0) break;
          piVar46 = *(istreambuf_iterator<> **)(puVar33 + 0x90);
          pbVar20 = *(byte **)(piVar46 + 0x10);
          if (pbVar20 < *(byte **)(piVar46 + 0x18)) goto LAB_14006c0a3;
          pcVar45 = *(code **)(*(longlong *)piVar46 + 0x50);
          *(undefined8 *)(puVar33 + -8) = 0x14006c171;
          (*pcVar45)(piVar46);
          *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
        }
        else {
          pbVar20 = *(byte **)(piVar46 + 0x10);
          if (*(byte **)(piVar46 + 0x18) <= pbVar20) {
            pcVar45 = *(code **)(*(longlong *)piVar46 + 0x48);
            *(undefined8 *)(puVar33 + -8) = 0x14006c627;
            _Buf = piVar46;
            uVar16 = (*pcVar45)();
            uVar24 = (ulonglong)uVar16;
            if (uVar16 == 0xffffffff) {
              *(undefined8 *)(puVar33 + 0x90) = 0;
            }
            goto LAB_14006c076;
          }
          _Buf = (istreambuf_iterator<> *)(ulonglong)*pbVar20;
          if ((*(byte *)(*(longlong *)(*(longlong *)(puVar33 + 0x58) + 0x30) + (longlong)_Buf * 2) &
              0x20) == 0) break;
LAB_14006c0a3:
          *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
          *(byte **)(piVar46 + 0x10) = pbVar20 + 1;
        }
LAB_14006c0b6:
        uVar24 = 0xffffffff;
        bVar50 = false;
        bVar52 = true;
        if (*(ulonglong *)(piVar46 + 0x18) <= *(ulonglong *)(piVar46 + 0x10)) {
          pcVar45 = *(code **)(*(longlong *)piVar46 + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006c0db;
          iVar14 = (*pcVar45)(piVar46);
          bVar50 = iVar14 == -1;
          if (bVar50) {
            *(undefined8 *)(puVar33 + 0x90) = 0;
          }
          uVar24 = 0xffffffff;
          bVar52 = true;
        }
      }
      break;
    case 2:
switchD_14006b99d_caseD_2:
      puVar33 = puVar12;
      if ((((*(byte *)(*(longlong *)(puVar33 + 0x130) + 0x19) & 2) == 0) &&
          (*(ulonglong *)(puVar33 + 0x50) < 2)) && (iVar32 != 0)) {
        if (lVar18 == 1) {
          if ((puVar33[0x7b] != '\0') || ((puVar33[0xac] == '\x03' || (puVar33[0xae] == '\x01'))))
          goto LAB_14006c1b8;
        }
        else {
          if (lVar18 != 2) goto LAB_14006ba2b;
          if ((puVar33[0xaf] == '\x04') || ((puVar33[0xaf] == '\x03' && (puVar33[0x7b] != '\0'))))
          goto LAB_14006c1b8;
        }
      }
      else {
LAB_14006c1b8:
        piVar5 = *(istreambuf_iterator<> **)(puVar44 + 0x30);
        piVar46 = (istreambuf_iterator<> *)0x0;
        plVar43 = (longlong *)(puVar33 + 0x80);
        piVar28 = (istreambuf_iterator<> *)(puVar33 + 0x90);
        while( true ) {
          *(undefined8 *)(puVar33 + -8) = 0x14006c211;
          _Buf = piVar28;
          uVar24 = istreambuf_iterator<>::equal(piVar28,plVar43);
          if (((char)uVar24 == '\x01') || (piVar5 <= piVar46)) break;
          _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x90);
          iVar14 = *(int *)(puVar33 + 0x98);
          if ((_Buf == (istreambuf_iterator<> *)0x0) || (iVar14 != -1)) {
LAB_14006c1d0:
            if (piVar46[*(longlong *)(puVar44 + 0x28)] != SUB41(iVar14,0)) goto LAB_14006c258;
            _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x90);
            piVar23 = *(istreambuf_iterator<> **)(_Buf + 0x10);
            if (piVar23 < *(istreambuf_iterator<> **)(_Buf + 0x18)) goto LAB_14006c1ef;
            pcVar45 = *(code **)(*(longlong *)_Buf + 0x50);
            *(undefined8 *)(puVar33 + -8) = 0x14006c2c6;
            (*pcVar45)();
          }
          else {
            piVar23 = *(istreambuf_iterator<> **)(_Buf + 0x10);
            if (*(istreambuf_iterator<> **)(_Buf + 0x18) <= piVar23) {
              pcVar45 = *(code **)(*(longlong *)_Buf + 0x48);
              *(undefined8 *)(puVar33 + -8) = 0x14006c66f;
              iVar14 = (*pcVar45)();
              if (iVar14 == -1) {
                *(undefined8 *)(puVar33 + 0x90) = 0;
              }
              goto LAB_14006c1d0;
            }
            if (*piVar23 != piVar46[*(longlong *)(puVar44 + 0x28)]) goto LAB_14006c258;
LAB_14006c1ef:
            *(istreambuf_iterator<> **)(_Buf + 0x10) = piVar23 + 1;
          }
          *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
          piVar46 = piVar46 + 1;
        }
        if (piVar46 != piVar5) {
LAB_14006c258:
          if (piVar46 == (istreambuf_iterator<> *)0x0) {
            uVar16 = *(uint *)(*(longlong *)(puVar33 + 0x130) + 0x18);
            *(uint *)(puVar33 + 0x7c) = uVar16;
            bVar48 = ((byte)(uVar16 >> 9) ^ 1) & 1;
            break;
          }
          goto LAB_14006bac0;
        }
      }
LAB_14006c2d5:
      bVar48 = 1;
      break;
    case 3:
switchD_14006b99d_caseD_3:
      puVar33 = puVar11;
      if (*(longlong *)(puVar44 + 0x40) == 0) {
        if (*(longlong *)(puVar44 + 0x50) != 0) {
LAB_14006c388:
          piVar28 = (istreambuf_iterator<> *)(puVar33 + 0x90);
          *(undefined8 *)(puVar33 + -8) = 0x14006c393;
          _Buf = piVar28;
          uVar24 = istreambuf_iterator<>::equal(piVar28,(longlong *)(puVar33 + 0x80));
          if ((char)uVar24 == '\0') {
            *(undefined8 *)(puVar33 + -8) = 0x14006c49f;
            uVar24 = istreambuf_iterator<>::_M_get(piVar28);
            _Buf = piVar28;
            if (**(char **)(puVar44 + 0x48) == (char)uVar24) {
              _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x90);
              *(undefined8 *)(puVar33 + 0x50) = *(undefined8 *)(puVar44 + 0x50);
              *(undefined8 *)(puVar33 + -8) = 0x14006c4c1;
              _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)_Buf);
              puVar33[0x7a] = 1;
              bVar48 = 1;
              *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
              break;
            }
          }
          if ((*(longlong *)(puVar44 + 0x40) != 0) && (*(longlong *)(puVar44 + 0x50) == 0))
          goto LAB_14006c375;
        }
LAB_14006b9c6:
        bVar48 = puVar33[0x7b] ^ 1;
      }
      else {
        piVar28 = (istreambuf_iterator<> *)(puVar33 + 0x90);
        *(undefined8 *)(puVar33 + -8) = 0x14006c35b;
        _Buf = piVar28;
        uVar24 = istreambuf_iterator<>::equal(piVar28,(longlong *)(puVar33 + 0x80));
        if ((char)uVar24 == '\0') {
          *(undefined8 *)(puVar33 + -8) = 0x14006c45f;
          uVar24 = istreambuf_iterator<>::_M_get(piVar28);
          _Buf = piVar28;
          if (**(char **)(puVar44 + 0x38) == (char)uVar24) {
            _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x90);
            *(undefined8 *)(puVar33 + 0x50) = *(undefined8 *)(puVar44 + 0x40);
            *(undefined8 *)(puVar33 + -8) = 0x14006c481;
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)_Buf);
            *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
            bVar48 = 1;
            break;
          }
        }
        if (*(longlong *)(puVar44 + 0x50) != 0) goto LAB_14006c388;
        if (*(longlong *)(puVar44 + 0x40) == 0) goto LAB_14006b9c6;
LAB_14006c375:
        puVar33[0x7a] = 1;
        bVar48 = 1;
      }
      break;
    case 4:
switchD_14006b99d_caseD_4:
      puVar33 = puVar10;
      plVar43 = *(longlong **)(puVar33 + 0x90);
      piVar46 = (istreambuf_iterator<> *)(ulonglong)*(uint *)(puVar33 + 0x98);
      while( true ) {
        bVar50 = (int)piVar46 == -1;
        bVar52 = bVar50;
        if (((plVar43 != (longlong *)0x0) && (bVar50)) &&
           (bVar52 = false, (ulonglong)plVar43[3] <= (ulonglong)plVar43[2])) {
          pcVar45 = *(code **)(*plVar43 + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006bedb;
          iVar14 = (*pcVar45)(plVar43);
          bVar52 = iVar14 == -1;
          if (bVar52) {
            *(undefined8 *)(puVar33 + 0x90) = 0;
          }
        }
        _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x80);
        bVar49 = *(int *)(puVar33 + 0x88) == -1;
        if (((_Buf != (istreambuf_iterator<> *)0x0) && (bVar49)) &&
           (bVar49 = false, *(ulonglong *)(_Buf + 0x18) <= *(ulonglong *)(_Buf + 0x10))) {
          pcVar45 = *(code **)(*(longlong *)_Buf + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006bf16;
          iVar14 = (*pcVar45)();
          bVar49 = iVar14 == -1;
          if (bVar49) {
            *(undefined8 *)(puVar33 + 0x80) = 0;
          }
        }
        if (bVar52 == bVar49) break;
        plVar43 = *(longlong **)(puVar33 + 0x90);
        if ((plVar43 != (longlong *)0x0) && (bVar50)) {
          if ((byte *)plVar43[2] < (byte *)plVar43[3]) {
            piVar46 = (istreambuf_iterator<> *)(ulonglong)*(byte *)plVar43[2];
          }
          else {
            pcVar45 = *(code **)(*plVar43 + 0x48);
            *(undefined8 *)(puVar33 + -8) = 0x14006c4e6;
            uVar16 = (*pcVar45)();
            piVar46 = (istreambuf_iterator<> *)(ulonglong)uVar16;
            if (uVar16 == 0xffffffff) {
              *(undefined8 *)(puVar33 + 0x90) = 0;
            }
          }
        }
        _Buf = *(istreambuf_iterator<> **)(puVar33 + 0x40);
        cVar51 = (char)piVar46;
        *(undefined8 *)(puVar33 + -8) = 0x14006bdd8;
        pvVar22 = memchr(_Buf,(int)cVar51,10);
        iVar14 = (int)uVar42;
        if (pvVar22 == (void *)0x0) {
          if (puVar44[0x21] == cVar51) {
            if (puVar33[0x6b] != '\0') goto LAB_14006bf70;
            _Buf = (istreambuf_iterator<> *)(ulonglong)*(uint *)(puVar44 + 0x58);
            if ((int)*(uint *)(puVar44 + 0x58) < 1) break;
            *(int *)(puVar33 + 0x6c) = iVar14;
            uVar42 = 0;
            puVar33[0x6b] = 1;
          }
          else {
            if ((puVar44[0x20] == '\0') || (puVar44[0x22] != cVar51)) break;
            if (puVar33[0x6b] != '\0') {
LAB_14006bf70:
              bVar48 = puVar33[0x6b];
              goto LAB_14006bf76;
            }
            if (iVar14 == 0) {
              bVar48 = 0;
              goto LAB_14006bf76;
            }
            lVar19 = *(longlong *)(puVar33 + 0xb0);
            lVar4 = *(longlong *)(lVar19 + -0x18);
            uVar24 = lVar4 + 1;
            if (*(ulonglong *)(lVar19 + -0x10) < uVar24) {
LAB_14006be45:
              *(undefined8 *)(puVar33 + -8) = 0x14006be52;
              std::string::reserve(*(string **)(puVar33 + 0x38),uVar24);
            }
            else {
              if (_CRT_MT == 0) {
                iVar14 = *(int *)(lVar19 + -8);
              }
              else {
                iVar14 = *(int *)(lVar19 + -8);
              }
              if (0 < iVar14) goto LAB_14006be45;
            }
            *(char *)(*(longlong *)(puVar33 + 0xb0) +
                     *(longlong *)(*(longlong *)(puVar33 + 0xb0) + -0x18)) = (char)uVar42;
            lVar19 = *(longlong *)(puVar33 + 0xb0);
            uVar42 = 0;
            *(undefined4 *)(lVar19 + -8) = 0;
            *(ulonglong *)(lVar19 + -0x18) = uVar24;
            *(undefined1 *)(lVar19 + 1 + lVar4) = 0;
          }
        }
        else {
          uVar30 = money_base::_S_atoms[(longlong)pvVar22 - *(longlong *)(puVar33 + 0x48)];
          lVar19 = *(longlong *)(puVar33 + 0xb8);
          lVar4 = *(longlong *)(lVar19 + -0x18);
          uVar24 = lVar4 + 1;
          if (*(ulonglong *)(lVar19 + -0x10) < uVar24) {
LAB_14006bd07:
            *(undefined8 *)(puVar33 + -8) = 0x14006bd14;
            std::string::reserve(*(string **)(puVar33 + 0x30),uVar24);
          }
          else {
            if (_CRT_MT == 0) {
              iVar15 = *(int *)(lVar19 + -8);
            }
            else {
              iVar15 = *(int *)(lVar19 + -8);
            }
            if (0 < iVar15) goto LAB_14006bd07;
          }
          uVar42 = (ulonglong)(iVar14 + 1);
          *(undefined1 *)
           (*(longlong *)(puVar33 + 0xb8) + *(longlong *)(*(longlong *)(puVar33 + 0xb8) + -0x18)) =
               uVar30;
          lVar19 = *(longlong *)(puVar33 + 0xb8);
          *(undefined4 *)(lVar19 + -8) = 0;
          *(ulonglong *)(lVar19 + -0x18) = uVar24;
          *(undefined1 *)(lVar19 + 1 + lVar4) = 0;
        }
        plVar43 = *(longlong **)(puVar33 + 0x90);
        if ((ulonglong)plVar43[2] < (ulonglong)plVar43[3]) {
          plVar43[2] = plVar43[2] + 1;
        }
        else {
          pcVar45 = *(code **)(*plVar43 + 0x50);
          *(undefined8 *)(puVar33 + -8) = 0x14006bf5a;
          (*pcVar45)(plVar43);
        }
        *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
        piVar46 = (istreambuf_iterator<> *)0xffffffff;
      }
      bVar48 = 1;
LAB_14006bf76:
      if (*(longlong *)(*(longlong *)(puVar33 + 0xb8) + -0x18) == 0) goto LAB_14006bf89;
      break;
    default:
      do {
        if (bVar52) {
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d24) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
          cVar51 = 'H';
          s_random_device__rdseed_failed_1400c5d1a[10] = 'H';
          bVar27 = (byte)((ulonglong)pbVar20 >> 8);
          iVar29 = SUB81((ulonglong)_Buf >> 8,0);
          out(*puVar44,0x5cc0);
          bVar48 = *(byte *)(longlong)(int)(uint)pbVar20;
          cVar8 = bVar27 - bVar48;
          if (bVar48 <= bVar27) {
            out(*(undefined4 *)(puVar44 + 1),0x5cc0);
            out(puVar44[5],0x5cc0);
            s_random_device__rdseed_failed_1400c5d1a[10] = cVar51;
            *pbVar20 = *pbVar20 + (char)pbVar20;
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          if (cVar8 == '\0') {
            _Buf[0x73] = (istreambuf_iterator<>)((byte)_Buf[0x73] & (byte)iVar29);
            bRam000000014035d479 = bRam000000014035d479 & bVar27;
            s_random_device__rdseed_failed_1400c5d1a[10] = cVar51;
          }
          else {
            if ((POPCOUNT(cVar8) & 1U) == 0) {
                    // WARNING: Bad instruction - Truncating control flow here
              halt_baddata();
            }
            *_Buf = (istreambuf_iterator<>)((char)*_Buf - (char)iVar29);
            s_random_device__rdseed_failed_1400c5d1a[10] = cVar51;
            *pbVar20 = *pbVar20 & (byte)iVar29;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
            if (*pbVar20 != 0) {
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                    // WARNING: Bad instruction - Truncating control flow here
              halt_baddata();
            }
            puVar38 = (undefined1 *)(ulonglong)(uint)(*(int *)(uVar42 + 0x68) * 0x20736920);
            pbVar20 = (byte *)(ulonglong)((uint)pbVar20 & 0x29757a);
          }
          bVar48 = (byte)((ulonglong)pbVar20 >> 8);
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
          s_random_device__rdseed_failed_1400c5d1a[7] = bVar48 + 'd';
          if (bVar48 < 0x9c) {
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          uVar16 = *(uint *)(piVar46 + 0x73);
          uVar42 = (ulonglong)uVar16;
          iVar32 = *(int *)(puVar44 + 0x68);
          puVar47 = *(undefined4 **)(puVar38 + 8);
          pcVar45 = (code *)(puVar44 + 2);
          out(puVar44[1],0x5cc0);
          *pbVar20 = *pbVar20 & (byte)iVar29;
          if (*pbVar20 != 0) {
            uVar30 = in(0x5cc0);
            *(undefined1 *)puVar47 = uVar30;
                    // WARNING: Bad instruction - Truncating control flow here
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
            halt_baddata();
          }
          puVar39 = (undefined8 *)(ulonglong)(uint)(*(int *)(uVar42 + 0x68) * 0x20736920);
          uVar17 = (uint)pbVar20 & 0x2029757a;
          pbVar25 = (byte *)(ulonglong)uVar17;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
          uVar24 = (ulonglong)(uint)(iVar32 * 0x74613a3a);
          if (0x6968741f < uVar17) {
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          if ((POPCOUNT(uVar17 + 0x96978be0 & 0xff) & 1U) != 0) {
            *_Buf = (istreambuf_iterator<>)((char)*_Buf - (char)iVar29);
            *pbVar25 = *pbVar25 & (byte)iVar29;
            if (*pbVar25 != 0) {
                    // WARNING: Bad instruction - Truncating control flow here
              halt_baddata();
            }
                    // WARNING: Bad instruction - Truncating control flow here
            halt_baddata();
          }
          bVar27 = (byte)(uVar17 >> 8);
          bVar48 = (byte)(uVar16 >> 8);
          if ((byte)iVar29 < (byte)_Buf[0x6e]) {
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
            s_random_device__rdseed_failed_1400c5d1a[7] = bVar27 + 'd';
            bVar52 = false;
            bVar50 = false;
                    // WARNING: Bad instruction - Truncating control flow here
            if (0x9b < bVar27) {
code_r0x0001400c6084:
              bVar48 = (byte)((uint)*(undefined4 *)((longlong)puVar47 + 0x73) >> 8);
code_r0x0001400c6087:
              if (bVar52) {
                if (!bVar50) {
                  *(uint *)pbVar25 = *(int *)pbVar25 - uVar17;
code_r0x0001400c60ff:
                  *pbVar25 = *pbVar25 + (char)pbVar25;
                    // WARNING: Could not recover jumptable at 0x0001400c6107. Too many branches
                    // WARNING: Treating indirect jump as call
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                  uVar26 = (*(code *)(ulonglong)*(uint *)(pbVar25 + -0x7f000542))();
                  return uVar26;
                }
                goto code_r0x0001400c6173;
              }
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
              if ((longlong)(int)((longlong)*(int *)(pcVar45 + 0x67) * 0x535f3a3a) !=
                  (longlong)*(int *)(pcVar45 + 0x67) * 0x535f3a3a) {
                    // WARNING: Bad instruction - Truncating control flow here
                halt_baddata();
              }
code_r0x0001400c610a:
              *(int *)(pbVar25 + 0x28fffabe) = *(int *)(pbVar25 + 0x28fffabe) + 1;
                    // WARNING: Could not recover jumptable at 0x0001400c610f. Too many branches
                    // WARNING: Treating indirect jump as call
              puVar47 = (undefined4 *)0xb7dcfffa;
              goto code_r0x0001400c6115;
            }
            *_Buf = (istreambuf_iterator<>)((char)*_Buf - (char)iVar29);
            pbVar25 = (byte *)(ulonglong)uVar17;
            *pbVar25 = *pbVar25 & (byte)iVar29;
            if (*pbVar25 == 0) {
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
              pbVar25 = (byte *)(ulonglong)((uint)pbVar20 & 0x29757a);
              goto code_r0x0001400c60ff;
            }
          }
          else {
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
            bVar52 = (byte)(bVar48 - bRam00000000400c5cc0) == '\0';
            bVar50 = (POPCOUNT(bVar48 - bRam00000000400c5cc0) & 1U) == 0;
            uVar24 = (ulonglong)*(uint *)((longlong)puVar47 + 0x6d);
            if (SBORROW1(bVar48,bRam00000000400c5cc0)) {
                    // WARNING: Bad instruction - Truncating control flow here
              halt_baddata();
            }
            bVar49 = true;
            if (bVar48 < bRam00000000400c5cc0) {
code_r0x0001400c6070:
              if (!bVar49) goto code_r0x0001400c6115;
            }
            else {
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
              s_random_device__rdseed_failed_1400c5d1a[7] = bVar27 + 'd';
              bVar52 = false;
              bVar50 = false;
                    // WARNING: Bad instruction - Truncating control flow here
              if (0x9b < bVar27) {
                bVar48 = (byte)((uint)*(undefined4 *)((longlong)puVar47 + 0x73) >> 8);
                uVar42 = (longlong)*(int *)(puVar44 + 0x69) * 0x61623a3a;
                uVar24 = uVar42 & 0xffffffff;
                    // WARNING: Bad instruction - Truncating control flow here
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                if ((longlong)(int)uVar42 == uVar42) goto code_r0x0001400c6087;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                if ((longlong)(int)((longlong)*(int *)(puVar44 + 0x69) * 0x74733a3a) !=
                    (longlong)*(int *)(puVar44 + 0x69) * 0x74733a3a) goto code_r0x0001400c610a;
                out(*pcVar45,0x5cc0);
                *(char *)(longlong)(int)uVar17 = *(char *)(longlong)(int)uVar17 + (char)uVar17;
                    // WARNING (jumptable): Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                s_random_device__rdseed_failed_1400c5d1a[7] = bVar27 + 'd';
                    // WARNING: Bad instruction - Truncating control flow here
                if (bVar27 < 0x9c) {
                    // WARNING: Bad instruction - Truncating control flow here
                  halt_baddata();
                }
                uVar42 = (ulonglong)*(uint *)((longlong)puVar47 + 0x73);
                uVar9 = (longlong)*(int *)(puVar44 + 0x6a) * 0x6f63203a;
                uVar24 = uVar9 & 0xffffffff;
                bVar52 = (longlong)(int)uVar9 != uVar9;
                out(puVar44[3],0x5cc0);
                if ((!bVar52) || (bVar52)) {
                  s_random_device__rdseed_failed_1400c5d1a[7] = bVar27 + 'd';
                    // WARNING: Bad instruction - Truncating control flow here
                  halt_baddata();
                }
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                puVar44 = (undefined1 *)(ulonglong)*(uint *)(_Buf + uVar24 * 2 + 0x6f);
                out(*puVar44,0x5cc0);
                puVar44[0x73] = puVar44[0x73] & bVar27;
                pcVar45 = (code *)(puVar44 + 5);
                out(*(undefined4 *)(puVar44 + 1),0x5cc0);
                uVar2 = in(0x5cc0);
                *puVar47 = uVar2;
                puVar44[0x7a] = puVar44[0x7a] & (byte)iVar29;
                puVar33 = (undefined1 *)((longlong)puVar47 + 5);
                uVar30 = in(0x5cc0);
                *(undefined1 *)(puVar47 + 1) = uVar30;
                puVar47 = (undefined4 *)((longlong)puVar47 + 6);
                uVar30 = in(0x5cc0);
                *puVar33 = uVar30;
                _Buf[0x73] = (istreambuf_iterator<>)((byte)_Buf[0x73] & (byte)iVar29);
                pbVar20 = puVar44 + 0x74;
                *pbVar20 = *pbVar20 & (byte)iVar29;
                bVar50 = (POPCOUNT(*pbVar20) & 1U) == 0;
                bVar52 = true;
                if (*pbVar20 == 0) goto code_r0x0001400c6084;
                    // WARNING: Read-only address (ram,0x0001400c5d21) is written
                    // WARNING: Read-only address (ram,0x0001400c5d24) is written
                uVar30 = in(0x5cc0);
                *(undefined1 *)puVar47 = uVar30;
                uVar9 = (longlong)*(int *)((longlong)pbVar25 * 2 + 0x62) * 0x63697361;
                bVar49 = (longlong)(int)uVar9 != uVar9;
                puVar47 = *(undefined4 **)(uVar9 & 0xffffffff);
                puVar39 = (undefined8 *)(uVar9 & 0xffffffff) + 1;
                bVar52 = false;
                goto code_r0x0001400c6070;
              }
            }
            bVar48 = (byte)(uVar42 >> 8);
            if (!bVar50) {
              *(int *)pbVar25 = *(int *)pbVar25 - (int)puVar39;
              pbVar20 = (byte *)((ulonglong)uVar17 + 0x69 + uVar24 * 2);
              *pbVar20 = *pbVar20 & 0x5c;
code_r0x0001400c6115:
                    // WARNING: Could not recover jumptable at 0x0001400c6117. Too many branches
                    // WARNING: Treating indirect jump as call
              uVar26 = (*(code *)(ulonglong)
                                 *(uint *)((longlong)puVar47 + (longlong)pcVar45 * 4 + -0x487b0006))
                                 ();
              return uVar26;
            }
            if (!bVar52) goto code_r0x0001400c6173;
            puVar40 = (undefined8 *)((longlong)puVar39 + -8);
            puVar39 = (undefined8 *)((longlong)puVar39 + -8);
            *puVar40 = *(undefined8 *)(uVar24 + 0x1d);
          }
          *(undefined8 *)((longlong)puVar39 + -8) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x10) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x18) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x20) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x28) = *(undefined8 *)(uVar24 + 0x1d);
          puVar41 = (undefined8 *)((longlong)puVar39 + -0x30);
          puVar39 = (undefined8 *)((longlong)puVar39 + -0x30);
          *puVar41 = *(undefined8 *)(uVar24 + 0x1d);
code_r0x0001400c6173:
          *(undefined8 *)((longlong)puVar39 + -8) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x10) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x18) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x20) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x28) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x30) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x38) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x40) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x48) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x50) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x58) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x60) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x68) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x70) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x78) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x80) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x88) = *(undefined8 *)(uVar24 + 0x1d);
          pcVar7 = *(code **)(_Buf + -0x410005dd);
          *(undefined8 *)((longlong)puVar39 + -0x90) = 0x1400c61bd;
          lVar18 = (*pcVar7)();
          lVar19 = CONCAT71((int7)((ulonglong)puVar31 >> 8),(byte)puVar31 & bVar48);
          *(int *)(lVar18 + 0x30) = *(int *)(lVar18 + 0x30) + 1;
          *(undefined2 *)((longlong)puVar39 + -0x8c) = in_CS;
          *(undefined4 *)((longlong)puVar39 + -0x90) = 0x400c61c5;
          (*pcVar45)();
          *(undefined8 *)((longlong)puVar39 + -0x90) = *(undefined8 *)(uVar24 + 0x1d);
          *(undefined8 *)((longlong)puVar39 + -0x98) = *(undefined8 *)(uVar24 + 0x1d);
          pcVar45 = *(code **)(lVar19 + 0x31);
          *(undefined8 *)((longlong)puVar39 + -0xa0) = 0x1400c61d6;
          (*pcVar45)();
                    // WARNING: Could not recover jumptable at 0x0001400c61d7. Too many branches
                    // WARNING: Treating indirect jump as call
          uVar26 = (**(code **)(_Buf + 0x2e))();
          return uVar26;
        }
        piVar1 = (int *)(lVar19 + 0x1710c571e);
        bVar52 = SBORROW4(*piVar1,1);
        *piVar1 = *piVar1 + -1;
        puVar33 = puVar38 + 8;
        puVar34 = puVar38 + 8;
        puVar35 = puVar38 + 8;
        puVar36 = puVar38 + 8;
        puVar37 = puVar38 + 8;
        puVar38 = puVar38 + 8;
        puVar10 = puVar37;
        puVar11 = puVar36;
        puVar12 = puVar35;
        puVar13 = puVar34;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
        switch(bVar48) {
        case 0:
          goto switchD_14006b99d_caseD_0;
        case 1:
          goto switchD_14006b99d_caseD_1;
        case 2:
          goto switchD_14006b99d_caseD_2;
        case 3:
          goto switchD_14006b99d_caseD_3;
        case 4:
          goto switchD_14006b99d_caseD_4;
        }
      } while( true );
    }
    lVar18 = lVar18 + 1;
  } while ((iVar32 + 1 < 4 & bVar48) != 0);
LAB_14006bb78:
  iVar32 = (int)uVar42;
  puVar33[0x38] = 1 < *(ulonglong *)(puVar33 + 0x50) & bVar48;
  if (puVar33[0x38] == '\0') {
    if (bVar48 == 0) goto LAB_14006bf89;
LAB_14006ba2b:
    iVar32 = (int)uVar42;
    uVar42 = *(ulonglong *)(*(longlong *)(puVar33 + 0xb8) + -0x18);
joined_r0x00014006c2b0:
    if (1 < uVar42) {
      psVar6 = *(string **)(puVar33 + 0x30);
      *(undefined8 *)(puVar33 + -8) = 0x14006c3cd;
      uVar42 = std::string::find_first_not_of(psVar6,'0',0);
      if (uVar42 != 0) {
        uVar24 = *(ulonglong *)(*(longlong *)(puVar33 + 0xb8) + -0x18);
        if (uVar42 == 0xffffffffffffffff) {
          uVar42 = uVar24 - 1;
        }
        if (uVar42 <= uVar24) {
          uVar24 = uVar42;
        }
        *(undefined8 *)(puVar33 + -8) = 0x14006c402;
        std::string::_M_mutate(psVar6,0,uVar24,0);
      }
    }
    if (puVar33[0x7a] != '\0') {
      pcVar21 = *(char **)(puVar33 + 0xb8);
      if (-1 < *(int *)(pcVar21 + -8)) {
        *(undefined8 *)(puVar33 + -8) = 0x14006c693;
        std::string::_M_leak_hard(*(string **)(puVar33 + 0x30));
        pcVar21 = *(char **)(puVar33 + 0xb8);
      }
      if (*pcVar21 != '0') {
        psVar6 = *(string **)(puVar33 + 0x30);
        *(undefined8 *)(puVar33 + -8) = 0x14006c5e7;
        std::string::_M_leak(psVar6);
        *(undefined4 *)(puVar33 + 0x20) = 0x2d;
        *(undefined8 *)(puVar33 + -8) = 0x14006c602;
        std::string::_M_replace_aux(psVar6,0,0,1,puVar33[0x20]);
        *(undefined4 *)(*(longlong *)(puVar33 + 0xb8) + -8) = 0xffffffff;
      }
    }
    if (*(longlong *)(*(longlong *)(puVar33 + 0xb0) + -0x18) != 0) {
      uVar30 = (char)iVar32;
      if (puVar33[0x6b] != '\0') {
        uVar30 = puVar33[0x6c];
      }
      *(undefined8 *)(puVar33 + -8) = 0x14006ba78;
      std::string::push_back((string *)(puVar33 + 0xb0),uVar30);
      lVar18 = *(longlong *)(puVar44 + 0x18);
      lVar19 = *(longlong *)(puVar44 + 0x10);
      *(undefined8 *)(puVar33 + -8) = 0x14006ba88;
      cVar51 = __verify_grouping(lVar19,lVar18,(undefined8 *)(puVar33 + 0xb0));
      if (cVar51 == '\0') {
        **(uint **)(puVar33 + 0x138) = **(uint **)(puVar33 + 0x138) | 4;
      }
    }
    if (puVar33[0x6b] == '\0') {
LAB_14006c430:
      plVar43 = (longlong *)(puVar33 + 0x80);
      piVar28 = (istreambuf_iterator<> *)(puVar33 + 0x90);
      *(undefined8 *)(puVar33 + -8) = 0x14006c452;
      std::string::swap(*(string **)(puVar33 + 0x140),*(longlong **)(puVar33 + 0x30));
      goto LAB_14006bacb;
    }
    plVar43 = (longlong *)(puVar33 + 0x80);
    piVar28 = (istreambuf_iterator<> *)(puVar33 + 0x90);
    if (*(int *)(puVar44 + 0x58) == iVar32) goto LAB_14006c430;
  }
  else {
    if (puVar33[0x7a] == '\0') {
      lVar18 = *(longlong *)(puVar44 + 0x38);
    }
    else {
      lVar18 = *(longlong *)(puVar44 + 0x48);
    }
    iVar14 = *(int *)(puVar33 + 0x98);
    plVar43 = *(longlong **)(puVar33 + 0x90);
    uVar42 = 1;
    cVar51 = iVar14 == -1;
    bVar52 = (bool)cVar51;
    if ((plVar43 != (longlong *)0x0) && ((bool)cVar51)) goto LAB_14006bc57;
    while( true ) {
      plVar43 = *(longlong **)(puVar33 + 0x80);
      if ((plVar43 == (longlong *)0x0) || (*(int *)(puVar33 + 0x88) != -1)) {
        bVar52 = (bool)(bVar52 ^ *(int *)(puVar33 + 0x88) == -1);
      }
      else if ((ulonglong)plVar43[3] <= (ulonglong)plVar43[2]) {
        pcVar45 = *(code **)(*plVar43 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006bfc4;
        iVar15 = (*pcVar45)();
        bVar52 = (bool)(bVar52 ^ iVar15 == -1);
        if (iVar15 == -1) {
          *(undefined8 *)(puVar33 + 0x80) = 0;
        }
      }
      if ((*(ulonglong *)(puVar33 + 0x50) <= uVar42) || (!bVar52)) break;
      plVar43 = *(longlong **)(puVar33 + 0x90);
      if ((plVar43 == (longlong *)0x0) || (cVar51 == '\0')) {
LAB_14006bc20:
        if (*(char *)(lVar18 + uVar42) != (char)iVar14) goto LAB_14006bf89;
        plVar43 = *(longlong **)(puVar33 + 0x90);
        pcVar21 = (char *)plVar43[2];
        if (pcVar21 < (char *)plVar43[3]) goto LAB_14006bc40;
        pcVar45 = *(code **)(*plVar43 + 0x50);
        *(undefined8 *)(puVar33 + -8) = 0x14006c191;
        (*pcVar45)(plVar43);
      }
      else {
        pcVar21 = (char *)plVar43[2];
        if ((char *)plVar43[3] <= pcVar21) {
          pcVar45 = *(code **)(*plVar43 + 0x48);
          *(undefined8 *)(puVar33 + -8) = 0x14006c64c;
          iVar14 = (*pcVar45)(plVar43);
          if (iVar14 == -1) {
            *(undefined8 *)(puVar33 + 0x90) = 0;
          }
          goto LAB_14006bc20;
        }
        if (*(char *)(lVar18 + uVar42) != *pcVar21) goto LAB_14006bf89;
LAB_14006bc40:
        plVar43[2] = (longlong)(pcVar21 + 1);
      }
      *(undefined4 *)(puVar33 + 0x98) = 0xffffffff;
      uVar42 = uVar42 + 1;
LAB_14006bc57:
      cVar51 = puVar33[0x38];
      iVar14 = -1;
      bVar52 = false;
      if ((ulonglong)plVar43[3] <= (ulonglong)plVar43[2]) {
        pcVar45 = *(code **)(*plVar43 + 0x48);
        *(undefined8 *)(puVar33 + -8) = 0x14006bc7d;
        iVar14 = (*pcVar45)(plVar43);
        bVar52 = iVar14 == -1;
        if (bVar52) {
          *(undefined8 *)(puVar33 + 0x90) = 0;
        }
        cVar51 = puVar33[0x38];
        iVar14 = -1;
      }
    }
    if (*(ulonglong *)(puVar33 + 0x50) == uVar42) {
      uVar42 = *(ulonglong *)(*(longlong *)(puVar33 + 0xb8) + -0x18);
      goto joined_r0x00014006c2b0;
    }
LAB_14006bf89:
    plVar43 = (longlong *)(puVar33 + 0x80);
    piVar28 = (istreambuf_iterator<> *)(puVar33 + 0x90);
  }
LAB_14006bac0:
  **(uint **)(puVar33 + 0x138) = **(uint **)(puVar33 + 0x138) | 4;
LAB_14006bacb:
  *(undefined8 *)(puVar33 + -8) = 0x14006bad6;
  uVar42 = istreambuf_iterator<>::equal(piVar28,plVar43);
  if ((char)uVar42 != '\0') {
    **(uint **)(puVar33 + 0x138) = **(uint **)(puVar33 + 0x138) | 2;
  }
  puVar3 = *(undefined8 **)(puVar33 + 0x110);
  uVar26 = *(undefined8 *)(puVar33 + 0x98);
  *puVar3 = *(undefined8 *)(puVar33 + 0x90);
  puVar3[1] = uVar26;
  *(undefined8 *)(puVar33 + -8) = 0x14006bb0f;
  std::string::_Rep::_M_dispose((void *)(*(longlong *)(puVar33 + 0xb8) + -0x18));
  *(undefined8 *)(puVar33 + -8) = 0x14006bb25;
  std::string::_Rep::_M_dispose((void *)(*(longlong *)(puVar33 + 0xb0) + -0x18));
  return *(undefined8 *)(puVar33 + 0x110);
}



// WARNING: Control flow encountered bad instruction data
// WARNING: Instruction at (ram,0x00014006b98f) overlaps instruction at (ram,0x00014006b98e)
// 
// std::istreambuf_iterator<char, std::char_traits<char> > std::money_get<char,
// std::istreambuf_iterator<char, std::char_traits<char> >
// >::_M_extract<true>(std::istreambuf_iterator<char, std::char_traits<char> >,
// std::istreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&,
// std::string&) const

char * std::money_get<>::_M_extract<true>
                 (char *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
                 longlong param_5,uint *param_6,string *param_7)

{
  longlong *plVar1;
  bool bVar2;
  char cVar3;
  bool bVar4;
  int iVar5;
  int iVar6;
  uint uVar7;
  string *psVar8;
  longlong lVar9;
  longlong lVar10;
  char *pcVar11;
  string *psVar12;
  void *pvVar13;
  byte *pbVar14;
  ulonglong uVar15;
  __moneypunct_cache<char,true> *this;
  undefined1 uVar16;
  uint *puVar17;
  int iVar18;
  istreambuf_iterator<> *unaff_RBP;
  string *psVar19;
  longlong lVar20;
  ulonglong uVar21;
  byte bVar22;
  ulonglong unaff_R12;
  ulonglong unaff_R13;
  bool bVar23;
  ulonglong uVar24;
  undefined **unaff_R15;
  bool bVar25;
  string *local_d0;
  string *local_b8;
  byte local_9d;
  int local_9c;
  bool local_8d;
  string *local_88;
  undefined8 uStack_80;
  string *local_78;
  ulonglong uStack_70;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  local_78 = (string *)*param_3;
  uStack_70 = param_3[1];
  local_88 = (string *)*param_4;
  uStack_80 = param_4[1];
  lVar9 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar9 = *(longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar9 * 8);
  if (lVar9 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar10 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar10 * 8);
  lVar20 = *plVar1;
  if (lVar20 == 0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<char,true>)0x0;
    *(undefined2 *)(this + 0x21) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,true>)0x0;
    __moneypunct_cache<char,true>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar10);
    lVar20 = *plVar1;
  }
  if (*(longlong *)(lVar20 + 0x40) == 0) {
    local_8d = false;
  }
  else {
    local_8d = *(longlong *)(lVar20 + 0x50) != 0;
  }
  local_58 = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar20 + 0x20) != '\0') {
    std::string::reserve((string *)&local_58,0x20);
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  psVar19 = (string *)local_50;
  std::string::reserve((string *)local_50,0x20);
  local_9d = 0;
  uVar24 = 0;
  iVar18 = 0;
  local_9c = 0;
  local_5c = *(undefined4 *)(lVar20 + 0x60);
  local_d0 = (string *)&local_58;
  local_b8 = (string *)0x0;
  bVar2 = false;
  do {
    iVar5 = (int)uVar24;
    if (4 < *(byte *)((longlong)&local_5c + uVar24)) goto LAB_14006d215;
    pcVar11 = (char *)((longlong)&switchD_14006c8dd::caseD_a +
                      (longlong)
                      (int)(&switchD_14006c8dd::caseD_a)[*(byte *)((longlong)&local_5c + uVar24)]);
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
    switch(*(byte *)((longlong)&local_5c + uVar24)) {
    case 0:
switchD_14006c8dd_caseD_0:
      unaff_R12 = 1;
      goto LAB_14006caae;
    case 1:
      uVar21 = istreambuf_iterator<>::equal
                         ((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
      if (((char)uVar21 == '\0') &&
         (uVar21 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78),
         (*(byte *)(*(longlong *)(lVar9 + 0x30) + (uVar21 & 0xff) * 2) & 0x20) != 0)) {
        _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_78);
        uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
        goto switchD_14006c8dd_caseD_0;
      }
      unaff_R12 = 0;
LAB_14006caae:
      bVar22 = (byte)unaff_R12;
      if (uVar24 == 3) goto LAB_14006cab8;
      unaff_RBP = (istreambuf_iterator<> *)(uStack_70 & 0xffffffff);
      unaff_R13 = CONCAT71((int7)(unaff_R13 >> 8),(int)uStack_70 == -1);
      if ((local_78 != (string *)0x0) && (psVar8 = local_78, (int)uStack_70 == -1))
      goto LAB_14006cff6;
      unaff_R15 = (undefined **)(unaff_R13 & 0xffffffff);
      while( true ) {
        bVar4 = (int)uStack_80 == -1;
        psVar19 = local_88;
        if (((local_88 != (string *)0x0) && (bVar4)) &&
           (bVar4 = false, *(ulonglong *)(local_88 + 0x18) <= *(ulonglong *)(local_88 + 0x10))) {
          iVar6 = (**(code **)(*(longlong *)local_88 + 0x48))();
          bVar4 = iVar6 == -1;
          if (bVar4) {
            local_88 = (string *)0x0;
          }
        }
        if (SUB81(unaff_R13,0) == bVar4) break;
        if ((local_78 == (string *)0x0) || ((char)unaff_R15 == '\0')) {
LAB_14006cfb6:
          psVar8 = local_78;
          unaff_RBP = (istreambuf_iterator<> *)((ulonglong)unaff_RBP & 0xff);
          if ((*(byte *)(*(longlong *)(lVar9 + 0x30) + (longlong)unaff_RBP * 2) & 0x20) == 0) break;
          pbVar14 = *(byte **)(local_78 + 0x10);
          if (pbVar14 < *(byte **)(local_78 + 0x18)) goto LAB_14006cfe3;
          (**(code **)(*(longlong *)local_78 + 0x50))(local_78);
          uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
        }
        else {
          pbVar14 = *(byte **)(local_78 + 0x10);
          if (*(byte **)(local_78 + 0x18) <= pbVar14) {
            psVar19 = local_78;
            uVar7 = (**(code **)(*(longlong *)local_78 + 0x48))();
            unaff_RBP = (istreambuf_iterator<> *)(ulonglong)uVar7;
            if (uVar7 == 0xffffffff) {
              local_78 = (string *)0x0;
            }
            goto LAB_14006cfb6;
          }
          psVar19 = (string *)(ulonglong)*pbVar14;
          if ((*(byte *)(*(longlong *)(lVar9 + 0x30) + (longlong)psVar19 * 2) & 0x20) == 0) break;
LAB_14006cfe3:
          uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
          *(byte **)(local_78 + 0x10) = pbVar14 + 1;
          psVar8 = local_78;
        }
LAB_14006cff6:
        unaff_R15 = (undefined **)0x1;
        unaff_RBP = (istreambuf_iterator<> *)0xffffffff;
        unaff_R13 = 0;
        if (*(ulonglong *)(psVar8 + 0x18) <= *(ulonglong *)(psVar8 + 0x10)) {
          iVar6 = (**(code **)(*(longlong *)psVar8 + 0x48))(psVar8);
          unaff_R13 = (ulonglong)(iVar6 == -1);
          if (iVar6 == -1) {
            local_78 = (string *)0x0;
          }
          unaff_R15 = (undefined **)0x1;
          unaff_RBP = (istreambuf_iterator<> *)0xffffffff;
        }
      }
      break;
    case 2:
      if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_b8 < (string *)0x2)) && (iVar5 != 0)) {
        if (uVar24 == 1) {
          if ((local_8d != false) || (((char)local_5c == '\x03' || (local_5c._2_1_ == '\x01'))))
          goto LAB_14006d0f8;
        }
        else {
          if (uVar24 != 2) goto LAB_14006c96b;
          if ((local_5c._3_1_ == '\x04') || ((local_5c._3_1_ == '\x03' && (local_8d != false))))
          goto LAB_14006d0f8;
        }
      }
      else {
LAB_14006d0f8:
        unaff_R13 = *(ulonglong *)(lVar20 + 0x30);
        unaff_RBP = (istreambuf_iterator<> *)&local_78;
        for (uVar21 = 0;
            (psVar19 = (string *)unaff_RBP,
            uVar15 = istreambuf_iterator<>::equal(unaff_RBP,(longlong *)&local_88),
            (char)uVar15 != '\x01' && (uVar21 < unaff_R13)); uVar21 = uVar21 + 1) {
          uVar15 = uStack_70 & 0xffffffff;
          psVar19 = local_78;
          if ((local_78 == (string *)0x0) || ((int)uStack_70 != -1)) {
LAB_14006d110:
            if (*(char *)(*(longlong *)(lVar20 + 0x28) + uVar21) != (char)uVar15)
            goto LAB_14006d198;
            pcVar11 = *(char **)(local_78 + 0x10);
            if (pcVar11 < *(char **)(local_78 + 0x18)) goto LAB_14006d12f;
            (**(code **)(*(longlong *)local_78 + 0x50))();
          }
          else {
            pcVar11 = *(char **)(local_78 + 0x10);
            if (*(char **)(local_78 + 0x18) <= pcVar11) {
              uVar15 = (**(code **)(*(longlong *)local_78 + 0x48))();
              if ((int)uVar15 == -1) {
                local_78 = (string *)0x0;
              }
              goto LAB_14006d110;
            }
            if (*pcVar11 != *(char *)(*(longlong *)(lVar20 + 0x28) + uVar21)) goto LAB_14006d198;
LAB_14006d12f:
            *(char **)(local_78 + 0x10) = pcVar11 + 1;
          }
          uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
        }
        if (uVar21 != unaff_R13) {
LAB_14006d198:
          if (uVar21 == 0) {
            unaff_R12 = (ulonglong)((*(uint *)(param_5 + 0x18) >> 9 ^ 1) & 1);
            break;
          }
          goto LAB_14006ca00;
        }
      }
LAB_14006d215:
      unaff_R12 = 1;
      break;
    case 3:
      if (*(longlong *)(lVar20 + 0x40) == 0) {
        if (*(longlong *)(lVar20 + 0x50) != 0) {
LAB_14006d2c8:
          unaff_RBP = (istreambuf_iterator<> *)&local_78;
          psVar19 = (string *)unaff_RBP;
          uVar21 = istreambuf_iterator<>::equal(unaff_RBP,(longlong *)&local_88);
          if (((char)uVar21 == '\0') &&
             (psVar19 = (string *)unaff_RBP, uVar21 = istreambuf_iterator<>::_M_get(unaff_RBP),
             **(char **)(lVar20 + 0x48) == (char)uVar21)) {
            local_b8 = *(string **)(lVar20 + 0x50);
            psVar19 = local_78;
            _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_78);
            bVar2 = true;
            unaff_R12 = 1;
            uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
            break;
          }
          if ((*(longlong *)(lVar20 + 0x40) != 0) && (*(longlong *)(lVar20 + 0x50) == 0))
          goto LAB_14006d2b5;
        }
LAB_14006c906:
        unaff_RBP = (istreambuf_iterator<> *)&local_78;
        unaff_R12 = (ulonglong)(local_8d ^ 1);
      }
      else {
        unaff_RBP = (istreambuf_iterator<> *)&local_78;
        psVar19 = (string *)unaff_RBP;
        uVar21 = istreambuf_iterator<>::equal(unaff_RBP,(longlong *)&local_88);
        if (((char)uVar21 == '\0') &&
           (psVar19 = (string *)unaff_RBP, uVar21 = istreambuf_iterator<>::_M_get(unaff_RBP),
           **(char **)(lVar20 + 0x38) == (char)uVar21)) {
          local_b8 = *(string **)(lVar20 + 0x40);
          psVar19 = local_78;
          _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0((longlong *)local_78);
          uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
          unaff_R12 = 1;
        }
        else {
          if (*(longlong *)(lVar20 + 0x50) != 0) goto LAB_14006d2c8;
          if (*(longlong *)(lVar20 + 0x40) == 0) goto LAB_14006c906;
LAB_14006d2b5:
          unaff_RBP = (istreambuf_iterator<> *)&local_78;
          bVar2 = true;
          unaff_R12 = 1;
        }
      }
      break;
    case 4:
      uVar21 = uStack_70 & 0xffffffff;
      unaff_R15 = &money_base::_S_atoms;
      unaff_RBP = (istreambuf_iterator<> *)local_78;
      while( true ) {
        bVar4 = (int)uVar21 == -1;
        unaff_R12 = CONCAT71((int7)(unaff_R12 >> 8),bVar4);
        if ((unaff_RBP == (istreambuf_iterator<> *)0x0) || (!bVar4)) {
          unaff_R13 = unaff_R12 & 0xffffffff;
        }
        else {
          unaff_R13 = 0;
          if (*(ulonglong *)(unaff_RBP + 0x18) <= *(ulonglong *)(unaff_RBP + 0x10)) {
            iVar6 = (**(code **)(*(longlong *)unaff_RBP + 0x48))(unaff_RBP);
            unaff_R13 = (ulonglong)(iVar6 == -1);
            if (iVar6 == -1) {
              local_78 = (string *)0x0;
            }
          }
        }
        bVar25 = (int)uStack_80 == -1;
        psVar19 = local_88;
        if (((local_88 != (string *)0x0) && (bVar25)) &&
           (bVar25 = false, *(ulonglong *)(local_88 + 0x18) <= *(ulonglong *)(local_88 + 0x10))) {
          iVar6 = (**(code **)(*(longlong *)local_88 + 0x48))();
          bVar25 = iVar6 == -1;
          if (bVar25) {
            local_88 = (string *)0x0;
          }
        }
        if (SUB81(unaff_R13,0) == bVar25) break;
        if ((local_78 != (string *)0x0) && (bVar4)) {
          if (*(byte **)(local_78 + 0x10) < *(byte **)(local_78 + 0x18)) {
            uVar21 = (ulonglong)**(byte **)(local_78 + 0x10);
          }
          else {
            uVar7 = (**(code **)(*(longlong *)local_78 + 0x48))();
            uVar21 = (ulonglong)uVar7;
            if (uVar7 == 0xffffffff) {
              local_78 = (string *)0x0;
            }
          }
        }
        cVar3 = (char)uVar21;
        psVar19 = (string *)(lVar20 + 0x65);
        pvVar13 = memchr((string *)(lVar20 + 0x65),(int)cVar3,10);
        if (pvVar13 == (void *)0x0) {
          if (*(char *)(lVar20 + 0x21) == cVar3) {
            if (local_9d != 0) goto LAB_14006ceb0;
            psVar19 = (string *)(ulonglong)*(uint *)(lVar20 + 0x58);
            if ((int)*(uint *)(lVar20 + 0x58) < 1) break;
            local_9d = 1;
            iVar6 = 0;
            local_9c = iVar18;
          }
          else {
            if ((*(char *)(lVar20 + 0x20) == '\0') || (*(char *)(lVar20 + 0x22) != cVar3)) break;
            if (local_9d != 0) {
LAB_14006ceb0:
              unaff_R12 = (ulonglong)local_9d;
              goto LAB_14006ceb6;
            }
            if (iVar18 == 0) {
              unaff_R12 = 0;
              goto LAB_14006ceb6;
            }
            uVar15 = local_58[-3];
            uVar21 = uVar15 + 1;
            if (local_58[-2] < uVar21) {
LAB_14006cd85:
              std::string::reserve(local_d0,uVar21);
            }
            else {
              if (_CRT_MT == 0) {
                iVar6 = (int)local_58[-1];
              }
              else {
                iVar6 = (int)local_58[-1];
              }
              if (0 < iVar6) goto LAB_14006cd85;
            }
            *(char *)((longlong)local_58 + local_58[-3]) = (char)iVar18;
            *(undefined4 *)(local_58 + -1) = 0;
            local_58[-3] = uVar21;
            *(undefined1 *)((longlong)local_58 + uVar15 + 1) = 0;
            iVar6 = 0;
          }
        }
        else {
          cVar3 = money_base::_S_atoms[(longlong)pvVar13 - (lVar20 + 100)];
          unaff_R12 = 0;
          uVar15 = local_50[0][-3];
          uVar21 = uVar15 + 1;
          if (local_50[0][-2] < uVar21) {
LAB_14006cc47:
            std::string::reserve((string *)local_50,uVar21);
          }
          else {
            if (_CRT_MT == 0) {
              iVar6 = (int)local_50[0][-1];
            }
            else {
              iVar6 = (int)local_50[0][-1];
            }
            if (0 < iVar6) goto LAB_14006cc47;
          }
          *(char *)((longlong)local_50[0] + local_50[0][-3]) = cVar3;
          *(undefined4 *)(local_50[0] + -1) = 0;
          local_50[0][-3] = uVar21;
          *(char *)((longlong)local_50[0] + uVar15 + 1) = '\0';
          iVar6 = iVar18 + 1;
        }
        iVar18 = iVar6;
        unaff_RBP = (istreambuf_iterator<> *)local_78;
        if (*(ulonglong *)(local_78 + 0x10) < *(ulonglong *)(local_78 + 0x18)) {
          *(ulonglong *)(local_78 + 0x10) = *(ulonglong *)(local_78 + 0x10) + 1;
        }
        else {
          (**(code **)(*(longlong *)local_78 + 0x50))(local_78);
        }
        uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
        uVar21 = 0xffffffff;
      }
      unaff_R12 = 1;
LAB_14006ceb6:
      if (local_50[0][-3] == 0) goto LAB_14006ca00;
      break;
    case 5:
      *pcVar11 = *pcVar11 + (byte)pcVar11;
                    // WARNING: Bad instruction - Truncating control flow here
      halt_baddata();
    case 6:
      goto switchD_14006c8dd_caseD_6;
    case 7:
      *psVar19 = (string)0x44;
      bVar22 = (byte)pcVar11 & (byte)((ulonglong)pcVar11 >> 8);
      goto code_r0x00014006b9e1;
    case 8:
      puVar17 = (uint *)0x1400c04ac;
      pbVar14 = (byte *)((longlong)&UINT_1400c5c38 +
                        (longlong)
                        (int)(&switchD_14006c8dd::caseD_a)[*(byte *)((longlong)&local_5c + uVar24)]
                        + 1);
      *pbVar14 = *pbVar14 ^ (byte)psVar19;
      uVar24 = (ulonglong)((int)pcVar11 + 0x5a32a);
      goto code_r0x00014006b996;
    case 9:
      goto code_r0x00014006bc90;
    default:
                    // WARNING: Bad instruction - Truncating control flow here
      halt_baddata();
    }
    bVar22 = (byte)unaff_R12;
    uVar24 = uVar24 + 1;
  } while ((iVar5 + 1 < 4 & bVar22) != 0);
LAB_14006cab8:
  bVar4 = (bool)((string *)0x1 < local_b8 & bVar22);
  if (bVar4 == false) {
    if (bVar22 != 0) {
LAB_14006c96b:
      uVar24 = local_50[0][-3];
joined_r0x00014006d1f0:
      if ((1 < uVar24) &&
         (uVar24 = std::string::find_first_not_of((string *)local_50,'0',0), uVar24 != 0)) {
        uVar21 = local_50[0][-3];
        if (uVar24 == 0xffffffffffffffff) {
          uVar24 = uVar21 - 1;
        }
        if (uVar24 <= uVar21) {
          uVar21 = uVar24;
        }
        std::string::_M_mutate((string *)local_50,0,uVar21,0);
      }
      if (bVar2) {
        if (-1 < (int)local_50[0][-1]) {
          std::string::_M_leak_hard((string *)local_50);
        }
        if ((char)*local_50[0] != '0') {
          std::string::_M_leak((string *)local_50);
          std::string::_M_replace_aux((string *)local_50,0,0,1,'-');
          *(undefined4 *)(local_50[0] + -1) = 0xffffffff;
        }
      }
      if (local_58[-3] != 0) {
        uVar16 = (char)iVar18;
        if (local_9d != 0) {
          uVar16 = (undefined1)local_9c;
        }
        std::string::push_back((string *)&local_58,uVar16);
        cVar3 = __verify_grouping(*(longlong *)(lVar20 + 0x10),*(longlong *)(lVar20 + 0x18),
                                  (undefined8 *)&local_58);
        if (cVar3 == '\0') {
          *param_6 = *param_6 | 4;
        }
      }
      if ((local_9d == 0) || (*(int *)(lVar20 + 0x58) == iVar18)) {
        std::string::swap(param_7,(longlong *)local_50);
        goto LAB_14006ca0b;
      }
    }
  }
  else {
    if (bVar2) {
      lVar9 = *(longlong *)(lVar20 + 0x48);
    }
    else {
      lVar9 = *(longlong *)(lVar20 + 0x38);
    }
    psVar19 = (string *)0x1;
    bVar25 = (int)uStack_70 == -1;
    iVar5 = (int)uStack_70;
    bVar23 = bVar25;
    if ((local_78 != (string *)0x0) && (psVar8 = local_78, bVar25)) goto LAB_14006cb97;
    while( true ) {
      if ((local_88 == (string *)0x0) || ((int)uStack_80 != -1)) {
        bVar25 = (bool)(bVar25 ^ (int)uStack_80 == -1);
      }
      else if (*(ulonglong *)(local_88 + 0x18) <= *(ulonglong *)(local_88 + 0x10)) {
        iVar6 = (**(code **)(*(longlong *)local_88 + 0x48))();
        bVar25 = (bool)(bVar25 ^ iVar6 == -1);
        if (iVar6 == -1) {
          local_88 = (string *)0x0;
        }
      }
      if ((local_b8 <= psVar19) || (!bVar25)) break;
      if ((local_78 == (string *)0x0) || (bVar23 == false)) {
LAB_14006cb60:
        psVar8 = local_78;
        if (psVar19[lVar9] != SUB41(iVar5,0)) goto LAB_14006ca00;
        psVar12 = *(string **)(local_78 + 0x10);
        if (psVar12 < *(string **)(local_78 + 0x18)) goto LAB_14006cb80;
        (**(code **)(*(longlong *)local_78 + 0x50))(local_78);
      }
      else {
        psVar12 = *(string **)(local_78 + 0x10);
        if (*(string **)(local_78 + 0x18) <= psVar12) {
          iVar5 = (**(code **)(*(longlong *)local_78 + 0x48))(local_78);
          if (iVar5 == -1) {
            local_78 = (string *)0x0;
          }
          goto LAB_14006cb60;
        }
        if (psVar19[lVar9] != *psVar12) goto LAB_14006ca00;
LAB_14006cb80:
        *(string **)(local_78 + 0x10) = psVar12 + 1;
        psVar8 = local_78;
      }
      uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
      psVar19 = psVar19 + 1;
LAB_14006cb97:
      iVar5 = -1;
      bVar25 = false;
      bVar23 = bVar4;
      if (*(ulonglong *)(psVar8 + 0x18) <= *(ulonglong *)(psVar8 + 0x10)) {
        iVar5 = (**(code **)(*(longlong *)psVar8 + 0x48))(psVar8);
        bVar25 = iVar5 == -1;
        if (bVar25) {
          local_78 = (string *)0x0;
        }
        iVar5 = -1;
      }
    }
    if (local_b8 == psVar19) {
      uVar24 = local_50[0][-3];
      goto joined_r0x00014006d1f0;
    }
  }
LAB_14006ca00:
  *param_6 = *param_6 | 4;
LAB_14006ca0b:
  uVar24 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
  if ((char)uVar24 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *(string **)param_1 = local_78;
  *(ulonglong *)(param_1 + 8) = uStack_70;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  std::string::_Rep::_M_dispose(local_58 + -3);
  return param_1;
code_r0x00014006b9e1:
  if (bVar22 == 0) goto LAB_14006bb78;
  if (*(byte *)((longlong)&local_5c + uVar24) < 5) {
    uVar24 = (ulonglong)*(byte *)((longlong)&local_5c + uVar24);
    puVar17 = &switchD_14006b99d::caseD_5;
code_r0x00014006b996:
                    // WARNING: Could not recover jumptable at 0x00014006b99d. Too many branches
                    // WARNING: Treating indirect jump as call
    pcVar11 = (char *)(*(code *)((longlong)(int)puVar17[uVar24] + (longlong)puVar17))();
    return pcVar11;
  }
  unaff_R12 = 1;
  bVar22 = (int)uVar24 + 1 < 4;
  uVar24 = uVar24 + 1;
  goto code_r0x00014006b9e1;
LAB_14006bb78:
  bVar22 = (string *)0x1 < local_b8 & (byte)unaff_R12;
  local_d0 = (string *)(ulonglong)bVar22;
  if (bVar22 == 0) {
    if ((byte)unaff_R12 != 0) {
      uVar24 = local_50[0][-3];
joined_r0x00014006c2b0:
      if ((1 < uVar24) &&
         (uVar24 = std::string::find_first_not_of((string *)local_50,'0',0), uVar24 != 0)) {
        uVar21 = local_50[0][-3];
        if (uVar24 == 0xffffffffffffffff) {
          uVar24 = uVar21 - 1;
        }
        if (uVar24 <= uVar21) {
          uVar21 = uVar24;
        }
        std::string::_M_mutate((string *)local_50,0,uVar21,0);
      }
      if (bVar2) {
        if (-1 < (int)local_50[0][-1]) {
          std::string::_M_leak_hard((string *)local_50);
        }
        if ((char)*local_50[0] != '0') {
          std::string::_M_leak((string *)local_50);
          std::string::_M_replace_aux((string *)local_50,0,0,1,'-');
          *(undefined4 *)(local_50[0] + -1) = 0xffffffff;
        }
      }
      if (local_58[-3] != 0) {
        uVar16 = (char)iVar18;
        if (local_9d != 0) {
          uVar16 = (undefined1)local_9c;
        }
        std::string::push_back((string *)&local_58,uVar16);
        cVar3 = __verify_grouping(*(longlong *)(lVar20 + 0x10),*(longlong *)(lVar20 + 0x18),
                                  (undefined8 *)&local_58);
        if (cVar3 == '\0') {
          *param_6 = *param_6 | 4;
        }
      }
      if ((local_9d == 0) || (*(int *)(lVar20 + 0x58) == iVar18)) {
        std::string::swap(param_7,(longlong *)local_50);
        goto LAB_14006bacb;
      }
    }
  }
  else {
    if (bVar2) {
      unaff_R15 = *(undefined ***)(lVar20 + 0x48);
    }
    else {
      unaff_R15 = *(undefined ***)(lVar20 + 0x38);
    }
    unaff_RBP = (istreambuf_iterator<> *)0x1;
    unaff_R12 = (ulonglong)((int)uStack_70 == -1);
    uVar24 = unaff_R12;
    iVar5 = (int)uStack_70;
    if ((local_78 != (string *)0x0) && (psVar19 = local_78, (int)uStack_70 == -1))
    goto LAB_14006bc57;
    while( true ) {
      bVar22 = (byte)unaff_R12;
      if ((local_88 == (string *)0x0) || ((int)uStack_80 != -1)) {
        bVar22 = bVar22 ^ (int)uStack_80 == -1;
      }
      else if (*(ulonglong *)(local_88 + 0x18) <= *(ulonglong *)(local_88 + 0x10)) {
        iVar6 = (**(code **)(*(longlong *)local_88 + 0x48))();
        bVar22 = bVar22 ^ iVar6 == -1;
        if (iVar6 == -1) {
          local_88 = (string *)0x0;
        }
      }
      if ((local_b8 <= unaff_RBP) || (bVar22 == 0)) break;
      if ((local_78 == (string *)0x0) || ((char)uVar24 == '\0')) {
LAB_14006bc20:
        psVar19 = local_78;
        if (*(string *)((longlong)unaff_R15 + (longlong)unaff_RBP) != SUB41(iVar5,0))
        goto LAB_14006bac0;
        psVar8 = *(string **)(local_78 + 0x10);
        if (psVar8 < *(string **)(local_78 + 0x18)) goto LAB_14006bc40;
        (**(code **)(*(longlong *)local_78 + 0x50))(local_78);
      }
      else {
        psVar8 = *(string **)(local_78 + 0x10);
        if (*(string **)(local_78 + 0x18) <= psVar8) {
          iVar5 = (**(code **)(*(longlong *)local_78 + 0x48))(local_78);
          if (iVar5 == -1) {
            local_78 = (string *)0x0;
          }
          goto LAB_14006bc20;
        }
        if (*(string *)((longlong)unaff_R15 + (longlong)unaff_RBP) != *psVar8) goto LAB_14006bac0;
LAB_14006bc40:
        *(string **)(local_78 + 0x10) = psVar8 + 1;
        psVar19 = local_78;
      }
      uStack_70 = CONCAT44(uStack_70._4_4_,0xffffffff);
      unaff_RBP = unaff_RBP + 1;
LAB_14006bc57:
      unaff_R12 = 0;
      uVar24 = (ulonglong)local_d0 & 0xff;
      iVar5 = -1;
      if (*(ulonglong *)(psVar19 + 0x18) <= *(ulonglong *)(psVar19 + 0x10)) {
        iVar5 = (**(code **)(*(longlong *)psVar19 + 0x48))(psVar19);
        unaff_R12 = (ulonglong)(iVar5 == -1);
        if (iVar5 == -1) {
          local_78 = (string *)0x0;
        }
        uVar24 = (ulonglong)local_d0 & 0xff;
code_r0x00014006bc90:
        iVar5 = -1;
      }
    }
    if (local_b8 == (string *)unaff_RBP) {
      uVar24 = local_50[0][-3];
      goto joined_r0x00014006c2b0;
    }
  }
LAB_14006bac0:
  *param_6 = *param_6 | 4;
LAB_14006bacb:
  uVar24 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
  if ((char)uVar24 != '\0') {
    *param_6 = *param_6 | 2;
  }
  *(string **)param_1 = local_78;
  *(ulonglong *)(param_1 + 8) = uStack_70;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  std::string::_Rep::_M_dispose(local_58 + -3);
  pcVar11 = param_1;
switchD_14006c8dd_caseD_6:
  return pcVar11;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, std::string&) const

undefined8
std::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double&) const

undefined8
std::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x10))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, std::string&) const

undefined8 *
std::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,string *param_8)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ctype<char> *this;
  ulonglong _Size;
  undefined8 uVar4;
  undefined8 uVar5;
  int iVar6;
  ulonglong *_Src;
  longlong lVar7;
  void *_Dst;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined8 local_78;
  ulonglong local_70;
  ulonglong *local_60 [4];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  uVar4 = *param_4;
  uVar5 = param_4[1];
  lVar7 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_6 + 0xd0) + 8) + lVar7 * 8);
  if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_60[0] = std::string::_S_construct(0,'\0');
  local_98 = uVar4;
  uStack_90 = uVar5;
  local_88 = uVar2;
  local_80 = uVar3;
  if (param_5 == '\0') {
    _M_extract<false>(&local_78,param_2,&local_88,&local_98,param_6);
  }
  else {
    _M_extract<true>((char *)&local_78,param_2,&local_88,&local_98,param_6,param_7,
                     (string *)local_60);
  }
  _Size = local_60[0][-3];
  if (_Size != 0) {
    std::string::resize(param_8,_Size,'\0');
    _Dst = *(void **)param_8;
    if (-1 < *(int *)((longlong)_Dst + -8)) {
      std::string::_M_leak_hard(param_8);
      _Dst = *(void **)param_8;
    }
    _Src = local_60[0];
    puVar1 = (ulonglong *)((longlong)local_60[0] + _Size);
    if (this[0x38] != (ctype<char>)0x1) {
      if (this[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this);
      }
      if (*(code **)(*(longlong *)this + 0x38) != ctype<char>::do_widen) {
        (**(code **)(*(longlong *)this + 0x38))(this,_Src,puVar1,_Dst);
        goto LAB_14006d928;
      }
    }
    if (puVar1 != _Src) {
      memcpy(_Dst,_Src,_Size);
    }
  }
LAB_14006d928:
  *param_1 = local_78;
  param_1[1] = uVar3 & 0xffffffff00000000 | local_70 & 0xffffffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_60[0][-1];
    *(int *)(local_60[0] + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_60[0] + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_60[0] + -3);
  }
  return param_1;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::do_get(std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double&) const

undefined8 *
std::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,float10 *param_8)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  int iVar6;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  ulonglong local_70;
  undefined8 local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  uVar4 = *param_4;
  uVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  local_88 = uVar4;
  uStack_80 = uVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  if (param_5 == '\0') {
    _M_extract<false>(&local_68,param_2,&local_78,&local_88,param_6);
  }
  else {
    _M_extract<true>((char *)&local_68,param_2,&local_78,&local_88,param_6,param_7,
                     (string *)&local_58);
  }
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<>((char *)local_58,param_8,param_7);
  *param_1 = local_68;
  param_1[1] = uVar3 & 0xffffffff00000000 | local_60 & 0xffffffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract<false>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, std::string&) const

undefined8 *
std::money_get<>::_M_extract<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          longlong param_5,uint *param_6,string *param_7)

{
  short *psVar1;
  bool bVar2;
  bool bVar3;
  int iVar4;
  char cVar5;
  bool bVar6;
  short sVar7;
  short sVar8;
  int iVar9;
  longlong lVar10;
  longlong lVar11;
  uint *puVar12;
  short *psVar13;
  __moneypunct_cache<> *this;
  undefined8 *puVar14;
  undefined1 uVar15;
  longlong **pplVar16;
  int iVar17;
  longlong *plVar18;
  longlong *plVar19;
  ulonglong uVar20;
  ulonglong uVar21;
  bool bVar22;
  bool bVar23;
  bool bVar24;
  longlong local_c8;
  ulonglong local_b8;
  int local_90;
  longlong *local_88;
  undefined8 uStack_80;
  longlong *local_78;
  ulonglong uStack_70;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  local_78 = (longlong *)*param_3;
  uStack_70 = param_3[1];
  local_88 = (longlong *)*param_4;
  uStack_80 = param_4[1];
  lVar10 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar18 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar10 * 8);
  if (plVar18 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar11 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar19 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar11 * 8);
  lVar10 = *plVar19;
  if (lVar10 == 0) {
    this = operator_new(0x80);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(this + 0x22) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(this,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)this,lVar11);
    lVar10 = *plVar19;
  }
  if (*(longlong *)(lVar10 + 0x40) == 0) {
    bVar6 = false;
  }
  else {
    bVar6 = *(longlong *)(lVar10 + 0x50) != 0;
  }
  local_58 = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar10 + 0x20) != '\0') {
    std::string::reserve((string *)&local_58,0x20);
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  pplVar16 = (longlong **)0x20;
  std::string::reserve((string *)local_50,0x20);
  psVar1 = (short *)(lVar10 + 0x66);
  bVar3 = false;
  iVar17 = 0;
  local_5c = *(undefined4 *)(lVar10 + 0x60);
  local_c8 = 0;
  local_90 = 0;
  local_b8 = 0;
  bVar2 = false;
LAB_14006dd5a:
  iVar9 = (int)local_c8;
  if (4 < *(byte *)((longlong)&local_5c + local_c8)) goto LAB_14006e6c7;
  puVar12 = (uint *)((longlong)&switchD_14006dd80::caseD_5 +
                    (longlong)
                    (int)(&switchD_14006dd80::caseD_5)[*(byte *)((longlong)&local_5c + local_c8)]);
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(*(byte *)((longlong)&local_5c + local_c8)) {
  case 0:
switchD_14006dd80_caseD_0:
    bVar23 = true;
    goto LAB_14006df4f;
  case 1:
    bVar23 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
    if (!bVar23) {
      istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
      cVar5 = (**(code **)(*plVar18 + 0x10))(plVar18,0x20);
      if (cVar5 != '\0') {
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        goto switchD_14006dd80_caseD_0;
      }
    }
    bVar23 = false;
LAB_14006df4f:
    if (local_c8 != 3) {
      bVar22 = (short)uStack_70 == -1;
      uVar21 = 0;
      bVar24 = bVar22;
      if ((local_78 != (longlong *)0x0) && (plVar19 = local_78, bVar22)) goto LAB_14006e4c8;
      while( true ) {
        pplVar16 = (longlong **)(CONCAT71((int7)(uVar21 >> 8),(short)uStack_80 == -1) & 0xffffffff);
        if ((local_88 != (longlong *)0x0) && ((short)uStack_80 == -1)) {
          if ((short *)local_88[2] < (short *)local_88[3]) {
            sVar8 = *(short *)local_88[2];
          }
          else {
            sVar8 = (**(code **)(*local_88 + 0x48))();
          }
          if (sVar8 == -1) {
            local_88 = (longlong *)0x0;
          }
          pplVar16 = (longlong **)CONCAT71((int7)((ulonglong)pplVar16 >> 8),sVar8 == -1);
        }
        if (bVar22 == SUB81(pplVar16,0)) break;
        if ((local_78 != (longlong *)0x0) && (bVar24)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar8 = *(short *)local_78[2];
          }
          else {
            sVar8 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar8 == -1) {
            local_78 = (longlong *)0x0;
          }
        }
        pplVar16 = (longlong **)0x20;
        cVar5 = (**(code **)(*plVar18 + 0x10))();
        plVar19 = local_78;
        if (cVar5 == '\0') break;
        if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
          local_78[2] = local_78[2] + 2;
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        }
        else {
          (**(code **)(*local_78 + 0x50))(local_78);
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        }
LAB_14006e4c8:
        if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
          uVar21 = (ulonglong)*(ushort *)plVar19[2];
        }
        else {
          uVar21 = (**(code **)(*plVar19 + 0x48))(plVar19);
        }
        if ((short)uVar21 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar22 = (short)uVar21 == -1;
        bVar24 = true;
      }
      break;
    }
    goto LAB_14006df5b;
  case 2:
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_b8 < 2)) && (iVar9 != 0)) {
      if (local_c8 == 1) {
        if ((bVar6) || (((char)local_5c == '\x03' || (local_5c._2_1_ == '\x01'))))
        goto LAB_14006e5b8;
      }
      else {
        if (local_c8 != 2) goto LAB_14006de19;
        if ((local_5c._3_1_ == '\x04') || ((local_5c._3_1_ == '\x03' && (bVar6))))
        goto LAB_14006e5b8;
      }
    }
    else {
LAB_14006e5b8:
      uVar21 = *(ulonglong *)(lVar10 + 0x30);
      uVar20 = 0;
      while ((pplVar16 = &local_88,
             bVar23 = istreambuf_iterator<>::equal
                                ((istreambuf_iterator<> *)&local_78,(longlong *)&local_88),
             uVar20 < uVar21 && (!bVar23))) {
        sVar8 = (short)uStack_70;
        if (((short)uStack_70 == -1) && (local_78 != (longlong *)0x0)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar8 = *(short *)local_78[2];
          }
          else {
            sVar8 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar8 != -1) goto LAB_14006e5d8;
          local_78 = (longlong *)0x0;
          pplVar16 = *(longlong ***)(lVar10 + 0x28);
          if (*(short *)((longlong)pplVar16 + uVar20 * 2) != -1) goto LAB_14006e688;
        }
        else {
LAB_14006e5d8:
          pplVar16 = *(longlong ***)(lVar10 + 0x28);
          if (*(short *)((longlong)pplVar16 + uVar20 * 2) != sVar8) goto LAB_14006e688;
        }
        if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
          local_78[2] = local_78[2] + 2;
        }
        else {
          (**(code **)(*local_78 + 0x50))();
        }
        uVar20 = uVar20 + 1;
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
      }
      if (uVar20 != uVar21) {
LAB_14006e688:
        if (uVar20 == 0) {
          bVar23 = (bool)(((byte)(*(uint *)(param_5 + 0x18) >> 9) ^ 1) & 1);
          break;
        }
        goto LAB_14006deaa;
      }
    }
LAB_14006e6c7:
    bVar23 = true;
    break;
  case 3:
    if (*(longlong *)(lVar10 + 0x40) == 0) {
      if (*(longlong *)(lVar10 + 0x50) != 0) {
LAB_14006e751:
        pplVar16 = &local_88;
        bVar23 = istreambuf_iterator<>::equal
                           ((istreambuf_iterator<> *)&local_78,(longlong *)pplVar16);
        if (!bVar23) {
          sVar8 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
          pplVar16 = *(longlong ***)(lVar10 + 0x48);
          if (*(short *)pplVar16 == sVar8) {
            local_b8 = *(ulonglong *)(lVar10 + 0x50);
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
            bVar2 = true;
            bVar23 = true;
            uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
            break;
          }
        }
        if ((*(longlong *)(lVar10 + 0x40) != 0) && (*(longlong *)(lVar10 + 0x50) == 0))
        goto LAB_14006e78b;
      }
LAB_14006dda8:
      bVar23 = (bool)(bVar6 ^ 1);
    }
    else {
      pplVar16 = &local_88;
      bVar23 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)pplVar16)
      ;
      if (!bVar23) {
        sVar8 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
        pplVar16 = *(longlong ***)(lVar10 + 0x38);
        if (*(short *)pplVar16 == sVar8) {
          local_b8 = *(ulonglong *)(lVar10 + 0x40);
          _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
          bVar23 = true;
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
          break;
        }
      }
      if (*(longlong *)(lVar10 + 0x50) != 0) goto LAB_14006e751;
      if (*(longlong *)(lVar10 + 0x40) == 0) goto LAB_14006dda8;
LAB_14006e78b:
      bVar2 = true;
      bVar23 = true;
    }
    break;
  case 4:
    uVar21 = uStack_70 & 0xffff;
    plVar19 = local_78;
    do {
      sVar8 = (short)uVar21;
      bVar22 = sVar8 == -1;
      bVar23 = bVar22;
      if ((plVar19 != (longlong *)0x0) && (bVar22)) {
        if ((ushort *)plVar19[2] < (ushort *)plVar19[3]) {
          puVar12 = (uint *)(ulonglong)*(ushort *)plVar19[2];
        }
        else {
          puVar12 = (uint *)(**(code **)(*plVar19 + 0x48))(plVar19);
        }
        if ((short)puVar12 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar23 = (short)puVar12 == -1;
      }
      pplVar16 = (longlong **)
                 (CONCAT71((int7)((ulonglong)puVar12 >> 8),(short)uStack_80 == -1) & 0xffffffff);
      if ((local_88 == (longlong *)0x0) || ((short)uStack_80 != -1)) {
        bVar24 = SUB81(pplVar16,0);
      }
      else {
        if ((short *)local_88[2] < (short *)local_88[3]) {
          sVar7 = *(short *)local_88[2];
        }
        else {
          sVar7 = (**(code **)(*local_88 + 0x48))();
        }
        if (sVar7 == -1) {
          local_88 = (longlong *)0x0;
        }
        bVar24 = sVar7 == -1;
        pplVar16 = (longlong **)CONCAT71((int7)((ulonglong)pplVar16 >> 8),bVar24);
      }
      if (bVar23 == bVar24) goto LAB_14006e2fb;
                    // WARNING: Read-only address (ram,0x0001400c62b0) is written
      psVar13 = psVar1;
      if ((local_78 != (longlong *)0x0) && (bVar22)) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar8 = *(short *)local_78[2];
        }
        else {
          sVar8 = (**(code **)(*local_78 + 0x48))();
        }
        if (sVar8 == -1) {
          local_78 = (longlong *)0x0;
        }
      }
      do {
        if (sVar8 == *psVar13) {
          cVar5 = money_base::_S_atoms[(longlong)psVar13 - (lVar10 + 100) >> 1];
          uVar20 = local_50[0][-3];
          uVar21 = uVar20 + 1;
          if (local_50[0][-2] < uVar21) {
LAB_14006e157:
            std::string::reserve((string *)local_50,uVar21);
          }
          else {
            if (_CRT_MT == 0) {
              iVar4 = (int)local_50[0][-1];
            }
            else {
              iVar4 = (int)local_50[0][-1];
            }
            if (0 < iVar4) goto LAB_14006e157;
          }
          *(char *)((longlong)local_50[0] + local_50[0][-3]) = cVar5;
          *(undefined4 *)(local_50[0] + -1) = 0;
          local_50[0][-3] = uVar21;
          *(char *)((longlong)local_50[0] + uVar20 + 1) = '\0';
          iVar4 = iVar17 + 1;
          goto LAB_14006e18d;
        }
        psVar13 = psVar13 + 1;
      } while (psVar13 != (short *)(lVar10 + 0x7a));
      bVar23 = bVar3;
      if (*(short *)(lVar10 + 0x22) == sVar8) {
        if (bVar3) goto LAB_14006e359;
        if (*(int *)(lVar10 + 0x58) < 1) goto LAB_14006e2fb;
        bVar3 = true;
        iVar4 = 0;
        local_90 = iVar17;
      }
      else {
        if ((*(char *)(lVar10 + 0x20) == '\0') || (*(short *)(lVar10 + 0x24) != sVar8))
        goto LAB_14006e2fb;
        if (bVar3) goto LAB_14006e359;
        if (iVar17 == 0) {
          bVar23 = false;
          goto LAB_14006e359;
        }
        uVar20 = local_58[-3];
        uVar21 = uVar20 + 1;
        if (local_58[-2] < uVar21) {
LAB_14006e243:
          std::string::reserve((string *)&local_58,uVar21);
        }
        else {
          if (_CRT_MT == 0) {
            iVar4 = (int)local_58[-1];
          }
          else {
            iVar4 = (int)local_58[-1];
          }
          if (0 < iVar4) goto LAB_14006e243;
        }
        *(char *)((longlong)local_58 + local_58[-3]) = (char)iVar17;
        *(undefined4 *)(local_58 + -1) = 0;
        local_58[-3] = uVar21;
        *(undefined1 *)((longlong)local_58 + uVar20 + 1) = 0;
        iVar4 = 0;
      }
LAB_14006e18d:
      iVar17 = iVar4;
      plVar19 = local_78;
      if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
        puVar12 = (uint *)(local_78[2] + 2);
        local_78[2] = (longlong)puVar12;
      }
      else {
        puVar12 = (uint *)(**(code **)(*local_78 + 0x50))(local_78);
      }
      uVar21 = 0xffffffff;
      uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
    } while( true );
  default:
                    // WARNING (jumptable): Read-only address (ram,0x0001400c62b0) is written
                    // WARNING: Read-only address (ram,0x0001400c62b0) is written
    switchD_14006dd80::caseD_5._0_1_ = in((short)pplVar16);
    *(int *)(local_c8 + 0x7c) = *(int *)(local_c8 + 0x7c) + 1;
                    // WARNING: Could not emulate address calculation at 0x0001400c62b7
                    // WARNING: Treating indirect jump as call
    puVar14 = (undefined8 *)(*(code *)(ulonglong)*puVar12)();
    return puVar14;
  }
LAB_14006ddb2:
  local_c8 = local_c8 + 1;
  if ((iVar9 + 1 < 4 & bVar23) == 0) goto LAB_14006df5b;
  goto LAB_14006dd5a;
LAB_14006e2fb:
  bVar23 = true;
LAB_14006e359:
  if (local_50[0][-3] == 0) goto LAB_14006deaa;
  goto LAB_14006ddb2;
LAB_14006df5b:
  if ((1 < local_b8 & bVar23) == 0) {
    if (bVar23 != false) {
LAB_14006de19:
      uVar21 = local_50[0][-3];
joined_r0x00014006de26:
      if ((1 < uVar21) &&
         (uVar21 = std::string::find_first_not_of((string *)local_50,'0',0), uVar21 != 0)) {
        uVar20 = local_50[0][-3];
        if (uVar21 == 0xffffffffffffffff) {
          uVar21 = uVar20 - 1;
        }
        if (uVar21 <= uVar20) {
          uVar20 = uVar21;
        }
        std::string::_M_mutate((string *)local_50,0,uVar20,0);
      }
      if (bVar2) {
        if (-1 < (int)local_50[0][-1]) {
          std::string::_M_leak_hard((string *)local_50);
        }
        if ((char)*local_50[0] != '0') {
          if (-1 < (int)local_50[0][-1]) {
            std::string::_M_leak_hard((string *)local_50);
          }
          std::string::_M_replace_aux((string *)local_50,0,0,1,'-');
          *(undefined4 *)(local_50[0] + -1) = 0xffffffff;
        }
      }
      if (local_58[-3] != 0) {
        uVar15 = (char)iVar17;
        if (bVar3) {
          uVar15 = (undefined1)local_90;
        }
        std::string::push_back((string *)&local_58,uVar15);
        cVar5 = __verify_grouping(*(longlong *)(lVar10 + 0x10),*(longlong *)(lVar10 + 0x18),
                                  (undefined8 *)&local_58);
        if (cVar5 == '\0') {
          *param_6 = *param_6 | 4;
        }
      }
      if ((!bVar3) || (*(int *)(lVar10 + 0x58) == iVar17)) {
        std::string::swap(param_7,(longlong *)local_50);
        goto LAB_14006deb5;
      }
    }
  }
  else {
    if (bVar2) {
      lVar11 = *(longlong *)(lVar10 + 0x48);
    }
    else {
      lVar11 = *(longlong *)(lVar10 + 0x38);
    }
    uVar21 = 1;
    plVar18 = local_78;
    sVar8 = (short)uStack_70;
    while( true ) {
      bVar23 = sVar8 == -1;
      bVar6 = bVar23;
      if ((plVar18 != (longlong *)0x0) && (bVar23)) {
        if ((short *)plVar18[2] < (short *)plVar18[3]) {
          sVar7 = *(short *)plVar18[2];
        }
        else {
          sVar7 = (**(code **)(*plVar18 + 0x48))(plVar18);
        }
        if (sVar7 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar6 = sVar7 == -1;
      }
      bVar22 = (short)uStack_80 == -1;
      if ((local_88 != (longlong *)0x0) && (bVar22)) break;
      if (local_b8 <= uVar21) goto LAB_14006e3be;
LAB_14006dfd4:
      if (bVar22 == bVar6) goto LAB_14006e3be;
      if ((local_78 != (longlong *)0x0) && (bVar23)) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar8 = *(short *)local_78[2];
        }
        else {
          sVar8 = (**(code **)(*local_78 + 0x48))();
        }
        if (sVar8 == -1) {
          local_78 = (longlong *)0x0;
        }
      }
      plVar18 = local_78;
      if (*(short *)(lVar11 + uVar21 * 2) != sVar8) goto LAB_14006deaa;
      if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
        local_78[2] = local_78[2] + 2;
      }
      else {
        (**(code **)(*local_78 + 0x50))(local_78);
      }
      uVar21 = uVar21 + 1;
      sVar8 = -1;
      uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
    }
    if ((short *)local_88[2] < (short *)local_88[3]) {
      sVar7 = *(short *)local_88[2];
    }
    else {
      sVar7 = (**(code **)(*local_88 + 0x48))();
    }
    if (sVar7 == -1) {
      local_88 = (longlong *)0x0;
    }
    bVar22 = sVar7 == -1;
    if (uVar21 < local_b8) goto LAB_14006dfd4;
LAB_14006e3be:
    if (uVar21 == local_b8) {
      uVar21 = local_50[0][-3];
      goto joined_r0x00014006de26;
    }
  }
LAB_14006deaa:
  *param_6 = *param_6 | 4;
LAB_14006deb5:
  bVar6 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
  if (bVar6) {
    *param_6 = *param_6 | 2;
  }
  *param_1 = local_78;
  param_1[1] = uStack_70;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  std::string::_Rep::_M_dispose(local_58 + -3);
  return param_1;
}



// WARNING: Control flow encountered bad instruction data
// WARNING: Instruction at (ram,0x00014006e063) overlaps instruction at (ram,0x00014006e062)
// 
// WARNING: Type propagation algorithm not settling
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_get<wchar_t,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_extract<true>(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, std::string&) const

char * std::money_get<>::_M_extract<true>
                 (char *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
                 longlong param_5,uint *param_6,string *param_7)

{
  short *psVar1;
  __moneypunct_cache<> *p_Var2;
  int iVar3;
  char cVar4;
  bool bVar5;
  short sVar6;
  short sVar7;
  int iVar8;
  uint uVar9;
  short *psVar10;
  ulonglong uVar11;
  longlong lVar12;
  longlong lVar13;
  char *pcVar14;
  ulonglong uVar15;
  longlong *plVar16;
  undefined1 uVar17;
  longlong **pplVar18;
  byte bVar20;
  int iVar19;
  ulonglong uVar21;
  __moneypunct_cache<> *unaff_RSI;
  longlong *plVar22;
  uint *puVar23;
  string *this;
  short *psVar24;
  ulonglong unaff_R15;
  bool bVar25;
  bool bVar26;
  bool bVar27;
  longlong *local_c8;
  uint *local_b8;
  int local_90;
  byte local_8b;
  bool local_89;
  longlong *local_88;
  undefined8 uStack_80;
  longlong *local_78;
  ulonglong uStack_70;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  local_78 = (longlong *)*param_3;
  uStack_70 = param_3[1];
  local_88 = (longlong *)*param_4;
  uStack_80 = param_4[1];
  lVar12 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar22 = *(longlong **)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 8) + lVar12 * 8);
  if (plVar22 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar13 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar16 = (longlong *)(*(longlong *)(*(longlong *)(param_5 + 0xd0) + 0x18) + lVar13 * 8);
  lVar12 = *plVar16;
  if (lVar12 == 0) {
    unaff_RSI = operator_new(0x80);
    *(undefined4 *)(unaff_RSI + 8) = 0;
    *(undefined ***)unaff_RSI = &PTR____moneypunct_cache_1400dde30;
    *(undefined8 *)(unaff_RSI + 0x10) = 0;
    *(undefined8 *)(unaff_RSI + 0x18) = 0;
    unaff_RSI[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(unaff_RSI + 0x22) = 0;
    *(undefined8 *)(unaff_RSI + 0x28) = 0;
    *(undefined8 *)(unaff_RSI + 0x30) = 0;
    *(undefined8 *)(unaff_RSI + 0x38) = 0;
    *(undefined8 *)(unaff_RSI + 0x40) = 0;
    *(undefined8 *)(unaff_RSI + 0x48) = 0;
    *(undefined8 *)(unaff_RSI + 0x50) = 0;
    *(undefined4 *)(unaff_RSI + 0x58) = 0;
    *(undefined8 *)(unaff_RSI + 0x5c) = 0;
    unaff_RSI[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(unaff_RSI,(longlong *)(param_5 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_5 + 0xd0),(longlong *)unaff_RSI,lVar13);
    lVar12 = *plVar16;
  }
  if (*(longlong *)(lVar12 + 0x40) == 0) {
    local_89 = false;
  }
  else {
    local_89 = *(longlong *)(lVar12 + 0x50) != 0;
  }
  local_58 = std::string::_S_construct(0,'\0');
  if (*(char *)(lVar12 + 0x20) != '\0') {
    std::string::reserve((string *)&local_58,0x20);
  }
  local_50[0] = std::string::_S_construct(0,'\0');
  pplVar18 = (longlong **)0x20;
  std::string::reserve((string *)local_50,0x20);
  psVar1 = (short *)(lVar12 + 0x66);
  local_8b = 0;
  uVar15 = 0;
  psVar24 = (short *)(lVar12 + 0x7a);
  local_5c = *(undefined4 *)(lVar12 + 0x60);
  this = (string *)&local_58;
  local_c8 = (longlong *)0x0;
  local_90 = 0;
  local_b8 = (uint *)0x0;
  bVar5 = false;
LAB_14006ecba:
  iVar8 = (int)local_c8;
  if (4 < *(byte *)((longlong)&local_5c + (longlong)local_c8)) goto LAB_14006f627;
  bVar20 = *(byte *)((longlong)&local_5c + (longlong)local_c8);
  puVar23 = &switchD_14006ece0::caseD_a;
  pcVar14 = (char *)((longlong)&switchD_14006ece0::caseD_a +
                    (longlong)(int)(&switchD_14006ece0::caseD_a)[bVar20]);
  plVar16 = local_c8;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(bVar20) {
  case 0:
switchD_14006ece0_caseD_0:
    unaff_R15 = 1;
    goto LAB_14006eeaf;
  case 1:
    bVar25 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
    if (!bVar25) {
      istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
      cVar4 = (**(code **)(*plVar22 + 0x10))(plVar22,0x20);
      if (cVar4 != '\0') {
        _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        goto switchD_14006ece0_caseD_0;
      }
    }
    unaff_R15 = 0;
LAB_14006eeaf:
    if (local_c8 != (longlong *)0x3) {
      bVar25 = (short)uStack_70 == -1;
      uVar11 = 0;
      if ((local_78 != (longlong *)0x0) && (plVar16 = local_78, bVar25)) goto LAB_14006f428;
      unaff_RSI = (__moneypunct_cache<> *)(ulonglong)bVar25;
      while( true ) {
        pplVar18 = (longlong **)(CONCAT71((int7)(uVar11 >> 8),(short)uStack_80 == -1) & 0xffffffff);
        if ((local_88 != (longlong *)0x0) && ((short)uStack_80 == -1)) {
          if ((short *)local_88[2] < (short *)local_88[3]) {
            sVar7 = *(short *)local_88[2];
          }
          else {
            sVar7 = (**(code **)(*local_88 + 0x48))();
          }
          if (sVar7 == -1) {
            local_88 = (longlong *)0x0;
          }
          pplVar18 = (longlong **)CONCAT71((int7)((ulonglong)pplVar18 >> 8),sVar7 == -1);
        }
        if (bVar25 == SUB81(pplVar18,0)) break;
        if ((local_78 != (longlong *)0x0) && ((char)unaff_RSI != '\0')) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar7 = *(short *)local_78[2];
          }
          else {
            sVar7 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar7 == -1) {
            local_78 = (longlong *)0x0;
          }
        }
        pplVar18 = (longlong **)0x20;
        cVar4 = (**(code **)(*plVar22 + 0x10))();
        plVar16 = local_78;
        if (cVar4 == '\0') break;
        if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
          local_78[2] = local_78[2] + 2;
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        }
        else {
          (**(code **)(*local_78 + 0x50))(local_78);
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        }
LAB_14006f428:
        if ((ushort *)plVar16[2] < (ushort *)plVar16[3]) {
          uVar11 = (ulonglong)*(ushort *)plVar16[2];
        }
        else {
          uVar11 = (**(code **)(*plVar16 + 0x48))(plVar16);
        }
        if ((short)uVar11 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar25 = (short)uVar11 == -1;
        unaff_RSI = (__moneypunct_cache<> *)0x1;
      }
      break;
    }
    goto LAB_14006eebb;
  case 2:
    if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_b8 < (uint *)0x2)) && (iVar8 != 0)) {
      if (local_c8 == (longlong *)0x1) {
        if ((local_89 != false) || (((char)local_5c == '\x03' || (local_5c._2_1_ == '\x01'))))
        goto LAB_14006f518;
      }
      else {
        if (local_c8 != (longlong *)0x2) goto LAB_14006ed79;
        if ((local_5c._3_1_ == '\x04') || ((local_5c._3_1_ == '\x03' && (local_89 != false))))
        goto LAB_14006f518;
      }
    }
    else {
LAB_14006f518:
      p_Var2 = *(__moneypunct_cache<> **)(lVar12 + 0x30);
      unaff_RSI = (__moneypunct_cache<> *)0x0;
      while ((pplVar18 = &local_88,
             bVar25 = istreambuf_iterator<>::equal
                                ((istreambuf_iterator<> *)&local_78,(longlong *)&local_88),
             unaff_RSI < p_Var2 && (!bVar25))) {
        sVar7 = (short)uStack_70;
        if (((short)uStack_70 == -1) && (local_78 != (longlong *)0x0)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar7 = *(short *)local_78[2];
          }
          else {
            sVar7 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar7 != -1) goto LAB_14006f538;
          local_78 = (longlong *)0x0;
          pplVar18 = *(longlong ***)(lVar12 + 0x28);
          if (*(short *)((longlong)pplVar18 + (longlong)unaff_RSI * 2) != -1) goto LAB_14006f5e8;
        }
        else {
LAB_14006f538:
          pplVar18 = *(longlong ***)(lVar12 + 0x28);
          if (*(short *)((longlong)pplVar18 + (longlong)unaff_RSI * 2) != sVar7) goto LAB_14006f5e8;
        }
        if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
          local_78[2] = local_78[2] + 2;
        }
        else {
          (**(code **)(*local_78 + 0x50))();
        }
        unaff_RSI = unaff_RSI + 1;
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
      }
      if (unaff_RSI != p_Var2) {
LAB_14006f5e8:
        if (unaff_RSI == (__moneypunct_cache<> *)0x0) {
          unaff_R15 = (ulonglong)((*(uint *)(param_5 + 0x18) >> 9 ^ 1) & 1);
          break;
        }
        goto LAB_14006ee0a;
      }
    }
LAB_14006f627:
    unaff_R15 = 1;
    break;
  case 3:
    if (*(longlong *)(lVar12 + 0x40) == 0) {
      if (*(longlong *)(lVar12 + 0x50) != 0) {
LAB_14006f6b1:
        pplVar18 = &local_88;
        bVar25 = istreambuf_iterator<>::equal
                           ((istreambuf_iterator<> *)&local_78,(longlong *)pplVar18);
        if (!bVar25) {
          sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
          pplVar18 = *(longlong ***)(lVar12 + 0x48);
          if (*(short *)pplVar18 == sVar7) {
            local_b8 = *(uint **)(lVar12 + 0x50);
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
            bVar5 = true;
            unaff_R15 = 1;
            uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
            break;
          }
        }
        if ((*(longlong *)(lVar12 + 0x40) != 0) && (*(longlong *)(lVar12 + 0x50) == 0))
        goto LAB_14006f6eb;
      }
LAB_14006ed08:
      unaff_R15 = (ulonglong)(local_89 ^ 1);
    }
    else {
      pplVar18 = &local_88;
      bVar25 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)pplVar18)
      ;
      if (!bVar25) {
        sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
        pplVar18 = *(longlong ***)(lVar12 + 0x38);
        if (*(short *)pplVar18 == sVar7) {
          local_b8 = *(uint **)(lVar12 + 0x40);
          _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
          unaff_R15 = 1;
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
          break;
        }
      }
      if (*(longlong *)(lVar12 + 0x50) != 0) goto LAB_14006f6b1;
      if (*(longlong *)(lVar12 + 0x40) == 0) goto LAB_14006ed08;
LAB_14006f6eb:
      bVar5 = true;
      unaff_R15 = 1;
    }
    break;
  case 4:
    unaff_RSI = (__moneypunct_cache<> *)(uStack_70 & 0xffff);
    plVar16 = local_78;
    do {
      bVar27 = (short)unaff_RSI == -1;
      bVar25 = bVar27;
      if ((plVar16 != (longlong *)0x0) && (bVar27)) {
        if ((ushort *)plVar16[2] < (ushort *)plVar16[3]) {
          pcVar14 = (char *)(ulonglong)*(ushort *)plVar16[2];
        }
        else {
          pcVar14 = (char *)(**(code **)(*plVar16 + 0x48))(plVar16);
        }
        if ((short)pcVar14 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar25 = (short)pcVar14 == -1;
      }
      pplVar18 = (longlong **)
                 (CONCAT71((int7)((ulonglong)pcVar14 >> 8),(short)uStack_80 == -1) & 0xffffffff);
      if ((local_88 == (longlong *)0x0) || ((short)uStack_80 != -1)) {
        bVar26 = SUB81(pplVar18,0);
      }
      else {
        if ((short *)local_88[2] < (short *)local_88[3]) {
          sVar7 = *(short *)local_88[2];
        }
        else {
          sVar7 = (**(code **)(*local_88 + 0x48))();
        }
        if (sVar7 == -1) {
          local_88 = (longlong *)0x0;
        }
        bVar26 = sVar7 == -1;
        pplVar18 = (longlong **)CONCAT71((int7)((ulonglong)pplVar18 >> 8),bVar26);
      }
      if (bVar25 == bVar26) goto LAB_14006f25b;
                    // WARNING: Read-only address (ram,0x0001400c629c) is written
                    // WARNING: Read-only address (ram,0x0001400c62b0) is written
      psVar10 = psVar1;
      if ((local_78 != (longlong *)0x0) && (bVar27)) {
        if ((ushort *)local_78[2] < (ushort *)local_78[3]) {
          unaff_RSI = (__moneypunct_cache<> *)(ulonglong)*(ushort *)local_78[2];
        }
        else {
          uVar9 = (**(code **)(*local_78 + 0x48))();
          unaff_RSI = (__moneypunct_cache<> *)(ulonglong)uVar9;
        }
        if ((short)unaff_RSI == -1) {
          local_78 = (longlong *)0x0;
        }
      }
      do {
        sVar7 = (short)unaff_RSI;
        iVar19 = (int)uVar15;
        if (sVar7 == *psVar10) {
          cVar4 = money_base::_S_atoms[(longlong)psVar10 - (lVar12 + 100) >> 1];
          uVar21 = local_50[0][-3];
          uVar11 = uVar21 + 1;
          if (local_50[0][-2] < uVar11) {
LAB_14006f0b7:
            std::string::reserve((string *)local_50,uVar11);
          }
          else {
            if (_CRT_MT == 0) {
              iVar3 = (int)local_50[0][-1];
            }
            else {
              iVar3 = (int)local_50[0][-1];
            }
            if (0 < iVar3) goto LAB_14006f0b7;
          }
          uVar15 = (ulonglong)(iVar19 + 1);
          *(char *)((longlong)local_50[0] + local_50[0][-3]) = cVar4;
          *(undefined4 *)(local_50[0] + -1) = 0;
          local_50[0][-3] = uVar11;
          *(char *)((longlong)local_50[0] + uVar21 + 1) = '\0';
          goto LAB_14006f0ed;
        }
        psVar10 = psVar10 + 1;
      } while (psVar10 != psVar24);
      if (*(short *)(lVar12 + 0x22) == sVar7) {
        if (local_8b != 0) goto LAB_14006f2b3;
        unaff_RSI = (__moneypunct_cache<> *)(ulonglong)*(uint *)(lVar12 + 0x58);
        if ((int)*(uint *)(lVar12 + 0x58) < 1) goto LAB_14006f25b;
        uVar15 = 0;
        local_8b = 1;
        local_90 = iVar19;
      }
      else {
        if ((*(char *)(lVar12 + 0x20) == '\0') || (*(short *)(lVar12 + 0x24) != sVar7))
        goto LAB_14006f25b;
        if (local_8b != 0) {
LAB_14006f2b3:
          unaff_R15 = (ulonglong)local_8b;
          goto LAB_14006f2b9;
        }
        if (iVar19 == 0) {
          unaff_R15 = 0;
          goto LAB_14006f2b9;
        }
        uVar21 = local_58[-3];
        uVar11 = uVar21 + 1;
        if (local_58[-2] < uVar11) {
LAB_14006f1a3:
          std::string::reserve(this,uVar11);
        }
        else {
          if (_CRT_MT == 0) {
            iVar19 = (int)local_58[-1];
          }
          else {
            iVar19 = (int)local_58[-1];
          }
          if (0 < iVar19) goto LAB_14006f1a3;
        }
        *(char *)((longlong)local_58 + local_58[-3]) = (char)uVar15;
        uVar15 = 0;
        *(undefined4 *)(local_58 + -1) = 0;
        local_58[-3] = uVar11;
        *(undefined1 *)((longlong)local_58 + uVar21 + 1) = 0;
      }
LAB_14006f0ed:
      plVar16 = local_78;
      if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
        pcVar14 = (char *)(local_78[2] + 2);
        local_78[2] = (longlong)pcVar14;
      }
      else {
        pcVar14 = (char *)(**(code **)(*local_78 + 0x50))(local_78);
      }
      unaff_RSI = (__moneypunct_cache<> *)0xffffffff;
      uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
    } while( true );
  case 5:
    goto switchD_14006ece0_caseD_5;
  case 6:
    goto switchD_14006ece0_caseD_6;
  case 7:
    *(undefined4 *)local_c8 = 0x247c8948;
                    // WARNING: Bad instruction - Truncating control flow here
    halt_baddata();
  case 8:
    goto switchD_14006ece0_caseD_8;
  case 9:
                    // WARNING (jumptable): Read-only address (ram,0x0001400c629c) is written
                    // WARNING: Read-only address (ram,0x0001400c629c) is written
    switchD_14006ece0::caseD_a = 0xfffa93df;
    *pcVar14 = *pcVar14 + (char)pcVar14;
    goto LAB_14006e069;
  default:
    if (local_c8 == (longlong *)0x1 || pcVar14 == (char *)0x0) {
                    // WARNING: Bad instruction - Truncating control flow here
      halt_baddata();
    }
    (**(code **)((longlong)local_c8 + -0x410005de))();
    bVar20 = (byte)(uVar15 >> 8);
    lVar12 = CONCAT71((int7)((ulonglong)pplVar18 >> 8),(byte)pplVar18 & bVar20);
    *(int *)(unaff_RSI + 0x26) = *(int *)(unaff_RSI + 0x26) + 1;
    *(int *)(lVar12 + 0x228cfffa) = *(int *)(lVar12 + 0x228cfffa) + -1;
    *(int *)(unaff_RSI + 0x75fffa20) = *(int *)(unaff_RSI + 0x75fffa20) + 1;
    *(int *)(unaff_RSI + 0x2d) = *(int *)(unaff_RSI + 0x2d) + 1;
    iRam000000001d75fffa = iRam000000001d75fffa + 1;
    (*(code *)((longlong)&UINT_1400c62c8 + 3))();
    iRam000000001d75fffa = iRam000000001d75fffa + 1;
    *(int *)unaff_RSI = *(int *)unaff_RSI + 1;
                    // WARNING: Could not recover jumptable at 0x0001400c6293. Too many branches
                    // WARNING: Treating indirect jump as call
    pcVar14 = (char *)(*(code *)(ulonglong)
                                *(uint *)((string *)local_50 +
                                         CONCAT62((int6)(uVar15 >> 0x10),
                                                  CONCAT11(bVar20 ^ (byte)lVar12,(char)uVar15)) +
                                         0x2aa7fffa))();
    return pcVar14;
  }
LAB_14006ed12:
  local_c8 = (longlong *)((longlong)local_c8 + 1);
  if ((iVar8 + 1 < 4 & (byte)unaff_R15) == 0) goto LAB_14006eebb;
  goto LAB_14006ecba;
switchD_14006ece0_caseD_5:
  _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(plVar16);
  uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
switchD_14006dd80_caseD_0:
  uVar9 = 1;
LAB_14006df4f:
  bVar20 = (byte)uVar9;
  if (local_c8 != (longlong *)0x3) {
    bVar25 = (short)uStack_70 == -1;
    uVar11 = 0;
    bVar27 = bVar25;
    if ((local_78 != (longlong *)0x0) && (plVar16 = local_78, bVar25)) goto LAB_14006e4c8;
    while( true ) {
      pplVar18 = (longlong **)(CONCAT71((int7)(uVar11 >> 8),(short)uStack_80 == -1) & 0xffffffff);
      if ((local_88 != (longlong *)0x0) && ((short)uStack_80 == -1)) {
        if ((short *)local_88[2] < (short *)local_88[3]) {
          sVar7 = *(short *)local_88[2];
        }
        else {
          sVar7 = (**(code **)(*local_88 + 0x48))();
        }
        if (sVar7 == -1) {
          local_88 = (longlong *)0x0;
        }
        pplVar18 = (longlong **)CONCAT71((int7)((ulonglong)pplVar18 >> 8),sVar7 == -1);
      }
      if (bVar25 == SUB81(pplVar18,0)) break;
      if ((local_78 != (longlong *)0x0) && (bVar27)) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar7 = *(short *)local_78[2];
        }
        else {
          sVar7 = (**(code **)(*local_78 + 0x48))();
        }
        if (sVar7 == -1) {
          local_78 = (longlong *)0x0;
        }
      }
      pplVar18 = (longlong **)0x20;
      cVar4 = (**(code **)(*plVar22 + 0x10))();
      plVar16 = local_78;
      if (cVar4 == '\0') break;
      if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
        local_78[2] = local_78[2] + 2;
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
      }
      else {
        (**(code **)(*local_78 + 0x50))(local_78);
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
      }
LAB_14006e4c8:
      if ((ushort *)plVar16[2] < (ushort *)plVar16[3]) {
        uVar11 = (ulonglong)*(ushort *)plVar16[2];
      }
      else {
        uVar11 = (**(code **)(*plVar16 + 0x48))(plVar16);
      }
      if ((short)uVar11 == -1) {
        local_78 = (longlong *)0x0;
      }
      bVar25 = (short)uVar11 == -1;
      bVar27 = true;
    }
LAB_14006ddb2:
    iVar8 = (int)local_c8;
    local_c8 = (longlong *)((longlong)local_c8 + 1);
    bVar20 = (byte)uVar9;
    if ((iVar8 + 1 < 4 & bVar20) == 0) goto LAB_14006df5b;
    pcVar14 = (char *)&local_5c;
    if (4 < *(byte *)((longlong)&local_5c + (longlong)local_c8)) goto LAB_14006e6c7;
switchD_14006ece0_caseD_8:
    iVar8 = (int)uVar15;
    puVar23 = (uint *)((longlong)&switchD_14006dd80::caseD_5 +
                      (longlong)
                      (int)(&switchD_14006dd80::caseD_5)[(byte)pcVar14[(longlong)local_c8]]);
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
    switch(pcVar14[(longlong)local_c8]) {
    case '\0':
      goto switchD_14006dd80_caseD_0;
    case '\x01':
      goto switchD_14006dd80_caseD_1;
    case '\x02':
      if ((((*(byte *)(param_5 + 0x19) & 2) == 0) && (local_b8 < (uint *)0x2)) &&
         ((int)local_c8 != 0)) {
        if (local_c8 == (longlong *)0x1) {
          if ((local_89 != false) || (((char)local_5c == '\x03' || (local_5c._2_1_ == '\x01'))))
          goto LAB_14006e5b8;
        }
        else {
          if (local_c8 != (longlong *)0x2) goto LAB_14006de19;
          if ((local_5c._3_1_ == '\x04') || ((local_5c._3_1_ == '\x03' && (local_89 != false))))
          goto LAB_14006e5b8;
        }
      }
      else {
LAB_14006e5b8:
        uVar11 = *(ulonglong *)(lVar12 + 0x30);
        uVar21 = 0;
        while ((pplVar18 = &local_88,
               bVar25 = istreambuf_iterator<>::equal
                                  ((istreambuf_iterator<> *)&local_78,(longlong *)&local_88),
               uVar21 < uVar11 && (!bVar25))) {
          sVar7 = (short)uStack_70;
          if (((short)uStack_70 == -1) && (local_78 != (longlong *)0x0)) {
            if ((short *)local_78[2] < (short *)local_78[3]) {
              sVar7 = *(short *)local_78[2];
            }
            else {
              sVar7 = (**(code **)(*local_78 + 0x48))();
            }
            if (sVar7 != -1) goto LAB_14006e5d8;
            local_78 = (longlong *)0x0;
            pplVar18 = *(longlong ***)(lVar12 + 0x28);
            if (*(short *)((longlong)pplVar18 + uVar21 * 2) != -1) goto LAB_14006e688;
          }
          else {
LAB_14006e5d8:
            pplVar18 = *(longlong ***)(lVar12 + 0x28);
            if (*(short *)((longlong)pplVar18 + uVar21 * 2) != sVar7) goto LAB_14006e688;
          }
          if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
            local_78[2] = local_78[2] + 2;
          }
          else {
            (**(code **)(*local_78 + 0x50))();
          }
          uVar21 = uVar21 + 1;
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
        }
        if (uVar21 != uVar11) {
LAB_14006e688:
          if (uVar21 != 0) goto LAB_14006deaa;
          uVar9 = (*(uint *)(param_5 + 0x18) >> 9 ^ 1) & 1;
          goto LAB_14006ddb2;
        }
      }
LAB_14006e6c7:
      uVar9 = 1;
      goto LAB_14006ddb2;
    case '\x03':
      if (*(longlong *)(lVar12 + 0x40) == 0) {
        if (*(longlong *)(lVar12 + 0x50) != 0) goto LAB_14006e751;
LAB_14006dda8:
        uVar9 = local_89 ^ 1;
        goto LAB_14006ddb2;
      }
      pplVar18 = &local_88;
      bVar25 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)pplVar18)
      ;
      if (!bVar25) {
        sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
        pplVar18 = *(longlong ***)(lVar12 + 0x38);
        if (*(short *)pplVar18 == sVar7) {
          local_b8 = *(uint **)(lVar12 + 0x40);
          _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
          uVar9 = 1;
          uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
          goto LAB_14006ddb2;
        }
      }
      if (*(longlong *)(lVar12 + 0x50) == 0) {
        if (*(longlong *)(lVar12 + 0x40) == 0) goto LAB_14006dda8;
      }
      else {
LAB_14006e751:
        pplVar18 = &local_88;
        bVar25 = istreambuf_iterator<>::equal
                           ((istreambuf_iterator<> *)&local_78,(longlong *)pplVar18);
        if (!bVar25) {
          sVar7 = istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
          pplVar18 = *(longlong ***)(lVar12 + 0x48);
          if (*(short *)pplVar18 == sVar7) {
            local_b8 = *(uint **)(lVar12 + 0x50);
            _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(local_78);
            bVar5 = true;
            uVar9 = 1;
            uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
            goto LAB_14006ddb2;
          }
        }
        if ((*(longlong *)(lVar12 + 0x40) == 0) || (*(longlong *)(lVar12 + 0x50) != 0))
        goto LAB_14006dda8;
      }
      bVar5 = true;
      uVar9 = 1;
      goto LAB_14006ddb2;
    case '\x04':
      uVar11 = uStack_70 & 0xffff;
      plVar16 = local_78;
      do {
        sVar7 = (short)uVar11;
        bVar27 = sVar7 == -1;
        bVar25 = bVar27;
        if ((plVar16 != (longlong *)0x0) && (bVar27)) {
          if ((ushort *)plVar16[2] < (ushort *)plVar16[3]) {
            puVar23 = (uint *)(ulonglong)*(ushort *)plVar16[2];
          }
          else {
            puVar23 = (uint *)(**(code **)(*plVar16 + 0x48))(plVar16);
          }
          if ((short)puVar23 == -1) {
            local_78 = (longlong *)0x0;
          }
          bVar25 = (short)puVar23 == -1;
        }
        pplVar18 = (longlong **)
                   (CONCAT71((int7)((ulonglong)puVar23 >> 8),(short)uStack_80 == -1) & 0xffffffff);
        if ((local_88 == (longlong *)0x0) || ((short)uStack_80 != -1)) {
          bVar26 = SUB81(pplVar18,0);
        }
        else {
          if ((short *)local_88[2] < (short *)local_88[3]) {
            sVar6 = *(short *)local_88[2];
          }
          else {
            sVar6 = (**(code **)(*local_88 + 0x48))();
          }
          if (sVar6 == -1) {
            local_88 = (longlong *)0x0;
          }
          bVar26 = sVar6 == -1;
          pplVar18 = (longlong **)CONCAT71((int7)((ulonglong)pplVar18 >> 8),bVar26);
        }
        if (bVar25 == bVar26) goto LAB_14006e2fb;
                    // WARNING: Read-only address (ram,0x0001400c629c) is written
                    // WARNING: Read-only address (ram,0x0001400c62b0) is written
        psVar10 = psVar1;
        if ((local_78 != (longlong *)0x0) && (bVar27)) {
          if ((short *)local_78[2] < (short *)local_78[3]) {
            sVar7 = *(short *)local_78[2];
          }
          else {
            sVar7 = (**(code **)(*local_78 + 0x48))();
          }
          if (sVar7 == -1) {
            local_78 = (longlong *)0x0;
          }
        }
        do {
          iVar8 = (int)uVar15;
          if (sVar7 == *psVar10) {
            cVar4 = money_base::_S_atoms[(longlong)psVar10 - (lVar12 + 100) >> 1];
            uVar21 = local_50[0][-3];
            uVar11 = uVar21 + 1;
            if (local_50[0][-2] < uVar11) {
LAB_14006e157:
              std::string::reserve((string *)local_50,uVar11);
            }
            else {
              if (_CRT_MT == 0) {
                iVar19 = (int)local_50[0][-1];
              }
              else {
                iVar19 = (int)local_50[0][-1];
              }
              if (0 < iVar19) goto LAB_14006e157;
            }
            uVar15 = (ulonglong)(iVar8 + 1);
            *(char *)((longlong)local_50[0] + local_50[0][-3]) = cVar4;
            *(undefined4 *)(local_50[0] + -1) = 0;
            local_50[0][-3] = uVar11;
            *(char *)((longlong)local_50[0] + uVar21 + 1) = '\0';
            goto LAB_14006e18d;
          }
          psVar10 = psVar10 + 1;
        } while (psVar10 != psVar24);
        if (*(short *)(lVar12 + 0x22) == sVar7) {
          if (local_8b != 0) goto LAB_14006e353;
          if (*(int *)(lVar12 + 0x58) < 1) goto LAB_14006e2fb;
          uVar15 = 0;
          local_8b = 1;
          local_90 = iVar8;
        }
        else {
          if ((*(char *)(lVar12 + 0x20) == '\0') || (*(short *)(lVar12 + 0x24) != sVar7))
          goto LAB_14006e2fb;
          if (local_8b != 0) {
LAB_14006e353:
            uVar9 = (uint)local_8b;
            goto LAB_14006e359;
          }
          if (iVar8 == 0) {
            uVar9 = 0;
            goto LAB_14006e359;
          }
          uVar21 = local_58[-3];
          uVar11 = uVar21 + 1;
          if (local_58[-2] < uVar11) {
LAB_14006e243:
            std::string::reserve(this,uVar11);
          }
          else {
            if (_CRT_MT == 0) {
              iVar8 = (int)local_58[-1];
            }
            else {
              iVar8 = (int)local_58[-1];
            }
            if (0 < iVar8) goto LAB_14006e243;
          }
          *(char *)((longlong)local_58 + local_58[-3]) = (char)uVar15;
          uVar15 = 0;
          *(undefined4 *)(local_58 + -1) = 0;
          local_58[-3] = uVar11;
          *(undefined1 *)((longlong)local_58 + uVar21 + 1) = 0;
        }
LAB_14006e18d:
        plVar16 = local_78;
        if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
          puVar23 = (uint *)(local_78[2] + 2);
          local_78[2] = (longlong)puVar23;
        }
        else {
          puVar23 = (uint *)(**(code **)(*local_78 + 0x50))(local_78);
        }
        uVar11 = 0xffffffff;
        uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
      } while( true );
    default:
                    // WARNING (jumptable): Read-only address (ram,0x0001400c62b0) is written
                    // WARNING: Read-only address (ram,0x0001400c62b0) is written
      switchD_14006dd80::caseD_5._0_1_ = in((short)pplVar18);
      *(int *)((longlong)local_c8 + 0x7c) = *(int *)((longlong)local_c8 + 0x7c) + 1;
                    // WARNING: Could not emulate address calculation at 0x0001400c62b7
                    // WARNING: Treating indirect jump as call
      pcVar14 = (char *)(*(code *)(ulonglong)*puVar23)();
      return pcVar14;
    }
  }
LAB_14006df5b:
  iVar8 = (int)uVar15;
  if (((uint *)0x1 < local_b8 & bVar20) == 0) {
    if (bVar20 == 0) goto LAB_14006deaa;
LAB_14006de19:
    uVar15 = local_50[0][-3];
    goto joined_r0x00014006de26;
  }
  if (bVar5) {
    unaff_R15 = *(ulonglong *)(lVar12 + 0x48);
  }
  else {
    unaff_R15 = *(ulonglong *)(lVar12 + 0x38);
  }
  puVar23 = (uint *)0x1;
  this = (string *)(uStack_70 & 0xffff);
  plVar22 = local_78;
  goto LAB_14006e033;
LAB_14006e2fb:
  uVar9 = 1;
LAB_14006e359:
  if (local_50[0][-3] == 0) goto LAB_14006deaa;
  goto LAB_14006ddb2;
switchD_14006dd80_caseD_1:
  bVar25 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
  if (!bVar25) {
    istreambuf_iterator<>::_M_get((istreambuf_iterator<> *)&local_78);
    cVar4 = (**(code **)(*plVar22 + 0x10))(plVar22,0x20);
    plVar16 = local_78;
    if (cVar4 != '\0') goto switchD_14006ece0_caseD_5;
  }
  uVar9 = 0;
  goto LAB_14006df4f;
LAB_14006e033:
  sVar7 = (short)this;
  bVar25 = sVar7 == -1;
  cVar4 = bVar25;
  if ((plVar22 != (longlong *)0x0) && (bVar25)) {
    if ((ushort *)plVar22[2] < (ushort *)plVar22[3]) {
      pcVar14 = (char *)(ulonglong)*(ushort *)plVar22[2];
    }
    else {
      pcVar14 = (char *)(**(code **)(*plVar22 + 0x48))(plVar22);
    }
    psVar24 = (short *)0x1;
    if ((short)pcVar14 == -1) {
      local_78 = (longlong *)0x0;
    }
LAB_14006e069:
    sVar7 = (short)this;
    bVar25 = (short)pcVar14 == -1;
    cVar4 = (char)psVar24;
  }
  iVar8 = (int)uVar15;
  bVar27 = (short)uStack_80 == -1;
  if ((local_88 != (longlong *)0x0) && (bVar27)) {
    if ((short *)local_88[2] < (short *)local_88[3]) {
      sVar6 = *(short *)local_88[2];
    }
    else {
      sVar6 = (**(code **)(*local_88 + 0x48))();
    }
    if (sVar6 == -1) {
      local_88 = (longlong *)0x0;
    }
    bVar27 = sVar6 == -1;
    if (puVar23 < local_b8) goto LAB_14006dfd4;
LAB_14006e3be:
    if (puVar23 != local_b8) goto LAB_14006deaa;
    uVar15 = local_50[0][-3];
joined_r0x00014006de26:
    if ((1 < uVar15) &&
       (uVar15 = std::string::find_first_not_of((string *)local_50,'0',0), uVar15 != 0)) {
      uVar11 = local_50[0][-3];
      if (uVar15 == 0xffffffffffffffff) {
        uVar15 = uVar11 - 1;
      }
      if (uVar15 <= uVar11) {
        uVar11 = uVar15;
      }
      std::string::_M_mutate((string *)local_50,0,uVar11,0);
    }
    if (bVar5) {
      if (-1 < (int)local_50[0][-1]) {
        std::string::_M_leak_hard((string *)local_50);
      }
      if ((char)*local_50[0] != '0') {
        if (-1 < (int)local_50[0][-1]) {
          std::string::_M_leak_hard((string *)local_50);
        }
        std::string::_M_replace_aux((string *)local_50,0,0,1,'-');
        *(undefined4 *)(local_50[0] + -1) = 0xffffffff;
      }
    }
    if (local_58[-3] != 0) {
      uVar17 = (char)iVar8;
      if (local_8b != 0) {
        uVar17 = (undefined1)local_90;
      }
      std::string::push_back((string *)&local_58,uVar17);
      cVar4 = __verify_grouping(*(longlong *)(lVar12 + 0x10),*(longlong *)(lVar12 + 0x18),
                                (undefined8 *)&local_58);
      if (cVar4 == '\0') {
        *param_6 = *param_6 | 4;
      }
    }
    if ((local_8b == 0) || (*(int *)(lVar12 + 0x58) == iVar8)) {
      std::string::swap(param_7,(longlong *)local_50);
    }
    else {
LAB_14006deaa:
      *param_6 = *param_6 | 4;
    }
    bVar5 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
    if (bVar5) {
      *param_6 = *param_6 | 2;
    }
    *(longlong **)param_1 = local_78;
    *(ulonglong *)(param_1 + 8) = uStack_70;
    std::string::_Rep::_M_dispose(local_50[0] + -3);
    std::string::_Rep::_M_dispose(local_58 + -3);
    pcVar14 = param_1;
switchD_14006ece0_caseD_6:
    return pcVar14;
  }
  if (local_b8 <= puVar23) goto LAB_14006e3be;
LAB_14006dfd4:
  if (bVar27 == bVar25) goto LAB_14006e3be;
  if ((local_78 != (longlong *)0x0) && (cVar4 != '\0')) {
    if ((short *)local_78[2] < (short *)local_78[3]) {
      sVar7 = *(short *)local_78[2];
    }
    else {
      sVar7 = (**(code **)(*local_78 + 0x48))();
    }
    if (sVar7 == -1) {
      local_78 = (longlong *)0x0;
    }
  }
  plVar22 = local_78;
  if (*(short *)(unaff_R15 + (longlong)puVar23 * 2) != sVar7) goto LAB_14006deaa;
  if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
    local_78[2] = local_78[2] + 2;
  }
  else {
    (**(code **)(*local_78 + 0x50))(local_78);
  }
  puVar23 = (uint *)((longlong)puVar23 + 1);
  this = (string *)0xffffffff;
  uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
  goto LAB_14006e033;
LAB_14006f25b:
  unaff_R15 = 1;
LAB_14006f2b9:
  if (local_50[0][-3] == 0) goto LAB_14006ee0a;
  goto LAB_14006ed12;
LAB_14006eebb:
  iVar8 = (int)uVar15;
  if (((uint *)0x1 < local_b8 & (byte)unaff_R15) == 0) {
    if ((byte)unaff_R15 != 0) {
LAB_14006ed79:
      iVar8 = (int)uVar15;
      uVar15 = local_50[0][-3];
joined_r0x00014006ed86:
      if ((1 < uVar15) &&
         (uVar15 = std::string::find_first_not_of((string *)local_50,'0',0), uVar15 != 0)) {
        uVar11 = local_50[0][-3];
        if (uVar15 == 0xffffffffffffffff) {
          uVar15 = uVar11 - 1;
        }
        if (uVar15 <= uVar11) {
          uVar11 = uVar15;
        }
        std::string::_M_mutate((string *)local_50,0,uVar11,0);
      }
      if (bVar5) {
        if (-1 < (int)local_50[0][-1]) {
          std::string::_M_leak_hard((string *)local_50);
        }
        if ((char)*local_50[0] != '0') {
          if (-1 < (int)local_50[0][-1]) {
            std::string::_M_leak_hard((string *)local_50);
          }
          std::string::_M_replace_aux((string *)local_50,0,0,1,'-');
          *(undefined4 *)(local_50[0] + -1) = 0xffffffff;
        }
      }
      if (local_58[-3] != 0) {
        uVar17 = (char)iVar8;
        if (local_8b != 0) {
          uVar17 = (undefined1)local_90;
        }
        std::string::push_back((string *)&local_58,uVar17);
        cVar4 = __verify_grouping(*(longlong *)(lVar12 + 0x10),*(longlong *)(lVar12 + 0x18),
                                  (undefined8 *)&local_58);
        if (cVar4 == '\0') {
          *param_6 = *param_6 | 4;
        }
      }
      if ((local_8b == 0) || (*(int *)(lVar12 + 0x58) == iVar8)) {
        std::string::swap(param_7,(longlong *)local_50);
        goto LAB_14006ee15;
      }
    }
  }
  else {
    if (bVar5) {
      lVar13 = *(longlong *)(lVar12 + 0x48);
    }
    else {
      lVar13 = *(longlong *)(lVar12 + 0x38);
    }
    puVar23 = (uint *)0x1;
    plVar22 = local_78;
    sVar7 = (short)uStack_70;
    while( true ) {
      bVar27 = sVar7 == -1;
      bVar25 = bVar27;
      if ((plVar22 != (longlong *)0x0) && (bVar27)) {
        if ((short *)plVar22[2] < (short *)plVar22[3]) {
          sVar6 = *(short *)plVar22[2];
        }
        else {
          sVar6 = (**(code **)(*plVar22 + 0x48))(plVar22);
        }
        if (sVar6 == -1) {
          local_78 = (longlong *)0x0;
        }
        bVar25 = sVar6 == -1;
      }
      bVar26 = (short)uStack_80 == -1;
      if ((local_88 != (longlong *)0x0) && (bVar26)) break;
      if (local_b8 <= puVar23) goto LAB_14006f31e;
LAB_14006ef34:
      if (bVar26 == bVar25) goto LAB_14006f31e;
      if ((local_78 != (longlong *)0x0) && (bVar27)) {
        if ((short *)local_78[2] < (short *)local_78[3]) {
          sVar7 = *(short *)local_78[2];
        }
        else {
          sVar7 = (**(code **)(*local_78 + 0x48))();
        }
        if (sVar7 == -1) {
          local_78 = (longlong *)0x0;
        }
      }
      plVar22 = local_78;
      if (*(short *)(lVar13 + (longlong)puVar23 * 2) != sVar7) goto LAB_14006ee0a;
      if ((ulonglong)local_78[2] < (ulonglong)local_78[3]) {
        local_78[2] = local_78[2] + 2;
      }
      else {
        (**(code **)(*local_78 + 0x50))(local_78);
      }
      puVar23 = (uint *)((longlong)puVar23 + 1);
      sVar7 = -1;
      uStack_70 = CONCAT62(uStack_70._2_6_,0xffff);
    }
    if ((short *)local_88[2] < (short *)local_88[3]) {
      sVar6 = *(short *)local_88[2];
    }
    else {
      sVar6 = (**(code **)(*local_88 + 0x48))();
    }
    if (sVar6 == -1) {
      local_88 = (longlong *)0x0;
    }
    bVar26 = sVar6 == -1;
    if (puVar23 < local_b8) goto LAB_14006ef34;
LAB_14006f31e:
    if (puVar23 == local_b8) {
      uVar15 = local_50[0][-3];
      goto joined_r0x00014006ed86;
    }
  }
LAB_14006ee0a:
  *param_6 = *param_6 | 4;
LAB_14006ee15:
  bVar5 = istreambuf_iterator<>::equal((istreambuf_iterator<> *)&local_78,(longlong *)&local_88);
  if (bVar5) {
    *param_6 = *param_6 | 2;
  }
  *(longlong **)param_1 = local_78;
  *(ulonglong *)(param_1 + 8) = uStack_70;
  std::string::_Rep::_M_dispose(local_50[0] + -3);
  std::string::_Rep::_M_dispose(local_58 + -3);
  return param_1;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, std::wstring&) const

undefined8
std::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x18))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, long double&) const

undefined8
std::money_get<>::get
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 *param_4,
          undefined1 param_5,undefined8 param_6,undefined8 param_7,undefined8 param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  (**(code **)(*param_2 + 0x10))
            (param_1,param_2,&local_18,&local_28,param_5,param_6,param_7,param_8);
  return param_1;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, std::wstring&) const

undefined8 *
std::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,wstring *param_8)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  longlong *plVar4;
  ulonglong uVar5;
  undefined8 uVar6;
  undefined8 uVar7;
  int iVar8;
  longlong lVar9;
  undefined8 local_98;
  undefined8 uStack_90;
  undefined8 local_88;
  ulonglong local_80;
  undefined8 local_78;
  ulonglong local_70;
  ulonglong *local_60 [4];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  uVar6 = *param_4;
  uVar7 = param_4[1];
  lVar9 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_6 + 0xd0) + 8) + lVar9 * 8);
  if (plVar4 != (longlong *)0x0) {
    local_60[0] = std::string::_S_construct(0,'\0');
    local_98 = uVar6;
    uStack_90 = uVar7;
    local_88 = uVar2;
    local_80 = uVar3;
    if (param_5 == '\0') {
      _M_extract<false>(&local_78,param_2,&local_88,&local_98,param_6,param_7,(string *)local_60);
    }
    else {
      _M_extract<true>((char *)&local_78,param_2,&local_88,&local_98,param_6,param_7,
                       (string *)local_60);
    }
    uVar5 = local_60[0][-3];
    if (uVar5 != 0) {
      std::wstring::resize(param_8,uVar5,0);
      lVar9 = *(longlong *)param_8;
      if (-1 < *(int *)(lVar9 + -8)) {
        std::wstring::_M_leak_hard(param_8);
        lVar9 = *(longlong *)param_8;
      }
      (**(code **)(*plVar4 + 0x58))(plVar4,local_60[0],(longlong)local_60[0] + uVar5,lVar9);
    }
    *param_1 = local_78;
    param_1[1] = uVar3 & 0xffffffffffff0000 | local_70 & 0xffff;
    if (_CRT_MT == 0) {
      iVar8 = (int)local_60[0][-1];
      *(int *)(local_60[0] + -1) = iVar8 + -1;
    }
    else {
      LOCK();
      puVar1 = local_60[0] + -1;
      iVar8 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar8 < 1) {
      std::string::_Rep::_M_destroy(local_60[0] + -3);
    }
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_get(std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, long double&) const

undefined8 *
std::money_get<>::do_get
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined8 *param_4,
          char param_5,longlong param_6,uint *param_7,float10 *param_8)

{
  ulonglong *puVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  int iVar6;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  ulonglong local_70;
  undefined8 local_68;
  ulonglong local_60;
  ulonglong *local_58;
  longlong local_50;
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  uVar4 = *param_4;
  uVar5 = param_4[1];
  local_58 = std::string::_S_construct(0,'\0');
  local_88 = uVar4;
  uStack_80 = uVar5;
  local_78 = uVar2;
  local_70 = uVar3;
  if (param_5 == '\0') {
    _M_extract<false>(&local_68,param_2,&local_78,&local_88,param_6,param_7,(string *)&local_58);
  }
  else {
    _M_extract<true>((char *)&local_68,param_2,&local_78,&local_88,param_6,param_7,
                     (string *)&local_58);
  }
  local_50 = locale::facet::_S_get_c_locale();
  __convert_to_v<>((char *)local_58,param_8,param_7);
  *param_1 = local_68;
  param_1[1] = uVar3 & 0xffffffffffff0000 | local_60 & 0xffff;
  if (_CRT_MT == 0) {
    iVar6 = (int)local_58[-1];
    *(int *)(local_58 + -1) = iVar6 + -1;
  }
  else {
    LOCK();
    puVar1 = local_58 + -1;
    iVar6 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar6 < 1) {
    std::string::_Rep::_M_destroy(local_58 + -3);
  }
  return param_1;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char,
// std::string const&) const

undefined8 *
std::money_put<>::put
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,char param_4,longlong param_5,
          char param_6,undefined8 *param_7)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x18) != do_put) {
    (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_28,param_4,param_5,(int)param_6,param_7);
    return param_1;
  }
  if (param_4 == '\0') {
    _M_insert<false>(param_1,param_2,&local_28,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<true>(param_1,param_2,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char, long
// double) const

undefined8
std::money_put<>::put
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,char param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,param_4,param_5,(int)param_6,local_28);
  return param_1;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char,
// std::string const&) const

undefined8 *
std::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,char param_4,longlong param_5,
          char param_6,undefined8 *param_7)

{
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  if (param_4 != '\0') {
    _M_insert<true>(param_1,param_2,&local_18,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<false>(param_1,param_2,&local_18,param_5,param_6,param_7);
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char,
// long double) const

undefined8 *
std::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined4 param_4,
          longlong param_5,undefined4 param_6,undefined1 (*param_7) [10])

{
  ctype<char> *this;
  code *pcVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  int iVar5;
  longlong lVar6;
  ulonglong *puVar7;
  ulonglong _Size;
  undefined1 *puVar8;
  char *_Src;
  bool bVar9;
  undefined8 uStack_130;
  undefined1 auStack_128 [32];
  undefined4 local_108 [2];
  undefined1 (*local_100) [10];
  char local_f8 [8];
  undefined *puStack_f0;
  undefined4 local_b0;
  undefined4 local_ac;
  undefined1 local_a8 [10];
  undefined8 local_98;
  undefined8 uStack_90;
  undefined1 local_88 [3] [10];
  longlong local_68;
  ulonglong *local_60 [4];
  
  uVar2 = *param_3;
  uVar3 = param_3[1];
  local_b0 = param_6;
  local_a8 = *param_7;
  puStack_f0 = (undefined *)0x14007014f;
  local_ac = param_4;
  locale::locale((locale *)&local_68,(undefined8 *)(param_5 + 0xd0));
  puStack_f0 = (undefined *)0x14007015b;
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  this = *(ctype<char> **)(*(longlong *)(local_68 + 8) + lVar6 * 8);
  if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
    puStack_f0 = &UNK_140070369;
    __throw_bad_cast();
  }
  puVar8 = auStack_128;
  _Src = local_f8;
  uStack_130 = 0x140070184;
  local_60[0] = (ulonglong *)locale::facet::_S_get_c_locale();
  local_88[0] = local_a8;
  local_108[0] = 0;
  uStack_130 = 0x1400701bb;
  local_100 = local_88;
  iVar5 = __convert_from_v((string *)local_60,_Src,0x40,"%.*Lf");
  if (0x3f < iVar5) {
    uStack_130 = 0x1400702c3;
    lVar6 = -((longlong)(iVar5 + 1) + 0xfU & 0xfffffffffffffff0);
    puVar8 = auStack_128 + lVar6;
    _Src = local_f8 + lVar6;
    *(undefined8 *)(auStack_128 + lVar6 + -8) = 0x1400702d3;
    local_60[0] = (ulonglong *)locale::facet::_S_get_c_locale();
    local_88[0] = local_a8;
    *(undefined1 (**) [10])(local_f8 + lVar6 + -8) = local_88;
    *(undefined4 *)((longlong)local_108 + lVar6) = 0;
    *(undefined8 *)(auStack_128 + lVar6 + -8) = 0x1400702ff;
    iVar5 = __convert_from_v((string *)local_60,_Src,iVar5 + 1,"%.*Lf");
  }
  _Size = (ulonglong)iVar5;
  *(undefined8 *)(puVar8 + -8) = 0x1400701d8;
  local_60[0] = std::string::_S_construct(_Size,'\0');
  if (-1 < (int)local_60[0][-1]) {
    *(undefined8 *)(puVar8 + -8) = 0x140070310;
    std::string::_M_leak_hard((string *)local_60);
  }
  local_a8._0_8_ = local_60[0];
  if (this[0x38] != (ctype<char>)0x1) {
    if (this[0x38] == (ctype<char>)0x0) {
      *(undefined8 *)(puVar8 + -8) = 0x140070348;
      ctype<char>::_M_widen_init(this);
    }
    pcVar1 = *(code **)(*(longlong *)this + 0x38);
    if (pcVar1 != ctype<char>::do_widen) {
      uVar4 = local_a8._0_8_;
      *(undefined8 *)(puVar8 + -8) = 0x14007035f;
      (*pcVar1)(this,_Src,_Src + _Size,uVar4);
      goto LAB_14007022e;
    }
  }
  if (_Src + _Size != _Src) {
    uVar4 = local_a8._0_8_;
    *(undefined8 *)(puVar8 + -8) = 0x14007022e;
    memcpy((void *)uVar4,_Src,_Size);
  }
LAB_14007022e:
  iVar5 = (int)(char)local_b0;
  bVar9 = (char)local_ac == '\0';
  local_98 = uVar2;
  uStack_90 = uVar3;
  *(string **)(puVar8 + 0x28) = (string *)local_60;
  *(int *)(puVar8 + 0x20) = iVar5;
  if (bVar9) {
    *(undefined8 *)(puVar8 + -8) = 0x14007025d;
    _M_insert<false>(param_1,param_2,&local_98,param_5,puVar8[0x20],*(undefined8 **)(puVar8 + 0x28))
    ;
  }
  else {
    *(undefined8 *)(puVar8 + -8) = 0x1400702ad;
    _M_insert<true>(param_1,param_2,&local_98,param_5,puVar8[0x20],*(undefined8 **)(puVar8 + 0x28));
  }
  if (_CRT_MT == 0) {
    iVar5 = (int)local_60[0][-1];
    *(int *)(local_60[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar7 = local_60[0] + -1;
    iVar5 = (int)*puVar7;
    *(int *)puVar7 = (int)*puVar7 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    puVar7 = local_60[0] + -3;
    *(undefined8 *)(puVar8 + -8) = 0x140070336;
    std::string::_Rep::_M_destroy(puVar7);
  }
  *(undefined8 *)(puVar8 + -8) = 0x14007028b;
  locale::~locale((locale *)&local_68);
  return param_1;
}



// std::ostreambuf_iterator<char, std::char_traits<char> > std::money_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> >
// >::_M_insert<false>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&,
// char, std::string const&) const

undefined8 *
std::money_put<>::_M_insert<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          undefined8 *param_6)

{
  byte *pbVar1;
  longlong *plVar2;
  undefined1 uVar3;
  longlong *plVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 *puVar8;
  __moneypunct_cache<char,false> *this;
  ulonglong uVar9;
  char cVar10;
  byte *pbVar11;
  ulonglong uVar12;
  string *psVar13;
  byte *pbVar14;
  longlong lVar15;
  undefined8 uVar16;
  int iVar17;
  ulonglong uVar18;
  ulonglong local_b0;
  undefined1 *local_a0;
  ulonglong local_98;
  uint local_90;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  plVar4 = (longlong *)*param_3;
  uVar16 = param_3[1];
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar6 = *(longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar6 * 8);
  if (lVar6 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar7 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  plVar2 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar7 * 8);
  lVar15 = *plVar2;
  if (lVar15 == 0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<char,false>)0x0;
    *(undefined2 *)(this + 0x21) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,false>)0x0;
    __moneypunct_cache<char,false>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar7);
    lVar15 = *plVar2;
  }
  pbVar14 = (byte *)*param_6;
  pbVar1 = pbVar14 + -0x18;
  if (*pbVar14 == *(byte *)(lVar15 + 100)) {
    local_5c = *(undefined4 *)(lVar15 + 0x60);
    local_a0 = *(undefined1 **)(lVar15 + 0x48);
    local_b0 = *(ulonglong *)(lVar15 + 0x50);
    if (*(longlong *)pbVar1 == 0) goto LAB_14007047f;
    pbVar14 = pbVar14 + 1;
  }
  else {
    local_5c = *(undefined4 *)(lVar15 + 0x5c);
    local_a0 = *(undefined1 **)(lVar15 + 0x38);
    local_b0 = *(ulonglong *)(lVar15 + 0x40);
  }
  if (pbVar14 < pbVar14 + *(longlong *)pbVar1) {
    pbVar11 = pbVar14;
    do {
      if ((*(byte *)(*(longlong *)(lVar6 + 0x30) + (ulonglong)*pbVar11 * 2) & 8) == 0) break;
      pbVar11 = pbVar11 + 1;
    } while (pbVar14 + *(longlong *)pbVar1 != pbVar11);
    uVar12 = (longlong)pbVar11 - (longlong)pbVar14;
    if (uVar12 != 0) {
      local_58 = std::string::_S_construct(0,'\0');
      std::string::reserve((string *)&local_58,uVar12 * 2);
      iVar5 = *(int *)(lVar15 + 0x58);
      iVar17 = (int)uVar12 - iVar5;
      if (0 < iVar17) {
        if (iVar5 < 0) {
          iVar17 = (int)uVar12;
        }
        if (*(longlong *)(lVar15 + 0x18) == 0) {
          std::string::assign((string *)&local_58,pbVar14,(longlong)iVar17);
        }
        else {
          std::string::_M_replace_aux
                    ((string *)&local_58,0,local_58[-3],(longlong)(iVar17 * 2),'\0');
          lVar6 = *(longlong *)(lVar15 + 0x18);
          pbVar1 = *(byte **)(lVar15 + 0x10);
          uVar3 = *(undefined1 *)(lVar15 + 0x22);
          if (-1 < (int)local_58[-1]) {
            std::string::_M_leak_hard((string *)&local_58);
          }
          puVar8 = __add_grouping<char>
                             ((undefined1 *)local_58,uVar3,pbVar1,lVar6,(longlong)pbVar14,
                              (longlong)(pbVar14 + iVar17));
          if (-1 < (int)local_58[-1]) {
            std::string::_M_leak_hard((string *)&local_58);
          }
          uVar18 = local_58[-3];
          uVar9 = (longlong)puVar8 - (longlong)local_58;
          if (uVar18 < uVar9) {
                    // WARNING: Subroutine does not return
            __throw_out_of_range_fmt
                      ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ac2,uVar9,
                       uVar18);
          }
          std::string::_M_mutate((string *)&local_58,uVar9,uVar18 - uVar9,0);
        }
        iVar5 = *(int *)(lVar15 + 0x58);
      }
      if (0 < iVar5) {
        std::string::push_back((string *)&local_58,*(undefined1 *)(lVar15 + 0x21));
        if (iVar17 < 0) {
          std::string::append((string *)&local_58,(longlong)-iVar17,*(char *)(lVar15 + 0x65));
          std::string::append((string *)&local_58,pbVar14,uVar12);
        }
        else {
          std::string::append((string *)&local_58,pbVar14 + iVar17,(longlong)*(int *)(lVar15 + 0x58)
                             );
        }
      }
      local_90 = *(uint *)(param_4 + 0x18) & 0xb0;
      local_98 = local_b0 + local_58[-3];
      if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
        local_98 = local_98 + *(longlong *)(lVar15 + 0x30);
      }
      local_50[0] = std::string::_S_construct(0,'\0');
      std::string::reserve((string *)local_50,local_98 * 2);
      uVar12 = *(ulonglong *)(param_4 + 0x10);
      psVar13 = (string *)&local_5c;
      do {
        switch(*psVar13) {
        case (string)0x0:
          if (local_90 == 0x10 && local_98 < uVar12) {
            std::string::append((string *)local_50,uVar12 - local_98,param_5);
          }
          break;
        case (string)0x1:
          if (local_90 == 0x10 && local_98 < uVar12) {
            std::string::append((string *)local_50,uVar12 - local_98,param_5);
          }
          else {
            std::string::push_back((string *)local_50,param_5);
          }
          break;
        case (string)0x2:
          if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
            std::string::append((string *)local_50,*(undefined1 **)(lVar15 + 0x28),
                                *(ulonglong *)(lVar15 + 0x30));
          }
          break;
        case (string)0x3:
          if (local_b0 != 0) {
            std::string::push_back((string *)local_50,*local_a0);
          }
          break;
        case (string)0x4:
          std::string::append((string *)local_50,(undefined8 *)&local_58);
        }
        psVar13 = psVar13 + 1;
      } while (psVar13 != (string *)&local_58);
      if (1 < local_b0) {
        std::string::append((string *)local_50,local_a0 + 1,local_b0 - 1);
      }
      uVar18 = local_50[0][-3];
      if (uVar18 < uVar12) {
        if (local_90 == 0x20) {
          std::string::append((string *)local_50,uVar12 - uVar18,param_5);
          uVar18 = uVar12;
        }
        else {
          std::string::_M_replace_aux((string *)local_50,0,0,uVar12 - uVar18,param_5);
          uVar18 = uVar12;
        }
      }
      cVar10 = (char)uVar16;
      if ((cVar10 == '\0') &&
         (lVar6 = (**(code **)(*plVar4 + 0x60))(plVar4,local_50[0],(longlong)(int)uVar18),
         (int)uVar18 != lVar6)) {
        cVar10 = '\x01';
      }
      uVar16 = CONCAT71((int7)((ulonglong)uVar16 >> 8),cVar10);
      std::string::_Rep::_M_dispose(local_50[0] + -3);
      std::string::_Rep::_M_dispose(local_58 + -3);
    }
  }
LAB_14007047f:
  *(undefined8 *)(param_4 + 0x10) = 0;
  *param_1 = plVar4;
  param_1[1] = uVar16;
  return param_1;
}



// std::ostreambuf_iterator<char, std::char_traits<char> > std::money_put<char,
// std::ostreambuf_iterator<char, std::char_traits<char> >
// >::_M_insert<true>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char,
// std::string const&) const

undefined8 *
std::money_put<>::_M_insert<true>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,char param_5,
          undefined8 *param_6)

{
  byte *pbVar1;
  longlong *plVar2;
  undefined1 uVar3;
  longlong *plVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  undefined1 *puVar8;
  __moneypunct_cache<char,true> *this;
  ulonglong uVar9;
  char cVar10;
  byte *pbVar11;
  ulonglong uVar12;
  string *psVar13;
  byte *pbVar14;
  longlong lVar15;
  undefined8 uVar16;
  int iVar17;
  ulonglong uVar18;
  ulonglong local_b0;
  undefined1 *local_a0;
  ulonglong local_98;
  uint local_90;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  plVar4 = (longlong *)*param_3;
  uVar16 = param_3[1];
  lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar6 = *(longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar6 * 8);
  if (lVar6 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar7 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  plVar2 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar7 * 8);
  lVar15 = *plVar2;
  if (lVar15 == 0) {
    this = operator_new(0x70);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<char,true>)0x0;
    *(undefined2 *)(this + 0x21) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x6f] = (__moneypunct_cache<char,true>)0x0;
    __moneypunct_cache<char,true>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar7);
    lVar15 = *plVar2;
  }
  pbVar14 = (byte *)*param_6;
  pbVar1 = pbVar14 + -0x18;
  if (*pbVar14 == *(byte *)(lVar15 + 100)) {
    local_5c = *(undefined4 *)(lVar15 + 0x60);
    local_a0 = *(undefined1 **)(lVar15 + 0x48);
    local_b0 = *(ulonglong *)(lVar15 + 0x50);
    if (*(longlong *)pbVar1 == 0) goto LAB_140070b6f;
    pbVar14 = pbVar14 + 1;
  }
  else {
    local_5c = *(undefined4 *)(lVar15 + 0x5c);
    local_a0 = *(undefined1 **)(lVar15 + 0x38);
    local_b0 = *(ulonglong *)(lVar15 + 0x40);
  }
  if (pbVar14 < pbVar14 + *(longlong *)pbVar1) {
    pbVar11 = pbVar14;
    do {
      if ((*(byte *)(*(longlong *)(lVar6 + 0x30) + (ulonglong)*pbVar11 * 2) & 8) == 0) break;
      pbVar11 = pbVar11 + 1;
    } while (pbVar14 + *(longlong *)pbVar1 != pbVar11);
    uVar12 = (longlong)pbVar11 - (longlong)pbVar14;
    if (uVar12 != 0) {
      local_58 = std::string::_S_construct(0,'\0');
      std::string::reserve((string *)&local_58,uVar12 * 2);
      iVar5 = *(int *)(lVar15 + 0x58);
      iVar17 = (int)uVar12 - iVar5;
      if (0 < iVar17) {
        if (iVar5 < 0) {
          iVar17 = (int)uVar12;
        }
        if (*(longlong *)(lVar15 + 0x18) == 0) {
          std::string::assign((string *)&local_58,pbVar14,(longlong)iVar17);
        }
        else {
          std::string::_M_replace_aux
                    ((string *)&local_58,0,local_58[-3],(longlong)(iVar17 * 2),'\0');
          lVar6 = *(longlong *)(lVar15 + 0x18);
          pbVar1 = *(byte **)(lVar15 + 0x10);
          uVar3 = *(undefined1 *)(lVar15 + 0x22);
          if (-1 < (int)local_58[-1]) {
            std::string::_M_leak_hard((string *)&local_58);
          }
          puVar8 = __add_grouping<char>
                             ((undefined1 *)local_58,uVar3,pbVar1,lVar6,(longlong)pbVar14,
                              (longlong)(pbVar14 + iVar17));
          if (-1 < (int)local_58[-1]) {
            std::string::_M_leak_hard((string *)&local_58);
          }
          uVar18 = local_58[-3];
          uVar9 = (longlong)puVar8 - (longlong)local_58;
          if (uVar18 < uVar9) {
                    // WARNING: Subroutine does not return
            __throw_out_of_range_fmt
                      ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5ac2,uVar9,
                       uVar18);
          }
          std::string::_M_mutate((string *)&local_58,uVar9,uVar18 - uVar9,0);
        }
        iVar5 = *(int *)(lVar15 + 0x58);
      }
      if (0 < iVar5) {
        std::string::push_back((string *)&local_58,*(undefined1 *)(lVar15 + 0x21));
        if (iVar17 < 0) {
          std::string::append((string *)&local_58,(longlong)-iVar17,*(char *)(lVar15 + 0x65));
          std::string::append((string *)&local_58,pbVar14,uVar12);
        }
        else {
          std::string::append((string *)&local_58,pbVar14 + iVar17,(longlong)*(int *)(lVar15 + 0x58)
                             );
        }
      }
      local_90 = *(uint *)(param_4 + 0x18) & 0xb0;
      local_98 = local_b0 + local_58[-3];
      if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
        local_98 = local_98 + *(longlong *)(lVar15 + 0x30);
      }
      local_50[0] = std::string::_S_construct(0,'\0');
      std::string::reserve((string *)local_50,local_98 * 2);
      uVar12 = *(ulonglong *)(param_4 + 0x10);
      psVar13 = (string *)&local_5c;
      do {
        switch(*psVar13) {
        case (string)0x0:
          if (local_90 == 0x10 && local_98 < uVar12) {
            std::string::append((string *)local_50,uVar12 - local_98,param_5);
          }
          break;
        case (string)0x1:
          if (local_90 == 0x10 && local_98 < uVar12) {
            std::string::append((string *)local_50,uVar12 - local_98,param_5);
          }
          else {
            std::string::push_back((string *)local_50,param_5);
          }
          break;
        case (string)0x2:
          if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
            std::string::append((string *)local_50,*(undefined1 **)(lVar15 + 0x28),
                                *(ulonglong *)(lVar15 + 0x30));
          }
          break;
        case (string)0x3:
          if (local_b0 != 0) {
            std::string::push_back((string *)local_50,*local_a0);
          }
          break;
        case (string)0x4:
          std::string::append((string *)local_50,(undefined8 *)&local_58);
        }
        psVar13 = psVar13 + 1;
      } while (psVar13 != (string *)&local_58);
      if (1 < local_b0) {
        std::string::append((string *)local_50,local_a0 + 1,local_b0 - 1);
      }
      uVar18 = local_50[0][-3];
      if (uVar18 < uVar12) {
        if (local_90 == 0x20) {
          std::string::append((string *)local_50,uVar12 - uVar18,param_5);
          uVar18 = uVar12;
        }
        else {
          std::string::_M_replace_aux((string *)local_50,0,0,uVar12 - uVar18,param_5);
          uVar18 = uVar12;
        }
      }
      cVar10 = (char)uVar16;
      if ((cVar10 == '\0') &&
         (lVar6 = (**(code **)(*plVar4 + 0x60))(plVar4,local_50[0],(longlong)(int)uVar18),
         (int)uVar18 != lVar6)) {
        cVar10 = '\x01';
      }
      uVar16 = CONCAT71((int7)((ulonglong)uVar16 >> 8),cVar10);
      std::string::_Rep::_M_dispose(local_50[0] + -3);
      std::string::_Rep::_M_dispose(local_58 + -3);
    }
  }
LAB_140070b6f:
  *(undefined8 *)(param_4 + 0x10) = 0;
  *param_1 = plVar4;
  param_1[1] = uVar16;
  return param_1;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, std::wstring const&) const

undefined8 *
std::money_put<>::put
          (undefined8 *param_1,longlong *param_2,undefined8 *param_3,char param_4,longlong param_5,
          undefined2 param_6,undefined8 *param_7)

{
  undefined8 local_28;
  undefined8 local_20;
  
  local_28 = *param_3;
  local_20 = param_3[1];
  if (*(code **)(*param_2 + 0x18) != do_put) {
    (**(code **)(*param_2 + 0x18))(param_1,param_2,&local_28,param_4,param_5,param_6,param_7);
    return param_1;
  }
  if (param_4 == '\0') {
    _M_insert<false>(param_1,param_2,&local_28,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<true>(param_1,param_2,&local_28,param_5,param_6,param_7);
  return param_1;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, long double) const

undefined8
std::money_put<>::put
          (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined1 param_4,
          undefined8 param_5,undefined2 param_6,undefined1 (*param_7) [10])

{
  undefined1 local_28 [10];
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  local_28 = *param_7;
  (**(code **)(*param_2 + 0x10))(param_1,param_2,&local_18,param_4,param_5,param_6,local_28);
  return param_1;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, std::wstring const&) const

undefined8 *
std::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,char param_4,longlong param_5,
          undefined2 param_6,undefined8 *param_7)

{
  undefined8 local_18;
  undefined8 local_10;
  
  local_18 = *param_3;
  local_10 = param_3[1];
  if (param_4 != '\0') {
    _M_insert<true>(param_1,param_2,&local_18,param_5,param_6,param_7);
    return param_1;
  }
  _M_insert<false>(param_1,param_2,&local_18,param_5,param_6,param_7);
  return param_1;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::do_put(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, long double) const

undefined8 *
std::money_put<>::do_put
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,undefined4 param_4,
          longlong param_5,uint param_6,undefined1 (*param_7) [10])

{
  longlong *plVar1;
  code *pcVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  uint uVar5;
  int iVar6;
  longlong lVar7;
  ulonglong *puVar8;
  undefined1 *puVar9;
  char *pcVar10;
  bool bVar11;
  undefined8 uStack_130;
  undefined1 auStack_128 [32];
  undefined4 local_108 [2];
  undefined1 (*local_100) [10];
  char local_f8 [8];
  undefined *puStack_f0;
  int local_b4;
  uint local_b0;
  undefined4 local_ac;
  undefined1 local_a8 [10];
  undefined8 local_98;
  undefined8 uStack_90;
  undefined1 local_88 [3] [10];
  longlong local_68;
  ulonglong *local_60 [4];
  
  uVar3 = *param_3;
  uVar4 = param_3[1];
  local_b0 = param_6;
  local_a8 = *param_7;
  puStack_f0 = (undefined *)0x14007135e;
  local_ac = param_4;
  locale::locale((locale *)&local_68,(undefined8 *)(param_5 + 0xd0));
  puStack_f0 = (undefined *)0x14007136a;
  lVar7 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar1 = *(longlong **)(*(longlong *)(local_68 + 8) + lVar7 * 8);
  if (plVar1 != (longlong *)0x0) {
    puVar9 = auStack_128;
    pcVar10 = local_f8;
    uStack_130 = 0x140071393;
    local_60[0] = (ulonglong *)locale::facet::_S_get_c_locale();
    local_88[0] = local_a8;
    local_108[0] = 0;
    uStack_130 = 0x1400713ca;
    local_100 = local_88;
    iVar6 = __convert_from_v((wstring *)local_60,pcVar10,0x40,"%.*Lf");
    if (0x3f < iVar6) {
      local_b4 = iVar6 + 1;
      uStack_130 = 0x1400714a5;
      lVar7 = -((longlong)local_b4 + 0xfU & 0xfffffffffffffff0);
      puVar9 = auStack_128 + lVar7;
      pcVar10 = local_f8 + lVar7;
      *(undefined8 *)(auStack_128 + lVar7 + -8) = 0x1400714b5;
      local_60[0] = (ulonglong *)locale::facet::_S_get_c_locale();
      local_88[0] = local_a8;
      *(undefined1 (**) [10])(local_f8 + lVar7 + -8) = local_88;
      *(undefined4 *)((longlong)local_108 + lVar7) = 0;
      iVar6 = local_b4;
      *(undefined8 *)(auStack_128 + lVar7 + -8) = 0x1400714e2;
      iVar6 = __convert_from_v((wstring *)local_60,pcVar10,iVar6,"%.*Lf");
    }
    *(undefined8 *)(puVar9 + -8) = 0x1400713e7;
    local_60[0] = std::wstring::_S_construct((longlong)iVar6,0);
    if (-1 < (int)local_60[0][-1]) {
      *(undefined8 *)(puVar9 + -8) = 0x1400714f8;
      std::wstring::_M_leak_hard((wstring *)local_60);
    }
    puVar8 = local_60[0];
    pcVar2 = *(code **)(*plVar1 + 0x58);
    *(undefined8 *)(puVar9 + -8) = 0x14007140a;
    (*pcVar2)(plVar1,pcVar10,pcVar10 + iVar6,puVar8);
    uVar5 = local_b0;
    bVar11 = (char)local_ac == '\0';
    local_98 = uVar3;
    uStack_90 = uVar4;
    *(wstring **)(puVar9 + 0x28) = (wstring *)local_60;
    *(uint *)(puVar9 + 0x20) = uVar5 & 0xffff;
    if (bVar11) {
      *(undefined8 *)(puVar9 + -8) = 0x140071438;
      _M_insert<false>(param_1,param_2,&local_98,param_5,*(undefined2 *)(puVar9 + 0x20),
                       *(undefined8 **)(puVar9 + 0x28));
    }
    else {
      *(undefined8 *)(puVar9 + -8) = 0x140071485;
      _M_insert<true>(param_1,param_2,&local_98,param_5,*(undefined2 *)(puVar9 + 0x20),
                      *(undefined8 **)(puVar9 + 0x28));
    }
    if (_CRT_MT == 0) {
      iVar6 = (int)local_60[0][-1];
      *(int *)(local_60[0] + -1) = iVar6 + -1;
    }
    else {
      LOCK();
      puVar8 = local_60[0] + -1;
      iVar6 = (int)*puVar8;
      *(int *)puVar8 = (int)*puVar8 + -1;
      UNLOCK();
    }
    if (iVar6 < 1) {
      puVar8 = local_60[0] + -3;
      *(undefined8 *)(puVar9 + -8) = 0x14007151e;
      std::wstring::_Rep::_M_destroy(puVar8);
    }
    *(undefined8 *)(puVar9 + -8) = 0x140071466;
    locale::~locale((locale *)&local_68);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  puStack_f0 = &UNK_140071528;
  __throw_bad_cast();
}



// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_insert<false>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::ios_base&, wchar_t, std::wstring const&) const

undefined8 *
std::money_put<>::_M_insert<false>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined2 param_5,undefined8 *param_6)

{
  longlong *plVar1;
  undefined2 uVar2;
  longlong *plVar3;
  longlong *plVar4;
  short *psVar5;
  byte *pbVar6;
  ulonglong *puVar7;
  int iVar8;
  longlong lVar9;
  longlong lVar10;
  undefined2 *puVar11;
  __moneypunct_cache<> *this;
  ulonglong uVar12;
  char cVar13;
  short *psVar14;
  wstring *pwVar15;
  undefined8 uVar16;
  int iVar17;
  ulonglong uVar18;
  ulonglong uVar19;
  ulonglong local_b0;
  undefined2 *local_a0;
  ulonglong local_98;
  uint local_90;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  plVar3 = (longlong *)*param_3;
  uVar16 = param_3[1];
  lVar9 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar9 * 8);
  if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar10 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar10 * 8);
  lVar9 = *plVar1;
  if (lVar9 == 0) {
    this = operator_new(0x80);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(this + 0x22) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar10);
    lVar9 = *plVar1;
  }
  psVar5 = (short *)*param_6;
  psVar14 = psVar5;
  if (*psVar5 == *(short *)(lVar9 + 100)) {
    local_5c = *(undefined4 *)(lVar9 + 0x60);
    local_a0 = *(undefined2 **)(lVar9 + 0x48);
    local_b0 = *(ulonglong *)(lVar9 + 0x50);
    if (*(longlong *)(psVar5 + -0xc) != 0) {
      psVar14 = psVar5 + 1;
    }
  }
  else {
    local_5c = *(undefined4 *)(lVar9 + 0x5c);
    local_b0 = *(ulonglong *)(lVar9 + 0x40);
    local_a0 = *(undefined2 **)(lVar9 + 0x38);
  }
  lVar10 = (**(code **)(*plVar4 + 0x28))(plVar4,8,psVar14,psVar14 + *(longlong *)(psVar5 + -0xc));
  uVar18 = lVar10 - (longlong)psVar14 >> 1;
  if (uVar18 != 0) {
    local_58 = std::wstring::_S_construct(0,0);
    std::wstring::reserve((wstring *)&local_58,lVar10 - (longlong)psVar14);
    iVar8 = *(int *)(lVar9 + 0x58);
    iVar17 = (int)uVar18 - iVar8;
    if (0 < iVar17) {
      if (iVar8 < 0) {
        iVar17 = (int)uVar18;
      }
      if (*(longlong *)(lVar9 + 0x18) == 0) {
        std::wstring::assign((wstring *)&local_58,psVar14,(longlong)iVar17);
      }
      else {
        std::wstring::_M_replace_aux((wstring *)&local_58,0,local_58[-3],(longlong)(iVar17 * 2),0);
        lVar10 = *(longlong *)(lVar9 + 0x18);
        pbVar6 = *(byte **)(lVar9 + 0x10);
        uVar2 = *(undefined2 *)(lVar9 + 0x24);
        if (-1 < (int)local_58[-1]) {
          std::wstring::_M_leak_hard((wstring *)&local_58);
        }
        puVar7 = local_58;
        puVar11 = __add_grouping<wchar_t>
                            ((undefined2 *)local_58,uVar2,pbVar6,lVar10,(longlong)psVar14,
                             (longlong)(iVar17 * 2) + (longlong)psVar14);
        if (-1 < (int)puVar7[-1]) {
          std::wstring::_M_leak_hard((wstring *)&local_58);
        }
        uVar19 = local_58[-3];
        uVar12 = (longlong)puVar11 - (longlong)local_58 >> 1;
        if (uVar19 < uVar12) {
                    // WARNING: Subroutine does not return
          __throw_out_of_range_fmt
                    ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c60b2,uVar12,
                     uVar19);
        }
        std::wstring::_M_mutate((wstring *)&local_58,uVar12,uVar19 - uVar12,0);
      }
      iVar8 = *(int *)(lVar9 + 0x58);
    }
    if (0 < iVar8) {
      std::wstring::push_back((wstring *)&local_58,*(undefined2 *)(lVar9 + 0x22));
      if (iVar17 < 0) {
        std::wstring::append((wstring *)&local_58,(longlong)-iVar17,*(undefined2 *)(lVar9 + 0x66));
        std::wstring::append((wstring *)&local_58,psVar14,uVar18);
      }
      else {
        std::wstring::append((wstring *)&local_58,psVar14 + iVar17,(longlong)*(int *)(lVar9 + 0x58))
        ;
      }
    }
    local_90 = *(uint *)(param_4 + 0x18) & 0xb0;
    local_98 = local_b0 + local_58[-3];
    if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
      local_98 = local_98 + *(longlong *)(lVar9 + 0x30);
    }
    local_50[0] = std::wstring::_S_construct(0,0);
    std::wstring::reserve((wstring *)local_50,local_98 * 2);
    uVar18 = *(ulonglong *)(param_4 + 0x10);
    pwVar15 = (wstring *)&local_5c;
    do {
      switch(*pwVar15) {
      case (wstring)0x0:
        if (local_90 == 0x10 && local_98 < uVar18) {
          std::wstring::append((wstring *)local_50,uVar18 - local_98,param_5);
        }
        break;
      case (wstring)0x1:
        if (local_90 == 0x10 && local_98 < uVar18) {
          std::wstring::append((wstring *)local_50,uVar18 - local_98,param_5);
        }
        else {
          std::wstring::push_back((wstring *)local_50,param_5);
        }
        break;
      case (wstring)0x2:
        if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
          std::wstring::append
                    ((wstring *)local_50,*(undefined2 **)(lVar9 + 0x28),*(ulonglong *)(lVar9 + 0x30)
                    );
        }
        break;
      case (wstring)0x3:
        if (local_b0 != 0) {
          std::wstring::push_back((wstring *)local_50,*local_a0);
        }
        break;
      case (wstring)0x4:
        std::wstring::append((wstring *)local_50,(undefined8 *)&local_58);
      }
      pwVar15 = pwVar15 + 1;
    } while (pwVar15 != (wstring *)&local_58);
    if (1 < local_b0) {
      std::wstring::append((wstring *)local_50,local_a0 + 1,local_b0 - 1);
    }
    uVar19 = local_50[0][-3];
    if (uVar19 < uVar18) {
      if (local_90 == 0x20) {
        std::wstring::append((wstring *)local_50,uVar18 - uVar19,param_5);
        uVar19 = uVar18;
      }
      else {
        std::wstring::_M_replace_aux((wstring *)local_50,0,0,uVar18 - uVar19,param_5);
        uVar19 = uVar18;
      }
    }
    cVar13 = (char)uVar16;
    if ((cVar13 == '\0') &&
       (lVar9 = (**(code **)(*plVar3 + 0x60))(plVar3,local_50[0],(longlong)(int)uVar19),
       (int)uVar19 != lVar9)) {
      cVar13 = '\x01';
    }
    uVar16 = CONCAT71((int7)((ulonglong)uVar16 >> 8),cVar13);
    std::wstring::_Rep::_M_dispose(local_50[0] + -3);
    std::wstring::_Rep::_M_dispose(local_58 + -3);
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  *param_1 = plVar3;
  param_1[1] = uVar16;
  return param_1;
}



// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > std::money_put<wchar_t,
// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::_M_insert<true>(std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// wchar_t, std::wstring const&) const

undefined8 *
std::money_put<>::_M_insert<true>
          (undefined8 *param_1,undefined8 param_2,undefined8 *param_3,longlong param_4,
          undefined2 param_5,undefined8 *param_6)

{
  longlong *plVar1;
  undefined2 uVar2;
  longlong *plVar3;
  longlong *plVar4;
  short *psVar5;
  byte *pbVar6;
  ulonglong *puVar7;
  int iVar8;
  longlong lVar9;
  longlong lVar10;
  undefined2 *puVar11;
  __moneypunct_cache<> *this;
  ulonglong uVar12;
  char cVar13;
  short *psVar14;
  wstring *pwVar15;
  undefined8 uVar16;
  int iVar17;
  ulonglong uVar18;
  ulonglong uVar19;
  ulonglong local_b0;
  undefined2 *local_a0;
  ulonglong local_98;
  uint local_90;
  undefined4 local_5c;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  plVar3 = (longlong *)*param_3;
  uVar16 = param_3[1];
  lVar9 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar4 = *(longlong **)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 8) + lVar9 * 8);
  if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  lVar10 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar1 = (longlong *)(*(longlong *)(*(longlong *)(param_4 + 0xd0) + 0x18) + lVar10 * 8);
  lVar9 = *plVar1;
  if (lVar9 == 0) {
    this = operator_new(0x80);
    *(undefined4 *)(this + 8) = 0;
    *(undefined ***)this = &PTR____moneypunct_cache_1400dde30;
    *(undefined8 *)(this + 0x10) = 0;
    *(undefined8 *)(this + 0x18) = 0;
    this[0x20] = (__moneypunct_cache<>)0x0;
    *(undefined4 *)(this + 0x22) = 0;
    *(undefined8 *)(this + 0x28) = 0;
    *(undefined8 *)(this + 0x30) = 0;
    *(undefined8 *)(this + 0x38) = 0;
    *(undefined8 *)(this + 0x40) = 0;
    *(undefined8 *)(this + 0x48) = 0;
    *(undefined8 *)(this + 0x50) = 0;
    *(undefined4 *)(this + 0x58) = 0;
    *(undefined8 *)(this + 0x5c) = 0;
    this[0x7a] = (__moneypunct_cache<>)0x0;
    __moneypunct_cache<>::_M_cache(this,(longlong *)(param_4 + 0xd0));
    locale::_Impl::_M_install_cache(*(_Impl **)(param_4 + 0xd0),(longlong *)this,lVar10);
    lVar9 = *plVar1;
  }
  psVar5 = (short *)*param_6;
  psVar14 = psVar5;
  if (*psVar5 == *(short *)(lVar9 + 100)) {
    local_5c = *(undefined4 *)(lVar9 + 0x60);
    local_a0 = *(undefined2 **)(lVar9 + 0x48);
    local_b0 = *(ulonglong *)(lVar9 + 0x50);
    if (*(longlong *)(psVar5 + -0xc) != 0) {
      psVar14 = psVar5 + 1;
    }
  }
  else {
    local_5c = *(undefined4 *)(lVar9 + 0x5c);
    local_b0 = *(ulonglong *)(lVar9 + 0x40);
    local_a0 = *(undefined2 **)(lVar9 + 0x38);
  }
  lVar10 = (**(code **)(*plVar4 + 0x28))(plVar4,8,psVar14,psVar14 + *(longlong *)(psVar5 + -0xc));
  uVar18 = lVar10 - (longlong)psVar14 >> 1;
  if (uVar18 != 0) {
    local_58 = std::wstring::_S_construct(0,0);
    std::wstring::reserve((wstring *)&local_58,lVar10 - (longlong)psVar14);
    iVar8 = *(int *)(lVar9 + 0x58);
    iVar17 = (int)uVar18 - iVar8;
    if (0 < iVar17) {
      if (iVar8 < 0) {
        iVar17 = (int)uVar18;
      }
      if (*(longlong *)(lVar9 + 0x18) == 0) {
        std::wstring::assign((wstring *)&local_58,psVar14,(longlong)iVar17);
      }
      else {
        std::wstring::_M_replace_aux((wstring *)&local_58,0,local_58[-3],(longlong)(iVar17 * 2),0);
        lVar10 = *(longlong *)(lVar9 + 0x18);
        pbVar6 = *(byte **)(lVar9 + 0x10);
        uVar2 = *(undefined2 *)(lVar9 + 0x24);
        if (-1 < (int)local_58[-1]) {
          std::wstring::_M_leak_hard((wstring *)&local_58);
        }
        puVar7 = local_58;
        puVar11 = __add_grouping<wchar_t>
                            ((undefined2 *)local_58,uVar2,pbVar6,lVar10,(longlong)psVar14,
                             (longlong)(iVar17 * 2) + (longlong)psVar14);
        if (-1 < (int)puVar7[-1]) {
          std::wstring::_M_leak_hard((wstring *)&local_58);
        }
        uVar19 = local_58[-3];
        uVar12 = (longlong)puVar11 - (longlong)local_58 >> 1;
        if (uVar19 < uVar12) {
                    // WARNING: Subroutine does not return
          __throw_out_of_range_fmt
                    ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c60b2,uVar12,
                     uVar19);
        }
        std::wstring::_M_mutate((wstring *)&local_58,uVar12,uVar19 - uVar12,0);
      }
      iVar8 = *(int *)(lVar9 + 0x58);
    }
    if (0 < iVar8) {
      std::wstring::push_back((wstring *)&local_58,*(undefined2 *)(lVar9 + 0x22));
      if (iVar17 < 0) {
        std::wstring::append((wstring *)&local_58,(longlong)-iVar17,*(undefined2 *)(lVar9 + 0x66));
        std::wstring::append((wstring *)&local_58,psVar14,uVar18);
      }
      else {
        std::wstring::append((wstring *)&local_58,psVar14 + iVar17,(longlong)*(int *)(lVar9 + 0x58))
        ;
      }
    }
    local_90 = *(uint *)(param_4 + 0x18) & 0xb0;
    local_98 = local_b0 + local_58[-3];
    if ((*(uint *)(param_4 + 0x18) & 0x200) != 0) {
      local_98 = local_98 + *(longlong *)(lVar9 + 0x30);
    }
    local_50[0] = std::wstring::_S_construct(0,0);
    std::wstring::reserve((wstring *)local_50,local_98 * 2);
    uVar18 = *(ulonglong *)(param_4 + 0x10);
    pwVar15 = (wstring *)&local_5c;
    do {
      switch(*pwVar15) {
      case (wstring)0x0:
        if (local_90 == 0x10 && local_98 < uVar18) {
          std::wstring::append((wstring *)local_50,uVar18 - local_98,param_5);
        }
        break;
      case (wstring)0x1:
        if (local_90 == 0x10 && local_98 < uVar18) {
          std::wstring::append((wstring *)local_50,uVar18 - local_98,param_5);
        }
        else {
          std::wstring::push_back((wstring *)local_50,param_5);
        }
        break;
      case (wstring)0x2:
        if ((*(byte *)(param_4 + 0x19) & 2) != 0) {
          std::wstring::append
                    ((wstring *)local_50,*(undefined2 **)(lVar9 + 0x28),*(ulonglong *)(lVar9 + 0x30)
                    );
        }
        break;
      case (wstring)0x3:
        if (local_b0 != 0) {
          std::wstring::push_back((wstring *)local_50,*local_a0);
        }
        break;
      case (wstring)0x4:
        std::wstring::append((wstring *)local_50,(undefined8 *)&local_58);
      }
      pwVar15 = pwVar15 + 1;
    } while (pwVar15 != (wstring *)&local_58);
    if (1 < local_b0) {
      std::wstring::append((wstring *)local_50,local_a0 + 1,local_b0 - 1);
    }
    uVar19 = local_50[0][-3];
    if (uVar19 < uVar18) {
      if (local_90 == 0x20) {
        std::wstring::append((wstring *)local_50,uVar18 - uVar19,param_5);
        uVar19 = uVar18;
      }
      else {
        std::wstring::_M_replace_aux((wstring *)local_50,0,0,uVar18 - uVar19,param_5);
        uVar19 = uVar18;
      }
    }
    cVar13 = (char)uVar16;
    if ((cVar13 == '\0') &&
       (lVar9 = (**(code **)(*plVar3 + 0x60))(plVar3,local_50[0],(longlong)(int)uVar19),
       (int)uVar19 != lVar9)) {
      cVar13 = '\x01';
    }
    uVar16 = CONCAT71((int7)((ulonglong)uVar16 >> 8),cVar13);
    std::wstring::_Rep::_M_dispose(local_50[0] + -3);
    std::wstring::_Rep::_M_dispose(local_58 + -3);
  }
  *(undefined8 *)(param_4 + 0x10) = 0;
  *param_1 = plVar3;
  param_1[1] = uVar16;
  return param_1;
}



// std::type_info::__do_catch(std::type_info const*, void**, unsigned int) const

undefined8 std::type_info::__do_catch(longlong param_1,longlong param_2)

{
  int iVar1;
  undefined8 uVar2;
  undefined4 extraout_var;
  
  uVar2 = 1;
  if (param_1 != param_2) {
    uVar2 = 0;
    if (**(char **)(param_1 + 8) != '*') {
      iVar1 = strcmp(*(char **)(param_1 + 8),
                     *(char **)(param_2 + 8) + (**(char **)(param_2 + 8) == '*'));
      uVar2 = CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),iVar1 == 0);
    }
  }
  return uVar2;
}



// std::type_info::__do_upcast(__cxxabiv1::__class_type_info const*, void**) const

undefined8 std::type_info::__do_upcast(void)

{
  return 0;
}



// std::type_info::__is_pointer_p() const

undefined8 std::type_info::__is_pointer_p(void)

{
  return 0;
}



// std::type_info::TEMPNAMEPLACEHOLDERVALUE(std::type_info const&) const

undefined8 __thiscall std::type_info::operator==(type_info *this,type_info *param_1)

{
  int iVar1;
  undefined8 uVar2;
  undefined4 extraout_var;
  
  uVar2 = 1;
  if (param_1 != this) {
    uVar2 = 0;
    if (**(char **)(this + 8) != '*') {
      iVar1 = strcmp(*(char **)(this + 8),
                     *(char **)(param_1 + 8) + (**(char **)(param_1 + 8) == '*'));
      uVar2 = CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),iVar1 == 0);
    }
  }
  return uVar2;
}



// std::wstring::_S_compare(unsigned long long, unsigned long long)

ulonglong std::wstring::_S_compare(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = 0x7fffffff;
  uVar2 = param_1 - param_2;
  if (((longlong)uVar2 < 0x80000000) && (uVar1 = 0x80000000, -0x80000001 < (longlong)uVar2)) {
    uVar1 = uVar2 & 0xffffffff;
  }
  return uVar1;
}



// std::wstring::_Alloc_hider::_Alloc_hider(wchar_t*, std::allocator<wchar_t> const&)

void __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::wstring::_Alloc_hider::_Alloc_hider(wchar_t*, std::allocator<wchar_t> const&)

void __thiscall std::wstring::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::wstring::_M_leak_hard()

void __thiscall std::wstring::_M_leak_hard(wstring *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if (*(longlong *)(lVar1 + -0x18) == 0) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007248e;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007248e;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007248e:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::wstring::_S_construct(unsigned long long, wchar_t, std::allocator<wchar_t> const&)

ulonglong * std::wstring::_S_construct(ulonglong param_1,undefined2 param_2)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  
  puVar1 = _Rep::_S_create(param_1,0);
  if (param_1 != 0) {
    uVar2 = 0;
    if (param_1 == 1) {
      *(undefined2 *)(puVar1 + 3) = param_2;
    }
    else {
      if ((param_1 & 1) != 0) {
        *(undefined2 *)(puVar1 + 3) = param_2;
        uVar2 = 1;
      }
      do {
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x18) = param_2;
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x1a) = param_2;
        uVar2 = uVar2 + 2;
      } while (param_1 != uVar2);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined2 *)((longlong)puVar1 + param_1 * 2 + 0x18) = 0;
  return puVar1 + 3;
}



// wchar_t* std::wstring::_S_construct<__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >
// >(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, __gnu_cxx::__normal_iterator<wchar_t*,
// std::wstring >, std::allocator<wchar_t> const&, std::forward_iterator_tag)

ulonglong * std::wstring::_S_construct<>(undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong uVar2;
  size_t _Size;
  
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  return _Dst;
}



// wchar_t* std::wstring::_S_construct<wchar_t const*>(wchar_t const*, wchar_t const*,
// std::allocator<wchar_t> const&, std::forward_iterator_tag)

ulonglong * std::wstring::_S_construct<>(undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  return _Dst;
}



ulonglong *
_text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
          (undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    std::__throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = std::wstring::_Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  return _Dst;
}



ulonglong *
_text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
          (undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    std::__throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = std::wstring::_Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  return _Dst;
}



// wchar_t* std::wstring::_S_construct<wchar_t*>(wchar_t*, wchar_t*, std::allocator<wchar_t> const&,
// std::forward_iterator_tag)

ulonglong * std::wstring::_S_construct<wchar_t*>(undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  return _Dst;
}



// std::wstring::_S_empty_rep()

undefined1 * std::wstring::_S_empty_rep(void)

{
  return &_Rep::_S_empty_rep_storage;
}



// std::wstring::_S_copy_chars(wchar_t*, __gnu_cxx::__normal_iterator<wchar_t const*, std::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::wstring >)

void std::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::wstring::_S_copy_chars(wchar_t*, __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >)

void std::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::wstring::_S_copy_chars(wchar_t*, wchar_t const*, wchar_t const*)

void std::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::wstring::_S_copy_chars(wchar_t*, wchar_t*, wchar_t*)

void std::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::wstring::shrink_to_fit()

void __thiscall std::wstring::shrink_to_fit(wstring *this)

{
  reserve(this);
  return;
}



// std::wstring::_M_replace_aux(unsigned long long, unsigned long long, unsigned long long, wchar_t)

wstring * __thiscall
std::wstring::_M_replace_aux
          (wstring *this,longlong param_1,longlong param_2,ulonglong param_3,undefined2 param_4)

{
  undefined2 *puVar1;
  ulonglong uVar2;
  
  if ((ulonglong)((param_2 + 0x1ffffffffffffffc) - *(longlong *)(*(longlong *)this + -0x18)) <
      param_3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,param_1,param_2,param_3);
  if (param_3 != 0) {
    puVar1 = (undefined2 *)(*(longlong *)this + param_1 * 2);
    uVar2 = 0;
    if (param_3 == 1) {
      *puVar1 = param_4;
      return this;
    }
    if ((param_3 & 1) != 0) {
      *puVar1 = param_4;
      uVar2 = 1;
    }
    do {
      puVar1[uVar2] = param_4;
      puVar1[uVar2 + 1] = param_4;
      uVar2 = uVar2 + 2;
    } while (param_3 != uVar2);
  }
  return this;
}



// std::wstring::_M_replace_safe(unsigned long long, unsigned long long, wchar_t const*, unsigned
// long long)

wstring * __thiscall
std::wstring::_M_replace_safe
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,longlong param_4)

{
  undefined2 *_Dst;
  
  _M_mutate(this,param_1,param_2,param_4);
  if (param_4 != 0) {
    _Dst = (undefined2 *)(*(longlong *)this + param_1 * 2);
    if (param_4 == 1) {
      *_Dst = *param_3;
      return this;
    }
    memcpy(_Dst,param_3,param_4 * 2);
  }
  return this;
}



// std::wstring::_S_construct_aux_2(unsigned long long, wchar_t, std::allocator<wchar_t> const&)

ulonglong * std::wstring::_S_construct_aux_2(ulonglong param_1,undefined2 param_2)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  
  puVar1 = _Rep::_S_create(param_1,0);
  if (param_1 != 0) {
    uVar2 = 0;
    if (param_1 == 1) {
      *(undefined2 *)(puVar1 + 3) = param_2;
    }
    else {
      if ((param_1 & 1) != 0) {
        *(undefined2 *)(puVar1 + 3) = param_2;
        uVar2 = 1;
      }
      do {
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x18) = param_2;
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x1a) = param_2;
        uVar2 = uVar2 + 2;
      } while (param_1 != uVar2);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined2 *)((longlong)puVar1 + param_1 * 2 + 0x18) = 0;
  return puVar1 + 3;
}



// std::wstring::at(unsigned long long)

longlong __thiscall
std::wstring::at(wstring *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if (param_1 < *(ulonglong *)(lVar1 + -0x18)) {
    if (-1 < *(int *)(lVar1 + -8)) {
      _M_leak_hard(this);
      lVar1 = *(longlong *)this;
    }
    return lVar1 + param_1 * 2;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,
             *(ulonglong *)(lVar1 + -0x18),param_3);
}



// std::wstring::end()

longlong __thiscall std::wstring::end(wstring *this)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
  if ((*(int *)(lVar1 + -8) < 0) || (lVar2 == 0)) {
    return lVar1 + lVar2 * 2;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_140072afd;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    lVar2 = *(longlong *)(lVar1 + -0x18);
    goto LAB_140072afd;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
LAB_140072afd:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return lVar1 + lVar2 * 2;
}



// std::wstring::_Rep::_M_destroy(std::allocator<wchar_t> const&)

void std::wstring::_Rep::_M_destroy(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



// std::wstring::_Rep::_M_dispose(std::allocator<wchar_t> const&)

void std::wstring::_Rep::_M_dispose(void *param_1)

{
  int *piVar1;
  int iVar2;
  
  if (_CRT_MT == 0) {
    iVar2 = *(int *)((longlong)param_1 + 0x10);
    *(int *)((longlong)param_1 + 0x10) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)((longlong)param_1 + 0x10);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  operator_delete(param_1);
  return;
}



// std::wstring::_Rep::_M_refcopy()

_Rep * __thiscall std::wstring::_Rep::_M_refcopy(_Rep *this)

{
  if (_CRT_MT == 0) {
    *(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
    return this + 0x18;
  }
  LOCK();
  *(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
  UNLOCK();
  return this + 0x18;
}



// std::wstring::_Rep::_M_refdata()

_Rep * __thiscall std::wstring::_Rep::_M_refdata(_Rep *this)

{
  return this + 0x18;
}



// std::wstring::_Rep::_S_empty_rep()

undefined1 * std::wstring::_Rep::_S_empty_rep(void)

{
  return &_S_empty_rep_storage;
}



// std::wstring::_Rep::_M_set_leaked()

void __thiscall std::wstring::_Rep::_M_set_leaked(_Rep *this)

{
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  return;
}



// std::wstring::_Rep::_M_set_sharable()

void __thiscall std::wstring::_Rep::_M_set_sharable(_Rep *this)

{
  *(undefined4 *)(this + 0x10) = 0;
  return;
}



// std::wstring::_Rep::_M_set_length_and_sharable(unsigned long long)

void __thiscall std::wstring::_Rep::_M_set_length_and_sharable(_Rep *this,longlong param_1)

{
  *(undefined4 *)(this + 0x10) = 0;
  *(longlong *)this = param_1;
  *(undefined2 *)(this + param_1 * 2 + 0x18) = 0;
  return;
}



// std::wstring::_Rep::_M_grab(std::allocator<wchar_t> const&, std::allocator<wchar_t> const&)

_Rep * std::wstring::_Rep::_M_grab(_Rep *param_1,undefined8 param_2)

{
  _Rep *p_Var1;
  
  if (*(int *)(param_1 + 0x10) < 0) {
    p_Var1 = (_Rep *)_M_clone(param_1,param_2,0);
    return p_Var1;
  }
  if (_CRT_MT == 0) {
    *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
    return param_1 + 0x18;
  }
  LOCK();
  *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
  UNLOCK();
  return param_1 + 0x18;
}



// std::wstring::_Rep::_M_clone(std::allocator<wchar_t> const&, unsigned long long)

longlong * __thiscall
std::wstring::_Rep::_M_clone(_Rep *this,undefined8 param_2_00,longlong param_2)

{
  longlong *plVar1;
  longlong *_Dst;
  longlong lVar2;
  
  plVar1 = _S_create(*(longlong *)this + param_2,*(ulonglong *)(this + 8));
  lVar2 = *(longlong *)this;
  _Dst = plVar1 + 3;
  if (lVar2 != 0) {
    if (lVar2 == 1) {
      *(undefined2 *)(plVar1 + 3) = *(undefined2 *)(this + 0x18);
    }
    else {
      _Dst = memcpy(_Dst,this + 0x18,lVar2 * 2);
      lVar2 = *(longlong *)this;
    }
  }
  *plVar1 = lVar2;
  *(undefined4 *)(plVar1 + 2) = 0;
  *(undefined2 *)((longlong)plVar1 + lVar2 * 2 + 0x18) = 0;
  return _Dst;
}



// std::wstring::_Rep::_S_create(unsigned long long, unsigned long long, std::allocator<wchar_t>
// const&)

void * std::wstring::_Rep::_S_create(ulonglong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  void *pvVar2;
  longlong lVar3;
  wstring *this;
  longlong lVar4;
  
  if (0x1ffffffffffffffc < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_S_create");
  }
  if (param_2 < param_1) {
    if (param_1 < param_2 * 2) {
      param_1 = param_2 * 2;
    }
    this = (wstring *)(param_1 * 2 + 0x1a);
    uVar1 = param_1 * 2 + 0x3a;
    if ((uVar1 < 0x1001) || (param_1 <= param_2)) {
      if ((longlong)this < 0) {
        __throw_bad_alloc();
        lVar3 = *(longlong *)this;
        lVar4 = *(longlong *)(lVar3 + -0x18) + -1;
        if ((*(int *)(lVar3 + -8) < 0) || (*(longlong *)(lVar3 + -0x18) == 0)) {
          return (void *)(lVar3 + lVar4 * 2);
        }
        if (_CRT_MT == 0) {
          if (*(int *)(lVar3 + -8) < 1) goto LAB_140072db5;
        }
        else if (*(int *)(lVar3 + -8) < 1) {
          lVar3 = *(longlong *)this;
          goto LAB_140072db5;
        }
        _M_mutate(this,0,0,0);
        lVar3 = *(longlong *)this;
LAB_140072db5:
        *(undefined4 *)(lVar3 + -8) = 0xffffffff;
        return (void *)(lVar3 + lVar4 * 2);
      }
      goto LAB_140072d39;
    }
    param_1 = param_1 + (0x1000 - (ulonglong)((uint)uVar1 & 0xfff) >> 1);
    if (0x1ffffffffffffffc < param_1) {
      param_1 = 0x1ffffffffffffffc;
    }
  }
  this = (wstring *)(param_1 * 2 + 0x1a);
LAB_140072d39:
  pvVar2 = operator_new((size_t)this);
  *(ulonglong *)((longlong)pvVar2 + 8) = param_1;
  *(undefined4 *)((longlong)pvVar2 + 0x10) = 0;
  return pvVar2;
}



// std::wstring::back()

longlong __thiscall std::wstring::back(wstring *this)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18) + -1;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return lVar1 + lVar2 * 2;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_140072db5;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_140072db5;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_140072db5:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return lVar1 + lVar2 * 2;
}



// std::wstring::rend()

void std::wstring::rend(longlong *param_1,wstring *param_2)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)param_2;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    *param_1 = lVar1;
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_140072e3c;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)param_2;
    goto LAB_140072e3c;
  }
  _M_mutate(param_2,0,0,0);
  lVar1 = *(longlong *)param_2;
LAB_140072e3c:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  *param_1 = lVar1;
  return;
}



// std::wstring::swap(std::wstring&)

void __thiscall std::wstring::swap(wstring *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    *(undefined4 *)(lVar1 + -8) = 0;
  }
  lVar2 = *param_1;
  if (*(int *)(lVar2 + -8) < 0) {
    *(undefined4 *)(lVar2 + -8) = 0;
  }
  *(longlong *)this = lVar2;
  *param_1 = lVar1;
  return;
}



// std::wstring::begin()

void __thiscall std::wstring::begin(wstring *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_140072ee5;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_140072ee5;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_140072ee5:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::wstring::clear()

void __thiscall std::wstring::clear(wstring *this)

{
  _M_mutate(this,0,*(longlong *)(*(longlong *)this + -0x18),0);
  return;
}



// std::wstring::erase(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >)

longlong __thiscall std::wstring::erase(wstring *this,longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  _M_mutate(this,param_1 - lVar1 >> 1,1,0);
  lVar2 = *(longlong *)this;
  *(undefined4 *)(lVar2 + -8) = 0xffffffff;
  return lVar2 + (param_1 - lVar1);
}



// std::wstring::erase(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >)

longlong __thiscall std::wstring::erase(wstring *this,longlong param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = param_2 - param_1 >> 1;
  if (lVar2 == 0) {
    return param_1;
  }
  lVar1 = *(longlong *)this;
  _M_mutate(this,param_1 - lVar1 >> 1,lVar2,0);
  lVar2 = *(longlong *)this;
  *(undefined4 *)(lVar2 + -8) = 0xffffffff;
  return lVar2 + (param_1 - lVar1);
}



// std::wstring::erase(unsigned long long, unsigned long long)

wstring * __thiscall std::wstring::erase(wstring *this,ulonglong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_mutate(this,param_1,param_2,0);
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c510d,param_1,uVar1);
}



// std::wstring::front()

void __thiscall std::wstring::front(wstring *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_140073065;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_140073065;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_140073065:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::wstring::append(wchar_t const*)

void __thiscall std::wstring::append(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  append(this,param_1,sVar1);
  return;
}



// std::wstring::append(wchar_t const*, unsigned long long)

wstring * __thiscall std::wstring::append(wstring *this,undefined2 *param_1,ulonglong param_2)

{
  int *piVar1;
  ulonglong uVar2;
  undefined2 *_Dst;
  undefined2 *puVar3;
  longlong lVar4;
  
  if (param_2 == 0) {
    return this;
  }
  puVar3 = *(undefined2 **)this;
  lVar4 = *(longlong *)(puVar3 + -0xc);
  if (0x1ffffffffffffffcU - lVar4 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  uVar2 = param_2 + lVar4;
  if (*(ulonglong *)(puVar3 + -8) < uVar2) {
LAB_140073121:
    if ((param_1 < puVar3) || (puVar3 + *(longlong *)(puVar3 + -0xc) < param_1)) {
      reserve(this,uVar2);
      puVar3 = *(undefined2 **)this;
      lVar4 = *(longlong *)(puVar3 + -0xc);
LAB_140073145:
      _Dst = puVar3 + lVar4;
      goto joined_r0x0001400731a0;
    }
    lVar4 = (longlong)param_1 - (longlong)puVar3;
    reserve(this,uVar2);
    puVar3 = *(undefined2 **)this;
    param_1 = (undefined2 *)(lVar4 + (longlong)puVar3);
  }
  else {
    if (_CRT_MT == 0) {
      if (0 < *(int *)(puVar3 + -4)) goto LAB_140073121;
      goto LAB_140073145;
    }
    piVar1 = (int *)(puVar3 + -4);
    puVar3 = *(undefined2 **)this;
    if (0 < *piVar1) goto LAB_140073121;
  }
  _Dst = puVar3 + *(longlong *)(puVar3 + -0xc);
joined_r0x0001400731a0:
  if (param_2 == 1) {
    *_Dst = *param_1;
  }
  else {
    memcpy(_Dst,param_1,param_2 * 2);
    puVar3 = *(undefined2 **)this;
  }
  *(undefined4 *)(puVar3 + -4) = 0;
  *(ulonglong *)(puVar3 + -0xc) = uVar2;
  puVar3[uVar2] = 0;
  return this;
}



// std::wstring::append(std::wstring const&)

wstring * __thiscall std::wstring::append(wstring *this,undefined8 *param_1)

{
  ulonglong uVar1;
  undefined2 *_Dst;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  undefined2 *_Src;
  
  _Src = (undefined2 *)*param_1;
  lVar2 = *(longlong *)(_Src + -0xc);
  if (lVar2 == 0) {
    return this;
  }
  lVar3 = *(longlong *)this;
  lVar4 = *(longlong *)(lVar3 + -0x18);
  uVar1 = lVar4 + lVar2;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_140073230;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      _Src = (undefined2 *)*param_1;
      lVar4 = *(longlong *)(lVar3 + -0x18);
      goto LAB_140073230;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  _Src = (undefined2 *)*param_1;
  lVar4 = *(longlong *)(lVar3 + -0x18);
LAB_140073230:
  _Dst = (undefined2 *)(lVar3 + lVar4 * 2);
  if (lVar2 == 1) {
    *_Dst = *_Src;
  }
  else {
    memcpy(_Dst,_Src,lVar2 * 2);
    lVar3 = *(longlong *)this;
  }
  *(undefined4 *)(lVar3 + -8) = 0;
  *(ulonglong *)(lVar3 + -0x18) = uVar1;
  *(undefined2 *)(lVar3 + uVar1 * 2) = 0;
  return this;
}



// std::wstring::append(std::wstring const&, unsigned long long, unsigned long long)

wstring * __thiscall
std::wstring::append(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  undefined2 *_Dst;
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  
  lVar4 = *param_1;
  uVar1 = *(ulonglong *)(lVar4 + -0x18);
  if (uVar1 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c517e,param_2,uVar1);
  }
  uVar5 = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    uVar5 = param_3;
  }
  if (uVar5 == 0) {
    return this;
  }
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
  uVar1 = lVar3 + uVar5;
  if (uVar1 <= *(ulonglong *)(lVar2 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar2 + -8) < 1) goto LAB_140073321;
    }
    else if (*(int *)(lVar2 + -8) < 1) {
      lVar2 = *(longlong *)this;
      lVar4 = *param_1;
      lVar3 = *(longlong *)(lVar2 + -0x18);
      goto LAB_140073321;
    }
  }
  reserve(this,uVar1);
  lVar2 = *(longlong *)this;
  lVar4 = *param_1;
  lVar3 = *(longlong *)(lVar2 + -0x18);
LAB_140073321:
  _Src = (undefined2 *)(lVar4 + param_2 * 2);
  _Dst = (undefined2 *)(lVar2 + lVar3 * 2);
  if (uVar5 == 1) {
    *_Dst = *_Src;
  }
  else {
    memcpy(_Dst,_Src,uVar5 * 2);
    lVar2 = *(longlong *)this;
  }
  *(undefined4 *)(lVar2 + -8) = 0;
  *(ulonglong *)(lVar2 + -0x18) = uVar1;
  *(undefined2 *)(lVar2 + uVar1 * 2) = 0;
  return this;
}



// std::wstring::append(std::initializer_list<wchar_t>)

void __thiscall std::wstring::append(wstring *this,undefined8 *param_1)

{
  append(this,(undefined2 *)*param_1,param_1[1]);
  return;
}



// std::wstring::append(unsigned long long, wchar_t)

wstring * __thiscall std::wstring::append(wstring *this,ulonglong param_1,undefined2 param_2)

{
  ulonglong uVar1;
  undefined2 *puVar2;
  longlong lVar3;
  ulonglong uVar4;
  longlong lVar5;
  
  if (param_1 == 0) {
    return this;
  }
  lVar5 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar5 + -0x18);
  if (0x1ffffffffffffffcU - lVar3 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  uVar1 = param_1 + lVar3;
  if (*(ulonglong *)(lVar5 + -0x10) < uVar1) {
LAB_14007340c:
    reserve(this,uVar1);
    lVar5 = *(longlong *)this;
    lVar3 = *(longlong *)(lVar5 + -0x18);
  }
  else if (_CRT_MT == 0) {
    if (0 < *(int *)(lVar5 + -8)) goto LAB_14007340c;
  }
  else {
    if (0 < *(int *)(lVar5 + -8)) goto LAB_14007340c;
    lVar5 = *(longlong *)this;
    lVar3 = *(longlong *)(lVar5 + -0x18);
  }
  puVar2 = (undefined2 *)(lVar5 + lVar3 * 2);
  uVar4 = 0;
  if (param_1 == 1) {
    *puVar2 = param_2;
  }
  else {
    if ((param_1 & 1) != 0) {
      uVar4 = 1;
      *puVar2 = param_2;
      if (param_1 == 1) goto LAB_140073452;
    }
    do {
      puVar2[uVar4] = param_2;
      puVar2[uVar4 + 1] = param_2;
      uVar4 = uVar4 + 2;
    } while (uVar4 != param_1);
  }
LAB_140073452:
  *(undefined4 *)(lVar5 + -8) = 0;
  *(ulonglong *)(lVar5 + -0x18) = uVar1;
  *(undefined2 *)(lVar5 + uVar1 * 2) = 0;
  return this;
}



// std::wstring::assign(std::wstring&&)

void __thiscall std::wstring::assign(wstring *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    *(undefined4 *)(lVar1 + -8) = 0;
  }
  lVar2 = *param_1;
  if (*(int *)(lVar2 + -8) < 0) {
    *(undefined4 *)(lVar2 + -8) = 0;
  }
  *(longlong *)this = lVar2;
  *param_1 = lVar1;
  return;
}



// std::wstring::assign(wchar_t const*)

void __thiscall std::wstring::assign(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  assign(this,param_1,sVar1);
  return;
}



// std::wstring::assign(wchar_t const*, unsigned long long)

wstring * __thiscall std::wstring::assign(wstring *this,undefined2 *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  undefined2 *_Dst;
  longlong lVar2;
  
  _Dst = *(undefined2 **)this;
  lVar2 = *(longlong *)(_Dst + -0xc);
  if (0x1ffffffffffffffc < param_2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::assign");
  }
  if ((param_1 < _Dst) || (_Dst + lVar2 < param_1)) {
LAB_1400735e0:
    _M_mutate(this,0,lVar2,param_2);
    if (param_2 == 0) {
      return this;
    }
    if (param_2 == 1) {
      **(undefined2 **)this = *param_1;
      return this;
    }
    memcpy(*(undefined2 **)this,param_1,param_2 * 2);
    return this;
  }
  if (_CRT_MT == 0) {
    if (0 < *(int *)(_Dst + -4)) goto LAB_1400735e0;
  }
  else {
    if (0 < *(int *)(_Dst + -4)) {
      lVar2 = *(longlong *)(*(longlong *)this + -0x18);
      goto LAB_1400735e0;
    }
    _Dst = *(undefined2 **)this;
  }
  uVar1 = (longlong)param_1 - (longlong)_Dst >> 1;
  if (uVar1 < param_2) {
    if (uVar1 == 0) goto LAB_1400735b0;
    if (param_2 != 1) {
      memmove(_Dst,param_1,param_2 * 2);
      _Dst = *(undefined2 **)this;
      goto LAB_1400735b0;
    }
  }
  else if (param_2 != 1) {
    if (param_2 != 0) {
      memcpy(_Dst,param_1,param_2 * 2);
      _Dst = *(undefined2 **)this;
    }
    goto LAB_1400735b0;
  }
  *_Dst = *param_1;
LAB_1400735b0:
  *(undefined4 *)(_Dst + -4) = 0;
  *(ulonglong *)(_Dst + -0xc) = param_2;
  _Dst[param_2] = 0;
  return this;
}



// std::wstring::assign(std::wstring const&)

wstring * __thiscall std::wstring::assign(wstring *this,longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined1 local_19 [9];
  
  plVar4 = (longlong *)*param_1;
  if (*(longlong **)this != plVar4) {
    if ((int)plVar4[-1] < 0) {
      plVar4 = _Rep::_M_clone((_Rep *)(plVar4 + -3),local_19,0);
      lVar3 = *(longlong *)this;
    }
    else {
      if (_CRT_MT == 0) {
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
      }
      else {
        LOCK();
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
        UNLOCK();
      }
      lVar3 = *(longlong *)this;
    }
    if (_CRT_MT == 0) {
      iVar2 = *(int *)(lVar3 + -8);
      *(int *)(lVar3 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(lVar3 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      operator_delete((void *)(lVar3 + -0x18));
    }
    *(longlong **)this = plVar4;
    return this;
  }
  return this;
}



// std::wstring::assign(std::wstring const&, unsigned long long, unsigned long long)

void __thiscall
std::wstring::assign(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*param_1 + -0x18);
  uVar2 = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    uVar2 = param_3;
  }
  if (param_2 <= uVar1) {
    assign(this,(undefined2 *)(*param_1 + param_2 * 2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5169,param_2,uVar1);
}



// std::wstring::assign(std::initializer_list<wchar_t>)

void __thiscall std::wstring::assign(wstring *this,undefined8 *param_1)

{
  assign(this,(undefined2 *)*param_1,param_1[1]);
  return;
}



// std::wstring::assign(unsigned long long, wchar_t)

wstring * __thiscall std::wstring::assign(wstring *this,ulonglong param_1,undefined2 param_2)

{
  undefined2 *puVar1;
  undefined2 *puVar2;
  undefined2 *puVar3;
  
  if (0x1ffffffffffffffc < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,0,*(longlong *)(*(longlong *)this + -0x18),param_1);
  if (param_1 != 0) {
    puVar2 = *(undefined2 **)this;
    if (param_1 == 1) {
      *puVar2 = param_2;
      return this;
    }
    puVar1 = puVar2 + param_1;
    if ((param_1 & 1) != 0) {
      *puVar2 = param_2;
      puVar2 = puVar2 + 1;
      if (puVar1 == puVar2) {
        return this;
      }
    }
    do {
      *puVar2 = param_2;
      puVar2[1] = param_2;
      if (puVar1 == puVar2 + 2) {
        return this;
      }
      puVar2[2] = param_2;
      puVar3 = puVar2 + 4;
      puVar2[3] = param_2;
      puVar2 = puVar3;
    } while (puVar1 != puVar3);
  }
  return this;
}



// std::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// std::initializer_list<wchar_t>)

void __thiscall std::wstring::insert(wstring *this,longlong param_1,undefined8 *param_2)

{
  insert(this,param_1 - *(longlong *)this >> 1,(undefined2 *)*param_2,param_2[1]);
  return;
}



// std::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, wchar_t)

void __thiscall std::wstring::insert(wstring *this,longlong param_1,undefined2 param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = param_1 - *(longlong *)this;
  if (*(longlong *)(*(longlong *)this + -0x18) != 0x1ffffffffffffffc) {
    _M_mutate(this,lVar2 >> 1,0,1);
    lVar1 = *(longlong *)this;
    *(undefined2 *)(lVar1 + lVar2) = param_2;
    *(undefined4 *)(lVar1 + -8) = 0xffffffff;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_M_replace_aux");
}



// std::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, unsigned long long,
// wchar_t)

void __thiscall
std::wstring::insert(wstring *this,longlong param_1,ulonglong param_2,undefined2 param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  undefined2 *puVar3;
  
  lVar2 = param_1 - *(longlong *)this;
  if (0x1ffffffffffffffcU - *(longlong *)(*(longlong *)this + -0x18) < param_2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,lVar2 >> 1,0,param_2);
  if (param_2 != 0) {
    puVar3 = (undefined2 *)(lVar2 + *(longlong *)this);
    uVar1 = 0;
    if (param_2 == 1) {
      *puVar3 = param_3;
      return;
    }
    if ((param_2 & 1) != 0) {
      *puVar3 = param_3;
      uVar1 = 1;
    }
    do {
      puVar3[uVar1] = param_3;
      puVar3[uVar1 + 1] = param_3;
      uVar1 = uVar1 + 2;
    } while (param_2 != uVar1);
  }
  return;
}



// std::wstring::insert(unsigned long long, wchar_t const*)

void __thiscall std::wstring::insert(wstring *this,ulonglong param_1,wchar_t *param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_2);
  insert(this,param_1,param_2,sVar1);
  return;
}



// std::wstring::insert(unsigned long long, wchar_t const*, unsigned long long)

wstring * __thiscall
std::wstring::insert(wstring *this,ulonglong param_1,undefined2 *param_2,ulonglong param_3)

{
  undefined2 *_Src;
  ulonglong uVar1;
  undefined2 *_Dst;
  undefined2 *puVar2;
  undefined2 *_Src_00;
  longlong lVar3;
  size_t _Size;
  
  puVar2 = *(undefined2 **)this;
  uVar1 = *(ulonglong *)(puVar2 + -0xc);
  if (uVar1 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c513e,param_1,uVar1);
  }
  if (0x1ffffffffffffffc - uVar1 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::insert");
  }
  if ((puVar2 <= param_2) && (param_2 <= puVar2 + uVar1)) {
    if (_CRT_MT == 0) {
      if (*(int *)(puVar2 + -4) < 1) {
LAB_140073a6a:
        _M_mutate(this,param_1,0,param_3);
        _Src_00 = (undefined2 *)(*(longlong *)this + ((longlong)param_2 - (longlong)puVar2));
        _Dst = (undefined2 *)(*(longlong *)this + param_1 * 2);
        _Src = _Src_00 + param_3;
        if (_Dst < _Src) {
          if (_Dst <= _Src_00) {
            if (param_3 == 1) {
              *_Dst = *_Src;
              return this;
            }
            if (param_3 == 0) {
              return this;
            }
            memcpy(_Dst,_Src,param_3 * 2);
            return this;
          }
          _Size = param_1 * 2 - ((longlong)param_2 - (longlong)puVar2);
          if (_Size == 2) {
            *_Dst = *_Src_00;
          }
          else {
            _Dst = memcpy(_Dst,_Src_00,_Size);
          }
          lVar3 = param_3 - ((longlong)_Size >> 1);
          _Src_00 = _Dst + param_3;
          _Dst = (undefined2 *)((longlong)_Dst + _Size);
          if (lVar3 != 1) {
            if (lVar3 == 0) {
              return this;
            }
            memcpy(_Dst,_Src_00,lVar3 * 2);
            return this;
          }
        }
        else if (param_3 != 1) {
          if (param_3 == 0) {
            return this;
          }
          memcpy(_Dst,_Src_00,param_3 * 2);
          return this;
        }
        *_Dst = *_Src_00;
        return this;
      }
    }
    else if (*(int *)(puVar2 + -4) < 1) {
      puVar2 = *(undefined2 **)this;
      goto LAB_140073a6a;
    }
  }
  _M_mutate(this,param_1,0,param_3);
  if (param_3 != 0) {
    puVar2 = (undefined2 *)(*(longlong *)this + param_1 * 2);
    if (param_3 == 1) {
      *puVar2 = *param_2;
      return this;
    }
    memcpy(puVar2,param_2,param_3 * 2);
  }
  return this;
}



// std::wstring::insert(unsigned long long, std::wstring const&)

void __thiscall std::wstring::insert(wstring *this,ulonglong param_1,undefined8 *param_2)

{
  insert(this,param_1,(undefined2 *)*param_2,*(ulonglong *)((undefined2 *)*param_2 + -0xc));
  return;
}



// std::wstring::insert(unsigned long long, std::wstring const&, unsigned long long, unsigned long
// long)

void __thiscall
std::wstring::insert
          (wstring *this,ulonglong param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*param_2 + -0x18);
  uVar2 = uVar1 - param_3;
  if (param_4 < uVar1 - param_3) {
    uVar2 = param_4;
  }
  if (param_3 <= uVar1) {
    insert(this,param_1,(undefined2 *)(*param_2 + param_3 * 2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c513e,param_3,uVar1);
}



// std::wstring::insert(unsigned long long, unsigned long long, wchar_t)

void __thiscall
std::wstring::insert(wstring *this,ulonglong param_1,ulonglong param_2,undefined2 param_3)

{
  if (param_1 <= *(ulonglong *)(*(longlong *)this + -0x18)) {
    _M_replace_aux(this,param_1,0,param_2,param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c513e,param_1,
             *(ulonglong *)(*(longlong *)this + -0x18));
}



// std::wstring::rbegin()

void std::wstring::rbegin(longlong *param_1,wstring *param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = *(longlong *)param_2;
  lVar1 = *(longlong *)(lVar2 + -0x18);
  if ((*(int *)(lVar2 + -8) < 0) || (lVar1 == 0)) {
    *param_1 = lVar2 + lVar1 * 2;
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar2 + -8) < 1) goto LAB_140073c7c;
  }
  else if (*(int *)(lVar2 + -8) < 1) {
    lVar2 = *(longlong *)param_2;
    lVar1 = *(longlong *)(lVar2 + -0x18);
    goto LAB_140073c7c;
  }
  _M_mutate(param_2,0,0,0);
  lVar2 = *(longlong *)param_2;
  lVar1 = *(longlong *)(lVar2 + -0x18);
LAB_140073c7c:
  *(undefined4 *)(lVar2 + -8) = 0xffffffff;
  *param_1 = lVar2 + lVar1 * 2;
  return;
}



// std::wstring::resize(unsigned long long)

void __thiscall std::wstring::resize(wstring *this,ulonglong param_1)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (0x1ffffffffffffffc < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::resize");
  }
  if (param_1 <= uVar1) {
    if (uVar1 <= param_1) {
      return;
    }
    _M_mutate(this,param_1,uVar1 - param_1,0);
    return;
  }
  append(this,param_1 - uVar1,0);
  return;
}



// std::wstring::resize(unsigned long long, wchar_t)

void __thiscall std::wstring::resize(wstring *this,ulonglong param_1,undefined2 param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (0x1ffffffffffffffc < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::resize");
  }
  if (param_1 <= uVar1) {
    if (uVar1 <= param_1) {
      return;
    }
    _M_mutate(this,param_1,uVar1 - param_1,0);
    return;
  }
  append(this,param_1 - uVar1,param_2);
  return;
}



// std::wstring::_M_copy(wchar_t*, wchar_t const*, unsigned long long)

void std::wstring::_M_copy(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 * 2);
  return;
}



// std::wstring::_M_data(wchar_t*)

undefined8 __thiscall std::wstring::_M_data(wstring *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return param_1;
}



// std::wstring::_M_leak()

void __thiscall std::wstring::_M_leak(wstring *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_140073e25;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_140073e25;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_140073e25:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::wstring::_M_move(wchar_t*, wchar_t const*, unsigned long long)

void std::wstring::_M_move(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memmove(param_1,param_2,param_3 * 2);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, __gnu_cxx::__normal_iterator<wchar_t
// const*, std::wstring >, __gnu_cxx::__normal_iterator<wchar_t const*, std::wstring >)

void __thiscall
std::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,
          param_4 - (longlong)param_3 >> 1);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, wchar_t const*)

void __thiscall
std::wstring::replace(wstring *this,longlong param_1,longlong param_2,wchar_t *param_3)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_3);
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,sVar1);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, wchar_t const*, wchar_t const*)

void __thiscall
std::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,
          param_4 - (longlong)param_3 >> 1);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, wchar_t const*, unsigned long long)

void __thiscall
std::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,ulonglong param_4)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,param_4);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, std::wstring const&)

void __thiscall
std::wstring::replace(wstring *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,(undefined2 *)*param_3,
          *(ulonglong *)((undefined2 *)*param_3 + -0xc));
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, wchar_t*, wchar_t*)

void __thiscall
std::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,
          param_4 - (longlong)param_3 >> 1);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, __gnu_cxx::__normal_iterator<wchar_t*,
// std::wstring >, __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >)

void __thiscall
std::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,
          param_4 - (longlong)param_3 >> 1);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, std::initializer_list<wchar_t>)

void __thiscall
std::wstring::replace(wstring *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  replace(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,(undefined2 *)*param_3,
          param_3[1] * 2 >> 1);
  return;
}



// std::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, unsigned long long, wchar_t)

wstring * __thiscall
std::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,ulonglong param_3,undefined2 param_4)

{
  ulonglong uVar1;
  longlong lVar2;
  undefined2 *puVar3;
  longlong lVar4;
  
  lVar4 = param_2 - param_1 >> 1;
  lVar2 = param_1 - *(longlong *)this;
  if ((ulonglong)((lVar4 + 0x1ffffffffffffffc) - *(longlong *)(*(longlong *)this + -0x18)) < param_3
     ) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,lVar2 >> 1,lVar4,param_3);
  if (param_3 != 0) {
    puVar3 = (undefined2 *)(lVar2 + *(longlong *)this);
    uVar1 = 0;
    if (param_3 == 1) {
      *puVar3 = param_4;
      return this;
    }
    if ((param_3 & 1) != 0) {
      *puVar3 = param_4;
      uVar1 = 1;
    }
    do {
      puVar3[uVar1] = param_4;
      puVar3[uVar1 + 1] = param_4;
      uVar1 = uVar1 + 2;
    } while (param_3 != uVar1);
  }
  return this;
}



// std::wstring::replace(unsigned long long, unsigned long long, wchar_t const*)

void __thiscall
std::wstring::replace(wstring *this,ulonglong param_1,ulonglong param_2,wchar_t *param_3)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_3);
  replace(this,param_1,param_2,param_3,sVar1);
  return;
}



// std::wstring::replace(unsigned long long, unsigned long long, wchar_t const*, unsigned long long)

wstring * __thiscall
std::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,undefined2 *param_3,ulonglong param_4)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  int iVar3;
  ulonglong *_Src;
  undefined2 *_Dst;
  ulonglong uVar4;
  undefined2 *puVar5;
  longlong lVar6;
  
  puVar5 = *(undefined2 **)this;
  uVar2 = *(ulonglong *)(puVar5 + -0xc);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5153,param_1,uVar2);
  }
  uVar4 = uVar2 - param_1;
  if (param_2 < uVar2 - param_1) {
    uVar4 = param_2;
  }
  if ((0x1ffffffffffffffc - uVar2) + uVar4 < param_4) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::replace");
  }
  if ((param_3 < puVar5) || (puVar5 + uVar2 < param_3)) {
LAB_140074250:
    _M_mutate(this,param_1,uVar4,param_4);
    if (param_4 != 0) {
      puVar5 = (undefined2 *)(*(longlong *)this + param_1 * 2);
      if (param_4 == 1) {
        *puVar5 = *param_3;
      }
      else {
        memcpy(puVar5,param_3,param_4 * 2);
      }
    }
  }
  else {
    if (_CRT_MT == 0) {
      if (0 < *(int *)(puVar5 + -4)) goto LAB_140074250;
    }
    else {
      if (0 < *(int *)(puVar5 + -4)) goto LAB_140074250;
      puVar5 = *(undefined2 **)this;
    }
    if (puVar5 + param_1 < param_3 + param_4) {
      if (param_3 < puVar5 + param_1 + uVar4) {
        _Src = _S_construct<>(param_3,(longlong)(param_3 + param_4));
        _M_mutate(this,param_1,uVar4,param_4);
        if (param_4 != 0) {
          puVar5 = (undefined2 *)(param_1 * 2 + *(longlong *)this);
          if (param_4 == 1) {
            *puVar5 = (short)*_Src;
          }
          else {
            memcpy(puVar5,_Src,param_4 * 2);
          }
        }
        if (_CRT_MT == 0) {
          iVar3 = (int)_Src[-1];
          *(int *)(_Src + -1) = iVar3 + -1;
        }
        else {
          LOCK();
          puVar1 = _Src + -1;
          iVar3 = (int)*puVar1;
          *(int *)puVar1 = (int)*puVar1 + -1;
          UNLOCK();
        }
        if (0 < iVar3) {
          return this;
        }
        operator_delete(_Src + -3);
        return this;
      }
      lVar6 = (param_4 - uVar4) + ((longlong)param_3 - (longlong)puVar5 >> 1);
    }
    else {
      lVar6 = (longlong)param_3 - (longlong)puVar5 >> 1;
    }
    _M_mutate(this,param_1,uVar4,param_4);
    puVar5 = (undefined2 *)(*(longlong *)this + lVar6 * 2);
    _Dst = (undefined2 *)(*(longlong *)this + param_1 * 2);
    if (param_4 == 1) {
      *_Dst = *puVar5;
    }
    else if (param_4 != 0) {
      memcpy(_Dst,puVar5,param_4 * 2);
    }
  }
  return this;
}



// std::wstring::replace(unsigned long long, unsigned long long, std::wstring const&)

void __thiscall
std::wstring::replace(wstring *this,ulonglong param_1,ulonglong param_2,undefined8 *param_3)

{
  replace(this,param_1,param_2,(undefined2 *)*param_3,*(ulonglong *)((undefined2 *)*param_3 + -0xc))
  ;
  return;
}



// std::wstring::replace(unsigned long long, unsigned long long, std::wstring const&, unsigned long
// long, unsigned long long)

void __thiscall
std::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_5_00,
          ulonglong param_5)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*param_3 + -0x18);
  uVar2 = uVar1 - param_5_00;
  if (param_5 < uVar1 - param_5_00) {
    uVar2 = param_5;
  }
  if (param_5_00 <= uVar1) {
    replace(this,param_1,param_2,(undefined2 *)(*param_3 + param_5_00 * 2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5153,param_5_00,uVar1);
}



// std::wstring::replace(unsigned long long, unsigned long long, unsigned long long, wchar_t)

void __thiscall
std::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,ulonglong param_3,undefined2 param_4)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace_aux(this,param_1,param_2,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5153,param_1,uVar1);
}



// std::wstring::reserve()

void __thiscall std::wstring::reserve(wstring *this)

{
  int *piVar1;
  int iVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined1 local_19 [9];
  
  lVar4 = *(longlong *)this;
  if (*(ulonglong *)(lVar4 + -0x10) <= *(ulonglong *)(lVar4 + -0x18)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
    }
    else {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
      lVar4 = *(longlong *)this;
    }
  }
  plVar3 = _Rep::_M_clone((_Rep *)(lVar4 + -0x18),local_19,0);
  lVar4 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar4 + -8);
    *(int *)(lVar4 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar4 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    operator_delete((void *)(lVar4 + -0x18));
  }
  *(longlong **)this = plVar3;
  return;
}



// std::wstring::reserve(unsigned long long)

void __thiscall std::wstring::reserve(wstring *this,ulonglong param_1)

{
  int *piVar1;
  int iVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong *plVar5;
  undefined1 local_19;
  
  lVar4 = *(longlong *)this;
  uVar3 = *(ulonglong *)(lVar4 + -0x10);
  if (param_1 <= uVar3) {
    param_1 = uVar3;
    if (_CRT_MT == 0) {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
    }
    else {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
      lVar4 = *(longlong *)this;
    }
  }
  plVar5 = _Rep::_M_clone((_Rep *)(lVar4 + -0x18),&local_19,param_1 - *(longlong *)(lVar4 + -0x18));
  lVar4 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar4 + -8);
    *(int *)(lVar4 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar4 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    operator_delete((void *)(lVar4 + -0x18));
  }
  *(longlong **)this = plVar5;
  return;
}



// std::wstring::pop_back()

void __thiscall std::wstring::pop_back(wstring *this)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18) - 1;
  if (uVar1 <= *(ulonglong *)(*(longlong *)this + -0x18)) {
    _M_mutate(this,uVar1,1,0);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c510d,0xffffffffffffffff
             ,0);
}



// std::wstring::_M_assign(wchar_t*, unsigned long long, wchar_t)

void std::wstring::_M_assign(undefined2 *param_1,ulonglong param_2,undefined2 param_3)

{
  ulonglong uVar1;
  
  if (param_2 == 1) {
    *param_1 = param_3;
    return;
  }
  if (param_2 != 0) {
    uVar1 = 0;
    if ((param_2 & 1) != 0) {
      *param_1 = param_3;
      uVar1 = 1;
      if (param_2 == 1) {
        return;
      }
    }
    do {
      param_1[uVar1] = param_3;
      param_1[uVar1 + 1] = param_3;
      uVar1 = uVar1 + 2;
    } while (param_2 != uVar1);
  }
  return;
}



// std::wstring::_M_mutate(unsigned long long, unsigned long long, unsigned long long)

void __thiscall
std::wstring::_M_mutate(wstring *this,longlong param_1,longlong param_2,longlong param_3)

{
  int *piVar1;
  longlong lVar2;
  undefined2 *puVar3;
  int iVar4;
  longlong lVar5;
  void *pvVar6;
  ulonglong uVar7;
  undefined2 *puVar8;
  longlong lVar9;
  ulonglong uVar10;
  
  lVar9 = *(longlong *)this;
  lVar2 = param_2 + param_1;
  uVar7 = *(ulonglong *)(lVar9 + -0x10);
  uVar10 = (param_3 - param_2) + *(longlong *)(lVar9 + -0x18);
  lVar5 = *(longlong *)(lVar9 + -0x18) - lVar2;
  if (uVar10 <= uVar7) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar9 + -8) < 1) {
LAB_140074793:
        if ((lVar5 != 0) && (param_3 != param_2)) {
          puVar8 = (undefined2 *)(lVar9 + lVar2 * 2);
          puVar3 = (undefined2 *)(lVar9 + (param_3 + param_1) * 2);
          if (lVar5 == 1) {
            *puVar3 = *puVar8;
          }
          else {
            memmove(puVar3,puVar8,lVar5 * 2);
            lVar9 = *(longlong *)this;
          }
        }
        goto LAB_14007473d;
      }
    }
    else {
      if (*(int *)(lVar9 + -8) < 1) {
        lVar9 = *(longlong *)this;
        goto LAB_140074793;
      }
      uVar7 = *(ulonglong *)(*(longlong *)this + -0x10);
    }
  }
  pvVar6 = _Rep::_S_create(uVar10,uVar7);
  if (param_1 == 0) {
    puVar8 = *(undefined2 **)this;
  }
  else {
    puVar8 = *(undefined2 **)this;
    if (param_1 == 1) {
      *(undefined2 *)((longlong)pvVar6 + 0x18) = *puVar8;
    }
    else {
      memcpy((void *)((longlong)pvVar6 + 0x18),puVar8,param_1 * 2);
      puVar8 = *(undefined2 **)this;
    }
  }
  lVar9 = (longlong)pvVar6 + 0x18;
  if (lVar5 != 0) {
    puVar3 = (undefined2 *)((longlong)pvVar6 + (param_3 + param_1) * 2 + 0x18);
    if (lVar5 == 1) {
      *puVar3 = puVar8[lVar2];
    }
    else {
      memcpy(puVar3,puVar8 + lVar2,lVar5 * 2);
      puVar8 = *(undefined2 **)this;
    }
  }
  if (_CRT_MT == 0) {
    iVar4 = *(int *)(puVar8 + -4);
    *(int *)(puVar8 + -4) = iVar4 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(puVar8 + -4);
    iVar4 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar4 < 1) {
    operator_delete(puVar8 + -0xc);
  }
  *(longlong *)this = lVar9;
LAB_14007473d:
  *(undefined4 *)(lVar9 + -8) = 0;
  *(ulonglong *)(lVar9 + -0x18) = uVar10;
  *(undefined2 *)(lVar9 + uVar10 * 2) = 0;
  return;
}



// std::wstring::push_back(wchar_t)

void __thiscall std::wstring::push_back(wstring *this,undefined2 param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
  uVar1 = lVar3 + 1;
  if (uVar1 <= *(ulonglong *)(lVar2 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar2 + -8) < 1) goto LAB_140074875;
    }
    else if (*(int *)(lVar2 + -8) < 1) {
      lVar2 = *(longlong *)this;
      lVar3 = *(longlong *)(lVar2 + -0x18);
      goto LAB_140074875;
    }
  }
  reserve(this,uVar1);
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
LAB_140074875:
  *(undefined2 *)(lVar2 + lVar3 * 2) = param_1;
  *(undefined4 *)(lVar2 + -8) = 0;
  *(ulonglong *)(lVar2 + -0x18) = uVar1;
  *(undefined2 *)(lVar2 + uVar1 * 2) = 0;
  return;
}



// std::wstring::wstring(std::wstring&&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = _CRT_MT;
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  if (iVar2 == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_1400748e2:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)this;
      goto LAB_1400748e2;
    }
    lVar1 = *(longlong *)this;
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::wstring::wstring(std::wstring&&, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined1 (*pauVar1) [16];
  
  *(undefined8 *)this = *param_1;
  pauVar1 = operator_new(0x1a);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  *(undefined2 *)(pauVar1[1] + 8) = 0;
  *param_1 = pauVar1[1] + 8;
  return;
}



// std::wstring::wstring(wchar_t const*, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  if (param_1 != (wchar_t *)0x0) {
    sVar1 = wcslen(param_1);
    pwVar3 = param_1 + sVar1;
  }
  puVar2 = _S_construct<>(param_1,(longlong)pwVar3);
  *(ulonglong **)this = puVar2;
  return;
}



// std::wstring::wstring(wchar_t const*, unsigned long long, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  
  puVar1 = _S_construct<>(param_1,(longlong)(param_1 + param_2));
  *(ulonglong **)this = puVar1;
  return;
}



// std::wstring::wstring(std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x1a);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  *(undefined2 *)(pauVar1[1] + 8) = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::wstring::wstring(std::wstring const&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::wstring::wstring(std::wstring const&, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),param_2,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::wstring::wstring(std::wstring const&, unsigned long long, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<wchar_t*>((undefined2 *)(lVar1 + param_2 * 2),lVar1 + uVar2 * 2);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51d2,param_2,uVar2);
}



// std::wstring::wstring(std::wstring const&, unsigned long long, unsigned long long)

void __thiscall
std::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong *puVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar3 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar3 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar4 = _S_construct<wchar_t*>
                       ((undefined2 *)(lVar1 + param_2 * 2),lVar1 + (uVar3 + param_2) * 2);
    *(ulonglong **)this = puVar4;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51d2,param_2,uVar2);
}



// std::wstring::wstring(std::wstring const&, unsigned long long, unsigned long long,
// std::allocator<wchar_t> const&)

void __thiscall
std::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong *puVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar3 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar3 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar4 = _S_construct<wchar_t*>
                       ((undefined2 *)(lVar1 + param_2 * 2),lVar1 + (uVar3 + param_2) * 2);
    *(ulonglong **)this = puVar4;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51d2,param_2,uVar2);
}



// std::wstring::wstring(std::initializer_list<wchar_t>, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,undefined8 *param_1)

{
  ulonglong *puVar1;
  
  puVar1 = _S_construct<>((undefined2 *)*param_1,(longlong)((undefined2 *)*param_1 + param_1[1]));
  *(ulonglong **)this = puVar1;
  return;
}



// std::wstring::wstring()

void __thiscall std::wstring::wstring(wstring *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x1a);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  *(undefined2 *)(pauVar1[1] + 8) = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::wstring::wstring(unsigned long long, wchar_t, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,ulonglong param_1,undefined2 param_2)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  
  puVar1 = _Rep::_S_create(param_1,0);
  if (param_1 != 0) {
    uVar2 = 0;
    if (param_1 == 1) {
      *(undefined2 *)(puVar1 + 3) = param_2;
    }
    else {
      if ((param_1 & 1) != 0) {
        *(undefined2 *)(puVar1 + 3) = param_2;
        uVar2 = 1;
      }
      do {
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x18) = param_2;
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x1a) = param_2;
        uVar2 = uVar2 + 2;
      } while (param_1 != uVar2);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined2 *)((longlong)puVar1 + param_1 * 2 + 0x18) = 0;
  *(ulonglong **)this = puVar1 + 3;
  return;
}



// std::wstring::wstring<__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >
// >(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, __gnu_cxx::__normal_iterator<wchar_t*,
// std::wstring >, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong uVar2;
  size_t _Size;
  
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::wstring::wstring<wchar_t const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t>
// const&)

void __thiscall std::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::wstring::wstring<wchar_t*>(wchar_t*, wchar_t*, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring<wchar_t*>(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::wstring::wstring(std::wstring&&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = _CRT_MT;
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  if (iVar2 == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_140074ee2:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)this;
      goto LAB_140074ee2;
    }
    lVar1 = *(longlong *)this;
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::wstring::wstring(std::wstring&&, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined1 (*pauVar1) [16];
  
  *(undefined8 *)this = *param_1;
  pauVar1 = operator_new(0x1a);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  *(undefined2 *)(pauVar1[1] + 8) = 0;
  *param_1 = pauVar1[1] + 8;
  return;
}



// std::wstring::wstring(wchar_t const*, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  wchar_t *pwVar3;
  
  pwVar3 = (wchar_t *)0xfffffffffffffffe;
  if (param_1 != (wchar_t *)0x0) {
    sVar1 = wcslen(param_1);
    pwVar3 = param_1 + sVar1;
  }
  puVar2 = _S_construct<>(param_1,(longlong)pwVar3);
  *(ulonglong **)this = puVar2;
  return;
}



// std::wstring::wstring(wchar_t const*, unsigned long long, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  
  puVar1 = _S_construct<>(param_1,(longlong)(param_1 + param_2));
  *(ulonglong **)this = puVar1;
  return;
}



// std::wstring::wstring(std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x1a);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  *(undefined2 *)(pauVar1[1] + 8) = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::wstring::wstring(std::wstring const&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::wstring::wstring(std::wstring const&, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),param_2,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::wstring::wstring(std::wstring const&, unsigned long long, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<wchar_t*>((undefined2 *)(lVar1 + param_2 * 2),lVar1 + uVar2 * 2);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51d2,param_2,uVar2);
}



// std::wstring::wstring(std::wstring const&, unsigned long long, unsigned long long)

void __thiscall
std::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong *puVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar3 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar3 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar4 = _S_construct<wchar_t*>
                       ((undefined2 *)(lVar1 + param_2 * 2),lVar1 + (uVar3 + param_2) * 2);
    *(ulonglong **)this = puVar4;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51d2,param_2,uVar2);
}



// std::wstring::wstring(std::wstring const&, unsigned long long, unsigned long long,
// std::allocator<wchar_t> const&)

void __thiscall
std::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong *puVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar3 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar3 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar4 = _S_construct<wchar_t*>
                       ((undefined2 *)(lVar1 + param_2 * 2),lVar1 + (uVar3 + param_2) * 2);
    *(ulonglong **)this = puVar4;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c51d2,param_2,uVar2);
}



// std::wstring::wstring(std::initializer_list<wchar_t>, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,undefined8 *param_1)

{
  ulonglong *puVar1;
  
  puVar1 = _S_construct<>((undefined2 *)*param_1,(longlong)((undefined2 *)*param_1 + param_1[1]));
  *(ulonglong **)this = puVar1;
  return;
}



// std::wstring::wstring()

void __thiscall std::wstring::wstring(wstring *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x1a);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  *(undefined2 *)(pauVar1[1] + 8) = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::wstring::wstring(unsigned long long, wchar_t, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring(wstring *this,ulonglong param_1,undefined2 param_2)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  
  puVar1 = _Rep::_S_create(param_1,0);
  if (param_1 != 0) {
    uVar2 = 0;
    if (param_1 == 1) {
      *(undefined2 *)(puVar1 + 3) = param_2;
    }
    else {
      if ((param_1 & 1) != 0) {
        *(undefined2 *)(puVar1 + 3) = param_2;
        uVar2 = 1;
      }
      do {
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x18) = param_2;
        *(undefined2 *)((longlong)puVar1 + uVar2 * 2 + 0x1a) = param_2;
        uVar2 = uVar2 + 2;
      } while (param_1 != uVar2);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined2 *)((longlong)puVar1 + param_1 * 2 + 0x18) = 0;
  *(ulonglong **)this = puVar1 + 3;
  return;
}



// std::wstring::wstring<__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >
// >(__gnu_cxx::__normal_iterator<wchar_t*, std::wstring >, __gnu_cxx::__normal_iterator<wchar_t*,
// std::wstring >, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong uVar2;
  size_t _Size;
  
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::wstring::wstring<wchar_t const*>(wchar_t const*, wchar_t const*, std::allocator<wchar_t>
// const&)

void __thiscall std::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::wstring::wstring<wchar_t*>(wchar_t*, wchar_t*, std::allocator<wchar_t> const&)

void __thiscall std::wstring::wstring<wchar_t*>(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  size_t _Size;
  ulonglong uVar2;
  
  if ((param_2 != 0) && (param_1 == (undefined2 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = param_2 - (longlong)param_1;
  uVar2 = (longlong)_Size >> 1;
  puVar1 = _Rep::_S_create(uVar2,0);
  _Dst = puVar1 + 3;
  if (uVar2 == 1) {
    *(undefined2 *)(puVar1 + 3) = *param_1;
  }
  else if (uVar2 != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = uVar2;
  *(undefined2 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::wstring::~wstring()

void __thiscall std::wstring::~wstring(wstring *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  operator_delete((void *)(lVar3 + -0x18));
  return;
}



// std::wstring::~wstring()

void __thiscall std::wstring::~wstring(wstring *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  operator_delete((void *)(lVar3 + -0x18));
  return;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::wstring&&)

void __thiscall std::wstring::operator=(wstring *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    *(undefined4 *)(lVar1 + -8) = 0;
  }
  lVar2 = *param_1;
  if (*(int *)(lVar2 + -8) < 0) {
    *(undefined4 *)(lVar2 + -8) = 0;
  }
  *(longlong *)this = lVar2;
  *param_1 = lVar1;
  return;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*)

void __thiscall std::wstring::operator=(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  assign(this,param_1,sVar1);
  return;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::wstring const&)

wstring * __thiscall std::wstring::operator=(wstring *this,longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined1 local_19 [9];
  
  plVar4 = (longlong *)*param_1;
  if (*(longlong **)this != plVar4) {
    if ((int)plVar4[-1] < 0) {
      plVar4 = _Rep::_M_clone((_Rep *)(plVar4 + -3),local_19,0);
      lVar3 = *(longlong *)this;
    }
    else {
      if (_CRT_MT == 0) {
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
      }
      else {
        LOCK();
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
        UNLOCK();
      }
      lVar3 = *(longlong *)this;
    }
    if (_CRT_MT == 0) {
      iVar2 = *(int *)(lVar3 + -8);
      *(int *)(lVar3 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(lVar3 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      operator_delete((void *)(lVar3 + -0x18));
    }
    *(longlong **)this = plVar4;
    return this;
  }
  return this;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>)

wstring * __thiscall std::wstring::operator=(wstring *this,undefined8 *param_1)

{
  assign(this,(undefined2 *)*param_1,param_1[1]);
  return this;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t)

wstring * __thiscall std::wstring::operator=(wstring *this,undefined2 param_1)

{
  _M_mutate(this,0,*(longlong *)(*(longlong *)this + -0x18),1);
  **(undefined2 **)this = param_1;
  return this;
}



// std::wstring::operator[](unsigned long long)

longlong __thiscall std::wstring::operator[](wstring *this,longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return lVar1 + param_1 * 2;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_1400756cd;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_1400756cd;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_1400756cd:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return lVar1 + param_1 * 2;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*)

void __thiscall std::wstring::operator+=(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  
  sVar1 = wcslen(param_1);
  append(this,param_1,sVar1);
  return;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::wstring const&)

wstring * __thiscall std::wstring::operator+=(wstring *this,undefined8 *param_1)

{
  ulonglong uVar1;
  undefined2 *_Dst;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  undefined2 *_Src;
  
  _Src = (undefined2 *)*param_1;
  lVar2 = *(longlong *)(_Src + -0xc);
  if (lVar2 == 0) {
    return this;
  }
  lVar3 = *(longlong *)this;
  lVar4 = *(longlong *)(lVar3 + -0x18);
  uVar1 = lVar4 + lVar2;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_140073230;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      _Src = (undefined2 *)*param_1;
      lVar4 = *(longlong *)(lVar3 + -0x18);
      goto LAB_140073230;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  _Src = (undefined2 *)*param_1;
  lVar4 = *(longlong *)(lVar3 + -0x18);
LAB_140073230:
  _Dst = (undefined2 *)(lVar3 + lVar4 * 2);
  if (lVar2 == 1) {
    *_Dst = *_Src;
  }
  else {
    memcpy(_Dst,_Src,lVar2 * 2);
    lVar3 = *(longlong *)this;
  }
  *(undefined4 *)(lVar3 + -8) = 0;
  *(ulonglong *)(lVar3 + -0x18) = uVar1;
  *(undefined2 *)(lVar3 + uVar1 * 2) = 0;
  return this;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>)

void __thiscall std::wstring::operator+=(wstring *this,undefined8 *param_1)

{
  append(this,(undefined2 *)*param_1,param_1[1]);
  return;
}



// std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t)

wstring * __thiscall std::wstring::operator+=(wstring *this,undefined2 param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
  uVar1 = lVar2 + 1;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_1400757a4;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      lVar2 = *(longlong *)(lVar3 + -0x18);
      goto LAB_1400757a4;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
LAB_1400757a4:
  *(undefined2 *)(lVar3 + lVar2 * 2) = param_1;
  *(undefined4 *)(lVar3 + -8) = 0;
  *(ulonglong *)(lVar3 + -0x18) = uVar1;
  *(undefined2 *)(lVar3 + uVar1 * 2) = 0;
  return this;
}



// std::iostream::swap(std::iostream&)

void __thiscall std::iostream::swap(iostream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  lVar3 = param_1[1];
  this_00[0xe1] = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  return;
}



// std::iostream::iostream(std::iostream&&)

void __thiscall std::iostream::iostream(iostream *this,longlong *param_1)

{
  ios_base *this_00;
  undefined8 uVar1;
  longlong lVar2;
  
  this_00 = (ios_base *)(this + 0x18);
  ios_base::ios_base(this_00);
  *(undefined2 *)(this + 0xf8) = 0;
  *(undefined **)this = &DAT_1400d6e18;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x18) = &DAT_1400d6e40;
  lVar2 = param_1[1];
  *(undefined8 *)(this + 0xf0) = 0;
  *(longlong *)(this + 8) = lVar2;
  lVar2 = *(longlong *)(*param_1 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar2);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this + 0xe8));
  uVar1 = *(undefined8 *)(lVar2 + 0xd8);
  *(undefined8 *)(this + 0x100) = 0;
  *(undefined8 *)(lVar2 + 0xd8) = 0;
  *(undefined8 *)(this + 0xf0) = uVar1;
  *(undefined2 *)(this + 0xf8) = *(undefined2 *)(lVar2 + 0xe0);
  param_1[1] = 0;
  *(undefined ***)this = &PTR__iostream_1400dcfa8;
  *(undefined ***)(this + 0x10) = &PTR__iostream_1400dcfd0;
  *(undefined ***)(this + 0x18) = &PTR__iostream_1400dcff8;
  return;
}



// std::iostream::iostream(std::streambuf*)

void __thiscall std::iostream::iostream(iostream *this,longlong param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x18);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6e18;
  *(undefined **)(this + 0x18) = &DAT_1400d6e40;
  *(undefined8 *)(this + 0xf0) = 0;
  *(undefined2 *)(this + 0xf8) = 0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,param_1);
  *(undefined **)(this + 0x10) = &DAT_1400d6e68;
  *(undefined **)(this + 0x18) = &DAT_1400d6e90;
  ios::init((ios *)this_00,param_1);
  *(undefined ***)this = &PTR__iostream_1400dcfa8;
  *(undefined ***)(this + 0x10) = &PTR__iostream_1400dcfd0;
  *(undefined ***)(this + 0x18) = &PTR__iostream_1400dcff8;
  return;
}



// std::iostream::iostream()

void __thiscall std::iostream::iostream(iostream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x18);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6e18;
  *(undefined **)(this + 0x18) = &DAT_1400d6e40;
  *(undefined8 *)(this + 0xf0) = 0;
  *(undefined2 *)(this + 0xf8) = 0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6e68;
  *(undefined **)(this + 0x18) = &DAT_1400d6e90;
  ios::init((ios *)this_00,0);
  *(undefined ***)this = &PTR__iostream_1400dcfa8;
  *(undefined ***)(this + 0x10) = &PTR__iostream_1400dcfd0;
  *(undefined ***)(this + 0x18) = &PTR__iostream_1400dcff8;
  return;
}



// std::iostream::iostream(std::iostream&&)

void __thiscall std::iostream::iostream(iostream *this,longlong *param_1,longlong *param_2)

{
  undefined8 uVar1;
  longlong lVar2;
  ios_base *this_00;
  longlong lVar3;
  
  lVar3 = param_1[1];
  *(longlong *)this = lVar3;
  *(longlong *)(this + *(longlong *)(lVar3 + -0x18)) = param_1[2];
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar3 + -0x18));
  lVar3 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar3);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar1 = *(undefined8 *)(lVar3 + 0xd8);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(lVar3 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar3 + 0xe0);
  lVar3 = param_1[3];
  param_2[1] = 0;
  lVar2 = param_1[4];
  *(longlong *)(this + 0x10) = lVar3;
  *(longlong *)(this + *(longlong *)(lVar3 + -0x18) + 0x10) = lVar2;
  lVar3 = *param_1;
  lVar2 = param_1[5];
  *(longlong *)this = lVar3;
  *(longlong *)(this + *(longlong *)(lVar3 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[6];
  return;
}



// std::iostream::iostream(std::streambuf*)

void __thiscall std::iostream::iostream(iostream *this,longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),param_2);
  lVar1 = param_1[3];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[4];
  ios::init((ios *)(this + lVar1 + 0x10),param_2);
  lVar1 = *param_1;
  lVar2 = param_1[5];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[6];
  return;
}



// std::iostream::iostream()

void __thiscall std::iostream::iostream(iostream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = param_1[3];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[4];
  ios::init((ios *)(this + lVar1 + 0x10),0);
  lVar1 = *param_1;
  lVar2 = param_1[5];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[6];
  return;
}



// std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this)

{
  *(undefined **)this = &DAT_1400d6e18;
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6e68;
  *(undefined ***)(this + 0x18) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x18));
  operator_delete(this);
  return;
}



// std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this)

{
  *(undefined **)this = &DAT_1400d6e18;
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6e68;
  *(undefined ***)(this + 0x18) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x18));
  return;
}



// std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[5];
  *(longlong *)(this + 0x10) = param_1[6];
  lVar1 = param_1[3];
  *(longlong *)(this + 0x10) = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18) + 0x10) = param_1[4];
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::iostream::TEMPNAMEPLACEHOLDERVALUE(std::iostream&&)

iostream * __thiscall std::iostream::operator=(iostream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  lVar3 = param_1[1];
  this_00[0xe1] = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  return this;
}



// std::istream& std::istream::_M_extract<void*>(void*&)

istream * __thiscall std::istream::_M_extract<void*>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x60))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<bool>(bool&)

istream * __thiscall std::istream::_M_extract<bool>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x10))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<double>(double&)

istream * __thiscall std::istream::_M_extract<double>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x50))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<long double>(long double&)

istream * __thiscall std::istream::_M_extract<>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x58))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<float>(float&)

istream * __thiscall std::istream::_M_extract<float>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x48))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<unsigned int>(unsigned int&)

istream * __thiscall std::istream::_M_extract<>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x28))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<long>(long&)

istream * __thiscall std::istream::_M_extract<long>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x18))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<unsigned long>(unsigned long&)

istream * __thiscall std::istream::_M_extract<>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x30))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<unsigned short>(unsigned short&)

istream * __thiscall std::istream::_M_extract<>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x20))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<long long>(long long&)

istream * __thiscall std::istream::_M_extract<long_long>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x38))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream& std::istream::_M_extract<unsigned long long>(unsigned long long&)

istream * __thiscall std::istream::_M_extract<>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x40))(local_38,plVar1,&local_48,&local_58,piVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::get(char*, long long)

void __thiscall std::istream::get(istream *this,undefined1 *param_1,longlong param_2)

{
  ctype<char> *this_00;
  char cVar1;
  uint uVar2;
  
  this_00 = *(ctype<char> **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xf0);
  if (this_00 != (ctype<char> *)0x0) {
    if (this_00[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this_00);
      uVar2 = 10;
      if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
        cVar1 = (**(code **)(*(longlong *)this_00 + 0x30))(this_00,10);
        uVar2 = (uint)cVar1;
      }
    }
    else {
      uVar2 = (uint)(char)this_00[0x43];
    }
    get(this,param_1,param_2,uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::istream::get(char*, long long, char)

istream * __thiscall
std::istream::get(istream *this,undefined1 *param_1,longlong param_2,uint param_3)

{
  byte bVar1;
  longlong *plVar2;
  longlong lVar3;
  byte *pbVar4;
  int iVar5;
  uint uVar6;
  byte *pbVar7;
  sentry local_29;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_29,(longlong *)this,'\x01');
  if (local_29 != (sentry)0x0) {
    plVar2 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((byte *)plVar2[2] < (byte *)plVar2[3]) {
      lVar3 = *(longlong *)(this + 8);
      bVar1 = *(byte *)plVar2[2];
      goto joined_r0x000140076f5f;
    }
    uVar6 = (**(code **)(*plVar2 + 0x48))(plVar2);
    if (*(longlong *)(this + 8) + 1 < param_2) {
joined_r0x000140077031:
      if (uVar6 != 0xffffffff) {
        do {
          if ((param_3 & 0xff) == uVar6) goto LAB_140076eac;
          *param_1 = (char)uVar6;
          pbVar7 = (byte *)plVar2[2];
          param_1 = param_1 + 1;
          pbVar4 = (byte *)plVar2[3];
          *(longlong *)(this + 8) = *(longlong *)(this + 8) + 1;
          if (pbVar7 < pbVar4) {
            pbVar7 = pbVar7 + 1;
            plVar2[2] = (longlong)pbVar7;
            if (pbVar4 <= pbVar7) goto LAB_140076fd0;
          }
          else {
            iVar5 = (**(code **)(*plVar2 + 0x50))(plVar2);
            if (iVar5 == -1) break;
            pbVar7 = (byte *)plVar2[2];
            if ((byte *)plVar2[3] <= pbVar7) goto LAB_140076fd0;
          }
          lVar3 = *(longlong *)(this + 8);
          bVar1 = *pbVar7;
joined_r0x000140076f5f:
          uVar6 = (uint)bVar1;
          if (param_2 <= lVar3 + 1) goto LAB_140076eac;
        } while( true );
      }
      goto LAB_140076ff0;
    }
LAB_140077039:
    if (uVar6 == 0xffffffff) {
LAB_140076ff0:
      if (0 < param_2) {
        *param_1 = 0;
      }
      uVar6 = 6;
      if (*(longlong *)(this + 8) != 0) {
        uVar6 = 2;
      }
      goto LAB_140076ec0;
    }
  }
LAB_140076eac:
  if (param_2 < 1) {
    if (*(longlong *)(this + 8) != 0) {
      return this;
    }
  }
  else {
    *param_1 = 0;
    if (*(longlong *)(this + 8) != 0) {
      return this;
    }
  }
  uVar6 = 4;
LAB_140076ec0:
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             uVar6 | *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
LAB_140076fd0:
  uVar6 = (**(code **)(*plVar2 + 0x48))(plVar2);
  if (param_2 <= *(longlong *)(this + 8) + 1) goto LAB_140077039;
  goto joined_r0x000140077031;
}



// std::istream::get(std::streambuf&)

void __thiscall std::istream::get(istream *this,longlong *param_1)

{
  ctype<char> *this_00;
  char cVar1;
  uint uVar2;
  
  this_00 = *(ctype<char> **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xf0);
  if (this_00 != (ctype<char> *)0x0) {
    if (this_00[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this_00);
      uVar2 = 10;
      if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
        cVar1 = (**(code **)(*(longlong *)this_00 + 0x30))(this_00,10);
        uVar2 = (uint)cVar1;
      }
    }
    else {
      uVar2 = (uint)(char)this_00[0x43];
    }
    get(this,param_1,uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::istream::get(std::streambuf&, char)

istream * __thiscall std::istream::get(istream *this,longlong *param_1,uint param_2)

{
  longlong *plVar1;
  byte bVar2;
  int iVar3;
  uint uVar4;
  byte *pbVar5;
  uint uVar6;
  longlong lVar7;
  sentry local_29;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_29,(longlong *)this,'\x01');
  if (local_29 == (sentry)0x0) {
    lVar7 = *(longlong *)(this + 8);
joined_r0x000140077200:
    if (lVar7 != 0) {
      return this;
    }
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
      bVar2 = *(byte *)plVar1[2];
      uVar4 = (uint)bVar2;
      uVar6 = (uint)bVar2;
    }
    else {
      uVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
      uVar6 = uVar4 & 0xff;
      if (uVar4 == 0xffffffff) {
        *(undefined8 *)(this + 8) = 0;
LAB_140077298:
        uVar4 = 6;
        goto LAB_140077151;
      }
    }
    lVar7 = 0;
    if ((param_2 & 0xff) != uVar4) {
      do {
        if ((undefined1 *)param_1[5] < (undefined1 *)param_1[6]) {
          *(undefined1 *)param_1[5] = (char)uVar6;
          param_1[5] = param_1[5] + 1;
        }
        else {
          iVar3 = (**(code **)(*param_1 + 0x68))(param_1);
          if (iVar3 == -1) break;
        }
        lVar7 = lVar7 + 1;
        if ((byte *)plVar1[3] <= (byte *)plVar1[2]) {
          iVar3 = (**(code **)(*plVar1 + 0x50))(plVar1);
          if (iVar3 != -1) {
            pbVar5 = (byte *)plVar1[2];
            if (pbVar5 < (byte *)plVar1[3]) goto LAB_1400771d5;
            goto LAB_140077230;
          }
LAB_140077248:
          if (lVar7 < 0) {
            *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
          }
          else {
            *(longlong *)(this + 8) = lVar7;
            if (lVar7 == 0) goto LAB_140077298;
          }
          uVar4 = 2;
          goto LAB_140077151;
        }
        pbVar5 = (byte *)plVar1[2] + 1;
        plVar1[2] = (longlong)pbVar5;
        if (pbVar5 < (byte *)plVar1[3]) {
LAB_1400771d5:
          bVar2 = *pbVar5;
          uVar4 = (uint)bVar2;
        }
        else {
LAB_140077230:
          uVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
          bVar2 = (byte)uVar4;
          if (uVar4 == 0xffffffff) goto LAB_140077248;
        }
        uVar6 = (uint)bVar2;
      } while ((param_2 & 0xff) != uVar4);
      if (lVar7 < 0) {
        *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
        return this;
      }
      *(longlong *)(this + 8) = lVar7;
      goto joined_r0x000140077200;
    }
    *(undefined8 *)(this + 8) = 0;
  }
  uVar4 = 4;
LAB_140077151:
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             uVar4 | *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::istream::get(char&)

istream * __thiscall std::istream::get(istream *this,undefined1 *param_1)

{
  longlong *plVar1;
  byte *pbVar2;
  uint uVar3;
  sentry local_19 [9];
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_19,(longlong *)this,'\x01');
  if (local_19[0] != (sentry)0x0) {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    pbVar2 = (byte *)plVar1[2];
    if (pbVar2 < (byte *)plVar1[3]) {
      uVar3 = (uint)*pbVar2;
      plVar1[2] = (longlong)(pbVar2 + 1);
    }
    else {
      uVar3 = (**(code **)(*plVar1 + 0x50))();
      if (uVar3 == 0xffffffff) {
        uVar3 = (-(uint)(*(longlong *)(this + 8) == 0) & 4) + 2;
        goto LAB_14007736a;
      }
    }
    *(undefined8 *)(this + 8) = 1;
    *param_1 = (char)uVar3;
  }
  if (*(longlong *)(this + 8) != 0) {
    return this;
  }
  uVar3 = 4;
LAB_14007736a:
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             uVar3 | *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::istream::get()

ulonglong __thiscall std::istream::get(istream *this)

{
  longlong *plVar1;
  byte *pbVar2;
  ulonglong uVar3;
  uint uVar4;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 == (sentry)0x0) {
    if (*(longlong *)(this + 8) == 0) {
      uVar4 = 4;
LAB_1400774d0:
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 uVar4 | *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20))
      ;
    }
    uVar3 = 0xffffffff;
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    pbVar2 = (byte *)plVar1[2];
    if (pbVar2 < (byte *)plVar1[3]) {
      uVar3 = (ulonglong)*pbVar2;
      plVar1[2] = (longlong)(pbVar2 + 1);
    }
    else {
      uVar3 = (**(code **)(*plVar1 + 0x50))();
      if ((int)uVar3 == -1) {
        uVar4 = (-(uint)(*(longlong *)(this + 8) == 0) & 4) + 2;
        goto LAB_1400774d0;
      }
    }
    *(undefined8 *)(this + 8) = 1;
  }
  return uVar3;
}



// std::istream::peek()

ulonglong __thiscall std::istream::peek(istream *this)

{
  longlong *plVar1;
  ulonglong uVar2;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 == (sentry)0x0) {
    uVar2 = 0xffffffff;
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
      uVar2 = (ulonglong)*(byte *)plVar1[2];
    }
    else {
      uVar2 = (**(code **)(*plVar1 + 0x48))();
      if ((int)uVar2 == -1) {
        ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                   *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
        uVar2 = uVar2 & 0xffffffff;
      }
    }
  }
  return uVar2;
}



// std::istream::read(char*, long long)

istream * __thiscall std::istream::read(istream *this,undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  sentry local_19;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_19,(longlong *)this,'\x01');
  if (local_19 != (sentry)0x0) {
    lVar1 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                        0x40))(*(longlong **)
                                (this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),param_1,
                               param_2);
    *(longlong *)(this + 8) = lVar1;
    if (param_2 != lVar1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 6);
      return this;
    }
  }
  return this;
}



// std::istream::swap(std::istream&)

void __thiscall std::istream::swap(istream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  lVar3 = param_1[1];
  this_00[0xe1] = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  return;
}



// std::istream::sync()

undefined8 __thiscall std::istream::sync(istream *this)

{
  int iVar1;
  sentry local_9;
  
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if ((local_9 != (sentry)0x0) &&
     (*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) != (longlong *)0x0)) {
    iVar1 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                        0x30))();
    if (iVar1 != -1) {
      return 0;
    }
    ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
               *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
  }
  return 0xffffffff;
}



// std::istream::seekg(std::fpos<int>)

istream * __thiscall std::istream::seekg(istream *this,undefined8 *param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 local_48;
  undefined8 uStack_40;
  longlong local_38 [3];
  sentry local_19 [17];
  
  uVar1 = *param_1;
  uVar2 = param_1[1];
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) & 0xfffffffd
            );
  sentry::sentry(local_19,(longlong *)this,'\x01');
  if ((local_19[0] != (sentry)0x0) &&
     (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0)) {
    local_48 = uVar1;
    uStack_40 = uVar2;
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x28))
              (local_38,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               &local_48,8);
    if (local_38[0] == -1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  return this;
}



// std::istream::seekg(long long, std::_Ios_Seekdir)

istream * __thiscall std::istream::seekg(istream *this,undefined8 param_1,undefined4 param_2)

{
  longlong local_38 [3];
  sentry local_19;
  
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) & 0xfffffffd
            );
  sentry::sentry(&local_19,(longlong *)this,'\x01');
  if ((local_19 != (sentry)0x0) &&
     (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0)) {
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x20))
              (local_38,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               param_1,param_2,8);
    if (local_38[0] == -1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  return this;
}



// std::istream::tellg()

undefined8 * std::istream::tellg(undefined8 *param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined8 local_38;
  undefined4 local_30;
  sentry local_19 [9];
  
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  sentry::sentry(local_19,param_2,'\x01');
  if ((local_19[0] != (sentry)0x0) &&
     ((*(byte *)((longlong)param_2 + *(longlong *)(*param_2 + -0x18) + 0x20) & 5) == 0)) {
    plVar1 = *(longlong **)((longlong)param_2 + *(longlong *)(*param_2 + -0x18) + 0xe8);
    (**(code **)(*plVar1 + 0x20))(&local_38,plVar1,0,1,8);
    *param_1 = local_38;
    *(undefined4 *)(param_1 + 1) = local_30;
  }
  return param_1;
}



// std::istream::unget()

istream * __thiscall std::istream::unget(istream *this)

{
  longlong *plVar1;
  int iVar2;
  ios *this_00;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) & 0xfffffffd
            );
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 != (sentry)0x0) {
    this_00 = (ios *)(this + *(longlong *)(*(longlong *)this + -0x18));
    plVar1 = *(longlong **)(this_00 + 0xe8);
    if (plVar1 == (longlong *)0x0) {
LAB_140077c75:
      ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      return this;
    }
    if ((ulonglong)plVar1[1] < (ulonglong)plVar1[2]) {
      plVar1[2] = plVar1[2] - 1;
    }
    else {
      iVar2 = (**(code **)(*plVar1 + 0x58))(plVar1,0xffffffff);
      if (iVar2 == -1) {
        this_00 = (ios *)(this + *(longlong *)(*(longlong *)this + -0x18));
        goto LAB_140077c75;
      }
    }
  }
  return this;
}



// std::istream::ignore()

istream * __thiscall std::istream::ignore(istream *this)

{
  longlong *plVar1;
  int iVar2;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 == (sentry)0x0) {
    return this;
  }
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
  if ((ulonglong)plVar1[2] < (ulonglong)plVar1[3]) {
    plVar1[2] = plVar1[2] + 1;
  }
  else {
    iVar2 = (**(code **)(*plVar1 + 0x50))();
    if (iVar2 == -1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
      return this;
    }
  }
  *(undefined8 *)(this + 8) = 1;
  return this;
}



// std::istream::ignore(long long)

istream * __thiscall std::istream::ignore(istream *this,longlong param_1)

{
  longlong *plVar1;
  uint uVar2;
  int iVar3;
  istream *piVar4;
  ulonglong uVar5;
  longlong lVar6;
  longlong lVar7;
  ulonglong uVar8;
  sentry sVar9;
  sentry local_39;
  
  if (param_1 == 1) {
    piVar4 = ignore(this);
    return piVar4;
  }
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_39,(longlong *)this,'\x01');
  if (param_1 < 1) {
    return this;
  }
  if (local_39 == (sentry)0x0) {
    return this;
  }
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
  if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
    uVar2 = (uint)*(byte *)plVar1[2];
  }
  else {
    uVar2 = (**(code **)(*plVar1 + 0x48))(plVar1);
  }
  sVar9 = (sentry)0x0;
  do {
    lVar7 = *(longlong *)(this + 8);
    if (lVar7 < param_1) {
      if (uVar2 == 0xffffffff) goto LAB_140077ebd;
    }
    else {
      if (param_1 != 0x7fffffffffffffff) {
        return this;
      }
      if (uVar2 == 0xffffffff) goto LAB_140077ff8;
      lVar7 = -0x8000000000000000;
      sVar9 = local_39;
    }
    uVar8 = plVar1[3];
LAB_140077f4a:
    while( true ) {
      uVar5 = plVar1[2];
      lVar6 = param_1 - lVar7;
      if ((longlong)(uVar8 - uVar5) < param_1 - lVar7) {
        lVar6 = uVar8 - uVar5;
      }
      if (1 < lVar6) {
        lVar7 = lVar7 + lVar6;
        plVar1[2] = uVar5 + lVar6;
        *(longlong *)(this + 8) = lVar7;
        if (uVar5 + lVar6 < uVar8) goto code_r0x000140077f2b;
        break;
      }
      *(longlong *)(this + 8) = lVar7 + 1;
      if (uVar5 < uVar8) {
        uVar5 = uVar5 + 1;
        plVar1[2] = uVar5;
      }
      else {
        iVar3 = (**(code **)(*plVar1 + 0x50))(plVar1);
        if (iVar3 == -1) {
          if (*(longlong *)(this + 8) < param_1) goto LAB_140077ebd;
          if (param_1 != 0x7fffffffffffffff) {
            return this;
          }
          goto LAB_140077ff8;
        }
        uVar5 = plVar1[2];
        uVar8 = plVar1[3];
      }
      if (uVar8 <= uVar5) break;
      lVar7 = *(longlong *)(this + 8);
      if (param_1 <= lVar7) {
        if (param_1 != 0x7fffffffffffffff) {
          return this;
        }
        goto LAB_140077f39;
      }
    }
    uVar2 = (**(code **)(*plVar1 + 0x48))(plVar1);
  } while( true );
code_r0x000140077f2b:
  if (param_1 <= lVar7) {
    if (param_1 != 0x7fffffffffffffff) {
      return this;
    }
LAB_140077f39:
    *(undefined8 *)(this + 8) = 0x8000000000000000;
    lVar7 = -0x8000000000000000;
    sVar9 = local_39;
  }
  goto LAB_140077f4a;
LAB_140077ff8:
  if (sVar9 != (sentry)0x0) {
    *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
  }
  goto LAB_140077ed5;
LAB_140077ebd:
  if ((param_1 == 0x7fffffffffffffff) && (sVar9 != (sentry)0x0)) {
    *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
  }
LAB_140077ed5:
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
  return this;
}



// std::istream::ignore(long long, int)

istream * __thiscall std::istream::ignore(istream *this,longlong param_1,uint param_2)

{
  byte bVar1;
  longlong *plVar2;
  uint uVar3;
  int iVar4;
  istream *piVar5;
  void *pvVar6;
  byte *pbVar7;
  size_t _MaxCount;
  longlong lVar8;
  byte *pbVar9;
  sentry sVar10;
  sentry local_49 [9];
  
  if (param_2 == 0xffffffff) {
    piVar5 = ignore(this,param_1);
    return piVar5;
  }
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_49,(longlong *)this,'\x01');
  if (param_1 < 1) {
    return this;
  }
  if (local_49[0] == (sentry)0x0) {
    return this;
  }
  plVar2 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
  if ((byte *)plVar2[2] < (byte *)plVar2[3]) {
    uVar3 = (uint)*(byte *)plVar2[2];
  }
  else {
    uVar3 = (**(code **)(*plVar2 + 0x48))(plVar2);
  }
  sVar10 = (sentry)0x0;
LAB_140078136:
  lVar8 = *(longlong *)(this + 8);
  if (lVar8 < param_1) {
    if (uVar3 == 0xffffffff) goto LAB_14007814c;
  }
  else {
    if (param_1 != 0x7fffffffffffffff) {
      return this;
    }
    if (uVar3 == 0xffffffff) goto LAB_140078346;
    if (uVar3 == param_2) {
LAB_14007838d:
      if (sVar10 == (sentry)0x0) {
        if (lVar8 != 0x7fffffffffffffff) {
LAB_140078260:
          *(longlong *)(this + 8) = lVar8 + 1;
        }
      }
      else {
LAB_14007837a:
        *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
      }
      if ((ulonglong)plVar2[2] < (ulonglong)plVar2[3]) {
        plVar2[2] = plVar2[2] + 1;
        return this;
      }
      (**(code **)(*plVar2 + 0x50))(plVar2);
      return this;
    }
    *(undefined8 *)(this + 8) = 0x8000000000000000;
    lVar8 = -0x8000000000000000;
    sVar10 = local_49[0];
  }
LAB_140078232:
  if (param_2 == uVar3) {
    if (param_1 != 0x7fffffffffffffff) {
      if (param_1 <= lVar8) {
        return this;
      }
      goto LAB_140078260;
    }
    if (sVar10 == (sentry)0x0) goto LAB_140078260;
    goto LAB_14007837a;
  }
  pbVar9 = (byte *)plVar2[3];
  pbVar7 = (byte *)plVar2[2];
  _MaxCount = param_1 - lVar8;
  if ((longlong)pbVar9 - (longlong)pbVar7 < param_1 - lVar8) {
    _MaxCount = (longlong)pbVar9 - (longlong)pbVar7;
  }
  if ((longlong)_MaxCount < 2) {
    *(longlong *)(this + 8) = lVar8 + 1;
    if (pbVar7 < pbVar9) {
      pbVar7 = pbVar7 + 1;
      plVar2[2] = (longlong)pbVar7;
    }
    else {
      iVar4 = (**(code **)(*plVar2 + 0x50))(plVar2);
      if (iVar4 == -1) {
        if (*(longlong *)(this + 8) < param_1) goto LAB_14007814c;
        if (param_1 != 0x7fffffffffffffff) {
          return this;
        }
        goto LAB_140078346;
      }
      pbVar7 = (byte *)plVar2[2];
      pbVar9 = (byte *)plVar2[3];
    }
    if (pbVar9 <= pbVar7) goto LAB_1400782f0;
    lVar8 = *(longlong *)(this + 8);
    bVar1 = *pbVar7;
  }
  else {
    pvVar6 = memchr(pbVar7,(int)(char)param_2,_MaxCount);
    if (pvVar6 != (void *)0x0) {
      _MaxCount = (longlong)pvVar6 - (longlong)pbVar7;
    }
    pbVar7 = pbVar7 + _MaxCount;
    lVar8 = lVar8 + _MaxCount;
    plVar2[2] = (longlong)pbVar7;
    *(longlong *)(this + 8) = lVar8;
    if (pbVar9 <= pbVar7) goto LAB_1400782f0;
    bVar1 = *pbVar7;
  }
  uVar3 = (uint)bVar1;
  if (param_1 <= lVar8) {
    if (param_1 != 0x7fffffffffffffff) {
      return this;
    }
    if (param_2 == uVar3) goto LAB_14007838d;
    *(undefined8 *)(this + 8) = 0x8000000000000000;
    lVar8 = -0x8000000000000000;
    sVar10 = local_49[0];
  }
  goto LAB_140078232;
LAB_140078346:
  if (sVar10 != (sentry)0x0) {
    *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
  }
  goto LAB_140078164;
LAB_1400782f0:
  uVar3 = (**(code **)(*plVar2 + 0x48))(plVar2);
  goto LAB_140078136;
LAB_14007814c:
  if ((param_1 == 0x7fffffffffffffff) && (sVar10 != (sentry)0x0)) {
    *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
  }
LAB_140078164:
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
  return this;
}



// std::istream::sentry::sentry(std::istream&, bool)

void __thiscall std::istream::sentry::sentry(sentry *this,longlong *param_1,char param_2)

{
  byte bVar1;
  longlong *plVar2;
  int iVar3;
  byte *pbVar4;
  ulonglong uVar5;
  ios *this_00;
  uint uVar6;
  byte *pbVar7;
  longlong lVar8;
  
  lVar8 = *param_1;
  *this = (sentry)0x0;
  this_00 = (ios *)(*(longlong *)(lVar8 + -0x18) + (longlong)param_1);
  uVar6 = *(uint *)(this_00 + 0x20);
  if (uVar6 != 0) goto LAB_140078475;
  if (*(ostream **)(this_00 + 0xd8) == (ostream *)0x0) {
    if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_140078493:
      *this = (sentry)0x1;
      return;
    }
  }
  else {
    ostream::flush(*(ostream **)(this_00 + 0xd8));
    this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_14007846e:
      uVar6 = *(uint *)(this_00 + 0x20);
      if (uVar6 == 0) goto LAB_140078493;
      goto LAB_140078475;
    }
  }
  plVar2 = *(longlong **)(this_00 + 0xe8);
  if ((byte *)plVar2[2] < (byte *)plVar2[3]) {
    lVar8 = *(longlong *)(this_00 + 0xf0);
    uVar5 = (ulonglong)*(byte *)plVar2[2];
    if (lVar8 == 0) {
LAB_14007857d:
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
LAB_1400784c8:
    do {
      bVar1 = *(byte *)(*(longlong *)(lVar8 + 0x30) + (uVar5 & 0xff) * 2);
      while( true ) {
        if ((bVar1 & 0x20) == 0) {
          this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
          goto LAB_14007846e;
        }
        pbVar7 = (byte *)plVar2[3];
        if ((byte *)plVar2[2] < pbVar7) {
          pbVar4 = (byte *)plVar2[2] + 1;
          plVar2[2] = (longlong)pbVar4;
        }
        else {
          iVar3 = (**(code **)(*plVar2 + 0x50))(plVar2);
          if (iVar3 == -1) goto LAB_14007853e;
          pbVar4 = (byte *)plVar2[2];
          pbVar7 = (byte *)plVar2[3];
        }
        if (pbVar7 <= pbVar4) break;
        bVar1 = *(byte *)(*(longlong *)(lVar8 + 0x30) + (ulonglong)*pbVar4 * 2);
      }
      uVar5 = (**(code **)(*plVar2 + 0x48))(plVar2);
    } while ((int)uVar5 != -1);
LAB_14007853e:
    this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  }
  else {
    uVar5 = (**(code **)(*plVar2 + 0x48))(plVar2);
    this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    lVar8 = *(longlong *)(this_00 + 0xf0);
    if (lVar8 == 0) goto LAB_14007857d;
    if ((int)uVar5 != -1) goto LAB_1400784c8;
  }
  uVar6 = *(uint *)(this_00 + 0x20) | 2;
LAB_140078475:
  ios::clear(this_00,uVar6 | 4);
  return;
}



// std::istream::sentry::sentry(std::istream&, bool)

void __thiscall std::istream::sentry::sentry(sentry *this,longlong *param_1,char param_2)

{
  byte bVar1;
  longlong *plVar2;
  int iVar3;
  byte *pbVar4;
  ulonglong uVar5;
  ios *this_00;
  uint uVar6;
  byte *pbVar7;
  longlong lVar8;
  
  lVar8 = *param_1;
  *this = (sentry)0x0;
  this_00 = (ios *)(*(longlong *)(lVar8 + -0x18) + (longlong)param_1);
  uVar6 = *(uint *)(this_00 + 0x20);
  if (uVar6 != 0) goto LAB_140078645;
  if (*(ostream **)(this_00 + 0xd8) == (ostream *)0x0) {
    if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_140078663:
      *this = (sentry)0x1;
      return;
    }
  }
  else {
    ostream::flush(*(ostream **)(this_00 + 0xd8));
    this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_14007863e:
      uVar6 = *(uint *)(this_00 + 0x20);
      if (uVar6 == 0) goto LAB_140078663;
      goto LAB_140078645;
    }
  }
  plVar2 = *(longlong **)(this_00 + 0xe8);
  if ((byte *)plVar2[2] < (byte *)plVar2[3]) {
    lVar8 = *(longlong *)(this_00 + 0xf0);
    uVar5 = (ulonglong)*(byte *)plVar2[2];
    if (lVar8 == 0) {
LAB_14007874d:
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
LAB_140078698:
    do {
      bVar1 = *(byte *)(*(longlong *)(lVar8 + 0x30) + (uVar5 & 0xff) * 2);
      while( true ) {
        if ((bVar1 & 0x20) == 0) {
          this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
          goto LAB_14007863e;
        }
        pbVar7 = (byte *)plVar2[3];
        if ((byte *)plVar2[2] < pbVar7) {
          pbVar4 = (byte *)plVar2[2] + 1;
          plVar2[2] = (longlong)pbVar4;
        }
        else {
          iVar3 = (**(code **)(*plVar2 + 0x50))(plVar2);
          if (iVar3 == -1) goto LAB_14007870e;
          pbVar4 = (byte *)plVar2[2];
          pbVar7 = (byte *)plVar2[3];
        }
        if (pbVar7 <= pbVar4) break;
        bVar1 = *(byte *)(*(longlong *)(lVar8 + 0x30) + (ulonglong)*pbVar4 * 2);
      }
      uVar5 = (**(code **)(*plVar2 + 0x48))(plVar2);
    } while ((int)uVar5 != -1);
LAB_14007870e:
    this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  }
  else {
    uVar5 = (**(code **)(*plVar2 + 0x48))(plVar2);
    this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    lVar8 = *(longlong *)(this_00 + 0xf0);
    if (lVar8 == 0) goto LAB_14007874d;
    if ((int)uVar5 != -1) goto LAB_140078698;
  }
  uVar6 = *(uint *)(this_00 + 0x20) | 2;
LAB_140078645:
  ios::clear(this_00,uVar6 | 4);
  return;
}



// std::istream::getline(char*, long long)

void __thiscall std::istream::getline(istream *this,undefined1 *param_1,longlong param_2)

{
  ctype<char> *this_00;
  ctype<char> cVar1;
  
  this_00 = *(ctype<char> **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xf0);
  if (this_00 != (ctype<char> *)0x0) {
    if (this_00[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this_00);
      cVar1 = (ctype<char>)0xa;
      if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
        cVar1 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,10);
      }
    }
    else {
      cVar1 = this_00[0x43];
    }
    getline(this,param_1,param_2,(byte)cVar1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::istream::getline(char*, long long, char)

istream * __thiscall
std::istream::getline(istream *this,undefined1 *param_1,longlong param_2,byte param_3)

{
  byte bVar1;
  longlong *plVar2;
  int iVar3;
  uint uVar4;
  void *pvVar5;
  size_t _MaxCount;
  longlong lVar6;
  size_t sVar7;
  byte *pbVar8;
  uint uVar9;
  longlong lVar10;
  undefined1 *_Dst;
  byte *pbVar11;
  sentry local_49 [9];
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_49,(longlong *)this,'\x01');
  if (local_49[0] == (sentry)0x0) {
LAB_140078897:
    if (param_2 < 1) {
      lVar6 = *(longlong *)(this + 8);
    }
    else {
LAB_14007889c:
      *param_1 = 0;
      lVar6 = *(longlong *)(this + 8);
    }
joined_r0x000140078915:
    if (lVar6 != 0) {
      return this;
    }
  }
  else {
    uVar9 = (uint)param_3;
    plVar2 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    pbVar11 = (byte *)plVar2[2];
    pbVar8 = (byte *)plVar2[3];
    if (pbVar8 <= pbVar11) {
      uVar4 = (**(code **)(*plVar2 + 0x48))(plVar2);
      lVar10 = *(longlong *)(this + 8);
      lVar6 = lVar10 + 1;
      if (lVar6 < param_2) {
        if (uVar4 != 0xffffffff) {
          pbVar11 = (byte *)plVar2[2];
          pbVar8 = (byte *)plVar2[3];
          goto LAB_140078959;
        }
      }
      else {
LAB_140078b5e:
        if (uVar4 != 0xffffffff) goto LAB_140078a28;
      }
LAB_140078a95:
      if (0 < param_2) {
        *param_1 = 0;
      }
      uVar9 = 6;
      if (*(longlong *)(this + 8) != 0) {
        uVar9 = 2;
      }
      goto LAB_1400788ad;
    }
    lVar10 = *(longlong *)(this + 8);
    uVar4 = (uint)*pbVar11;
    lVar6 = lVar10 + 1;
    if (lVar6 < param_2) {
LAB_140078959:
      _Dst = param_1;
      if (uVar9 != uVar4) {
        do {
          sVar7 = (param_2 - lVar10) - 1;
          _MaxCount = (longlong)pbVar8 - (longlong)pbVar11;
          if ((longlong)sVar7 <= (longlong)pbVar8 - (longlong)pbVar11) {
            _MaxCount = sVar7;
          }
          if ((longlong)_MaxCount < 2) {
            *_Dst = (char)uVar4;
            pbVar8 = (byte *)plVar2[2];
            param_1 = _Dst + 1;
            pbVar11 = (byte *)plVar2[3];
            *(longlong *)(this + 8) = *(longlong *)(this + 8) + 1;
            if (pbVar8 < pbVar11) {
              pbVar8 = pbVar8 + 1;
              plVar2[2] = (longlong)pbVar8;
            }
            else {
              iVar3 = (**(code **)(*plVar2 + 0x50))(plVar2);
              if (iVar3 == -1) goto LAB_140078a95;
              pbVar8 = (byte *)plVar2[2];
              pbVar11 = (byte *)plVar2[3];
            }
            if (pbVar11 <= pbVar8) {
              uVar4 = (**(code **)(*plVar2 + 0x48))(plVar2);
              goto LAB_140078a7b;
            }
            lVar10 = *(longlong *)(this + 8);
            bVar1 = *pbVar8;
joined_r0x0001400789b4:
            lVar6 = lVar10 + 1;
            uVar4 = (uint)bVar1;
            if (param_2 <= lVar6) goto LAB_140078a28;
          }
          else {
            pvVar5 = memchr(pbVar11,(int)(char)param_3,_MaxCount);
            if ((pvVar5 == (void *)0x0) ||
               (_MaxCount = (longlong)pvVar5 - (longlong)pbVar11, param_1 = _Dst, _MaxCount != 0)) {
              param_1 = _Dst + _MaxCount;
              memcpy(_Dst,pbVar11,_MaxCount);
              pbVar8 = (byte *)plVar2[3];
              pbVar11 = (byte *)(plVar2[2] + _MaxCount);
            }
            lVar10 = _MaxCount + *(longlong *)(this + 8);
            plVar2[2] = (longlong)pbVar11;
            *(longlong *)(this + 8) = lVar10;
            if (pbVar11 < pbVar8) {
              bVar1 = *pbVar11;
              goto joined_r0x0001400789b4;
            }
            uVar4 = (**(code **)(*plVar2 + 0x48))(plVar2);
LAB_140078a7b:
            lVar10 = *(longlong *)(this + 8);
            lVar6 = lVar10 + 1;
            if (param_2 <= lVar6) goto LAB_140078b5e;
            if (uVar4 == 0xffffffff) goto LAB_140078a95;
          }
          if (uVar4 == uVar9) goto LAB_140078a28;
          pbVar8 = (byte *)plVar2[3];
          pbVar11 = (byte *)plVar2[2];
          _Dst = param_1;
        } while( true );
      }
LAB_140078af8:
      *(longlong *)(this + 8) = lVar6;
      if (pbVar8 <= pbVar11) {
        (**(code **)(*plVar2 + 0x50))(plVar2);
        goto LAB_140078897;
      }
      plVar2[2] = (longlong)(pbVar11 + 1);
      if (0 < param_2) goto LAB_14007889c;
      goto joined_r0x000140078915;
    }
LAB_140078a28:
    if (uVar9 == uVar4) {
      pbVar11 = (byte *)plVar2[2];
      pbVar8 = (byte *)plVar2[3];
      goto LAB_140078af8;
    }
    if (0 < param_2) {
      *param_1 = 0;
    }
  }
  uVar9 = 4;
LAB_1400788ad:
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             uVar9 | *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::istream::putback(char)

istream * __thiscall std::istream::putback(istream *this,char param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  int iVar3;
  ios *this_00;
  sentry local_19 [9];
  
  *(undefined8 *)(this + 8) = 0;
  ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
             *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) & 0xfffffffd
            );
  sentry::sentry(local_19,(longlong *)this,'\x01');
  if (local_19[0] != (sentry)0x0) {
    this_00 = (ios *)(this + *(longlong *)(*(longlong *)this + -0x18));
    plVar1 = *(longlong **)(this_00 + 0xe8);
    if (plVar1 == (longlong *)0x0) {
LAB_140078c7c:
      ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      return this;
    }
    uVar2 = plVar1[2];
    if (((ulonglong)plVar1[1] < uVar2) && (param_1 == *(char *)(uVar2 - 1))) {
      plVar1[2] = uVar2 - 1;
    }
    else {
      iVar3 = (**(code **)(*plVar1 + 0x58))(plVar1,param_1);
      if (iVar3 == -1) {
        this_00 = (ios *)(this + *(longlong *)(*(longlong *)this + -0x18));
        goto LAB_140078c7c;
      }
    }
  }
  return this;
}



// std::istream::readsome(char*, long long)

undefined8 __thiscall std::istream::readsome(istream *this,undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  sentry local_19;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_19,(longlong *)this,'\x01');
  if (local_19 != (sentry)0x0) {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    lVar2 = plVar1[3] - plVar1[2];
    if (lVar2 == 0) {
      lVar2 = (**(code **)(*plVar1 + 0x38))();
    }
    if (0 < lVar2) {
      if (lVar2 <= param_2) {
        param_2 = lVar2;
      }
      uVar3 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                          0x40))(*(longlong **)
                                  (this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),param_1,
                                 param_2);
      *(undefined8 *)(this + 8) = uVar3;
      return uVar3;
    }
    if (lVar2 == -1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
    }
  }
  return *(undefined8 *)(this + 8);
}



// std::istream::istream(std::istream&&)

void __thiscall std::istream::istream(istream *this,longlong *param_1)

{
  ios_base *this_00;
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x10);
  ios_base::ios_base(this_00);
  *(undefined2 *)(this + 0xf0) = 0;
  *(undefined ***)this = &PTR__istream_1400dd028;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x108) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x10) = &PTR__istream_1400dd050;
  lVar3 = param_1[1];
  *(undefined8 *)(this + 0xe8) = 0;
  *(longlong *)(this + 8) = lVar3;
  lVar3 = *(longlong *)(*param_1 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar3);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this + 0xe0));
  uVar2 = *(undefined8 *)(lVar3 + 0xd8);
  *(undefined8 *)(this + 0xf8) = 0;
  *(undefined8 *)(lVar3 + 0xd8) = 0;
  *(undefined8 *)(this + 0xe8) = uVar2;
  uVar1 = *(undefined2 *)(lVar3 + 0xe0);
  param_1[1] = 0;
  *(undefined2 *)(this + 0xf0) = uVar1;
  return;
}



// std::istream::istream(std::streambuf*)

void __thiscall std::istream::istream(istream *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)(this + 0x10));
  *(undefined2 *)(this + 0xf0) = 0;
  *(undefined ***)this = &PTR__istream_1400dd028;
  *(undefined8 *)(this + 0xe8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__istream_1400dd050;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x108) = (undefined1  [16])0x0;
  ios::init((ios *)(this + 0x10),param_1);
  return;
}



// std::istream::istream()

void __thiscall std::istream::istream(istream *this)

{
  ios_base::ios_base((ios_base *)(this + 0x10));
  *(undefined2 *)(this + 0xf0) = 0;
  *(undefined ***)this = &PTR__istream_1400dd028;
  *(undefined8 *)(this + 0xe8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__istream_1400dd050;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x108) = (undefined1  [16])0x0;
  ios::init((ios *)(this + 0x10),0);
  return;
}



// std::istream::istream(std::istream&&)

void __thiscall std::istream::istream(istream *this,longlong *param_1,longlong *param_2)

{
  undefined2 uVar1;
  longlong lVar2;
  undefined8 uVar3;
  ios_base *this_00;
  longlong lVar4;
  
  lVar4 = *param_1;
  lVar2 = param_1[1];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar2;
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar4 + -0x18));
  lVar4 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar4);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(lVar4 + 0xd8);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(lVar4 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar1 = *(undefined2 *)(lVar4 + 0xe0);
  param_2[1] = 0;
  *(undefined2 *)(this_00 + 0xe0) = uVar1;
  return;
}



// std::istream::istream(std::streambuf*)

void __thiscall std::istream::istream(istream *this,longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  lVar3 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)this = lVar1;
  *(longlong *)(this + lVar3) = lVar2;
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),param_2);
  return;
}



// std::istream::istream()

void __thiscall std::istream::istream(istream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  lVar3 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)this = lVar1;
  *(longlong *)(this + lVar3) = lVar2;
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  return;
}



// std::istream::~istream()

void __thiscall std::istream::~istream(istream *this)

{
  *(undefined ***)this = &PTR__istream_1400dd028;
  *(undefined8 *)(this + 8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x10));
  operator_delete(this);
  return;
}



// std::istream::~istream()

void __thiscall std::istream::~istream(istream *this)

{
  *(undefined ***)this = &PTR__istream_1400dd028;
  *(undefined8 *)(this + 8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x10));
  return;
}



// std::istream::~istream()

void __thiscall std::istream::~istream(istream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[1];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(std::istream&&)

istream * __thiscall std::istream::operator=(istream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  lVar3 = param_1[1];
  this_00[0xe1] = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(std::istream& (*)(std::istream&))

void __thiscall std::istream::operator>>(undefined8 param_1_00,undefined *param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140079290. Too many branches
                    // WARNING: Treating indirect jump as call
  (*(code *)param_2)();
  return;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(std::ios_base& (*)(std::ios_base&))

istream * __thiscall std::istream::operator>>(istream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(std::ios& (*)(std::ios&))

istream * __thiscall std::istream::operator>>(istream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(std::streambuf*)

istream * __thiscall std::istream::operator>>(istream *this,longlong *param_1)

{
  longlong lVar1;
  uint uVar2;
  sentry local_1a;
  char local_19 [9];
  
  sentry::sentry(&local_1a,(longlong *)this,'\0');
  if (local_1a == (sentry)0x0) {
    if (param_1 != (longlong *)0x0) {
      return this;
    }
LAB_14007935d:
    lVar1 = *(longlong *)this;
  }
  else {
    lVar1 = *(longlong *)this;
    if (param_1 != (longlong *)0x0) {
      lVar1 = __copy_streambufs_eof<>
                        (*(longlong **)(this + *(longlong *)(lVar1 + -0x18) + 0xe8),param_1,local_19
                        );
      if (lVar1 != 0) {
        if (local_19[0] == '\0') {
          return this;
        }
        lVar1 = *(longlong *)this;
        uVar2 = 2;
        goto LAB_14007933a;
      }
      if (local_19[0] != '\0') {
        lVar1 = *(longlong *)this;
        uVar2 = 6;
        goto LAB_14007933a;
      }
      goto LAB_14007935d;
    }
  }
  uVar2 = 4;
LAB_14007933a:
  ios::clear((ios *)(this + *(longlong *)(lVar1 + -0x18)),
             uVar2 | *(uint *)((ios *)(this + *(longlong *)(lVar1 + -0x18)) + 0x20));
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(void*&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x60))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(bool&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x10))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(double&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x50))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(long double&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x58))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(float&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x48))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(int&)

istream * __thiscall std::istream::operator>>(istream *this,undefined4 *param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [23];
  sentry local_21;
  uint local_20;
  undefined4 local_1c [3];
  
  sentry::sentry(&local_21,(longlong *)this,'\0');
  if (local_21 != (sentry)0x0) {
    local_20 = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x18))(local_38,plVar1,&local_48,&local_58,piVar2,&local_20,local_1c);
    *param_1 = local_1c[0];
    if (local_20 != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 local_20 |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(unsigned int&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x28))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(long&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x18))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(unsigned long&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x30))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(short&)

istream * __thiscall std::istream::operator>>(istream *this,undefined2 *param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [23];
  sentry local_21;
  uint local_20;
  int local_1c [3];
  
  sentry::sentry(&local_21,(longlong *)this,'\0');
  if (local_21 != (sentry)0x0) {
    local_20 = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(piVar2 + 0xe8);
    local_40 = 0xffffffff;
    local_50 = 0xffffffff;
    local_58 = 0;
    (**(code **)(*plVar1 + 0x18))(local_38,plVar1,&local_48,&local_58,piVar2,&local_20,local_1c);
    if (local_1c[0] < -0x8000) {
      local_20 = local_20 | 4;
      *param_1 = 0x8000;
    }
    else if (local_1c[0] < 0x8000) {
      *param_1 = (short)local_1c[0];
      if (local_20 == 0) {
        return this;
      }
    }
    else {
      local_20 = local_20 | 4;
      *param_1 = 0x7fff;
    }
    ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
               local_20 | *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20)
              );
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(unsigned short&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x20))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(long long&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x38))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::istream::TEMPNAMEPLACEHOLDERVALUE(unsigned long long&)

istream * __thiscall std::istream::operator>>(istream *this,undefined8 param_1)

{
  longlong *plVar1;
  istream *piVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    piVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(piVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(piVar2 + 0xe8);
    uStack_40 = 0xffffffff;
    uStack_50 = 0xffffffff;
    uStack_58 = 0;
    (**(code **)(*plVar1 + 0x40))(auStack_38,plVar1,&uStack_48,&uStack_58,piVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 auStack_1c[0] |
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::ostream::put(char)

ostream * __thiscall std::ostream::put(ostream *this,undefined1 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  int iVar4;
  ios *this_00;
  sentry local_28 [8];
  longlong *local_20;
  
  sentry::sentry(local_28,(longlong *)this);
  if (local_28[0] != (sentry)0x0) {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((undefined1 *)plVar1[5] < (undefined1 *)plVar1[6]) {
      *(undefined1 *)plVar1[5] = param_1;
      plVar1[5] = plVar1[5] + 1;
    }
    else {
      iVar4 = (**(code **)(*plVar1 + 0x68))(plVar1,param_1);
      if (iVar4 == -1) {
        ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                   *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
      }
    }
  }
  lVar2 = *(longlong *)(*local_20 + -0x18);
  if ((*(byte *)((longlong)local_20 + lVar2 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_20 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar1 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (ios *)((longlong)local_20 + *(longlong *)(*local_20 + -0x18));
        ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::swap(std::ostream&)

void __thiscall std::ostream::swap(ostream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  this_00[0xe1] = iVar1;
  return;
}



// std::ostream::flush()

ostream * __thiscall std::ostream::flush(ostream *this)

{
  longlong lVar1;
  longlong *plVar2;
  int iVar3;
  undefined4 uVar4;
  ios *this_00;
  sentry local_28 [8];
  longlong *local_20;
  
  if (*(longlong *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) != 0) {
    sentry::sentry(local_28,(longlong *)this);
    if (local_28[0] != (sentry)0x0) {
      iVar3 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                          0x30))();
      if (iVar3 == -1) {
        ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                   *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
      }
    }
    lVar1 = *(longlong *)(*local_20 + -0x18);
    if ((*(byte *)((longlong)local_20 + lVar1 + 0x19) & 0x20) != 0) {
      uVar4 = uncaught_exception();
      if (((char)uVar4 == '\0') &&
         (plVar2 = *(longlong **)((longlong)local_20 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
        iVar3 = (**(code **)(*plVar2 + 0x30))();
        if (iVar3 == -1) {
          this_00 = (ios *)((longlong)local_20 + *(longlong *)(*local_20 + -0x18));
          ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
        }
      }
    }
  }
  return this;
}



// std::ostream::seekp(std::fpos<int>)

ostream * __thiscall std::ostream::seekp(ostream *this,undefined8 *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined4 uVar5;
  int iVar6;
  ios *this_00;
  undefined8 local_58;
  undefined8 uStack_50;
  longlong local_48 [2];
  sentry local_38 [8];
  longlong *local_30;
  
  uVar3 = *param_1;
  uVar4 = param_1[1];
  sentry::sentry(local_38,(longlong *)this);
  if (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0) {
    local_58 = uVar3;
    uStack_50 = uVar4;
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x28))
              (local_48,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               &local_58,0x10);
    if (local_48[0] == -1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  lVar1 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar1 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_30 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar2 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (ios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::seekp(long long, std::_Ios_Seekdir)

ostream * __thiscall std::ostream::seekp(ostream *this,undefined8 param_1,undefined4 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined4 uVar3;
  int iVar4;
  ios *this_00;
  longlong local_48 [2];
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0) {
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x20))
              (local_48,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               param_1,param_2,0x10);
    if (local_48[0] == -1) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  lVar1 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar1 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_30 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar2 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (ios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::tellp()

undefined8 * std::ostream::tellp(undefined8 *param_1,longlong *param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined4 uVar3;
  int iVar4;
  ios *this;
  undefined8 local_38;
  undefined4 local_30;
  sentry local_28 [8];
  longlong *local_20;
  
  sentry::sentry(local_28,param_2);
  lVar1 = *param_2;
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  if ((*(byte *)((longlong)param_2 + *(longlong *)(lVar1 + -0x18) + 0x20) & 5) == 0) {
    plVar2 = *(longlong **)((longlong)param_2 + *(longlong *)(lVar1 + -0x18) + 0xe8);
    (**(code **)(*plVar2 + 0x20))(&local_38,plVar2,0,1,0x10);
    *param_1 = local_38;
    *(undefined4 *)(param_1 + 1) = local_30;
  }
  lVar1 = *(longlong *)(*local_20 + -0x18);
  if ((*(byte *)((longlong)local_20 + lVar1 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_20 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar2 + 0x30))();
      if (iVar4 == -1) {
        this = (ios *)(*(longlong *)(*local_20 + -0x18) + (longlong)local_20);
        ios::clear(this,*(uint *)(this + 0x20) | 1);
      }
    }
  }
  return param_1;
}



// std::ostream::write(char const*, long long)

ostream * __thiscall std::ostream::write(ostream *this,undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined4 uVar2;
  int iVar3;
  longlong lVar4;
  ios *this_00;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    lVar4 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                        0x60))(*(longlong **)
                                (this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),param_1,
                               param_2);
    if (param_2 != lVar4) {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar4 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar4 + 0x19) & 0x20) != 0) {
    uVar2 = uncaught_exception();
    if (((char)uVar2 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar4 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar3 = (**(code **)(*plVar1 + 0x30))();
      if (iVar3 == -1) {
        this_00 = (ios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::sentry::sentry(std::ostream&)

void __thiscall std::ostream::sentry::sentry(sentry *this,longlong *param_1)

{
  longlong lVar1;
  ios *this_00;
  uint uVar2;
  
  lVar1 = *param_1;
  *(longlong **)(this + 8) = param_1;
  *this = (sentry)0x0;
  this_00 = (ios *)(*(longlong *)(lVar1 + -0x18) + (longlong)param_1);
  uVar2 = *(uint *)(this_00 + 0x20);
  if (*(ostream **)(this_00 + 0xd8) != (ostream *)0x0) {
    if (uVar2 != 0) goto LAB_140079ed0;
    flush(*(ostream **)(this_00 + 0xd8));
    this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  }
  uVar2 = *(uint *)(this_00 + 0x20);
  if (uVar2 == 0) {
    *this = (sentry)0x1;
    return;
  }
LAB_140079ed0:
  if ((uVar2 & 1) == 0) {
    return;
  }
  ios::clear(this_00,uVar2 | 4);
  return;
}



// std::ostream::sentry::sentry(std::ostream&)

void __thiscall std::ostream::sentry::sentry(sentry *this,longlong *param_1)

{
  longlong lVar1;
  ios *this_00;
  uint uVar2;
  
  lVar1 = *param_1;
  *(longlong **)(this + 8) = param_1;
  *this = (sentry)0x0;
  this_00 = (ios *)(*(longlong *)(lVar1 + -0x18) + (longlong)param_1);
  uVar2 = *(uint *)(this_00 + 0x20);
  if (*(ostream **)(this_00 + 0xd8) != (ostream *)0x0) {
    if (uVar2 != 0) goto LAB_140079f50;
    flush(*(ostream **)(this_00 + 0xd8));
    this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  }
  uVar2 = *(uint *)(this_00 + 0x20);
  if (uVar2 == 0) {
    *this = (sentry)0x1;
    return;
  }
LAB_140079f50:
  if ((uVar2 & 1) == 0) {
    return;
  }
  ios::clear(this_00,uVar2 | 4);
  return;
}



// std::ostream::sentry::~sentry()

void __thiscall std::ostream::sentry::~sentry(sentry *this)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  int iVar4;
  ios *this_00;
  
  plVar1 = *(longlong **)(this + 8);
  lVar2 = *(longlong *)(*plVar1 + -0x18);
  if ((*(byte *)((longlong)plVar1 + lVar2 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plVar1 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar1 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (ios *)((longlong)*(longlong **)(this + 8) +
                         *(longlong *)(**(longlong **)(this + 8) + -0x18));
        ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return;
}



// std::ostream::sentry::~sentry()

void __thiscall std::ostream::sentry::~sentry(sentry *this)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  int iVar4;
  ios *this_00;
  
  plVar1 = *(longlong **)(this + 8);
  lVar2 = *(longlong *)(*plVar1 + -0x18);
  if ((*(byte *)((longlong)plVar1 + lVar2 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plVar1 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar1 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (ios *)((longlong)*(longlong **)(this + 8) +
                         *(longlong *)(**(longlong **)(this + 8) + -0x18));
        ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return;
}



// std::ostream::_M_write(char const*, long long)

ostream * __thiscall std::ostream::_M_write(ostream *this,undefined8 param_1,longlong param_2)

{
  uint uVar1;
  longlong *plVar2;
  ctype<char> *pcVar3;
  ctype<char> cVar4;
  int iVar5;
  undefined4 uVar6;
  longlong lVar7;
  longlong lVar8;
  ios *this_00;
  ostream *this_01;
  longlong lVar9;
  sentry asStack_58 [8];
  longlong *plStack_50;
  
  sentry::sentry(asStack_58,(longlong *)this);
  if (asStack_58[0] != (sentry)0x0) {
    lVar7 = *(longlong *)(*(longlong *)this + -0x18);
    this_01 = this + lVar7;
    lVar9 = *(longlong *)(this_01 + 0x10);
    if (param_2 < lVar9) {
      uVar1 = *(uint *)(this_01 + 0x18);
      if ((uVar1 & 0xb0) != 0x20) {
        lVar8 = lVar9 - param_2;
        if (this_01[0xe1] == (ostream)0x0) {
          pcVar3 = *(ctype<char> **)(this_01 + 0xf0);
          if (pcVar3 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
            __throw_bad_cast();
          }
          if (pcVar3[0x38] == (ctype<char>)0x0) {
            ctype<char>::_M_widen_init(pcVar3);
            cVar4 = (ctype<char>)0x20;
            if (*(code **)(*(longlong *)pcVar3 + 0x30) != ctype<char>::do_widen) {
              cVar4 = (ctype<char>)(**(code **)(*(longlong *)pcVar3 + 0x30))(pcVar3,0x20);
            }
          }
          else {
            cVar4 = pcVar3[0x59];
          }
          *(ctype<char> *)(this_01 + 0xe0) = cVar4;
          lVar7 = *(longlong *)this;
          this_01[0xe1] = (ostream)0x1;
          lVar7 = *(longlong *)(lVar7 + -0x18);
        }
        else {
          cVar4 = *(ctype<char> *)(this_01 + 0xe0);
        }
        do {
          plVar2 = *(longlong **)(this + lVar7 + 0xe8);
          if ((ctype<char> *)plVar2[5] < (ctype<char> *)plVar2[6]) {
            *(ctype<char> *)plVar2[5] = cVar4;
            plVar2[5] = plVar2[5] + 1;
          }
          else {
            iVar5 = (**(code **)(*plVar2 + 0x68))(plVar2,cVar4);
            if (iVar5 == -1) {
              ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                         *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20)
                         | 1);
              this_01 = this + *(longlong *)(*(longlong *)this + -0x18);
              if (*(int *)(this_01 + 0x20) != 0) goto LAB_1400b7d90;
              goto LAB_1400b7e3f;
            }
          }
          lVar7 = *(longlong *)(*(longlong *)this + -0x18);
          lVar8 = lVar8 + -1;
        } while (lVar8 != 0);
        this_01 = this + lVar7;
      }
      if (*(int *)(this_01 + 0x20) == 0) {
LAB_1400b7e3f:
        lVar8 = (**(code **)(**(longlong **)(this_01 + 0xe8) + 0x60))
                          (*(longlong **)(this_01 + 0xe8),param_1,param_2);
        lVar7 = *(longlong *)this;
        if (param_2 != lVar8) {
          ios::clear((ios *)(this + *(longlong *)(lVar7 + -0x18)),
                     *(uint *)((ios *)(this + *(longlong *)(lVar7 + -0x18)) + 0x20) | 1);
          lVar7 = *(longlong *)this;
        }
        lVar7 = *(longlong *)(lVar7 + -0x18);
        this_01 = this + lVar7;
        if (((uVar1 & 0xb0) == 0x20) && (*(int *)(this_01 + 0x20) == 0)) {
          lVar9 = lVar9 - param_2;
          if (this_01[0xe1] == (ostream)0x0) {
            pcVar3 = *(ctype<char> **)(this_01 + 0xf0);
            if (pcVar3 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
              __throw_bad_cast();
            }
            if (pcVar3[0x38] == (ctype<char>)0x0) {
              ctype<char>::_M_widen_init(pcVar3);
              cVar4 = (ctype<char>)0x20;
              if (*(code **)(*(longlong *)pcVar3 + 0x30) != ctype<char>::do_widen) {
                cVar4 = (ctype<char>)(**(code **)(*(longlong *)pcVar3 + 0x30))(pcVar3,0x20);
              }
            }
            else {
              cVar4 = pcVar3[0x59];
            }
            *(ctype<char> *)(this_01 + 0xe0) = cVar4;
            lVar7 = *(longlong *)this;
            this_01[0xe1] = (ostream)0x1;
            lVar7 = *(longlong *)(lVar7 + -0x18);
          }
          else {
            cVar4 = *(ctype<char> *)(this_01 + 0xe0);
          }
          do {
            plVar2 = *(longlong **)(this + lVar7 + 0xe8);
            if ((ctype<char> *)plVar2[5] < (ctype<char> *)plVar2[6]) {
              *(ctype<char> *)plVar2[5] = cVar4;
              plVar2[5] = plVar2[5] + 1;
            }
            else {
              iVar5 = (**(code **)(*plVar2 + 0x68))(plVar2,cVar4);
              if (iVar5 == -1) {
                ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                           *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20
                                    ) | 1);
                goto LAB_1400b7e18;
              }
            }
            lVar7 = *(longlong *)(*(longlong *)this + -0x18);
            lVar9 = lVar9 + -1;
          } while (lVar9 != 0);
          this_01 = this + lVar7;
        }
      }
    }
    else {
      lVar7 = (**(code **)(**(longlong **)(this_01 + 0xe8) + 0x60))
                        (*(longlong **)(this_01 + 0xe8),param_1,param_2);
      this_01 = this + *(longlong *)(*(longlong *)this + -0x18);
      if (param_2 != lVar7) {
        ios::clear((ios *)this_01,*(uint *)(this_01 + 0x20) | 1);
LAB_1400b7e18:
        *(undefined8 *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0x10) = 0;
        goto LAB_1400b7d98;
      }
    }
LAB_1400b7d90:
    *(undefined8 *)(this_01 + 0x10) = 0;
  }
LAB_1400b7d98:
  lVar7 = *(longlong *)(*plStack_50 + -0x18);
  if (((((*(byte *)((longlong)plStack_50 + lVar7 + 0x19) & 0x20) != 0) &&
       (uVar6 = uncaught_exception(), (char)uVar6 == '\0')) &&
      (plVar2 = *(longlong **)((longlong)plStack_50 + lVar7 + 0xe8), plVar2 != (longlong *)0x0)) &&
     (iVar5 = (**(code **)(*plVar2 + 0x30))(), iVar5 == -1)) {
    this_00 = (ios *)((longlong)plStack_50 + *(longlong *)(*plStack_50 + -0x18));
    ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<void const*>(void const*)

ostream * __thiscall std::ostream::_M_insert<>(ostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    local_68 = *(longlong *)(poVar6 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x48))(local_58,plVar1,&local_68,poVar6,iVar5,param_1);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_40 + -0x18) + (longlong)local_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<bool>(bool)

ostream * __thiscall std::ostream::_M_insert<bool>(ostream *this,undefined1 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  ios *this_01;
  ostream *poVar5;
  int iVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar5 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar5 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar5[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar5 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar6 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar6 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar6 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar5 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar5[0xe1] = (ostream)0x1;
      poVar5 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar6 = (int)(char)poVar5[0xe0];
    }
    local_68 = *(longlong *)(poVar5 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x10))(local_58,plVar1,&local_68,poVar5,iVar6,param_1);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_01 = (ios *)((longlong)local_40 + *(longlong *)(*local_40 + -0x18));
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<double>(double)

ostream * __thiscall std::ostream::_M_insert<double>(ostream *this,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    local_68 = *(longlong *)(poVar6 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x38))(local_58,plVar1,&local_68,poVar6,iVar5,param_2);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_40 + -0x18) + (longlong)local_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<long double>(long double)

ostream * __thiscall std::ostream::_M_insert<>(ostream *this,undefined1 (*param_1) [10])

{
  undefined1 auVar1 [10];
  longlong *plVar2;
  longlong lVar3;
  ctype<char> *this_00;
  ctype<char> cVar4;
  undefined4 uVar5;
  int iVar6;
  ios *this_01;
  ostream *poVar7;
  undefined1 local_68 [10];
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  auVar1 = *param_1;
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    poVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar2 = *(longlong **)(poVar7 + 0xf8);
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar7[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar7 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar6 = 0x20;
        cVar4 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar4 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar6 = (int)(char)cVar4;
        }
      }
      else {
        cVar4 = this_00[0x59];
        iVar6 = (int)(char)cVar4;
      }
      *(ctype<char> *)(poVar7 + 0xe0) = cVar4;
      lVar3 = *(longlong *)this;
      poVar7[0xe1] = (ostream)0x1;
      poVar7 = this + *(longlong *)(lVar3 + -0x18);
    }
    else {
      iVar6 = (int)(char)poVar7[0xe0];
    }
    local_58 = *(longlong *)(poVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    local_68 = auVar1;
    (**(code **)(*plVar2 + 0x40))(local_48,plVar2,&local_58,poVar7,iVar6,local_68);
    if (local_40 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar3 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar3 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_30 + lVar3 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar2 + 0x30))();
      if (iVar6 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_30 + -0x18) + (longlong)local_30);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<long>(long)

ostream * __thiscall std::ostream::_M_insert<long>(ostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    local_68 = *(longlong *)(poVar6 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x18))(local_58,plVar1,&local_68,poVar6,iVar5,param_1);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_40 + -0x18) + (longlong)local_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<unsigned long>(unsigned long)

ostream * __thiscall std::ostream::_M_insert<>(ostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    local_68 = *(longlong *)(poVar6 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x20))(local_58,plVar1,&local_68,poVar6,iVar5,param_1);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_40 + -0x18) + (longlong)local_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<long long>(long long)

ostream * __thiscall std::ostream::_M_insert<long_long>(ostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    local_68 = *(longlong *)(poVar6 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x28))(local_58,plVar1,&local_68,poVar6,iVar5,param_1);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_40 + -0x18) + (longlong)local_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream& std::ostream::_M_insert<unsigned long long>(unsigned long long)

ostream * __thiscall std::ostream::_M_insert<>(ostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    local_68 = *(longlong *)(poVar6 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x30))(local_58,plVar1,&local_68,poVar6,iVar5,param_1);
    if (local_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*local_40 + -0x18) + (longlong)local_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::ostream(std::ostream&&)

void __thiscall std::ostream::ostream(ostream *this,longlong *param_1)

{
  ios_base *this_00;
  undefined8 uVar1;
  longlong lVar2;
  
  this_00 = (ios_base *)(this + 8);
  ios_base::ios_base(this_00);
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  lVar2 = (longlong)param_1 + *(longlong *)(*param_1 + -0x18);
  *(undefined ***)this = &PTR__ostream_1400dd078;
  *(undefined ***)(this + 8) = &PTR__ostream_1400dd0a0;
  ios_base::_M_move(this_00,lVar2);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this + 0xd8));
  uVar1 = *(undefined8 *)(lVar2 + 0xd8);
  *(undefined8 *)(this + 0xf0) = 0;
  *(undefined8 *)(lVar2 + 0xd8) = 0;
  *(undefined8 *)(this + 0xe0) = uVar1;
  *(undefined2 *)(this + 0xe8) = *(undefined2 *)(lVar2 + 0xe0);
  return;
}



// std::ostream::ostream(std::streambuf*)

void __thiscall std::ostream::ostream(ostream *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)(this + 8));
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined ***)this = &PTR__ostream_1400dd078;
  *(undefined ***)(this + 8) = &PTR__ostream_1400dd0a0;
  ios::init((ios *)(this + 8),param_1);
  return;
}



// std::ostream::ostream(std::iostream&)

void __thiscall std::ostream::ostream(ostream *this)

{
  ios_base::ios_base((ios_base *)(this + 8));
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__ostream_1400dd078;
  *(undefined ***)(this + 8) = &PTR__ostream_1400dd0a0;
  return;
}



// std::ostream::ostream()

void __thiscall std::ostream::ostream(ostream *this)

{
  ios_base::ios_base((ios_base *)(this + 8));
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined ***)this = &PTR__ostream_1400dd078;
  *(undefined ***)(this + 8) = &PTR__ostream_1400dd0a0;
  ios::init((ios *)(this + 8),0);
  return;
}



// std::ostream::ostream(std::ostream&&)

void __thiscall std::ostream::ostream(ostream *this,longlong *param_1,longlong *param_2)

{
  undefined8 uVar1;
  ios_base *this_00;
  longlong lVar2;
  
  lVar2 = *param_1;
  *(longlong *)this = lVar2;
  this_00 = (ios_base *)(this + *(longlong *)(lVar2 + -0x18));
  *(longlong *)this_00 = param_1[1];
  lVar2 = (longlong)param_2 + *(longlong *)(*param_2 + -0x18);
  ios_base::_M_move(this_00,lVar2);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar1 = *(undefined8 *)(lVar2 + 0xd8);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(lVar2 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar2 + 0xe0);
  return;
}



// std::ostream::ostream(std::streambuf*)

void __thiscall std::ostream::ostream(ostream *this,longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = lVar2;
  ios::init((ios *)(this + lVar1),param_2);
  return;
}



// std::ostream::ostream(std::iostream&)

void __thiscall std::ostream::ostream(ostream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  return;
}



// std::ostream::ostream()

void __thiscall std::ostream::ostream(ostream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = param_1[1];
  ios::init((ios *)(this + lVar1),0);
  return;
}



// std::ostream::~ostream()

void __thiscall std::ostream::~ostream(ostream *this)

{
  *(undefined ***)this = &PTR__ostream_1400dd078;
  *(undefined ***)(this + 8) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 8));
  operator_delete(this);
  return;
}



// std::ostream::~ostream()

void __thiscall std::ostream::~ostream(ostream *this)

{
  *(undefined ***)this = &PTR__ostream_1400dd078;
  *(undefined ***)(this + 8) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 8));
  return;
}



// std::ostream::~ostream()

void __thiscall std::ostream::~ostream(ostream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[1];
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(std::ostream&&)

ostream * __thiscall std::ostream::operator=(ostream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  this_00[0xe1] = iVar1;
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(std::ostream& (*)(std::ostream&))

void __thiscall std::ostream::operator<<(undefined8 param_1_00,undefined *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014007b620. Too many branches
                    // WARNING: Treating indirect jump as call
  (*(code *)param_2)();
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(std::ios_base& (*)(std::ios_base&))

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(std::ios& (*)(std::ios&))

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(void const*)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x48))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(std::streambuf*)

ostream * __thiscall std::ostream::operator<<(ostream *this,longlong *param_1)

{
  longlong *plVar1;
  undefined4 uVar2;
  int iVar3;
  longlong lVar4;
  uint uVar5;
  ios *this_00;
  undefined1 local_29;
  sentry local_28 [8];
  longlong *local_20;
  
  sentry::sentry(local_28,(longlong *)this);
  if (local_28[0] == (sentry)0x0) {
    if (param_1 != (longlong *)0x0) goto LAB_14007b6d0;
    lVar4 = *(longlong *)this;
    uVar5 = 1;
  }
  else {
    lVar4 = *(longlong *)this;
    if (param_1 == (longlong *)0x0) {
      uVar5 = 1;
    }
    else {
      lVar4 = __copy_streambufs_eof<>
                        (param_1,*(longlong **)(this + *(longlong *)(lVar4 + -0x18) + 0xe8),
                         &local_29);
      if (lVar4 != 0) goto LAB_14007b6d0;
      lVar4 = *(longlong *)this;
      uVar5 = 4;
    }
  }
  ios::clear((ios *)(this + *(longlong *)(lVar4 + -0x18)),
             uVar5 | *(uint *)((ios *)(this + *(longlong *)(lVar4 + -0x18)) + 0x20));
LAB_14007b6d0:
  lVar4 = *(longlong *)(*local_20 + -0x18);
  if (((((*(byte *)((longlong)local_20 + lVar4 + 0x19) & 0x20) != 0) &&
       (uVar2 = uncaught_exception(), (char)uVar2 == '\0')) &&
      (plVar1 = *(longlong **)((longlong)local_20 + lVar4 + 0xe8), plVar1 != (longlong *)0x0)) &&
     (iVar3 = (**(code **)(*plVar1 + 0x30))(), iVar3 == -1)) {
    this_00 = (ios *)((longlong)local_20 + *(longlong *)(*local_20 + -0x18));
    ios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(bool)

void __thiscall std::ostream::operator<<(ostream *this,undefined1 param_1)

{
  _M_insert<bool>(this,param_1);
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(double)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x38))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_2);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(long double)

void __thiscall std::ostream::operator<<(ostream *this,undefined1 (*param_1) [10])

{
  undefined1 local_18 [2] [10];
  
  local_18[0] = *param_1;
  _M_insert<>(this,local_18);
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(float)

void __thiscall std::ostream::operator<<(ostream *this,float param_1)

{
  _M_insert<double>(this,(double)param_1);
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(int)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x18))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(unsigned int)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x20))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(long)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x18))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(unsigned long)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x20))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(short)

void __thiscall std::ostream::operator<<(ostream *this,ushort param_1)

{
  if (((*(uint *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0x18) & 0x4a) != 0x40) &&
     ((*(uint *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0x18) & 0x4a) != 8)) {
    _M_insert<long>(this,(int)(short)param_1);
    return;
  }
  _M_insert<long>(this,(uint)param_1);
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(unsigned short)

void __thiscall std::ostream::operator<<(ostream *this,ushort param_1)

{
  _M_insert<>(this,(uint)param_1);
  return;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(long long)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x28))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::ostream::TEMPNAMEPLACEHOLDERVALUE(unsigned long long)

ostream * __thiscall std::ostream::operator<<(ostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  ctype<char> *this_00;
  ctype<char> cVar3;
  undefined4 uVar4;
  int iVar5;
  ios *this_01;
  ostream *poVar6;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    poVar6 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(poVar6 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (poVar6[0xe1] == (ostream)0x0) {
      this_00 = *(ctype<char> **)(poVar6 + 0xf0);
      if (this_00 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
        iVar5 = 0x20;
        cVar3 = (ctype<char>)0x20;
        if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
          cVar3 = (ctype<char>)(**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
          iVar5 = (int)(char)cVar3;
        }
      }
      else {
        cVar3 = this_00[0x59];
        iVar5 = (int)(char)cVar3;
      }
      *(ctype<char> *)(poVar6 + 0xe0) = cVar3;
      lVar2 = *(longlong *)this;
      poVar6[0xe1] = (ostream)0x1;
      poVar6 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      iVar5 = (int)(char)poVar6[0xe0];
    }
    lStack_68 = *(longlong *)(poVar6 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x30))(auStack_58,plVar1,&lStack_68,poVar6,iVar5,param_1);
    if (cStack_50 != '\0') {
      ios::clear((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                 *(uint *)((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_01 = (ios *)(*(longlong *)(*plStack_40 + -0x18) + (longlong)plStack_40);
        ios::clear(this_01,*(uint *)(this_01 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::string::_S_compare(unsigned long long, unsigned long long)

ulonglong std::string::_S_compare(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = 0x7fffffff;
  uVar2 = param_1 - param_2;
  if (((longlong)uVar2 < 0x80000000) && (uVar1 = 0x80000000, -0x80000001 < (longlong)uVar2)) {
    uVar1 = uVar2 & 0xffffffff;
  }
  return uVar1;
}



// std::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)

void __thiscall std::string::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)

void __thiscall std::string::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::string::_M_leak_hard()

void __thiscall std::string::_M_leak_hard(string *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if (*(longlong *)(lVar1 + -0x18) == 0) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007b94e;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007b94e;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007b94e:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::string::_S_construct(unsigned long long, char, std::allocator<char> const&)

ulonglong * std::string::_S_construct(ulonglong param_1,char param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  puVar1 = (ulonglong *)_Rep::_S_create(param_1,0);
  _Dst = puVar1 + 3;
  if (param_1 != 0) {
    if (param_1 == 1) {
      *(char *)(puVar1 + 3) = param_2;
    }
    else {
      _Dst = memset(_Dst,(int)param_2,param_1);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined1 *)((longlong)puVar1 + param_1 + 0x18) = 0;
  return _Dst;
}



// char* std::string::_S_construct<__gnu_cxx::__normal_iterator<char*, std::string >
// >(__gnu_cxx::__normal_iterator<char*, std::string >, __gnu_cxx::__normal_iterator<char*,
// std::string >, std::allocator<char> const&, std::forward_iterator_tag)

ulonglong * std::string::_S_construct<>(undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  
  _Size = param_2 - (longlong)param_1;
  puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
  _Dst = puVar1 + 3;
  if (_Size == 1) {
    *(undefined1 *)(puVar1 + 3) = *param_1;
  }
  else if (_Size != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)((longlong)puVar1 + _Size + 0x18) = 0;
  return _Dst;
}



// char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char>
// const&, std::forward_iterator_tag)

ulonglong * std::string::_S_construct<>(undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  return _Dst;
}



ulonglong *
_text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
          (undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      std::__throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  return _Dst;
}



ulonglong *
_text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
          (undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      std::__throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  return _Dst;
}



ulonglong *
_text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
          (undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      std::__throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  return _Dst;
}



ulonglong *
_text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
          (undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      std::__throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)std::string::_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  return _Dst;
}



// char* std::string::_S_construct<char*>(char*, char*, std::allocator<char> const&,
// std::forward_iterator_tag)

ulonglong * std::string::_S_construct<char*>(undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  return _Dst;
}



// std::string::_S_empty_rep()

undefined1 * std::string::_S_empty_rep(void)

{
  return &_Rep::_S_empty_rep_storage;
}



// std::string::_S_copy_chars(char*, __gnu_cxx::__normal_iterator<char const*, std::string >,
// __gnu_cxx::__normal_iterator<char const*, std::string >)

void std::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::string::_S_copy_chars(char*, __gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >)

void std::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::string::_S_copy_chars(char*, char const*, char const*)

void std::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::string::_S_copy_chars(char*, char*, char*)

void std::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::string::shrink_to_fit()

void __thiscall std::string::shrink_to_fit(string *this)

{
  reserve(this);
  return;
}



// std::string::_M_replace_aux(unsigned long long, unsigned long long, unsigned long long, char)

string * __thiscall
std::string::_M_replace_aux
          (string *this,size_t param_1,longlong param_2,ulonglong param_3,char param_4)

{
  if ((ulonglong)((param_2 + 0x3ffffffffffffff9) - *(longlong *)(*(longlong *)this + -0x18)) <
      param_3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,param_1,param_2,param_3);
  if (param_3 != 0) {
    if (param_3 == 1) {
      *(char *)(param_1 + *(longlong *)this) = param_4;
      return this;
    }
    memset((char *)(param_1 + *(longlong *)this),(int)param_4,param_3);
  }
  return this;
}



// std::string::_M_replace_safe(unsigned long long, unsigned long long, char const*, unsigned long
// long)

string * __thiscall
std::string::_M_replace_safe
          (string *this,size_t param_1,longlong param_2,undefined1 *param_3,size_t param_4)

{
  _M_mutate(this,param_1,param_2,param_4);
  if (param_4 != 0) {
    if (param_4 == 1) {
      *(undefined1 *)(param_1 + *(longlong *)this) = *param_3;
      return this;
    }
    memcpy((undefined1 *)(param_1 + *(longlong *)this),param_3,param_4);
  }
  return this;
}



// std::string::_S_construct_aux_2(unsigned long long, char, std::allocator<char> const&)

ulonglong * std::string::_S_construct_aux_2(ulonglong param_1,char param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  puVar1 = (ulonglong *)_Rep::_S_create(param_1,0);
  _Dst = puVar1 + 3;
  if (param_1 != 0) {
    if (param_1 == 1) {
      *(char *)(puVar1 + 3) = param_2;
    }
    else {
      _Dst = memset(_Dst,(int)param_2,param_1);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined1 *)((longlong)puVar1 + param_1 + 0x18) = 0;
  return _Dst;
}



// std::string::at(unsigned long long)

longlong __thiscall
std::string::at(string *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if (param_1 < *(ulonglong *)(lVar1 + -0x18)) {
    if (-1 < *(int *)(lVar1 + -8)) {
      _M_leak_hard(this);
      lVar1 = *(longlong *)this;
    }
    return lVar1 + param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,
             *(ulonglong *)(lVar1 + -0x18),param_3);
}



// std::string::end()

longlong __thiscall std::string::end(string *this)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
  if ((*(int *)(lVar1 + -8) < 0) || (lVar2 == 0)) {
    return lVar1 + lVar2;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007c08d;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    lVar2 = *(longlong *)(lVar1 + -0x18);
    goto LAB_14007c08d;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18);
LAB_14007c08d:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return lVar1 + lVar2;
}



// std::string::_Rep::_M_destroy(std::allocator<char> const&)

void std::string::_Rep::_M_destroy(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



// std::string::_Rep::_M_dispose(std::allocator<char> const&)

void std::string::_Rep::_M_dispose(void *param_1)

{
  int *piVar1;
  int iVar2;
  
  if (_CRT_MT == 0) {
    iVar2 = *(int *)((longlong)param_1 + 0x10);
    *(int *)((longlong)param_1 + 0x10) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)((longlong)param_1 + 0x10);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  operator_delete(param_1);
  return;
}



// std::string::_Rep::_M_refcopy()

_Rep * __thiscall std::string::_Rep::_M_refcopy(_Rep *this)

{
  if (_CRT_MT == 0) {
    *(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
    return this + 0x18;
  }
  LOCK();
  *(int *)(this + 0x10) = *(int *)(this + 0x10) + 1;
  UNLOCK();
  return this + 0x18;
}



// std::string::_Rep::_M_refdata()

_Rep * __thiscall std::string::_Rep::_M_refdata(_Rep *this)

{
  return this + 0x18;
}



// std::string::_Rep::_S_empty_rep()

undefined1 * std::string::_Rep::_S_empty_rep(void)

{
  return &_S_empty_rep_storage;
}



// std::string::_Rep::_M_set_leaked()

void __thiscall std::string::_Rep::_M_set_leaked(_Rep *this)

{
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  return;
}



// std::string::_Rep::_M_set_sharable()

void __thiscall std::string::_Rep::_M_set_sharable(_Rep *this)

{
  *(undefined4 *)(this + 0x10) = 0;
  return;
}



// std::string::_Rep::_M_set_length_and_sharable(unsigned long long)

void __thiscall std::string::_Rep::_M_set_length_and_sharable(_Rep *this,longlong param_1)

{
  *(undefined4 *)(this + 0x10) = 0;
  *(longlong *)this = param_1;
  this[param_1 + 0x18] = (_Rep)0x0;
  return;
}



// std::string::_Rep::_M_grab(std::allocator<char> const&, std::allocator<char> const&)

_Rep * std::string::_Rep::_M_grab(_Rep *param_1,undefined8 param_2)

{
  _Rep *p_Var1;
  
  if (*(int *)(param_1 + 0x10) < 0) {
    p_Var1 = (_Rep *)_M_clone(param_1,param_2,0);
    return p_Var1;
  }
  if (_CRT_MT == 0) {
    *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
    return param_1 + 0x18;
  }
  LOCK();
  *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + 1;
  UNLOCK();
  return param_1 + 0x18;
}



// std::string::_Rep::_M_clone(std::allocator<char> const&, unsigned long long)

longlong * __thiscall std::string::_Rep::_M_clone(_Rep *this,undefined8 param_2_00,longlong param_2)

{
  size_t _Size;
  longlong *plVar1;
  longlong *_Dst;
  longlong lVar2;
  
  plVar1 = (longlong *)_S_create(*(longlong *)this + param_2,*(ulonglong *)(this + 8));
  _Size = *(size_t *)this;
  _Dst = plVar1 + 3;
  lVar2 = 0;
  if (_Size != 0) {
    if (_Size == 1) {
      *(_Rep *)(plVar1 + 3) = this[0x18];
      lVar2 = *(longlong *)this;
    }
    else {
      _Dst = memcpy(_Dst,this + 0x18,_Size);
      lVar2 = *(longlong *)this;
    }
  }
  *(undefined4 *)(plVar1 + 2) = 0;
  *plVar1 = lVar2;
  *(undefined1 *)((longlong)plVar1 + lVar2 + 0x18) = 0;
  return _Dst;
}



// std::string::_Rep::_S_create(unsigned long long, unsigned long long, std::allocator<char> const&)

void std::string::_Rep::_S_create(ulonglong param_1,ulonglong param_2)

{
  void *pvVar1;
  
  if (param_1 < 0x3ffffffffffffffa) {
    if (param_2 < param_1) {
      if (param_1 < param_2 * 2) {
        param_1 = param_2 * 2;
      }
      if (((0x1000 < param_1 + 0x39) && (param_2 < param_1)) &&
         (param_1 = (param_1 + 0x1000) - (ulonglong)((uint)(param_1 + 0x39) & 0xfff),
         0x3ffffffffffffff9 < param_1)) {
        param_1 = 0x3ffffffffffffff9;
      }
    }
    pvVar1 = operator_new(param_1 + 0x19);
    *(ulonglong *)((longlong)pvVar1 + 8) = param_1;
    *(undefined4 *)((longlong)pvVar1 + 0x10) = 0;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_S_create");
}



// std::string::back()

longlong __thiscall std::string::back(string *this)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar1 + -0x18) + -1;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return lVar1 + lVar2;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007c30d;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007c30d;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007c30d:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return lVar1 + lVar2;
}



// std::string::rend()

void std::string::rend(longlong *param_1,string *param_2)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)param_2;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    *param_1 = lVar1;
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007c38c;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)param_2;
    goto LAB_14007c38c;
  }
  _M_mutate(param_2,0,0,0);
  lVar1 = *(longlong *)param_2;
LAB_14007c38c:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  *param_1 = lVar1;
  return;
}



// std::string::swap(std::string&)

void __thiscall std::string::swap(string *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    *(undefined4 *)(lVar1 + -8) = 0;
  }
  lVar2 = *param_1;
  if (*(int *)(lVar2 + -8) < 0) {
    *(undefined4 *)(lVar2 + -8) = 0;
  }
  *(longlong *)this = lVar2;
  *param_1 = lVar1;
  return;
}



// std::string::begin()

void __thiscall std::string::begin(string *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007c435;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007c435;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007c435:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::string::clear()

void __thiscall std::string::clear(string *this)

{
  _M_mutate(this,0,*(longlong *)(*(longlong *)this + -0x18),0);
  return;
}



// std::string::erase(__gnu_cxx::__normal_iterator<char*, std::string >)

longlong __thiscall std::string::erase(string *this,longlong param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  _M_mutate(this,param_1 - lVar1,1,0);
  lVar2 = *(longlong *)this;
  *(undefined4 *)(lVar2 + -8) = 0xffffffff;
  return lVar2 + (param_1 - lVar1);
}



// std::string::erase(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >)

longlong __thiscall std::string::erase(string *this,longlong param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  if (param_2 - param_1 == 0) {
    return param_1;
  }
  lVar1 = *(longlong *)this;
  _M_mutate(this,param_1 - lVar1,param_2 - param_1,0);
  lVar2 = *(longlong *)this;
  *(undefined4 *)(lVar2 + -8) = 0xffffffff;
  return lVar2 + (param_1 - lVar1);
}



// std::string::erase(unsigned long long, unsigned long long)

string * __thiscall std::string::erase(string *this,ulonglong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_mutate(this,param_1,param_2,0);
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f4d,param_1,uVar1);
}



// std::string::front()

void __thiscall std::string::front(string *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007c5b5;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007c5b5;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007c5b5:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::string::append(char const*)

void __thiscall std::string::append(string *this,char *param_1)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  append(this,param_1,sVar1);
  return;
}



// std::string::append(char const*, unsigned long long)

string * __thiscall std::string::append(string *this,undefined1 *param_1,ulonglong param_2)

{
  int *piVar1;
  ulonglong uVar2;
  undefined1 *puVar3;
  longlong lVar4;
  
  if (param_2 == 0) {
    return this;
  }
  puVar3 = *(undefined1 **)this;
  lVar4 = *(longlong *)(puVar3 + -0x18);
  if (0x3ffffffffffffff9U - lVar4 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  uVar2 = param_2 + lVar4;
  if (*(ulonglong *)(puVar3 + -0x10) < uVar2) {
LAB_14007c671:
    if ((param_1 < puVar3) || (puVar3 + *(longlong *)(puVar3 + -0x18) < param_1)) {
      reserve(this,uVar2);
      puVar3 = *(undefined1 **)this;
      lVar4 = *(longlong *)(puVar3 + -0x18);
LAB_14007c694:
      puVar3 = puVar3 + lVar4;
      goto joined_r0x00014007c6ef;
    }
    lVar4 = (longlong)param_1 - (longlong)puVar3;
    reserve(this,uVar2);
    puVar3 = *(undefined1 **)this;
    param_1 = puVar3 + lVar4;
  }
  else {
    if (_CRT_MT == 0) {
      if (0 < *(int *)(puVar3 + -8)) goto LAB_14007c671;
      goto LAB_14007c694;
    }
    piVar1 = (int *)(puVar3 + -8);
    puVar3 = *(undefined1 **)this;
    if (0 < *piVar1) goto LAB_14007c671;
  }
  puVar3 = puVar3 + *(longlong *)(puVar3 + -0x18);
joined_r0x00014007c6ef:
  if (param_2 == 1) {
    *puVar3 = *param_1;
  }
  else {
    memcpy(puVar3,param_1,param_2);
  }
  lVar4 = *(longlong *)this;
  *(undefined4 *)(lVar4 + -8) = 0;
  *(ulonglong *)(lVar4 + -0x18) = uVar2;
  *(undefined1 *)(lVar4 + uVar2) = 0;
  return this;
}



// std::string::append(std::string const&)

string * __thiscall std::string::append(string *this,undefined8 *param_1)

{
  ulonglong uVar1;
  size_t _Size;
  longlong lVar2;
  longlong lVar3;
  undefined1 *_Src;
  
  _Src = (undefined1 *)*param_1;
  _Size = *(size_t *)(_Src + -0x18);
  if (_Size == 0) {
    return this;
  }
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
  uVar1 = lVar2 + _Size;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_14007c780;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      _Src = (undefined1 *)*param_1;
      lVar2 = *(longlong *)(lVar3 + -0x18);
      goto LAB_14007c780;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  _Src = (undefined1 *)*param_1;
  lVar2 = *(longlong *)(lVar3 + -0x18);
LAB_14007c780:
  if (_Size == 1) {
    *(undefined1 *)(lVar3 + lVar2) = *_Src;
  }
  else {
    memcpy((undefined1 *)(lVar3 + lVar2),_Src,_Size);
  }
  lVar3 = *(longlong *)this;
  *(undefined4 *)(lVar3 + -8) = 0;
  *(ulonglong *)(lVar3 + -0x18) = uVar1;
  *(undefined1 *)(lVar3 + uVar1) = 0;
  return this;
}



// std::string::append(std::string const&, unsigned long long, unsigned long long)

string * __thiscall
std::string::append(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong _Size;
  
  lVar4 = *param_1;
  uVar1 = *(ulonglong *)(lVar4 + -0x18);
  if (uVar1 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4fea,param_2,uVar1);
  }
  _Size = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    _Size = param_3;
  }
  if (_Size == 0) {
    return this;
  }
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
  uVar1 = lVar2 + _Size;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_14007c861;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      lVar4 = *param_1;
      lVar2 = *(longlong *)(lVar3 + -0x18);
      goto LAB_14007c861;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  lVar4 = *param_1;
  lVar2 = *(longlong *)(lVar3 + -0x18);
LAB_14007c861:
  if (_Size == 1) {
    *(undefined1 *)(lVar3 + lVar2) = *(undefined1 *)(lVar4 + param_2);
  }
  else {
    memcpy((undefined1 *)(lVar3 + lVar2),(undefined1 *)(lVar4 + param_2),_Size);
  }
  lVar4 = *(longlong *)this;
  *(undefined4 *)(lVar4 + -8) = 0;
  *(ulonglong *)(lVar4 + -0x18) = uVar1;
  *(undefined1 *)(lVar4 + uVar1) = 0;
  return this;
}



// std::string::append(std::initializer_list<char>)

void __thiscall std::string::append(string *this,undefined8 *param_1)

{
  append(this,(undefined1 *)*param_1,param_1[1]);
  return;
}



// std::string::append(unsigned long long, char)

string * __thiscall std::string::append(string *this,ulonglong param_1,char param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  
  if (param_1 == 0) {
    return this;
  }
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
  if (0x3ffffffffffffff9U - lVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  uVar1 = param_1 + lVar2;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_14007c955;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      lVar2 = *(longlong *)(lVar3 + -0x18);
      goto LAB_14007c955;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
LAB_14007c955:
  if (param_1 == 1) {
    *(char *)(lVar3 + lVar2) = param_2;
  }
  else {
    memset((char *)(lVar3 + lVar2),(int)param_2,param_1);
  }
  lVar3 = *(longlong *)this;
  *(undefined4 *)(lVar3 + -8) = 0;
  *(ulonglong *)(lVar3 + -0x18) = uVar1;
  *(undefined1 *)(lVar3 + uVar1) = 0;
  return this;
}



// std::string::assign(std::string&&)

void __thiscall std::string::assign(string *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    *(undefined4 *)(lVar1 + -8) = 0;
  }
  lVar2 = *param_1;
  if (*(int *)(lVar2 + -8) < 0) {
    *(undefined4 *)(lVar2 + -8) = 0;
  }
  *(longlong *)this = lVar2;
  *param_1 = lVar1;
  return;
}



// std::string::assign(char const*)

void __thiscall std::string::assign(string *this,char *param_1)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  assign(this,param_1,sVar1);
  return;
}



// std::string::assign(char const*, unsigned long long)

string * __thiscall std::string::assign(string *this,undefined1 *param_1,ulonglong param_2)

{
  undefined1 *_Dst;
  longlong lVar1;
  
  _Dst = *(undefined1 **)this;
  lVar1 = *(longlong *)(_Dst + -0x18);
  if (0x3ffffffffffffff9 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::assign");
  }
  if ((param_1 < _Dst) || (_Dst + lVar1 < param_1)) {
LAB_14007cae8:
    _M_mutate(this,0,lVar1,param_2);
    if (param_2 == 0) {
      return this;
    }
    if (param_2 == 1) {
      **(undefined1 **)this = *param_1;
      return this;
    }
    memcpy(*(undefined1 **)this,param_1,param_2);
    return this;
  }
  if (_CRT_MT == 0) {
    if (0 < *(int *)(_Dst + -8)) goto LAB_14007cae8;
  }
  else {
    if (0 < *(int *)(_Dst + -8)) {
      lVar1 = *(longlong *)(*(longlong *)this + -0x18);
      goto LAB_14007cae8;
    }
    _Dst = *(undefined1 **)this;
  }
  if ((ulonglong)((longlong)param_1 - (longlong)_Dst) < param_2) {
    if (param_1 == _Dst) goto LAB_14007cab0;
    if (param_2 != 1) {
      memmove(_Dst,param_1,param_2);
      _Dst = *(undefined1 **)this;
      goto LAB_14007cab0;
    }
  }
  else if (param_2 != 1) {
    if (param_2 != 0) {
      memcpy(_Dst,param_1,param_2);
      _Dst = *(undefined1 **)this;
    }
    goto LAB_14007cab0;
  }
  *_Dst = *param_1;
  _Dst = *(undefined1 **)this;
LAB_14007cab0:
  *(undefined4 *)(_Dst + -8) = 0;
  *(ulonglong *)(_Dst + -0x18) = param_2;
  _Dst[param_2] = 0;
  return this;
}



// std::string::assign(std::string const&)

string * __thiscall std::string::assign(string *this,longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined1 local_19 [9];
  
  plVar4 = (longlong *)*param_1;
  if (*(longlong **)this != plVar4) {
    if ((int)plVar4[-1] < 0) {
      plVar4 = _Rep::_M_clone((_Rep *)(plVar4 + -3),local_19,0);
      lVar3 = *(longlong *)this;
    }
    else {
      if (_CRT_MT == 0) {
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
      }
      else {
        LOCK();
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
        UNLOCK();
      }
      lVar3 = *(longlong *)this;
    }
    if (_CRT_MT == 0) {
      iVar2 = *(int *)(lVar3 + -8);
      *(int *)(lVar3 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(lVar3 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      operator_delete((void *)(lVar3 + -0x18));
    }
    *(longlong **)this = plVar4;
    return this;
  }
  return this;
}



// std::string::assign(std::string const&, unsigned long long, unsigned long long)

void __thiscall
std::string::assign(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*param_1 + -0x18);
  uVar2 = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    uVar2 = param_3;
  }
  if (param_2 <= uVar1) {
    assign(this,(undefined1 *)(*param_1 + param_2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f94,param_2,uVar1);
}



// std::string::assign(std::initializer_list<char>)

void __thiscall std::string::assign(string *this,undefined8 *param_1)

{
  assign(this,(undefined1 *)*param_1,param_1[1]);
  return;
}



// std::string::assign(unsigned long long, char)

string * __thiscall std::string::assign(string *this,ulonglong param_1,char param_2)

{
  if (0x3ffffffffffffff9 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,0,*(longlong *)(*(longlong *)this + -0x18),param_1);
  if (param_1 != 0) {
    if (param_1 == 1) {
      **(char **)this = param_2;
      return this;
    }
    memset(*(char **)this,(int)param_2,param_1);
  }
  return this;
}



// std::string::insert(__gnu_cxx::__normal_iterator<char*, std::string >,
// std::initializer_list<char>)

void __thiscall std::string::insert(string *this,longlong param_1,undefined8 *param_2)

{
  insert(this,param_1 - *(longlong *)this,(undefined1 *)*param_2,param_2[1]);
  return;
}



// std::string::insert(__gnu_cxx::__normal_iterator<char*, std::string >, char)

longlong __thiscall std::string::insert(string *this,longlong param_1,undefined1 param_2)

{
  longlong lVar1;
  size_t sVar2;
  
  sVar2 = param_1 - *(longlong *)this;
  if (*(longlong *)(*(longlong *)this + -0x18) != 0x3ffffffffffffff9) {
    _M_mutate(this,sVar2,0,1);
    *(undefined1 *)(*(longlong *)this + sVar2) = param_2;
    lVar1 = *(longlong *)this;
    *(undefined4 *)(lVar1 + -8) = 0xffffffff;
    return lVar1 + sVar2;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_M_replace_aux");
}



// std::string::insert(__gnu_cxx::__normal_iterator<char*, std::string >, unsigned long long, char)

void __thiscall std::string::insert(string *this,longlong param_1,ulonglong param_2,char param_3)

{
  size_t sVar1;
  char *_Dst;
  
  sVar1 = param_1 - *(longlong *)this;
  if (0x3ffffffffffffff9U - *(longlong *)(*(longlong *)this + -0x18) < param_2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,sVar1,0,param_2);
  if (param_2 != 0) {
    _Dst = (char *)(sVar1 + *(longlong *)this);
    if (param_2 != 1) {
      memset(_Dst,(int)param_3,param_2);
      return;
    }
    *_Dst = param_3;
  }
  return;
}



// std::string::insert(unsigned long long, char const*)

void __thiscall std::string::insert(string *this,ulonglong param_1,char *param_2)

{
  size_t sVar1;
  
  sVar1 = strlen(param_2);
  insert(this,param_1,param_2,sVar1);
  return;
}



// std::string::insert(unsigned long long, char const*, unsigned long long)

string * __thiscall
std::string::insert(string *this,ulonglong param_1,undefined1 *param_2,ulonglong param_3)

{
  undefined1 *_Src;
  ulonglong uVar1;
  undefined1 *_Dst;
  undefined1 *puVar2;
  undefined1 *_Src_00;
  size_t sVar3;
  
  puVar2 = *(undefined1 **)this;
  uVar1 = *(ulonglong *)(puVar2 + -0x18);
  if (uVar1 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4fa9,param_1,uVar1);
  }
  if (0x3ffffffffffffff9 - uVar1 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::insert");
  }
  if ((puVar2 <= param_2) && (param_2 <= puVar2 + uVar1)) {
    if (_CRT_MT == 0) {
      if (*(int *)(puVar2 + -8) < 1) {
LAB_14007ceda:
        _M_mutate(this,param_1,0,param_3);
        _Src_00 = (undefined1 *)(*(longlong *)this + ((longlong)param_2 - (longlong)puVar2));
        _Dst = (undefined1 *)(*(longlong *)this + param_1);
        _Src = _Src_00 + param_3;
        if (_Dst < _Src) {
          if (_Dst <= _Src_00) {
            if (param_3 == 1) {
              *_Dst = *_Src;
              return this;
            }
            if (param_3 == 0) {
              return this;
            }
            memcpy(_Dst,_Src,param_3);
            return this;
          }
          sVar3 = param_1 - ((longlong)param_2 - (longlong)puVar2);
          if (sVar3 == 1) {
            *_Dst = *_Src_00;
          }
          else {
            _Dst = memcpy(_Dst,_Src_00,sVar3);
          }
          _Src_00 = _Dst + param_3;
          _Dst = _Dst + sVar3;
          sVar3 = param_3 - sVar3;
          if (sVar3 != 1) {
            if (sVar3 == 0) {
              return this;
            }
            memcpy(_Dst,_Src_00,sVar3);
            return this;
          }
        }
        else if (param_3 != 1) {
          if (param_3 == 0) {
            return this;
          }
          memcpy(_Dst,_Src_00,param_3);
          return this;
        }
        *_Dst = *_Src_00;
        return this;
      }
    }
    else if (*(int *)(puVar2 + -8) < 1) {
      puVar2 = *(undefined1 **)this;
      goto LAB_14007ceda;
    }
  }
  _M_mutate(this,param_1,0,param_3);
  if (param_3 != 0) {
    if (param_3 == 1) {
      *(undefined1 *)(param_1 + *(longlong *)this) = *param_2;
      return this;
    }
    memcpy((undefined1 *)(param_1 + *(longlong *)this),param_2,param_3);
  }
  return this;
}



// std::string::insert(unsigned long long, std::string const&)

void __thiscall std::string::insert(string *this,ulonglong param_1,undefined8 *param_2)

{
  insert(this,param_1,(undefined1 *)*param_2,*(ulonglong *)((undefined1 *)*param_2 + -0x18));
  return;
}



// std::string::insert(unsigned long long, std::string const&, unsigned long long, unsigned long
// long)

void __thiscall
std::string::insert(string *this,ulonglong param_1,longlong *param_2,ulonglong param_3,
                   ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*param_2 + -0x18);
  uVar2 = uVar1 - param_3;
  if (param_4 < uVar1 - param_3) {
    uVar2 = param_4;
  }
  if (param_3 <= uVar1) {
    insert(this,param_1,(undefined1 *)(*param_2 + param_3),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4fa9,param_3,uVar1);
}



// std::string::insert(unsigned long long, unsigned long long, char)

string * __thiscall
std::string::insert(string *this,ulonglong param_1,ulonglong param_2,char param_3)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4fa9,param_1,uVar1);
  }
  if (param_2 <= 0x3ffffffffffffff9 - uVar1) {
    _M_mutate(this,param_1,0,param_2);
    if (param_2 != 0) {
      if (param_2 == 1) {
        *(char *)(param_1 + *(longlong *)this) = param_3;
        return this;
      }
      memset((char *)(param_1 + *(longlong *)this),(int)param_3,param_2);
    }
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_M_replace_aux");
}



// std::string::rbegin()

void std::string::rbegin(longlong *param_1,string *param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar2 = *(longlong *)param_2;
  lVar1 = *(longlong *)(lVar2 + -0x18);
  if ((*(int *)(lVar2 + -8) < 0) || (lVar1 == 0)) {
    *param_1 = lVar2 + lVar1;
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar2 + -8) < 1) goto LAB_14007d13c;
  }
  else if (*(int *)(lVar2 + -8) < 1) {
    lVar2 = *(longlong *)param_2;
    lVar1 = *(longlong *)(lVar2 + -0x18);
    goto LAB_14007d13c;
  }
  _M_mutate(param_2,0,0,0);
  lVar2 = *(longlong *)param_2;
  lVar1 = *(longlong *)(lVar2 + -0x18);
LAB_14007d13c:
  *(undefined4 *)(lVar2 + -8) = 0xffffffff;
  *param_1 = lVar2 + lVar1;
  return;
}



// std::string::resize(unsigned long long)

void __thiscall std::string::resize(string *this,ulonglong param_1)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (0x3ffffffffffffff9 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::resize");
  }
  if (param_1 <= uVar1) {
    if (uVar1 <= param_1) {
      return;
    }
    _M_mutate(this,param_1,uVar1 - param_1,0);
    return;
  }
  append(this,param_1 - uVar1,'\0');
  return;
}



// std::string::resize(unsigned long long, char)

void __thiscall std::string::resize(string *this,ulonglong param_1,char param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (0x3ffffffffffffff9 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::resize");
  }
  if (param_1 <= uVar1) {
    if (uVar1 <= param_1) {
      return;
    }
    _M_mutate(this,param_1,uVar1 - param_1,0);
    return;
  }
  append(this,param_1 - uVar1,param_2);
  return;
}



// std::string::_M_copy(char*, char const*, unsigned long long)

void std::string::_M_copy(undefined1 *param_1,undefined1 *param_2,size_t param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3);
  return;
}



// std::string::_M_data(char*)

undefined8 __thiscall std::string::_M_data(string *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return param_1;
}



// std::string::_M_leak()

void __thiscall std::string::_M_leak(string *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007d2c5;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007d2c5;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007d2c5:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return;
}



// std::string::_M_move(char*, char const*, unsigned long long)

void std::string::_M_move(undefined1 *param_1,undefined1 *param_2,size_t param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memmove(param_1,param_2,param_3);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, __gnu_cxx::__normal_iterator<char const*,
// std::string >, __gnu_cxx::__normal_iterator<char const*, std::string >)

void __thiscall
std::string::replace
          (string *this,longlong param_1,longlong param_2,undefined1 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,param_3,param_4 - (longlong)param_3);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, char const*)

void __thiscall std::string::replace(string *this,longlong param_1,longlong param_2,char *param_3)

{
  size_t sVar1;
  
  sVar1 = strlen(param_3);
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,param_3,sVar1);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, char const*, char const*)

void __thiscall
std::string::replace
          (string *this,longlong param_1,longlong param_2,undefined1 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,param_3,param_4 - (longlong)param_3);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, char const*, unsigned long long)

void __thiscall
std::string::replace
          (string *this,longlong param_1,longlong param_2,undefined1 *param_3,ulonglong param_4)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,param_3,param_4);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, std::string const&)

void __thiscall
std::string::replace(string *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,(undefined1 *)*param_3,
          *(ulonglong *)((undefined1 *)*param_3 + -0x18));
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, char*, char*)

void __thiscall
std::string::replace
          (string *this,longlong param_1,longlong param_2,undefined1 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,param_3,param_4 - (longlong)param_3);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, __gnu_cxx::__normal_iterator<char*,
// std::string >, __gnu_cxx::__normal_iterator<char*, std::string >)

void __thiscall
std::string::replace
          (string *this,longlong param_1,longlong param_2,undefined1 *param_3,longlong param_4)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,param_3,param_4 - (longlong)param_3);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, std::initializer_list<char>)

void __thiscall
std::string::replace(string *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  replace(this,param_1 - *(longlong *)this,param_2 - param_1,(undefined1 *)*param_3,param_3[1]);
  return;
}



// std::string::replace(__gnu_cxx::__normal_iterator<char*, std::string >,
// __gnu_cxx::__normal_iterator<char*, std::string >, unsigned long long, char)

string * __thiscall
std::string::replace(string *this,longlong param_1,longlong param_2,ulonglong param_3,char param_4)

{
  size_t sVar1;
  char *_Dst;
  
  sVar1 = param_1 - *(longlong *)this;
  if ((ulonglong)
      (((param_2 - param_1) + 0x3ffffffffffffff9) - *(longlong *)(*(longlong *)this + -0x18)) <
      param_3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  _M_mutate(this,sVar1,param_2 - param_1,param_3);
  if (param_3 != 0) {
    _Dst = (char *)(sVar1 + *(longlong *)this);
    if (param_3 == 1) {
      *_Dst = param_4;
      return this;
    }
    memset(_Dst,(int)param_4,param_3);
  }
  return this;
}



// std::string::replace(unsigned long long, unsigned long long, char const*)

void __thiscall std::string::replace(string *this,ulonglong param_1,ulonglong param_2,char *param_3)

{
  size_t sVar1;
  
  sVar1 = strlen(param_3);
  replace(this,param_1,param_2,param_3,sVar1);
  return;
}



// std::string::replace(unsigned long long, unsigned long long, char const*, unsigned long long)

string * __thiscall
std::string::replace
          (string *this,ulonglong param_1,ulonglong param_2,undefined1 *param_3,ulonglong param_4)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  longlong lVar3;
  int iVar4;
  ulonglong *_Src;
  undefined1 *puVar5;
  ulonglong uVar6;
  
  puVar5 = *(undefined1 **)this;
  uVar2 = *(ulonglong *)(puVar5 + -0x18);
  if (uVar2 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f7e,param_1,uVar2);
  }
  uVar6 = uVar2 - param_1;
  if (param_2 < uVar2 - param_1) {
    uVar6 = param_2;
  }
  if ((0x3ffffffffffffff9 - uVar2) + uVar6 < param_4) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::replace");
  }
  if ((param_3 < puVar5) || (puVar5 + uVar2 < param_3)) {
LAB_14007d660:
    _M_mutate(this,param_1,uVar6,param_4);
    if (param_4 != 0) {
      if (param_4 == 1) {
        *(undefined1 *)(param_1 + *(longlong *)this) = *param_3;
      }
      else {
        memcpy((undefined1 *)(param_1 + *(longlong *)this),param_3,param_4);
      }
    }
  }
  else {
    if (_CRT_MT == 0) {
      if (0 < *(int *)(puVar5 + -8)) goto LAB_14007d660;
    }
    else {
      if (0 < *(int *)(puVar5 + -8)) goto LAB_14007d660;
      puVar5 = *(undefined1 **)this;
    }
    if (puVar5 + param_1 < param_3 + param_4) {
      if (param_3 < puVar5 + param_1 + uVar6) {
        _Src = _S_construct<>(param_3,(longlong)(param_3 + param_4));
        _M_mutate(this,param_1,uVar6,param_4);
        if (param_4 != 0) {
          if (param_4 == 1) {
            *(undefined1 *)(param_1 + *(longlong *)this) = (char)*_Src;
          }
          else {
            memcpy((undefined1 *)(param_1 + *(longlong *)this),_Src,param_4);
          }
        }
        if (_CRT_MT == 0) {
          iVar4 = (int)_Src[-1];
          *(int *)(_Src + -1) = iVar4 + -1;
        }
        else {
          LOCK();
          puVar1 = _Src + -1;
          iVar4 = (int)*puVar1;
          *(int *)puVar1 = (int)*puVar1 + -1;
          UNLOCK();
        }
        if (0 < iVar4) {
          return this;
        }
        operator_delete(_Src + -3);
        return this;
      }
      lVar3 = (param_4 - uVar6) - (longlong)puVar5;
    }
    else {
      lVar3 = -(longlong)puVar5;
    }
    _M_mutate(this,param_1,uVar6,param_4);
    puVar5 = (undefined1 *)(*(longlong *)this + param_1);
    if (param_4 == 1) {
      *puVar5 = param_3[*(longlong *)this + lVar3];
    }
    else if (param_4 != 0) {
      memcpy(puVar5,param_3 + *(longlong *)this + lVar3,param_4);
    }
  }
  return this;
}



// std::string::replace(unsigned long long, unsigned long long, std::string const&)

void __thiscall
std::string::replace(string *this,ulonglong param_1,ulonglong param_2,undefined8 *param_3)

{
  replace(this,param_1,param_2,(undefined1 *)*param_3,*(ulonglong *)((undefined1 *)*param_3 + -0x18)
         );
  return;
}



// std::string::replace(unsigned long long, unsigned long long, std::string const&, unsigned long
// long, unsigned long long)

void __thiscall
std::string::replace
          (string *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_5_00,
          ulonglong param_5)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *(ulonglong *)(*param_3 + -0x18);
  uVar2 = uVar1 - param_5_00;
  if (param_5 < uVar1 - param_5_00) {
    uVar2 = param_5;
  }
  if (param_5_00 <= uVar1) {
    replace(this,param_1,param_2,(undefined1 *)(*param_3 + param_5_00),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f7e,param_5_00,uVar1);
}



// std::string::replace(unsigned long long, unsigned long long, unsigned long long, char)

void __thiscall
std::string::replace
          (string *this,ulonglong param_1,ulonglong param_2,ulonglong param_3,char param_4)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(*(longlong *)this + -0x18);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace_aux(this,param_1,param_2,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f7e,param_1,uVar1);
}



// std::string::reserve()

void __thiscall std::string::reserve(string *this)

{
  int *piVar1;
  int iVar2;
  longlong *plVar3;
  longlong lVar4;
  undefined1 local_19 [9];
  
  lVar4 = *(longlong *)this;
  if (*(ulonglong *)(lVar4 + -0x10) <= *(ulonglong *)(lVar4 + -0x18)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
    }
    else {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
      lVar4 = *(longlong *)this;
    }
  }
  plVar3 = _Rep::_M_clone((_Rep *)(lVar4 + -0x18),local_19,0);
  lVar4 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar4 + -8);
    *(int *)(lVar4 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar4 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    operator_delete((void *)(lVar4 + -0x18));
  }
  *(longlong **)this = plVar3;
  return;
}



// std::string::reserve(unsigned long long)

void __thiscall std::string::reserve(string *this,ulonglong param_1)

{
  int *piVar1;
  int iVar2;
  ulonglong uVar3;
  longlong lVar4;
  longlong *plVar5;
  undefined1 local_19;
  
  lVar4 = *(longlong *)this;
  uVar3 = *(ulonglong *)(lVar4 + -0x10);
  if (param_1 <= uVar3) {
    param_1 = uVar3;
    if (_CRT_MT == 0) {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
    }
    else {
      if (*(int *)(lVar4 + -8) < 1) {
        return;
      }
      lVar4 = *(longlong *)this;
    }
  }
  plVar5 = _Rep::_M_clone((_Rep *)(lVar4 + -0x18),&local_19,param_1 - *(longlong *)(lVar4 + -0x18));
  lVar4 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar4 + -8);
    *(int *)(lVar4 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar4 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    operator_delete((void *)(lVar4 + -0x18));
  }
  *(longlong **)this = plVar5;
  return;
}



// std::string::pop_back()

void __thiscall std::string::pop_back(string *this)

{
  size_t sVar1;
  
  sVar1 = *(ulonglong *)(*(longlong *)this + -0x18) - 1;
  if (sVar1 <= *(ulonglong *)(*(longlong *)this + -0x18)) {
    _M_mutate(this,sVar1,1,0);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c4f4d,0xffffffffffffffff
             ,0);
}



// std::string::_M_assign(char*, unsigned long long, char)

void std::string::_M_assign(char *param_1,size_t param_2,char param_3)

{
  if (param_2 == 1) {
    *param_1 = param_3;
    return;
  }
  if (param_2 == 0) {
    return;
  }
  memset(param_1,(int)param_3,param_2);
  return;
}



// std::string::_M_mutate(unsigned long long, unsigned long long, unsigned long long)

void __thiscall
std::string::_M_mutate(string *this,size_t param_1,longlong param_2,longlong param_3)

{
  int *piVar1;
  undefined1 *puVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  size_t _Size;
  
  lVar4 = *(longlong *)this;
  lVar5 = param_2 + param_1;
  uVar6 = *(ulonglong *)(lVar4 + -0x10);
  uVar7 = (param_3 - param_2) + *(longlong *)(lVar4 + -0x18);
  _Size = *(longlong *)(lVar4 + -0x18) - lVar5;
  if (uVar7 <= uVar6) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar4 + -8) < 1) {
LAB_14007db73:
        if ((_Size != 0) && (param_3 != param_2)) {
          puVar2 = (undefined1 *)(lVar4 + param_3 + param_1);
          if (_Size == 1) {
            *puVar2 = *(undefined1 *)(lVar4 + lVar5);
            lVar4 = *(longlong *)this;
          }
          else {
            memmove(puVar2,(undefined1 *)(lVar4 + lVar5),_Size);
            lVar4 = *(longlong *)this;
          }
        }
        goto LAB_14007db05;
      }
    }
    else {
      if (*(int *)(lVar4 + -8) < 1) {
        lVar4 = *(longlong *)this;
        goto LAB_14007db73;
      }
      uVar6 = *(ulonglong *)(*(longlong *)this + -0x10);
    }
  }
  lVar4 = _Rep::_S_create(uVar7,uVar6);
  if (param_1 == 0) {
LAB_14007dae6:
    if (_Size == 0) goto LAB_14007daeb;
LAB_14007db28:
    puVar2 = (undefined1 *)(lVar4 + param_1 + 0x18 + param_3);
    if (_Size == 1) {
      *puVar2 = *(undefined1 *)(lVar5 + *(longlong *)this);
      goto LAB_14007daeb;
    }
    memcpy(puVar2,(undefined1 *)(lVar5 + *(longlong *)this),_Size);
    lVar5 = *(longlong *)this;
    if (_CRT_MT != 0) goto LAB_14007db53;
LAB_14007daf5:
    iVar3 = *(int *)(lVar5 + -8);
    *(int *)(lVar5 + -8) = iVar3 + -1;
  }
  else {
    if (param_1 != 1) {
      memcpy((void *)(lVar4 + 0x18),*(undefined1 **)this,param_1);
      goto LAB_14007dae6;
    }
    *(undefined1 *)(lVar4 + 0x18) = **(undefined1 **)this;
    if (_Size != 0) goto LAB_14007db28;
LAB_14007daeb:
    lVar5 = *(longlong *)this;
    if (_CRT_MT == 0) goto LAB_14007daf5;
LAB_14007db53:
    LOCK();
    piVar1 = (int *)(lVar5 + -8);
    iVar3 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar3 < 1) {
    operator_delete((void *)(lVar5 + -0x18));
  }
  lVar4 = lVar4 + 0x18;
  *(longlong *)this = lVar4;
LAB_14007db05:
  *(undefined4 *)(lVar4 + -8) = 0;
  *(ulonglong *)(lVar4 + -0x18) = uVar7;
  *(undefined1 *)(lVar4 + uVar7) = 0;
  return;
}



// std::string::push_back(char)

void __thiscall std::string::push_back(string *this,undefined1 param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
  uVar1 = lVar3 + 1;
  if (uVar1 <= *(ulonglong *)(lVar2 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar2 + -8) < 1) goto LAB_14007dc35;
    }
    else if (*(int *)(lVar2 + -8) < 1) {
      lVar2 = *(longlong *)this;
      lVar3 = *(longlong *)(lVar2 + -0x18);
      goto LAB_14007dc35;
    }
  }
  reserve(this,uVar1);
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
LAB_14007dc35:
  *(undefined1 *)(lVar2 + lVar3) = param_1;
  lVar2 = *(longlong *)this;
  *(undefined4 *)(lVar2 + -8) = 0;
  *(ulonglong *)(lVar2 + -0x18) = uVar1;
  *(undefined1 *)(lVar2 + uVar1) = 0;
  return;
}



// std::string::string(std::string&&)

void __thiscall std::string::string(string *this,longlong *param_1)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = _CRT_MT;
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  if (iVar2 == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_14007dca2:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)this;
      goto LAB_14007dca2;
    }
    lVar1 = *(longlong *)this;
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::string::string(std::string&&, std::allocator<char> const&)

void __thiscall std::string::string(string *this,undefined8 *param_1)

{
  undefined1 (*pauVar1) [16];
  
  *(undefined8 *)this = *param_1;
  pauVar1 = operator_new(0x19);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  pauVar1[1][8] = 0;
  *param_1 = pauVar1[1] + 8;
  return;
}



// std::string::string(char const*, std::allocator<char> const&)

void __thiscall std::string::string(string *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _S_construct<>(param_1,(longlong)pcVar3);
  *(ulonglong **)this = puVar2;
  return;
}



// std::string::string(char const*, unsigned long long, std::allocator<char> const&)

void __thiscall std::string::string(string *this,undefined1 *param_1,ulonglong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  if ((param_1 + param_2 != (undefined1 *)0x0) && (param_1 == (undefined1 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  puVar1 = (ulonglong *)_Rep::_S_create(param_2,0);
  _Dst = puVar1 + 3;
  if (param_2 == 1) {
    *(undefined1 *)(puVar1 + 3) = *param_1;
  }
  else if (param_2 != 0) {
    _Dst = memcpy(_Dst,param_1,param_2);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_2;
  *(undefined1 *)((longlong)puVar1 + param_2 + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string(std::allocator<char> const&)

void __thiscall std::string::string(string *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x19);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  pauVar1[1][8] = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::string::string(std::string const&)

void __thiscall std::string::string(string *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::string::string(std::string const&, std::allocator<char> const&)

void __thiscall std::string::string(string *this,longlong *param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),param_2,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::string::string(std::string const&, unsigned long long, std::allocator<char> const&)

void __thiscall std::string::string(string *this,longlong *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_2),lVar1 + uVar2);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5014,param_2,uVar2);
}



// std::string::string(std::string const&, unsigned long long, unsigned long long)

void __thiscall
std::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  ulonglong uVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar4 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar4 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_2),uVar4 + param_2 + lVar1);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5014,param_2,uVar2);
}



// std::string::string(std::string const&, unsigned long long, unsigned long long,
// std::allocator<char> const&)

void __thiscall
std::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  ulonglong uVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar4 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar4 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_2),uVar4 + param_2 + lVar1);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5014,param_2,uVar2);
}



// std::string::string(std::initializer_list<char>, std::allocator<char> const&)

void __thiscall std::string::string(string *this,undefined8 *param_1)

{
  undefined1 *_Src;
  ulonglong _Size;
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  _Src = (undefined1 *)*param_1;
  _Size = param_1[1];
  if ((_Src + _Size != (undefined1 *)0x0) && (_Src == (undefined1 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
  _Dst = puVar1 + 3;
  if (_Size == 1) {
    *(undefined1 *)(puVar1 + 3) = *_Src;
  }
  else if (_Size != 0) {
    _Dst = memcpy(_Dst,_Src,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string()

void __thiscall std::string::string(string *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x19);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  pauVar1[1][8] = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::string::string(unsigned long long, char, std::allocator<char> const&)

void __thiscall std::string::string(string *this,ulonglong param_1,char param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  puVar1 = (ulonglong *)_Rep::_S_create(param_1,0);
  _Dst = puVar1 + 3;
  if (param_1 != 0) {
    if (param_1 == 1) {
      *(char *)(puVar1 + 3) = param_2;
    }
    else {
      _Dst = memset(_Dst,(int)param_2,param_1);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined1 *)((longlong)puVar1 + param_1 + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string<__gnu_cxx::__normal_iterator<char*, std::string >
// >(__gnu_cxx::__normal_iterator<char*, std::string >, __gnu_cxx::__normal_iterator<char*,
// std::string >, std::allocator<char> const&)

void __thiscall std::string::string<>(string *this,undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  
  _Size = param_2 - (longlong)param_1;
  puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
  _Dst = puVar1 + 3;
  if (_Size == 1) {
    *(undefined1 *)(puVar1 + 3) = *param_1;
  }
  else if (_Size != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string<char const*>(char const*, char const*, std::allocator<char> const&)

void __thiscall std::string::string<>(string *this,undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string<char*>(char*, char*, std::allocator<char> const&)

void __thiscall std::string::string<char*>(string *this,undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string(std::string&&)

void __thiscall std::string::string(string *this,longlong *param_1)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = _CRT_MT;
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  if (iVar2 == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_14007e352:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)this;
      goto LAB_14007e352;
    }
    lVar1 = *(longlong *)this;
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::string::string(std::string&&, std::allocator<char> const&)

void __thiscall std::string::string(string *this,undefined8 *param_1)

{
  undefined1 (*pauVar1) [16];
  
  *(undefined8 *)this = *param_1;
  pauVar1 = operator_new(0x19);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  pauVar1[1][8] = 0;
  *param_1 = pauVar1[1] + 8;
  return;
}



// std::string::string(char const*, std::allocator<char> const&)

void __thiscall std::string::string(string *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _S_construct<>(param_1,(longlong)pcVar3);
  *(ulonglong **)this = puVar2;
  return;
}



// std::string::string(char const*, unsigned long long, std::allocator<char> const&)

void __thiscall std::string::string(string *this,undefined1 *param_1,ulonglong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  if ((param_1 + param_2 != (undefined1 *)0x0) && (param_1 == (undefined1 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  puVar1 = (ulonglong *)_Rep::_S_create(param_2,0);
  _Dst = puVar1 + 3;
  if (param_2 == 1) {
    *(undefined1 *)(puVar1 + 3) = *param_1;
  }
  else if (param_2 != 0) {
    _Dst = memcpy(_Dst,param_1,param_2);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_2;
  *(undefined1 *)((longlong)puVar1 + param_2 + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string(std::allocator<char> const&)

void __thiscall std::string::string(string *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x19);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  pauVar1[1][8] = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::string::string(std::string const&)

void __thiscall std::string::string(string *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::string::string(std::string const&, std::allocator<char> const&)

void __thiscall std::string::string(string *this,longlong *param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = _Rep::_M_clone((_Rep *)(lVar1 + -0x18),param_2,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::string::string(std::string const&, unsigned long long, std::allocator<char> const&)

void __thiscall std::string::string(string *this,longlong *param_1,ulonglong param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_2),lVar1 + uVar2);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5014,param_2,uVar2);
}



// std::string::string(std::string const&, unsigned long long, unsigned long long)

void __thiscall
std::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  ulonglong uVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar4 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar4 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_2),uVar4 + param_2 + lVar1);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5014,param_2,uVar2);
}



// std::string::string(std::string const&, unsigned long long, unsigned long long,
// std::allocator<char> const&)

void __thiscall
std::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong *puVar3;
  ulonglong uVar4;
  
  lVar1 = *param_1;
  uVar2 = *(ulonglong *)(lVar1 + -0x18);
  uVar4 = uVar2 - param_2;
  if (param_3 < uVar2 - param_2) {
    uVar4 = param_3;
  }
  if (param_2 <= uVar2) {
    puVar3 = _S_construct<char*>((undefined1 *)(lVar1 + param_2),uVar4 + param_2 + lVar1);
    *(ulonglong **)this = puVar3;
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5014,param_2,uVar2);
}



// std::string::string(std::initializer_list<char>, std::allocator<char> const&)

void __thiscall std::string::string(string *this,undefined8 *param_1)

{
  undefined1 *_Src;
  ulonglong _Size;
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  _Src = (undefined1 *)*param_1;
  _Size = param_1[1];
  if ((_Src + _Size != (undefined1 *)0x0) && (_Src == (undefined1 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
  _Dst = puVar1 + 3;
  if (_Size == 1) {
    *(undefined1 *)(puVar1 + 3) = *_Src;
  }
  else if (_Size != 0) {
    _Dst = memcpy(_Dst,_Src,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string()

void __thiscall std::string::string(string *this)

{
  undefined1 (*pauVar1) [16];
  
  pauVar1 = operator_new(0x19);
  *(undefined4 *)pauVar1[1] = 0;
  *pauVar1 = (undefined1  [16])0x0;
  pauVar1[1][8] = 0;
  *(undefined1 **)this = pauVar1[1] + 8;
  return;
}



// std::string::string(unsigned long long, char, std::allocator<char> const&)

void __thiscall std::string::string(string *this,ulonglong param_1,char param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  puVar1 = (ulonglong *)_Rep::_S_create(param_1,0);
  _Dst = puVar1 + 3;
  if (param_1 != 0) {
    if (param_1 == 1) {
      *(char *)(puVar1 + 3) = param_2;
    }
    else {
      _Dst = memset(_Dst,(int)param_2,param_1);
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_1;
  *(undefined1 *)((longlong)puVar1 + param_1 + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string<__gnu_cxx::__normal_iterator<char*, std::string >
// >(__gnu_cxx::__normal_iterator<char*, std::string >, __gnu_cxx::__normal_iterator<char*,
// std::string >, std::allocator<char> const&)

void __thiscall std::string::string<>(string *this,undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  
  _Size = param_2 - (longlong)param_1;
  puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
  _Dst = puVar1 + 3;
  if (_Size == 1) {
    *(undefined1 *)(puVar1 + 3) = *param_1;
  }
  else if (_Size != 0) {
    _Dst = memcpy(_Dst,param_1,_Size);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)((longlong)puVar1 + _Size + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string<char const*>(char const*, char const*, std::allocator<char> const&)

void __thiscall std::string::string<>(string *this,undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::string<char*>(char*, char*, std::allocator<char> const&)

void __thiscall std::string::string<char*>(string *this,undefined1 *param_1,longlong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  ulonglong _Size;
  ulonglong *puVar2;
  
  if (param_1 == (undefined1 *)0x0) {
    if (param_2 != 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("basic_string::_S_construct null not valid");
    }
    _Size = 0;
    puVar1 = (ulonglong *)_Rep::_S_create(0,0);
    _Dst = puVar1 + 3;
    puVar2 = _Dst;
  }
  else {
    _Size = param_2 - (longlong)param_1;
    puVar1 = (ulonglong *)_Rep::_S_create(_Size,0);
    _Dst = puVar1 + 3;
    if (_Size == 1) {
      *(undefined1 *)(puVar1 + 3) = *param_1;
      puVar2 = (ulonglong *)((longlong)puVar1 + 0x19);
    }
    else {
      puVar2 = (ulonglong *)((longlong)puVar1 + _Size + 0x18);
      if (_Size != 0) {
        _Dst = memcpy(_Dst,param_1,_Size);
      }
    }
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = _Size;
  *(undefined1 *)puVar2 = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::string::~string()

void __thiscall std::string::~string(string *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  operator_delete((void *)(lVar3 + -0x18));
  return;
}



// std::string::~string()

void __thiscall std::string::~string(string *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  operator_delete((void *)(lVar3 + -0x18));
  return;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(std::string&&)

void __thiscall std::string::operator=(string *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *(longlong *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    *(undefined4 *)(lVar1 + -8) = 0;
  }
  lVar2 = *param_1;
  if (*(int *)(lVar2 + -8) < 0) {
    *(undefined4 *)(lVar2 + -8) = 0;
  }
  *(longlong *)this = lVar2;
  *param_1 = lVar1;
  return;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(char const*)

void __thiscall std::string::operator=(string *this,char *param_1)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  assign(this,param_1,sVar1);
  return;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(std::string const&)

string * __thiscall std::string::operator=(string *this,longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined1 local_19 [9];
  
  plVar4 = (longlong *)*param_1;
  if (*(longlong **)this != plVar4) {
    if ((int)plVar4[-1] < 0) {
      plVar4 = _Rep::_M_clone((_Rep *)(plVar4 + -3),local_19,0);
      lVar3 = *(longlong *)this;
    }
    else {
      if (_CRT_MT == 0) {
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
      }
      else {
        LOCK();
        *(int *)(plVar4 + -1) = (int)plVar4[-1] + 1;
        UNLOCK();
      }
      lVar3 = *(longlong *)this;
    }
    if (_CRT_MT == 0) {
      iVar2 = *(int *)(lVar3 + -8);
      *(int *)(lVar3 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(lVar3 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      operator_delete((void *)(lVar3 + -0x18));
    }
    *(longlong **)this = plVar4;
    return this;
  }
  return this;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<char>)

string * __thiscall std::string::operator=(string *this,undefined8 *param_1)

{
  assign(this,(undefined1 *)*param_1,param_1[1]);
  return this;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(char)

string * __thiscall std::string::operator=(string *this,undefined1 param_1)

{
  _M_mutate(this,0,*(longlong *)(*(longlong *)this + -0x18),1);
  **(undefined1 **)this = param_1;
  return this;
}



// std::string::operator[](unsigned long long)

longlong __thiscall std::string::operator[](string *this,longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  if ((*(int *)(lVar1 + -8) < 0) || (*(longlong *)(lVar1 + -0x18) == 0)) {
    return lVar1 + param_1;
  }
  if (_CRT_MT == 0) {
    if (*(int *)(lVar1 + -8) < 1) goto LAB_14007ebed;
  }
  else if (*(int *)(lVar1 + -8) < 1) {
    lVar1 = *(longlong *)this;
    goto LAB_14007ebed;
  }
  _M_mutate(this,0,0,0);
  lVar1 = *(longlong *)this;
LAB_14007ebed:
  *(undefined4 *)(lVar1 + -8) = 0xffffffff;
  return lVar1 + param_1;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(char const*)

void __thiscall std::string::operator+=(string *this,char *param_1)

{
  size_t sVar1;
  
  sVar1 = strlen(param_1);
  append(this,param_1,sVar1);
  return;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(std::string const&)

string * __thiscall std::string::operator+=(string *this,undefined8 *param_1)

{
  ulonglong uVar1;
  size_t _Size;
  longlong lVar2;
  longlong lVar3;
  undefined1 *_Src;
  
  _Src = (undefined1 *)*param_1;
  _Size = *(size_t *)(_Src + -0x18);
  if (_Size == 0) {
    return this;
  }
  lVar3 = *(longlong *)this;
  lVar2 = *(longlong *)(lVar3 + -0x18);
  uVar1 = lVar2 + _Size;
  if (uVar1 <= *(ulonglong *)(lVar3 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar3 + -8) < 1) goto LAB_14007c780;
    }
    else if (*(int *)(lVar3 + -8) < 1) {
      lVar3 = *(longlong *)this;
      _Src = (undefined1 *)*param_1;
      lVar2 = *(longlong *)(lVar3 + -0x18);
      goto LAB_14007c780;
    }
  }
  reserve(this,uVar1);
  lVar3 = *(longlong *)this;
  _Src = (undefined1 *)*param_1;
  lVar2 = *(longlong *)(lVar3 + -0x18);
LAB_14007c780:
  if (_Size == 1) {
    *(undefined1 *)(lVar3 + lVar2) = *_Src;
  }
  else {
    memcpy((undefined1 *)(lVar3 + lVar2),_Src,_Size);
  }
  lVar3 = *(longlong *)this;
  *(undefined4 *)(lVar3 + -8) = 0;
  *(ulonglong *)(lVar3 + -0x18) = uVar1;
  *(undefined1 *)(lVar3 + uVar1) = 0;
  return this;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<char>)

void __thiscall std::string::operator+=(string *this,undefined8 *param_1)

{
  append(this,(undefined1 *)*param_1,param_1[1]);
  return;
}



// std::string::TEMPNAMEPLACEHOLDERVALUE(char)

string * __thiscall std::string::operator+=(string *this,undefined1 param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
  uVar1 = lVar3 + 1;
  if (uVar1 <= *(ulonglong *)(lVar2 + -0x10)) {
    if (_CRT_MT == 0) {
      if (*(int *)(lVar2 + -8) < 1) goto LAB_14007ecc5;
    }
    else if (*(int *)(lVar2 + -8) < 1) {
      lVar2 = *(longlong *)this;
      lVar3 = *(longlong *)(lVar2 + -0x18);
      goto LAB_14007ecc5;
    }
  }
  reserve(this,uVar1);
  lVar2 = *(longlong *)this;
  lVar3 = *(longlong *)(lVar2 + -0x18);
LAB_14007ecc5:
  *(undefined1 *)(lVar2 + lVar3) = param_1;
  lVar2 = *(longlong *)this;
  *(undefined4 *)(lVar2 + -8) = 0;
  *(ulonglong *)(lVar2 + -0x18) = uVar1;
  *(undefined1 *)(lVar2 + uVar1) = 0;
  return this;
}



// std::__num_base::_S_format_float(std::ios_base const&, char*, char)

void std::__num_base::_S_format_float(longlong param_1,undefined1 *param_2,char param_3)

{
  char *pcVar1;
  uint uVar2;
  byte bVar3;
  char *pcVar4;
  uint uVar5;
  
  uVar2 = *(uint *)(param_1 + 0x18);
  *param_2 = 0x25;
  pcVar4 = param_2 + 1;
  if ((uVar2 & 0x800) != 0) {
    param_2[1] = 0x2b;
    pcVar4 = param_2 + 2;
  }
  if ((uVar2 & 0x400) != 0) {
    *pcVar4 = '#';
    pcVar4 = pcVar4 + 1;
  }
  uVar5 = uVar2 & 0x104;
  if (uVar5 != 0x104) {
    pcVar4[0] = '.';
    pcVar4[1] = '*';
    pcVar1 = pcVar4 + 2;
    if (param_3 == '\0') {
      pcVar4 = pcVar4 + 3;
    }
    else {
      pcVar1 = pcVar4 + 3;
      pcVar4[2] = param_3;
      pcVar4 = pcVar4 + 4;
    }
    if (uVar5 == 4) {
      *pcVar1 = 'f';
      *pcVar4 = '\0';
      return;
    }
    bVar3 = -((uVar2 & 0x4000) == 0) & 0x20;
    if (uVar5 != 0x100) {
      *pcVar1 = bVar3 + 0x47;
      *pcVar4 = '\0';
      return;
    }
    *pcVar1 = bVar3 + 0x45;
    *pcVar4 = '\0';
    return;
  }
  if (param_3 != '\0') {
    *pcVar4 = param_3;
    pcVar4 = pcVar4 + 1;
  }
  *pcVar4 = (-((uVar2 & 0x4000) == 0) & 0x20U) + 0x41;
  pcVar4[1] = '\0';
  return;
}



// std::bad_typeid::~bad_typeid()

void __thiscall std::bad_typeid::~bad_typeid(bad_typeid *this)

{
  *(undefined ***)this = &PTR__bad_typeid_1400dd0c0;
  exception::~exception();
  operator_delete(this);
  return;
}



// std::bad_typeid::~bad_typeid()

void __thiscall std::bad_typeid::~bad_typeid(bad_typeid *this)

{
  *(undefined ***)this = &PTR__bad_typeid_1400dd0c0;
  exception::~exception();
  return;
}



// std::money_base::_S_construct_pattern(char, char, char)

undefined4 std::money_base::_S_construct_pattern(void)

{
  return 0x4000302;
}



// std::moneypunct<char, false>::_M_initialize_moneypunct(int*, char const*)

void std::moneypunct<char,false>::_M_initialize_moneypunct(longlong param_1)

{
  undefined *puVar1;
  longlong lVar2;
  undefined8 *puVar3;
  
  puVar3 = *(undefined8 **)(param_1 + 0x10);
  if (puVar3 == (undefined8 *)0x0) {
    puVar3 = operator_new(0x70);
    *(undefined4 *)(puVar3 + 1) = 0;
    *puVar3 = &PTR____moneypunct_cache_1400dddd0;
    puVar3[2] = 0;
    puVar3[3] = 0;
    *(undefined1 *)(puVar3 + 4) = 0;
    *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[8] = 0;
    puVar3[9] = 0;
    puVar3[10] = 0;
    *(undefined4 *)(puVar3 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar3;
  }
  *(undefined1 *)((longlong)puVar3 + 0x21) = 0x2e;
  *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x22) = 0x2c;
  lVar2 = *(longlong *)(param_1 + 0x10);
  *(undefined **)(lVar2 + 0x10) = &::_rdata;
  *(undefined **)(lVar2 + 0x28) = &::_rdata;
  *(undefined **)(lVar2 + 0x38) = &::_rdata;
  *(undefined **)(lVar2 + 0x48) = &::_rdata;
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  *(undefined4 *)(lVar2 + 0x58) = 0;
  *(undefined4 *)(lVar2 + 0x5c) = 0x4000302;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar1 = money_base::_S_atoms;
  lVar2 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 100 + lVar2) = puVar1[lVar2];
    lVar2 = lVar2 + 1;
  } while (lVar2 != 0xb);
  return;
}



// std::moneypunct<char, false>::moneypunct(std::__moneypunct_cache<char, false>*, unsigned long
// long)

void __thiscall
std::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, false>::moneypunct(unsigned long long)

void __thiscall
std::moneypunct<char,false>::moneypunct(moneypunct<char,false> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, false>::moneypunct(std::__moneypunct_cache<char, false>*, unsigned long
// long)

void __thiscall
std::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, false>::moneypunct(unsigned long long)

void __thiscall
std::moneypunct<char,false>::moneypunct(moneypunct<char,false> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, false>::~moneypunct()

void __thiscall std::moneypunct<char,false>::~moneypunct(moneypunct<char,false> *this)

{
  ~moneypunct(this);
  operator_delete(this);
  return;
}



// std::moneypunct<char, false>::~moneypunct()

void __thiscall std::moneypunct<char,false>::~moneypunct(moneypunct<char,false> *this)

{
  __moneypunct_cache<char,false> *this_00;
  
  this_00 = *(__moneypunct_cache<char,false> **)(this + 0x10);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  if (this_00 != (__moneypunct_cache<char,false> *)0x0) {
    if (*(code **)(*(longlong *)this_00 + 8) != __moneypunct_cache<char,false>::~__moneypunct_cache)
    {
      (**(code **)(*(longlong *)this_00 + 8))();
      locale::facet::~facet();
      return;
    }
    __moneypunct_cache<char,false>::~__moneypunct_cache(this_00);
    operator_delete(this_00);
  }
  locale::facet::~facet();
  return;
}



// std::moneypunct<char, true>::_M_initialize_moneypunct(int*, char const*)

void std::moneypunct<char,true>::_M_initialize_moneypunct(longlong param_1)

{
  undefined *puVar1;
  longlong lVar2;
  undefined8 *puVar3;
  
  puVar3 = *(undefined8 **)(param_1 + 0x10);
  if (puVar3 == (undefined8 *)0x0) {
    puVar3 = operator_new(0x70);
    *(undefined4 *)(puVar3 + 1) = 0;
    *puVar3 = &PTR____moneypunct_cache_1400dddf0;
    puVar3[2] = 0;
    puVar3[3] = 0;
    *(undefined1 *)(puVar3 + 4) = 0;
    *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[8] = 0;
    puVar3[9] = 0;
    puVar3[10] = 0;
    *(undefined4 *)(puVar3 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar3;
  }
  *(undefined1 *)((longlong)puVar3 + 0x21) = 0x2e;
  *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x22) = 0x2c;
  lVar2 = *(longlong *)(param_1 + 0x10);
  *(undefined **)(lVar2 + 0x10) = &::_rdata;
  *(undefined **)(lVar2 + 0x28) = &::_rdata;
  *(undefined **)(lVar2 + 0x38) = &::_rdata;
  *(undefined **)(lVar2 + 0x48) = &::_rdata;
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  *(undefined4 *)(lVar2 + 0x58) = 0;
  *(undefined4 *)(lVar2 + 0x5c) = 0x4000302;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar1 = money_base::_S_atoms;
  lVar2 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 100 + lVar2) = puVar1[lVar2];
    lVar2 = lVar2 + 1;
  } while (lVar2 != 0xb);
  return;
}



// std::moneypunct<char, true>::moneypunct(std::__moneypunct_cache<char, true>*, unsigned long long)

void __thiscall
std::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, true>::moneypunct(unsigned long long)

void __thiscall std::moneypunct<char,true>::moneypunct(moneypunct<char,true> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, true>::moneypunct(std::__moneypunct_cache<char, true>*, unsigned long long)

void __thiscall
std::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, true>::moneypunct(unsigned long long)

void __thiscall std::moneypunct<char,true>::moneypunct(moneypunct<char,true> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<char, true>::~moneypunct()

void __thiscall std::moneypunct<char,true>::~moneypunct(moneypunct<char,true> *this)

{
  ~moneypunct(this);
  operator_delete(this);
  return;
}



// std::moneypunct<char, true>::~moneypunct()

void __thiscall std::moneypunct<char,true>::~moneypunct(moneypunct<char,true> *this)

{
  __moneypunct_cache<char,true> *this_00;
  
  this_00 = *(__moneypunct_cache<char,true> **)(this + 0x10);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  if (this_00 != (__moneypunct_cache<char,true> *)0x0) {
    if (*(code **)(*(longlong *)this_00 + 8) != __moneypunct_cache<char,true>::~__moneypunct_cache)
    {
      (**(code **)(*(longlong *)this_00 + 8))();
      locale::facet::~facet();
      return;
    }
    __moneypunct_cache<char,true>::~__moneypunct_cache(this_00);
    operator_delete(this_00);
  }
  locale::facet::~facet();
  return;
}



// std::moneypunct<wchar_t, false>::_M_initialize_moneypunct(int*, char const*)

void std::moneypunct<>::_M_initialize_moneypunct(longlong param_1)

{
  longlong lVar1;
  undefined *puVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(param_1 + 0x10);
  if (puVar4 == (undefined8 *)0x0) {
    puVar4 = operator_new(0x80);
    *(undefined4 *)(puVar4 + 1) = 0;
    *puVar4 = &PTR____moneypunct_cache_1400dde10;
    puVar4[2] = 0;
    puVar4[3] = 0;
    *(undefined1 *)(puVar4 + 4) = 0;
    *(undefined4 *)((longlong)puVar4 + 0x22) = 0;
    puVar4[5] = 0;
    puVar4[6] = 0;
    puVar4[7] = 0;
    puVar4[8] = 0;
    puVar4[9] = 0;
    puVar4[10] = 0;
    *(undefined4 *)(puVar4 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar4 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar4 + 0x7a) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  *(undefined4 *)((longlong)puVar4 + 0x22) = 0x2c002e;
  puVar4[5] = &DAT_1400c4cf2;
  puVar4[7] = &DAT_1400c4cf2;
  puVar4[9] = &DAT_1400c4cf2;
  puVar4[2] = &::_rdata;
  puVar4[3] = 0;
  puVar4[6] = 0;
  *(undefined4 *)((longlong)puVar4 + 0x5c) = 0x4000302;
  puVar4[8] = 0;
  puVar4[10] = 0;
  *(undefined4 *)(puVar4 + 0xb) = 0;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar2 = money_base::_S_atoms;
  lVar1 = *(longlong *)(param_1 + 0x10);
  lVar3 = 0;
  do {
    *(short *)(lVar1 + 100 + lVar3 * 2) = (short)(char)puVar2[lVar3];
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0xb);
  return;
}



// std::moneypunct<wchar_t, false>::moneypunct(std::__moneypunct_cache<wchar_t, false>*, unsigned
// long long)

void __thiscall
std::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, false>::moneypunct(unsigned long long)

void __thiscall std::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, false>::moneypunct(std::__moneypunct_cache<wchar_t, false>*, unsigned
// long long)

void __thiscall
std::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, false>::moneypunct(unsigned long long)

void __thiscall std::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, false>::~moneypunct()

void __thiscall std::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  ~moneypunct(this);
  operator_delete(this);
  return;
}



// std::moneypunct<wchar_t, false>::~moneypunct()

void __thiscall std::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  __moneypunct_cache<> *this_00;
  
  this_00 = *(__moneypunct_cache<> **)(this + 0x10);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  if (this_00 != (__moneypunct_cache<> *)0x0) {
    if (*(code **)(*(longlong *)this_00 + 8) != __moneypunct_cache<>::~__moneypunct_cache) {
      (**(code **)(*(longlong *)this_00 + 8))();
      locale::facet::~facet();
      return;
    }
    __moneypunct_cache<>::~__moneypunct_cache(this_00);
    operator_delete(this_00);
  }
  locale::facet::~facet();
  return;
}



// std::moneypunct<wchar_t, true>::_M_initialize_moneypunct(int*, char const*)

void std::moneypunct<>::_M_initialize_moneypunct(longlong param_1)

{
  longlong lVar1;
  undefined *puVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(param_1 + 0x10);
  if (puVar4 == (undefined8 *)0x0) {
    puVar4 = operator_new(0x80);
    *(undefined4 *)(puVar4 + 1) = 0;
    *puVar4 = &PTR____moneypunct_cache_1400dde30;
    puVar4[2] = 0;
    puVar4[3] = 0;
    *(undefined1 *)(puVar4 + 4) = 0;
    *(undefined4 *)((longlong)puVar4 + 0x22) = 0;
    puVar4[5] = 0;
    puVar4[6] = 0;
    puVar4[7] = 0;
    puVar4[8] = 0;
    puVar4[9] = 0;
    puVar4[10] = 0;
    *(undefined4 *)(puVar4 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar4 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar4 + 0x7a) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  *(undefined4 *)((longlong)puVar4 + 0x22) = 0x2c002e;
  puVar4[5] = &DAT_1400c4cf2;
  puVar4[7] = &DAT_1400c4cf2;
  puVar4[9] = &DAT_1400c4cf2;
  puVar4[2] = &::_rdata;
  puVar4[3] = 0;
  puVar4[6] = 0;
  *(undefined4 *)((longlong)puVar4 + 0x5c) = 0x4000302;
  puVar4[8] = 0;
  puVar4[10] = 0;
  *(undefined4 *)(puVar4 + 0xb) = 0;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar2 = money_base::_S_atoms;
  lVar1 = *(longlong *)(param_1 + 0x10);
  lVar3 = 0;
  do {
    *(short *)(lVar1 + 100 + lVar3 * 2) = (short)(char)puVar2[lVar3];
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0xb);
  return;
}



// std::moneypunct<wchar_t, true>::moneypunct(std::__moneypunct_cache<wchar_t, true>*, unsigned long
// long)

void __thiscall
std::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, true>::moneypunct(unsigned long long)

void __thiscall std::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, true>::moneypunct(std::__moneypunct_cache<wchar_t, true>*, unsigned long
// long)

void __thiscall
std::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, true>::moneypunct(unsigned long long)

void __thiscall std::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::moneypunct<wchar_t, true>::~moneypunct()

void __thiscall std::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  ~moneypunct(this);
  operator_delete(this);
  return;
}



// std::moneypunct<wchar_t, true>::~moneypunct()

void __thiscall std::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  __moneypunct_cache<> *this_00;
  
  this_00 = *(__moneypunct_cache<> **)(this + 0x10);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  if (this_00 != (__moneypunct_cache<> *)0x0) {
    if (*(code **)(*(longlong *)this_00 + 8) != __moneypunct_cache<>::~__moneypunct_cache) {
      (**(code **)(*(longlong *)this_00 + 8))();
      locale::facet::~facet();
      return;
    }
    __moneypunct_cache<>::~__moneypunct_cache(this_00);
    operator_delete(this_00);
  }
  locale::facet::~facet();
  return;
}



// std::__timepunct<char>::_M_initialize_timepunct(int*)

void std::__timepunct<char>::_M_initialize_timepunct(longlong param_1)

{
  undefined8 *puVar1;
  
  puVar1 = *(undefined8 **)(param_1 + 0x10);
  if (puVar1 == (undefined8 *)0x0) {
    puVar1 = operator_new(400);
    *(undefined4 *)(puVar1 + 1) = 0;
    *(undefined1 *)(puVar1 + 0x31) = 0;
    *puVar1 = &PTR____timepunct_cache_1400ddbd0;
    puVar1[0x30] = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar1;
    *(undefined1 (*) [16])(puVar1 + 2) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 4) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 6) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 8) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 10) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0xc) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0xe) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x10) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x12) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x14) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x16) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x18) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x1a) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x1c) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x1e) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x20) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x22) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x24) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x26) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x28) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x2a) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x2c) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x2e) = (undefined1  [16])0x0;
  }
  puVar1[0x28] = &DAT_1400c844c;
  puVar1[0x29] = &DAT_1400c8401;
  puVar1[0x1c] = "April";
  puVar1[0x1d] = &DAT_1400c8401;
  puVar1[2] = "%m/%d/%y";
  puVar1[3] = "%m/%d/%y";
  puVar1[4] = "%H:%M:%S";
  puVar1[5] = "%H:%M:%S";
  puVar1[6] = &DAT_1400c8382;
  puVar1[7] = &DAT_1400c8382;
  puVar1[8] = &DAT_1400c8383;
  puVar1[9] = &DAT_1400c8386;
  puVar1[10] = "%I:%M:%S %p";
  puVar1[0xb] = "Sunday";
  puVar1[0xc] = "Monday";
  puVar1[0xd] = "Tuesday";
  puVar1[0xe] = "Wednesday";
  puVar1[0xf] = "Thursday";
  puVar1[0x10] = "Friday";
  puVar1[0x11] = "Saturday";
  puVar1[0x12] = &DAT_1400c83ce;
  puVar1[0x13] = &DAT_1400c83d2;
  puVar1[0x14] = &DAT_1400c83d6;
  puVar1[0x15] = &DAT_1400c83da;
  puVar1[0x16] = &DAT_1400c83de;
  puVar1[0x17] = &DAT_1400c83e2;
  puVar1[0x18] = &DAT_1400c83e6;
  puVar1[0x19] = "January";
  puVar1[0x1a] = "February";
  puVar1[0x1b] = "March";
  puVar1[0x1e] = &DAT_1400c840b;
  puVar1[0x1f] = &DAT_1400c8410;
  puVar1[0x20] = "August";
  puVar1[0x21] = "September";
  puVar1[0x22] = "October";
  puVar1[0x23] = "November";
  puVar1[0x24] = "December";
  puVar1[0x25] = &DAT_1400c8440;
  puVar1[0x30] = &DAT_1400c8468;
  puVar1[0x26] = &DAT_1400c8444;
  puVar1[0x27] = &DAT_1400c8448;
  puVar1[0x2a] = &DAT_1400c8450;
  puVar1[0x2b] = &DAT_1400c8454;
  puVar1[0x2c] = &DAT_1400c8458;
  puVar1[0x2d] = &DAT_1400c845c;
  puVar1[0x2e] = &DAT_1400c8460;
  puVar1[0x2f] = &DAT_1400c8464;
  return;
}



// std::__timepunct<char>::__timepunct(std::__timepunct_cache<char>*, unsigned long long)

void __thiscall
std::__timepunct<char>::__timepunct(__timepunct<char> *this,undefined8 param_1,longlong param_2)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<char>::__timepunct(int*, char const*, unsigned long long)

void __thiscall
std::__timepunct<char>::__timepunct
          (__timepunct<char> *this,undefined8 param_2_00,char *param_2,longlong param_3)

{
  int iVar1;
  char *_Str2;
  size_t sVar2;
  void *_Dst;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  _Str2 = locale::facet::_S_get_c_name();
  iVar1 = strcmp(param_2,_Str2);
  if (iVar1 != 0) {
    sVar2 = strlen(param_2);
    _Dst = operator_new__(sVar2 + 1);
    _Str2 = memcpy(_Dst,param_2,sVar2 + 1);
  }
  *(char **)(this + 0x20) = _Str2;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<char>::__timepunct(unsigned long long)

void __thiscall std::__timepunct<char>::__timepunct(__timepunct<char> *this,longlong param_1)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<char>::__timepunct(std::__timepunct_cache<char>*, unsigned long long)

void __thiscall
std::__timepunct<char>::__timepunct(__timepunct<char> *this,undefined8 param_1,longlong param_2)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<char>::__timepunct(int*, char const*, unsigned long long)

void __thiscall
std::__timepunct<char>::__timepunct
          (__timepunct<char> *this,undefined8 param_2_00,char *param_2,longlong param_3)

{
  int iVar1;
  char *_Str2;
  size_t sVar2;
  void *_Dst;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  _Str2 = locale::facet::_S_get_c_name();
  iVar1 = strcmp(param_2,_Str2);
  if (iVar1 != 0) {
    sVar2 = strlen(param_2);
    _Dst = operator_new__(sVar2 + 1);
    _Str2 = memcpy(_Dst,param_2,sVar2 + 1);
  }
  *(char **)(this + 0x20) = _Str2;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<char>::__timepunct(unsigned long long)

void __thiscall std::__timepunct<char>::__timepunct(__timepunct<char> *this,longlong param_1)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<char>::~__timepunct()

void __thiscall std::__timepunct<char>::~__timepunct(__timepunct<char> *this)

{
  ~__timepunct(this);
  operator_delete(this);
  return;
}



// std::__timepunct<char>::~__timepunct()

void __thiscall std::__timepunct<char>::~__timepunct(__timepunct<char> *this)

{
  undefined1 *puVar1;
  longlong *plVar2;
  undefined1 *puVar3;
  
  puVar1 = *(undefined1 **)(this + 0x20);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  puVar3 = locale::facet::_S_get_c_name();
  if ((puVar1 != puVar3) && (puVar1 != (undefined1 *)0x0)) {
    operator_delete__(puVar1);
  }
  plVar2 = *(longlong **)(this + 0x10);
  if (plVar2 != (longlong *)0x0) {
    if (*(code **)(*plVar2 + 8) == __timepunct_cache<char>::~__timepunct_cache) {
      *plVar2 = (longlong)&PTR____timepunct_cache_1400ddbd0;
      locale::facet::~facet();
      operator_delete(plVar2);
    }
    else {
      (**(code **)(*plVar2 + 8))(plVar2);
    }
  }
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x18));
  locale::facet::~facet();
  return;
}



// std::__timepunct<char>::~__timepunct()

void __thiscall std::__timepunct<char>::~__timepunct(__timepunct<char> *this)

{
  undefined1 *puVar1;
  longlong *plVar2;
  undefined1 *puVar3;
  
  puVar1 = *(undefined1 **)(this + 0x20);
  *(undefined ***)this = &PTR____timepunct_1400dd2b0;
  puVar3 = locale::facet::_S_get_c_name();
  if ((puVar1 != puVar3) && (puVar1 != (undefined1 *)0x0)) {
    operator_delete__(puVar1);
  }
  plVar2 = *(longlong **)(this + 0x10);
  if (plVar2 != (longlong *)0x0) {
    if (*(code **)(*plVar2 + 8) == __timepunct_cache<char>::~__timepunct_cache) {
      *plVar2 = (longlong)&PTR____timepunct_cache_1400ddbd0;
      locale::facet::~facet();
      operator_delete(plVar2);
    }
    else {
      (**(code **)(*plVar2 + 8))(plVar2);
    }
  }
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x18));
  locale::facet::~facet();
  return;
}



// std::__timepunct<wchar_t>::_M_initialize_timepunct(int*)

void std::__timepunct<wchar_t>::_M_initialize_timepunct(longlong param_1)

{
  undefined8 *puVar1;
  
  puVar1 = *(undefined8 **)(param_1 + 0x10);
  if (puVar1 == (undefined8 *)0x0) {
    puVar1 = operator_new(400);
    *(undefined4 *)(puVar1 + 1) = 0;
    *(undefined1 *)(puVar1 + 0x31) = 0;
    *puVar1 = &PTR____timepunct_cache_1400ddbf0;
    puVar1[0x30] = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar1;
    *(undefined1 (*) [16])(puVar1 + 2) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 4) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 6) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 8) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 10) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0xc) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0xe) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x10) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x12) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x14) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x16) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x18) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x1a) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x1c) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x1e) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x20) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x22) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x24) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x26) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x28) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x2a) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x2c) = (undefined1  [16])0x0;
    *(undefined1 (*) [16])(puVar1 + 0x2e) = (undefined1  [16])0x0;
  }
  puVar1[0x28] = &DAT_1400c8624;
  puVar1[0x29] = &DAT_1400c858e;
  puVar1[0x1c] = L"April";
  puVar1[0x1d] = &DAT_1400c858e;
  puVar1[2] = L"%m/%d/%y";
  puVar1[3] = L"%m/%d/%y";
  puVar1[4] = L"%H:%M:%S";
  puVar1[5] = L"%H:%M:%S";
  puVar1[6] = &DAT_1400c8490;
  puVar1[7] = &DAT_1400c8490;
  puVar1[8] = &DAT_1400c8492;
  puVar1[9] = &DAT_1400c8498;
  puVar1[10] = L"%I:%M:%S %p";
  puVar1[0xb] = L"Sunday";
  puVar1[0xc] = L"Monday";
  puVar1[0xd] = L"Tuesday";
  puVar1[0xe] = L"Wednesday";
  puVar1[0xf] = L"Thursday";
  puVar1[0x10] = L"Friday";
  puVar1[0x11] = L"Saturday";
  puVar1[0x12] = &DAT_1400c8528;
  puVar1[0x13] = &DAT_1400c8530;
  puVar1[0x14] = &DAT_1400c8538;
  puVar1[0x15] = &DAT_1400c8540;
  puVar1[0x16] = &DAT_1400c8548;
  puVar1[0x17] = &DAT_1400c8550;
  puVar1[0x18] = &DAT_1400c8558;
  puVar1[0x19] = L"January";
  puVar1[0x1a] = L"February";
  puVar1[0x1b] = L"March";
  puVar1[0x1e] = L"June";
  puVar1[0x1f] = &DAT_1400c85ac;
  puVar1[0x20] = L"August";
  puVar1[0x21] = L"September";
  puVar1[0x22] = L"October";
  puVar1[0x23] = L"November";
  puVar1[0x24] = L"December";
  puVar1[0x25] = &DAT_1400c860c;
  puVar1[0x30] = &DAT_1400c865c;
  puVar1[0x26] = &DAT_1400c8614;
  puVar1[0x27] = &DAT_1400c861c;
  puVar1[0x2a] = &DAT_1400c862c;
  puVar1[0x2b] = &DAT_1400c8634;
  puVar1[0x2c] = &DAT_1400c863c;
  puVar1[0x2d] = &DAT_1400c8644;
  puVar1[0x2e] = &DAT_1400c864c;
  puVar1[0x2f] = &DAT_1400c8654;
  return;
}



// std::__timepunct<wchar_t>::__timepunct(std::__timepunct_cache<wchar_t>*, unsigned long long)

void __thiscall
std::__timepunct<wchar_t>::__timepunct
          (__timepunct<wchar_t> *this,undefined8 param_1,longlong param_2)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<wchar_t>::__timepunct(int*, char const*, unsigned long long)

void __thiscall
std::__timepunct<wchar_t>::__timepunct
          (__timepunct<wchar_t> *this,undefined8 param_2_00,char *param_2,longlong param_3)

{
  int iVar1;
  char *_Str2;
  size_t sVar2;
  void *_Dst;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  _Str2 = locale::facet::_S_get_c_name();
  iVar1 = strcmp(param_2,_Str2);
  if (iVar1 != 0) {
    sVar2 = strlen(param_2);
    _Dst = operator_new__(sVar2 + 1);
    _Str2 = memcpy(_Dst,param_2,sVar2 + 1);
  }
  *(char **)(this + 0x20) = _Str2;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<wchar_t>::__timepunct(unsigned long long)

void __thiscall std::__timepunct<wchar_t>::__timepunct(__timepunct<wchar_t> *this,longlong param_1)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<wchar_t>::__timepunct(std::__timepunct_cache<wchar_t>*, unsigned long long)

void __thiscall
std::__timepunct<wchar_t>::__timepunct
          (__timepunct<wchar_t> *this,undefined8 param_1,longlong param_2)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<wchar_t>::__timepunct(int*, char const*, unsigned long long)

void __thiscall
std::__timepunct<wchar_t>::__timepunct
          (__timepunct<wchar_t> *this,undefined8 param_2_00,char *param_2,longlong param_3)

{
  int iVar1;
  char *_Str2;
  size_t sVar2;
  void *_Dst;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  _Str2 = locale::facet::_S_get_c_name();
  iVar1 = strcmp(param_2,_Str2);
  if (iVar1 != 0) {
    sVar2 = strlen(param_2);
    _Dst = operator_new__(sVar2 + 1);
    _Str2 = memcpy(_Dst,param_2,sVar2 + 1);
  }
  *(char **)(this + 0x20) = _Str2;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<wchar_t>::__timepunct(unsigned long long)

void __thiscall std::__timepunct<wchar_t>::__timepunct(__timepunct<wchar_t> *this,longlong param_1)

{
  undefined1 *puVar1;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  puVar1 = locale::facet::_S_get_c_name();
  *(undefined1 **)(this + 0x20) = puVar1;
  _M_initialize_timepunct((longlong)this);
  return;
}



// std::__timepunct<wchar_t>::~__timepunct()

void __thiscall std::__timepunct<wchar_t>::~__timepunct(__timepunct<wchar_t> *this)

{
  ~__timepunct(this);
  operator_delete(this);
  return;
}



// std::__timepunct<wchar_t>::~__timepunct()

void __thiscall std::__timepunct<wchar_t>::~__timepunct(__timepunct<wchar_t> *this)

{
  undefined1 *puVar1;
  longlong *plVar2;
  undefined1 *puVar3;
  
  puVar1 = *(undefined1 **)(this + 0x20);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  puVar3 = locale::facet::_S_get_c_name();
  if ((puVar1 != puVar3) && (puVar1 != (undefined1 *)0x0)) {
    operator_delete__(puVar1);
  }
  plVar2 = *(longlong **)(this + 0x10);
  if (plVar2 != (longlong *)0x0) {
    if (*(code **)(*plVar2 + 8) == __timepunct_cache<wchar_t>::~__timepunct_cache) {
      *plVar2 = (longlong)&PTR____timepunct_cache_1400ddbf0;
      locale::facet::~facet();
      operator_delete(plVar2);
    }
    else {
      (**(code **)(*plVar2 + 8))(plVar2);
    }
  }
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x18));
  locale::facet::~facet();
  return;
}



// std::__timepunct<wchar_t>::~__timepunct()

void __thiscall std::__timepunct<wchar_t>::~__timepunct(__timepunct<wchar_t> *this)

{
  undefined1 *puVar1;
  longlong *plVar2;
  undefined1 *puVar3;
  
  puVar1 = *(undefined1 **)(this + 0x20);
  *(undefined ***)this = &PTR____timepunct_1400dd2d0;
  puVar3 = locale::facet::_S_get_c_name();
  if ((puVar1 != puVar3) && (puVar1 != (undefined1 *)0x0)) {
    operator_delete__(puVar1);
  }
  plVar2 = *(longlong **)(this + 0x10);
  if (plVar2 != (longlong *)0x0) {
    if (*(code **)(*plVar2 + 8) == __timepunct_cache<wchar_t>::~__timepunct_cache) {
      *plVar2 = (longlong)&PTR____timepunct_cache_1400ddbf0;
      locale::facet::~facet();
      operator_delete(plVar2);
    }
    else {
      (**(code **)(*plVar2 + 8))(plVar2);
    }
  }
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x18));
  locale::facet::~facet();
  return;
}



// std::logic_error::logic_error(std::logic_error&&)

void __thiscall std::logic_error::logic_error(logic_error *this,longlong param_1)

{
  longlong lVar1;
  int iVar2;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar1 = *(longlong *)(param_1 + 8);
  *(longlong *)(this + 8) = lVar1;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_140080e63:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)(this + 8);
      goto LAB_140080e63;
    }
    lVar1 = *(longlong *)(this + 8);
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::logic_error::logic_error(char const*)

void __thiscall std::logic_error::logic_error(logic_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  return;
}



// std::logic_error::logic_error(std::__cxx11::string const&)

void __thiscall std::logic_error::logic_error(logic_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  return;
}



// std::logic_error::logic_error(std::logic_error const&)

void __thiscall std::logic_error::logic_error(logic_error *this,longlong param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar1 = *(longlong *)(param_1 + 8);
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)(this + 8) = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)(this + 8) = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)(this + 8) = lVar1;
  return;
}



// std::logic_error::logic_error(std::string const&)

void __thiscall std::logic_error::logic_error(logic_error *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),local_19,0);
    *(longlong **)(this + 8) = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)(this + 8) = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)(this + 8) = lVar1;
  return;
}



// std::logic_error::~logic_error()

void __thiscall std::logic_error::~logic_error(logic_error *this)

{
  ~logic_error(this);
  operator_delete(this);
  return;
}



// std::logic_error::~logic_error()

void __thiscall std::logic_error::~logic_error(logic_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::logic_error::TEMPNAMEPLACEHOLDERVALUE(std::logic_error&&)

logic_error * __thiscall std::logic_error::operator=(logic_error *this,longlong param_1)

{
  std::string::swap((string *)(this + 8),(longlong *)(param_1 + 8));
  return this;
}



// std::logic_error::TEMPNAMEPLACEHOLDERVALUE(std::logic_error const&)

logic_error * __thiscall std::logic_error::operator=(logic_error *this,longlong param_1)

{
  std::string::assign((string *)(this + 8),(longlong *)(param_1 + 8));
  return this;
}



// std::range_error::range_error(char const*)

void __thiscall std::range_error::range_error(range_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__range_error_1400dd320;
  return;
}



// std::range_error::range_error(std::__cxx11::string const&)

void __thiscall std::range_error::range_error(range_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__range_error_1400dd320;
  return;
}



// std::range_error::range_error(std::string const&)

void __thiscall std::range_error::range_error(range_error *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__range_error_1400dd320;
  return;
}



// std::range_error::~range_error()

void __thiscall std::range_error::~range_error(range_error *this)

{
  *(undefined ***)this = &PTR__range_error_1400dd320;
  runtime_error::~runtime_error((runtime_error *)this);
  operator_delete(this);
  return;
}



// std::range_error::~range_error()

void __thiscall std::range_error::~range_error(range_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



short * _text__ZNSt12_GLOBAL__N_110utf16_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                  (short *param_1,longlong param_2,ulonglong param_3,uint param_4,byte param_5)

{
  uint uVar1;
  short **ppsVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  short *local_38;
  longlong local_30;
  
  local_38 = param_1;
  if (((((param_5 & 4) != 0) && (2 < (ulonglong)(param_2 - (longlong)param_1))) &&
      (*param_1 == -0x4411)) && ((char)param_1[1] == -0x41)) {
    local_38 = (short *)((longlong)param_1 + 3);
  }
  uVar4 = 0;
  uVar3 = 1;
  ppsVar2 = &local_38;
  local_30 = param_2;
  if (1 < param_3) {
    do {
      uVar1 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                        (ppsVar2,param_4);
      if (param_4 < uVar1) {
        return local_38;
      }
      if (uVar1 < 0x10000) {
        uVar3 = uVar4;
      }
      uVar4 = uVar3 + 1;
      uVar3 = uVar3 + 2;
    } while (uVar3 < param_3);
  }
  if (uVar3 != param_3) {
    return local_38;
  }
  uVar1 = 0xffff;
  if (param_4 < 0x10000) {
    uVar1 = param_4;
  }
  _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm(&local_38,uVar1);
  return local_38;
}



int _text__ZNSt12_GLOBAL__N_112__x86_rdrandEPv(void)

{
  int iVar1;
  int iVar2;
  int iVar3;
  bool bVar4;
  
  iVar3 = 100;
  while( true ) {
    iVar1 = rdrand();
    bVar4 = (bool)rdrandIsValid();
    iVar2 = iVar1;
    if (bVar4) {
      iVar2 = 1;
    }
    if (iVar2 != 0) break;
    iVar3 = iVar3 + -1;
    if (iVar3 == 0) {
                    // WARNING: Subroutine does not return
      std::__throw_runtime_error("random_device: rdrand failed");
    }
  }
  return iVar1;
}



ulonglong _text__ZNSt12_GLOBAL__N_112__x86_rdseedEPv(undefined *param_1)

{
  ulonglong uVar1;
  int iVar2;
  bool bVar3;
  uint local_c;
  
  local_c = rdseed();
  bVar3 = (bool)rdseedIsValid();
  if (bVar3) {
LAB_140081430:
    uVar1 = (ulonglong)local_c;
  }
  else {
    iVar2 = 99;
    do {
      local_c = rdseed();
      bVar3 = (bool)rdseedIsValid();
      if (bVar3) goto LAB_140081430;
      iVar2 = iVar2 + -1;
    } while (iVar2 != 0);
    if (param_1 == (undefined *)0x0) {
                    // WARNING: Subroutine does not return
      std::__throw_runtime_error("random_device: rdseed failed");
    }
    uVar1 = (*(code *)param_1)(0);
  }
  return uVar1;
}



void * _text__ZNSt12_GLOBAL__N_114__set_C_localeEv(void)

{
  char *_Str;
  size_t sVar1;
  void *_Dst;
  
  _Str = setlocale(0,(char *)0x0);
  sVar1 = strlen(_Str);
  _Dst = operator_new__(sVar1 + 1);
  if (_Dst != (void *)0x0) {
    memcpy(_Dst,_Str,sVar1 + 1);
    setlocale(0,"C");
  }
  return _Dst;
}



uint _text__ZNSt12_GLOBAL__N_114__winxp_rand_sEPv(void)

{
  errno_t eVar1;
  uint local_c [3];
  
  eVar1 = (*__imp_rand_s)(local_c);
  if (eVar1 == 0) {
    return local_c[0];
  }
                    // WARNING: Subroutine does not return
  std::__throw_runtime_error("random_device: rand_s failed");
}



void _text__ZNSt12_GLOBAL__N_114read_utf16_bomILb0EEEvRNS_5rangeIKDsXT_EEERSt12codecvt_mode
               (undefined8 *param_1,uint *param_2)

{
  uint uVar1;
  short *psVar2;
  
  uVar1 = *param_2;
  if (((uVar1 & 4) != 0) &&
     (psVar2 = (short *)*param_1, 1 < (ulonglong)(param_1[1] - (longlong)psVar2))) {
    if (*psVar2 == -2) {
      *param_1 = psVar2 + 1;
      *param_2 = uVar1 & 0xfffffffe;
      return;
    }
    if (*psVar2 == -0x101) {
      *param_1 = psVar2 + 1;
      *param_2 = uVar1 | 1;
      return;
    }
  }
  return;
}



uint _text__ZNSt12_GLOBAL__N_115day_of_the_weekEiii(int param_1,int param_2,int param_3)

{
  int iVar1;
  int iVar2;
  
  iVar2 = (param_1 + 0x76c) - (uint)(param_2 < 2);
  iVar1 = iVar2 + 3;
  if (-1 < iVar2) {
    iVar1 = iVar2;
  }
  return ((int)(((((iVar1 >> 2) + (param_1 + -0x46) * 0x16d) - iVar2 / 100) -
                ((iVar1 >> 2) % 0x19 >> 0x1f)) + iVar2 / 400 +
                (uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)[param_2] + -0x1da + param_3)
          % 7 + 7U) % 7;
}



int _text__ZNSt12_GLOBAL__N_119__x86_rdseed_rdrandEPv(void)

{
  int iVar1;
  int iVar2;
  bool bVar3;
  
  iVar1 = rdseed();
  bVar3 = (bool)rdseedIsValid();
  if (!bVar3) {
    iVar1 = 99;
    do {
      iVar2 = rdseed();
      bVar3 = (bool)rdseedIsValid();
      if (bVar3) {
        return iVar2;
      }
      iVar1 = iVar1 + -1;
    } while (iVar1 != 0);
    iVar1 = _text__ZNSt12_GLOBAL__N_112__x86_rdrandEPv();
  }
  return iVar1;
}



uint _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIDuEEDiRNS_5rangeIKT_Lb1EEEm
               (undefined8 *param_1,uint param_2)

{
  byte bVar1;
  byte *pbVar2;
  longlong lVar3;
  uint uVar4;
  
  pbVar2 = (byte *)*param_1;
  lVar3 = (longlong)param_1[1] - (longlong)pbVar2;
  if ((byte *)param_1[1] == pbVar2) {
    return 0xfffffffe;
  }
  bVar1 = *pbVar2;
  uVar4 = (uint)bVar1;
  if (bVar1 < 0x80) {
    *param_1 = pbVar2 + 1;
    return uVar4;
  }
  if (0xc1 < bVar1) {
    if (uVar4 < 0xe0) {
      if (lVar3 == 1) {
        return 0xfffffffe;
      }
      if ((pbVar2[1] & 0xc0) == 0x80) {
        uVar4 = (pbVar2[1] - 0x3080) + uVar4 * 0x40;
        if (uVar4 <= param_2) {
          *param_1 = pbVar2 + 2;
          return uVar4;
        }
        return uVar4;
      }
    }
    else if (uVar4 < 0xf0) {
      if (lVar3 == 1) {
        return 0xfffffffe;
      }
      bVar1 = pbVar2[1];
      if (((bVar1 & 0xc0) == 0x80) && ((uVar4 != 0xe0 || (0x9f < bVar1)))) {
        if (lVar3 == 2) {
          return 0xfffffffe;
        }
        if ((pbVar2[2] & 0xc0) == 0x80) {
          uVar4 = (pbVar2[2] - 0xe2080) + uVar4 * 0x1000 + (uint)bVar1 * 0x40;
          if (uVar4 <= param_2) {
            *param_1 = pbVar2 + 3;
            return uVar4;
          }
          return uVar4;
        }
      }
    }
    else if ((uVar4 < 0xf5) && (0xffff < param_2)) {
      if (lVar3 == 1) {
        return 0xfffffffe;
      }
      bVar1 = pbVar2[1];
      if ((((bVar1 & 0xc0) == 0x80) && ((uVar4 != 0xf0 || (0x8f < bVar1)))) &&
         ((uVar4 != 0xf4 || (bVar1 < 0x90)))) {
        if (lVar3 == 2) {
          return 0xfffffffe;
        }
        if ((pbVar2[2] & 0xc0) == 0x80) {
          if (lVar3 == 3) {
            return 0xfffffffe;
          }
          if ((pbVar2[3] & 0xc0) == 0x80) {
            uVar4 = pbVar2[3] + 0xfc37df80 + uVar4 * 0x40000 + (uint)bVar1 * 0x1000 +
                    (uint)pbVar2[2] * 0x40;
            if (uVar4 <= param_2) {
              *param_1 = pbVar2 + 4;
              return uVar4;
            }
            return uVar4;
          }
        }
      }
    }
  }
  return 0xffffffff;
}



uint _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
               (undefined8 *param_1,uint param_2)

{
  byte bVar1;
  byte *pbVar2;
  longlong lVar3;
  uint uVar4;
  
  pbVar2 = (byte *)*param_1;
  lVar3 = (longlong)param_1[1] - (longlong)pbVar2;
  if ((byte *)param_1[1] == pbVar2) {
    return 0xfffffffe;
  }
  bVar1 = *pbVar2;
  uVar4 = (uint)bVar1;
  if (bVar1 < 0x80) {
    *param_1 = pbVar2 + 1;
    return uVar4;
  }
  if (0xc1 < bVar1) {
    if (uVar4 < 0xe0) {
      if (lVar3 == 1) {
        return 0xfffffffe;
      }
      if ((pbVar2[1] & 0xc0) == 0x80) {
        uVar4 = (pbVar2[1] - 0x3080) + uVar4 * 0x40;
        if (uVar4 <= param_2) {
          *param_1 = pbVar2 + 2;
          return uVar4;
        }
        return uVar4;
      }
    }
    else if (uVar4 < 0xf0) {
      if (lVar3 == 1) {
        return 0xfffffffe;
      }
      bVar1 = pbVar2[1];
      if (((bVar1 & 0xc0) == 0x80) && ((uVar4 != 0xe0 || (0x9f < bVar1)))) {
        if (lVar3 == 2) {
          return 0xfffffffe;
        }
        if ((pbVar2[2] & 0xc0) == 0x80) {
          uVar4 = (pbVar2[2] - 0xe2080) + uVar4 * 0x1000 + (uint)bVar1 * 0x40;
          if (uVar4 <= param_2) {
            *param_1 = pbVar2 + 3;
            return uVar4;
          }
          return uVar4;
        }
      }
    }
    else if ((uVar4 < 0xf5) && (0xffff < param_2)) {
      if (lVar3 == 1) {
        return 0xfffffffe;
      }
      bVar1 = pbVar2[1];
      if ((((bVar1 & 0xc0) == 0x80) && ((uVar4 != 0xf0 || (0x8f < bVar1)))) &&
         ((uVar4 != 0xf4 || (bVar1 < 0x90)))) {
        if (lVar3 == 2) {
          return 0xfffffffe;
        }
        if ((pbVar2[2] & 0xc0) == 0x80) {
          if (lVar3 == 3) {
            return 0xfffffffe;
          }
          if ((pbVar2[3] & 0xc0) == 0x80) {
            uVar4 = pbVar2[3] + 0xfc37df80 + uVar4 * 0x40000 + (uint)bVar1 * 0x1000 +
                    (uint)pbVar2[2] * 0x40;
            if (uVar4 <= param_2) {
              *param_1 = pbVar2 + 4;
              return uVar4;
            }
            return uVar4;
          }
        }
      }
    }
  }
  return 0xffffffff;
}



undefined8
_text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIDuEEbRNS_5rangeIT_Lb1EEEDi
          (longlong *param_1,uint param_2)

{
  byte *pbVar1;
  char *pcVar2;
  byte bVar3;
  
  bVar3 = (byte)param_2;
  if (param_2 < 0x80) {
    pbVar1 = (byte *)*param_1;
    if ((byte *)param_1[1] == pbVar1) {
      return 0;
    }
    *param_1 = (longlong)(pbVar1 + 1);
    *pbVar1 = bVar3;
  }
  else if (param_2 < 0x800) {
    pcVar2 = (char *)*param_1;
    if ((ulonglong)(param_1[1] - (longlong)pcVar2) < 2) {
      return 0;
    }
    *pcVar2 = (char)(param_2 >> 6) + -0x40;
    *param_1 = (longlong)(pcVar2 + 2);
    pcVar2[1] = (bVar3 & 0x3f) + 0x80;
  }
  else if (param_2 < 0x10000) {
    pcVar2 = (char *)*param_1;
    if ((ulonglong)(param_1[1] - (longlong)pcVar2) < 3) {
      return 0;
    }
    *pcVar2 = (char)(param_2 >> 0xc) + -0x20;
    pcVar2[1] = ((byte)(param_2 >> 6) & 0x3f) + 0x80;
    *param_1 = (longlong)(pcVar2 + 3);
    pcVar2[2] = (bVar3 & 0x3f) + 0x80;
  }
  else {
    if ((0x10ffff < param_2) ||
       (pcVar2 = (char *)*param_1, (ulonglong)(param_1[1] - (longlong)pcVar2) < 4)) {
      return 0;
    }
    *pcVar2 = (char)(param_2 >> 0x12) + -0x10;
    pcVar2[1] = ((byte)(param_2 >> 0xc) & 0x3f) + 0x80;
    pcVar2[2] = ((byte)(param_2 >> 6) & 0x3f) + 0x80;
    *param_1 = (longlong)(pcVar2 + 4);
    pcVar2[3] = (bVar3 & 0x3f) + 0x80;
  }
  return 1;
}



undefined8
_text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIcEEbRNS_5rangeIT_Lb1EEEDi
          (longlong *param_1,uint param_2)

{
  byte *pbVar1;
  char cVar2;
  char *pcVar3;
  
  if (param_2 < 0x80) {
    pbVar1 = (byte *)*param_1;
    if ((byte *)param_1[1] == pbVar1) {
      return 0;
    }
    *param_1 = (longlong)(pbVar1 + 1);
    *pbVar1 = (byte)param_2;
  }
  else {
    if (param_2 < 0x800) {
      pcVar3 = (char *)*param_1;
      if ((ulonglong)(param_1[1] - (longlong)pcVar3) < 2) {
        return 0;
      }
      *param_1 = (longlong)(pcVar3 + 1);
      cVar2 = (char)(param_2 >> 6) + -0x40;
    }
    else {
      if (param_2 < 0x10000) {
        pcVar3 = (char *)*param_1;
        if ((ulonglong)(param_1[1] - (longlong)pcVar3) < 3) {
          return 0;
        }
        *param_1 = (longlong)(pcVar3 + 1);
        cVar2 = (char)(param_2 >> 0xc) + -0x20;
      }
      else {
        if ((0x10ffff < param_2) ||
           (pcVar3 = (char *)*param_1, (ulonglong)(param_1[1] - (longlong)pcVar3) < 4)) {
          return 0;
        }
        *param_1 = (longlong)(pcVar3 + 1);
        *pcVar3 = (char)(param_2 >> 0x12) + -0x10;
        pcVar3 = (char *)*param_1;
        *param_1 = (longlong)(pcVar3 + 1);
        cVar2 = ((byte)(param_2 >> 0xc) & 0x3f) + 0x80;
      }
      *pcVar3 = cVar2;
      pcVar3 = (char *)*param_1;
      *param_1 = (longlong)(pcVar3 + 1);
      cVar2 = ((byte)(param_2 >> 6) & 0x3f) + 0x80;
    }
    *pcVar3 = cVar2;
    pcVar3 = (char *)*param_1;
    *param_1 = (longlong)(pcVar3 + 1);
    *pcVar3 = ((byte)param_2 & 0x3f) + 0x80;
  }
  return 1;
}



undefined8
_text__ZNSt12_GLOBAL__N_17ucs2_inERNS_5rangeIKDsLb0EEERNS0_IDsLb1EEEDiSt12codecvt_mode
          (undefined8 *param_1,undefined8 *param_2,uint param_3,uint param_4)

{
  longlong lVar1;
  ushort *puVar2;
  uint uVar3;
  ushort uVar4;
  ushort *puVar5;
  ushort *puVar6;
  uint local_res20 [2];
  
  local_res20[0] = param_4;
  _text__ZNSt12_GLOBAL__N_114read_utf16_bomILb0EEEvRNS_5rangeIKDsXT_EEERSt12codecvt_mode
            (param_1,local_res20);
  puVar6 = (ushort *)*param_1;
  lVar1 = param_1[1];
  if (0xffff < param_3) {
    param_3 = 0xffff;
  }
  if ((ulonglong)(lVar1 - (longlong)puVar6) >> 1 != 0) {
    puVar2 = (ushort *)param_2[1];
    puVar5 = (ushort *)*param_2;
    do {
      if (puVar5 == puVar2) {
        return 1;
      }
      uVar4 = *puVar6;
      if ((local_res20[0] & 1) == 0) {
        uVar4 = uVar4 << 8 | uVar4 >> 8;
      }
      uVar3 = (uint)uVar4;
      if (((uVar3 - 0xd800 < 0x400) || (uVar3 - 0xdc00 < 0x400)) || (param_3 < uVar3)) {
        return 2;
      }
      puVar6 = puVar6 + 1;
      *param_1 = puVar6;
      *param_2 = puVar5 + 1;
      *puVar5 = uVar4;
      puVar5 = puVar5 + 1;
    } while ((ulonglong)(lVar1 - (longlong)puVar6) >> 1 != 0);
  }
  return 0;
}



bool _text__ZNSt12_GLOBAL__N_18ucs2_outERNS_5rangeIKDsLb1EEERNS0_IDsLb0EEEDiSt12codecvt_mode_part_0
               (longlong *param_1,longlong *param_2,uint param_3,uint param_4)

{
  longlong lVar1;
  ushort *puVar2;
  ushort uVar3;
  ushort *puVar4;
  ushort *puVar5;
  
  puVar5 = (ushort *)param_1[1];
  puVar2 = (ushort *)*param_1;
  if (puVar5 != puVar2) {
    puVar4 = (ushort *)*param_2;
    do {
      if ((ulonglong)(param_2[1] - (longlong)puVar4) >> 1 == 0) {
        return puVar5 != puVar2;
      }
      uVar3 = *puVar2;
      if ((uVar3 - 0xd800 < 0x400) || (param_3 < uVar3)) {
        return true;
      }
      if ((param_4 & 1) == 0) {
        uVar3 = uVar3 << 8 | uVar3 >> 8;
      }
      *puVar4 = uVar3;
      puVar5 = (ushort *)param_1[1];
      puVar4 = (ushort *)(*param_2 + 2);
      lVar1 = *param_1;
      *param_2 = (longlong)puVar4;
      puVar2 = (ushort *)(lVar1 + 2);
      *param_1 = (longlong)puVar2;
    } while (puVar2 != puVar5);
  }
  return false;
}



bool _text__ZNSt12_GLOBAL__N_18utf16_inIcDsEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_mode
               (undefined8 *param_1,longlong *param_2,uint param_3,uint param_4)

{
  short *psVar1;
  ushort *puVar2;
  ushort *puVar3;
  ushort uVar4;
  uint uVar5;
  ushort uVar6;
  ushort uVar7;
  short *psVar8;
  
  psVar1 = (short *)param_1[1];
  psVar8 = (short *)*param_1;
  if (((((param_4 & 4) != 0) && (2 < (ulonglong)((longlong)psVar1 - (longlong)psVar8))) &&
      (*psVar8 == -0x4411)) && ((char)psVar8[1] == -0x41)) {
    psVar8 = (short *)((longlong)psVar8 + 3);
    *param_1 = psVar8;
  }
  if (psVar1 != psVar8) {
    puVar2 = (ushort *)param_2[1];
    do {
      puVar3 = (ushort *)*param_2;
      if (puVar3 == puVar2) {
        return psVar1 != psVar8;
      }
      uVar5 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                        (param_1,param_3);
      if (uVar5 == 0xfffffffe) {
        return true;
      }
      if (param_3 < uVar5) {
        return true;
      }
      uVar6 = (ushort)uVar5;
      if (uVar5 < 0x10000) {
        if ((param_4 & 1) == 0) {
          uVar5 = (uint)(ushort)(uVar6 << 8 | uVar6 >> 8);
        }
        *param_2 = (longlong)(puVar3 + 1);
        *puVar3 = (ushort)uVar5;
      }
      else {
        if ((ulonglong)((longlong)puVar2 - (longlong)puVar3) < 3) {
          *param_1 = psVar8;
          param_1[1] = psVar1;
          return true;
        }
        uVar4 = (uVar6 & 0x3ff) + 0xdc00;
        uVar7 = (short)(uVar5 >> 10) + 0xd7c0;
        if ((param_4 & 1) == 0) {
          uVar7 = uVar7 * 0x100 | uVar7 >> 8;
          uVar4 = uVar6 << 8 | uVar4 >> 8;
        }
        *puVar3 = uVar7;
        *param_2 = (longlong)(puVar3 + 2);
        puVar3[1] = uVar4;
      }
      psVar8 = (short *)*param_1;
    } while (psVar8 != psVar1);
  }
  return false;
}



short * _text__ZNSt12_GLOBAL__N_19ucs2_spanIcEEPKT_S3_S3_yDiSt12codecvt_mode
                  (short *param_1,longlong param_2,longlong param_3,uint param_4,byte param_5)

{
  uint uVar1;
  uint uVar2;
  short **ppsVar3;
  short *local_28;
  longlong local_20;
  
  local_28 = param_1;
  if (((((param_5 & 4) != 0) && (2 < (ulonglong)(param_2 - (longlong)param_1))) &&
      (*param_1 == -0x4411)) && ((char)param_1[1] == -0x41)) {
    local_28 = (short *)((longlong)param_1 + 3);
  }
  uVar1 = 0xffff;
  if (param_4 < 0x10000) {
    uVar1 = param_4;
  }
  if (param_3 != 0) {
    ppsVar3 = &local_28;
    local_20 = param_2;
    do {
      param_3 = param_3 + -1;
      uVar2 = _text__ZNSt12_GLOBAL__N_120read_utf8_code_pointIcEEDiRNS_5rangeIKT_Lb1EEEm
                        (ppsVar3,uVar1);
    } while (param_3 != 0 && uVar2 <= uVar1);
  }
  return local_28;
}



undefined8
_text__ZNSt12_GLOBAL__N_19utf16_outIDscEENSt12codecvt_base6resultERNS_5rangeIKT_Lb1EEERNS3_IT0_Lb1EEEmSt12codecvt_modeNS_10surrogatesE
          (longlong *param_1,longlong *param_2,uint param_3,uint param_4,int param_5)

{
  ushort uVar1;
  undefined2 *puVar2;
  ushort *puVar3;
  undefined8 uVar4;
  uint uVar5;
  ulonglong uVar6;
  longlong lVar7;
  ulonglong uVar8;
  
  uVar8 = (ulonglong)param_3;
  if ((param_4 & 2) != 0) {
    puVar2 = (undefined2 *)*param_2;
    if ((ulonglong)(param_2[1] - (longlong)puVar2) < 3) {
      return 1;
    }
    *(undefined1 *)(puVar2 + 1) = 0xbf;
    *puVar2 = 0xbbef;
    *param_2 = *param_2 + 3;
  }
  puVar3 = (ushort *)*param_1;
  uVar6 = param_1[1] - (longlong)puVar3;
  if ((ushort *)param_1[1] != puVar3) {
    do {
      uVar1 = *puVar3;
      uVar5 = (uint)uVar1;
      if (uVar1 - 0xd800 < 0x400) {
        if (param_5 == 1) {
          return 2;
        }
        if (uVar6 < 3) {
          return 1;
        }
        if (0x3ff < puVar3[1] - 0xdc00) {
          return 2;
        }
        lVar7 = 2;
        uVar5 = puVar3[1] + 0xfca02400 + uVar5 * 0x400;
      }
      else {
        if (uVar1 - 0xdc00 < 0x400) {
          return 2;
        }
        lVar7 = 1;
      }
      if ((uint)uVar8 < uVar5) {
        return 2;
      }
      uVar4 = _text__ZNSt12_GLOBAL__N_121write_utf8_code_pointIcEEbRNS_5rangeIT_Lb1EEEDi
                        (param_2,uVar5);
      if ((char)uVar4 == '\0') {
        return 1;
      }
      puVar3 = (ushort *)(*param_1 + lVar7 * 2);
      *param_1 = (longlong)puVar3;
      uVar6 = param_1[1] - (longlong)puVar3;
    } while (puVar3 != (ushort *)param_1[1]);
  }
  return 0;
}



// std::__cow_string::__cow_string(std::__cow_string&&)

void __thiscall std::__cow_string::__cow_string(__cow_string *this,longlong *param_1)

{
  longlong lVar1;
  int iVar2;
  
  iVar2 = _CRT_MT;
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  if (iVar2 == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_140082162:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)this;
      goto LAB_140082162;
    }
    lVar1 = *(longlong *)this;
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::__cow_string::__cow_string(char const*, unsigned long long)

void __thiscall
std::__cow_string::__cow_string(__cow_string *this,undefined1 *param_1,ulonglong param_2)

{
  ulonglong *puVar1;
  ulonglong *_Dst;
  
  if ((param_1 + param_2 != (undefined1 *)0x0) && (param_1 == (undefined1 *)0x0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  puVar1 = (ulonglong *)std::string::_Rep::_S_create(param_2,0);
  _Dst = puVar1 + 3;
  if (param_2 == 1) {
    *(undefined1 *)(puVar1 + 3) = *param_1;
  }
  else if (param_2 != 0) {
    _Dst = memcpy(_Dst,param_1,param_2);
  }
  *(undefined4 *)(puVar1 + 2) = 0;
  *puVar1 = param_2;
  *(undefined1 *)((longlong)puVar1 + param_2 + 0x18) = 0;
  *(ulonglong **)this = _Dst;
  return;
}



// std::__cow_string::__cow_string(std::__cxx11::string const&)

void __thiscall std::__cow_string::__cow_string(__cow_string *this,undefined8 *param_1)

{
  __cow_string(this,(undefined1 *)*param_1,param_1[1]);
  return;
}



// std::__cow_string::__cow_string(std::__cow_string const&)

void __thiscall std::__cow_string::__cow_string(__cow_string *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::__cow_string::__cow_string(std::string const&)

void __thiscall std::__cow_string::__cow_string(__cow_string *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)this = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)this = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)this = lVar1;
  return;
}



// std::__cow_string::__cow_string()

void __thiscall std::__cow_string::__cow_string(__cow_string *this)

{
  ulonglong *puVar1;
  
  puVar1 = std::string::_S_construct(0,'\0');
  *(ulonglong **)this = puVar1;
  return;
}



// std::__cow_string::~__cow_string()

void __thiscall std::__cow_string::~__cow_string(__cow_string *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *(longlong *)this;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  return;
}



// std::__cow_string::TEMPNAMEPLACEHOLDERVALUE(std::__cow_string&&)

__cow_string * __thiscall std::__cow_string::operator=(__cow_string *this,longlong *param_1)

{
  std::string::swap((string *)this,param_1);
  return this;
}



// std::__cow_string::TEMPNAMEPLACEHOLDERVALUE(std::__cow_string const&)

__cow_string * __thiscall std::__cow_string::operator=(__cow_string *this,longlong *param_1)

{
  std::string::assign((string *)this,param_1);
  return this;
}



// std::__sso_string::__sso_string(std::__sso_string&&)

void __thiscall std::__sso_string::__sso_string(__sso_string *this,longlong *param_1)

{
  longlong *plVar1;
  uint uVar2;
  longlong lVar3;
  uint uVar4;
  ulonglong uVar5;
  
  *(__sso_string **)this = this + 0x10;
  plVar1 = param_1 + 2;
  lVar3 = param_1[1];
  if ((longlong *)*param_1 != plVar1) {
    *(longlong **)this = (longlong *)*param_1;
    *(longlong *)(this + 0x10) = param_1[2];
    goto LAB_1400823da;
  }
  uVar5 = lVar3 + 1;
  uVar4 = (uint)uVar5;
  if (uVar4 < 8) {
    if ((uVar5 & 4) != 0) {
      *(int *)(this + 0x10) = (int)param_1[2];
      *(undefined4 *)(this + (uVar5 & 0xffffffff) + 0xc) =
           *(undefined4 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 0xc);
      lVar3 = param_1[1];
      goto LAB_1400823da;
    }
    if (uVar4 == 0) goto LAB_1400823da;
    this[0x10] = *(__sso_string *)(param_1 + 2);
    if ((uVar5 & 2) != 0) {
      *(undefined2 *)(this + (uVar5 & 0xffffffff) + 0xe) =
           *(undefined2 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 0xe);
      lVar3 = param_1[1];
      goto LAB_1400823da;
    }
  }
  else {
    *(longlong *)(this + 0x10) = param_1[2];
    *(undefined8 *)(this + (uVar5 & 0xffffffff) + 8) =
         *(undefined8 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 8);
    lVar3 = (longlong)(this + 0x10) - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
    uVar4 = uVar4 + (int)lVar3 & 0xfffffff8;
    if (7 < uVar4) {
      uVar2 = 0;
      do {
        uVar5 = (ulonglong)uVar2;
        uVar2 = uVar2 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar5) =
             *(undefined8 *)((longlong)plVar1 + (uVar5 - lVar3));
      } while (uVar2 < uVar4);
    }
  }
  lVar3 = param_1[1];
LAB_1400823da:
  *(longlong *)(this + 8) = lVar3;
  *param_1 = (longlong)plVar1;
  param_1[1] = 0;
  *(undefined1 *)(param_1 + 2) = 0;
  return;
}



// std::__sso_string::__sso_string(char const*, unsigned long long)

void __thiscall
std::__sso_string::__sso_string(__sso_string *this,__sso_string *param_1,ulonglong param_2)

{
  __sso_string _Var1;
  __sso_string *_Dst;
  ulonglong local_20;
  
  _Dst = this + 0x10;
  *(__sso_string **)this = _Dst;
  if ((param_1 == (__sso_string *)0x0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string: construction from null is not valid");
  }
  local_20 = param_2;
  if (param_2 < 0x10) {
    if (param_2 == 1) {
      _Var1 = *param_1;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = _Var1;
      this[0x11] = (__sso_string)0x0;
      return;
    }
    if (param_2 == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (__sso_string)0x0;
      return;
    }
  }
  else {
    _Dst = (__sso_string *)__cxx11::string::_M_create(this,&local_20,0);
    *(__sso_string **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_20;
  }
  memcpy(_Dst,param_1,param_2);
  *(ulonglong *)(this + 8) = local_20;
  *(undefined1 *)(*(longlong *)this + local_20) = 0;
  return;
}



// std::__sso_string::__sso_string(std::__cxx11::string const&)

void __thiscall std::__sso_string::__sso_string(__sso_string *this,undefined8 *param_1)

{
  __sso_string _Var1;
  ulonglong _Size;
  __sso_string *_Src;
  __sso_string *_Dst;
  ulonglong local_20;
  
  _Size = param_1[1];
  _Dst = this + 0x10;
  *(__sso_string **)this = _Dst;
  _Src = (__sso_string *)*param_1;
  local_20 = _Size;
  if (_Size < 0x10) {
    if (_Size == 1) {
      _Var1 = *_Src;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = _Var1;
      this[0x11] = (__sso_string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (__sso_string)0x0;
      return;
    }
  }
  else {
    _Dst = (__sso_string *)__cxx11::string::_M_create(this,&local_20,0);
    *(__sso_string **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_20;
  }
  memcpy(_Dst,_Src,_Size);
  *(ulonglong *)(this + 8) = local_20;
  *(undefined1 *)(*(longlong *)this + local_20) = 0;
  return;
}



// std::__sso_string::__sso_string(std::__sso_string const&)

void __thiscall std::__sso_string::__sso_string(__sso_string *this,undefined8 *param_1)

{
  __sso_string _Var1;
  ulonglong _Size;
  __sso_string *_Src;
  __sso_string *_Dst;
  ulonglong local_20;
  
  _Size = param_1[1];
  _Dst = this + 0x10;
  *(__sso_string **)this = _Dst;
  _Src = (__sso_string *)*param_1;
  local_20 = _Size;
  if (_Size < 0x10) {
    if (_Size == 1) {
      _Var1 = *_Src;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = _Var1;
      this[0x11] = (__sso_string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (__sso_string)0x0;
      return;
    }
  }
  else {
    _Dst = (__sso_string *)__cxx11::string::_M_create(this,&local_20,0);
    *(__sso_string **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_20;
  }
  memcpy(_Dst,_Src,_Size);
  *(ulonglong *)(this + 8) = local_20;
  *(undefined1 *)(*(longlong *)this + local_20) = 0;
  return;
}



// std::__sso_string::__sso_string(std::string const&)

void __thiscall std::__sso_string::__sso_string(__sso_string *this,undefined8 *param_1)

{
  __sso_string(this,(__sso_string *)*param_1,*(ulonglong *)((__sso_string *)*param_1 + -0x18));
  return;
}



// std::__sso_string::__sso_string()

void __thiscall std::__sso_string::__sso_string(__sso_string *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(__sso_string **)this = this + 0x10;
  this[0x10] = (__sso_string)0x0;
  return;
}



// std::__sso_string::~__sso_string()

void __thiscall std::__sso_string::~__sso_string(__sso_string *this)

{
  if (*(__sso_string **)this != this + 0x10) {
    operator_delete(*(__sso_string **)this);
    return;
  }
  return;
}



// std::__sso_string::TEMPNAMEPLACEHOLDERVALUE(std::__sso_string&&)

__sso_string * __thiscall std::__sso_string::operator=(__sso_string *this,__sso_string *param_1)

{
  __sso_string *p_Var1;
  size_t _Size;
  undefined8 uVar2;
  __sso_string *_Src;
  __sso_string *_Dst;
  longlong lVar3;
  
  _Size = *(size_t *)(param_1 + 8);
  _Dst = *(__sso_string **)this;
  _Src = *(__sso_string **)param_1;
  p_Var1 = param_1 + 0x10;
  if (_Dst == this + 0x10) {
    if (p_Var1 == _Src) goto LAB_140082770;
    *(__sso_string **)this = _Src;
    *(size_t *)(this + 8) = _Size;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  }
  else {
    if (p_Var1 == _Src) {
LAB_140082770:
      if (param_1 != this) {
        lVar3 = 0;
        if (_Size != 0) {
          if (_Size == 1) {
            *_Dst = *_Src;
            lVar3 = *(longlong *)(param_1 + 8);
            _Dst = *(__sso_string **)this;
          }
          else {
            memcpy(_Dst,_Src,_Size);
            lVar3 = *(longlong *)(param_1 + 8);
            _Dst = *(__sso_string **)this;
          }
        }
        *(longlong *)(this + 8) = lVar3;
        _Dst[lVar3] = (__sso_string)0x0;
        _Src = *(__sso_string **)param_1;
      }
      goto LAB_140082737;
    }
    *(__sso_string **)this = _Src;
    uVar2 = *(undefined8 *)(this + 0x10);
    *(size_t *)(this + 8) = _Size;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
    if (_Dst != (__sso_string *)0x0) {
      *(__sso_string **)param_1 = _Dst;
      *(undefined8 *)(param_1 + 0x10) = uVar2;
      _Src = _Dst;
      goto LAB_140082737;
    }
  }
  *(__sso_string **)param_1 = p_Var1;
  _Src = p_Var1;
LAB_140082737:
  *(undefined8 *)(param_1 + 8) = 0;
  *_Src = (__sso_string)0x0;
  return this;
}



// std::__sso_string::TEMPNAMEPLACEHOLDERVALUE(std::__sso_string const&)

__sso_string * __thiscall std::__sso_string::operator=(__sso_string *this,string *param_1)

{
  __cxx11::string::_M_assign((string *)this,param_1);
  return this;
}



// std::ctype_byname<char>::ctype_byname(char const*, unsigned long long)

void __thiscall
std::ctype_byname<char>::ctype_byname(ctype_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  
  ctype<char>::ctype((ctype<char> *)this,(undefined *)0x0,0,param_2);
  *(undefined ***)this = &PTR__ctype_byname_1400dd350;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::ctype_byname<char>::ctype_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::ctype_byname<char>::ctype_byname(ctype_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  ctype_byname(this,(char *)*param_1,param_2);
  return;
}



// std::ctype_byname<char>::ctype_byname(std::string const&, unsigned long long)

void __thiscall
std::ctype_byname<char>::ctype_byname(ctype_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  ctype_byname(this,(char *)*param_1,param_2);
  return;
}



// std::ctype_byname<char>::~ctype_byname()

void __thiscall std::ctype_byname<char>::~ctype_byname(ctype_byname<char> *this)

{
  *(undefined ***)this = &PTR__ctype_byname_1400dd350;
  ctype<char>::~ctype((ctype<char> *)this);
  operator_delete(this);
  return;
}



// std::ctype_byname<char>::~ctype_byname()

void __thiscall std::ctype_byname<char>::~ctype_byname(ctype_byname<char> *this)

{
  *(undefined ***)this = &PTR__ctype_byname_1400dd350;
  ctype<char>::~ctype((ctype<char> *)this);
  return;
}



// std::ctype_byname<wchar_t>::ctype_byname(char const*, unsigned long long)

void __thiscall
std::ctype_byname<wchar_t>::ctype_byname(ctype_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  this[0x18] = (ctype_byname<wchar_t>)0x0;
  ctype<wchar_t>::_M_initialize_ctype((ctype<wchar_t> *)this);
  *(undefined ***)this = &PTR__ctype_byname_1400dd3b0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      ctype<wchar_t>::_M_initialize_ctype((ctype<wchar_t> *)this);
      return;
    }
  }
  return;
}



// std::ctype_byname<wchar_t>::ctype_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::ctype_byname<wchar_t>::ctype_byname
          (ctype_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  ctype_byname(this,(char *)*param_1,param_2);
  return;
}



// std::ctype_byname<wchar_t>::ctype_byname(std::string const&, unsigned long long)

void __thiscall
std::ctype_byname<wchar_t>::ctype_byname
          (ctype_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  ctype_byname(this,(char *)*param_1,param_2);
  return;
}



// std::ctype_byname<wchar_t>::~ctype_byname()

void __thiscall std::ctype_byname<wchar_t>::~ctype_byname(ctype_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de1a0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::ctype_byname<wchar_t>::~ctype_byname()

void __thiscall std::ctype_byname<wchar_t>::~ctype_byname(ctype_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de1a0;
  locale::facet::~facet();
  return;
}



// std::domain_error::domain_error(char const*)

void __thiscall std::domain_error::domain_error(domain_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__domain_error_1400dd430;
  return;
}



// std::domain_error::domain_error(std::__cxx11::string const&)

void __thiscall std::domain_error::domain_error(domain_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__domain_error_1400dd430;
  return;
}



// std::domain_error::domain_error(std::string const&)

void __thiscall std::domain_error::domain_error(domain_error *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__domain_error_1400dd430;
  return;
}



// std::domain_error::~domain_error()

void __thiscall std::domain_error::~domain_error(domain_error *this)

{
  *(undefined ***)this = &PTR__domain_error_1400dd430;
  logic_error::~logic_error((logic_error *)this);
  operator_delete(this);
  return;
}



// std::domain_error::~domain_error()

void __thiscall std::domain_error::~domain_error(domain_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::length_error::length_error(char const*)

void __thiscall std::length_error::length_error(length_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__length_error_1400dd460;
  return;
}



// std::length_error::length_error(std::__cxx11::string const&)

void __thiscall std::length_error::length_error(length_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__length_error_1400dd460;
  return;
}



// std::length_error::length_error(std::string const&)

void __thiscall std::length_error::length_error(length_error *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__length_error_1400dd460;
  return;
}



// std::length_error::~length_error()

void __thiscall std::length_error::~length_error(length_error *this)

{
  *(undefined ***)this = &PTR__length_error_1400dd460;
  logic_error::~logic_error((logic_error *)this);
  operator_delete(this);
  return;
}



// std::length_error::~length_error()

void __thiscall std::length_error::~length_error(length_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::out_of_range::out_of_range(char const*)

void __thiscall std::out_of_range::out_of_range(out_of_range *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__out_of_range_1400dd490;
  return;
}



// std::out_of_range::out_of_range(std::__cxx11::string const&)

void __thiscall std::out_of_range::out_of_range(out_of_range *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__out_of_range_1400dd490;
  return;
}



// std::out_of_range::out_of_range(std::string const&)

void __thiscall std::out_of_range::out_of_range(out_of_range *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__out_of_range_1400dd490;
  return;
}



// std::out_of_range::~out_of_range()

void __thiscall std::out_of_range::~out_of_range(out_of_range *this)

{
  *(undefined ***)this = &PTR__out_of_range_1400dd490;
  logic_error::~logic_error((logic_error *)this);
  operator_delete(this);
  return;
}



// std::out_of_range::~out_of_range()

void __thiscall std::out_of_range::~out_of_range(out_of_range *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::system_error::system_error(std::error_code, char const*)

void __thiscall
std::system_error::system_error(system_error *this,undefined8 *param_1,string *param_2)

{
  string *psVar1;
  longlong *plVar2;
  undefined8 uVar3;
  string *psVar4;
  size_t sVar5;
  uint uVar6;
  ulonglong uVar7;
  string *psVar9;
  ulonglong uVar10;
  longlong lVar11;
  string *psVar12;
  string *local_a8;
  longlong local_a0;
  undefined8 local_98 [2];
  string *local_88;
  longlong local_80;
  undefined8 local_78 [2];
  undefined1 *local_68 [2];
  undefined1 local_58 [24];
  ulonglong uVar8;
  
  plVar2 = (longlong *)param_1[1];
  uVar3 = *param_1;
  (**(code **)(*plVar2 + 0x20))((string *)local_68);
  psVar4 = __cxx11::string::_M_replace((string *)local_68,0,0,(string *)&DAT_1400c86b5,2);
  psVar1 = psVar4 + 0x10;
  local_80 = *(longlong *)(psVar4 + 8);
  if (*(string **)psVar4 == psVar1) {
    uVar10 = local_80 + 1;
    psVar9 = psVar1;
    psVar12 = (string *)local_78;
    if (7 < (uint)uVar10) {
      uVar7 = 0;
      do {
        uVar6 = (int)uVar7 + 8;
        uVar8 = (ulonglong)uVar6;
        *(undefined8 *)((string *)local_78 + uVar7) = *(undefined8 *)(psVar1 + uVar7);
        uVar7 = uVar8;
      } while (uVar6 < ((uint)uVar10 & 0xfffffff8));
      psVar12 = (string *)local_78 + uVar8;
      psVar9 = psVar1 + uVar8;
    }
    lVar11 = 0;
    if ((uVar10 & 4) != 0) {
      *(undefined4 *)psVar12 = *(undefined4 *)psVar9;
      lVar11 = 4;
    }
    if ((uVar10 & 2) != 0) {
      *(undefined2 *)(psVar12 + lVar11) = *(undefined2 *)(psVar9 + lVar11);
      lVar11 = lVar11 + 2;
    }
    if ((uVar10 & 1) != 0) {
      psVar12[lVar11] = psVar9[lVar11];
    }
    local_80 = *(longlong *)(psVar4 + 8);
    local_88 = (string *)local_78;
  }
  else {
    local_78[0] = *(undefined8 *)(psVar4 + 0x10);
    local_88 = *(string **)psVar4;
  }
  *(string **)psVar4 = psVar1;
  *(undefined8 *)(psVar4 + 8) = 0;
  psVar4[0x10] = (string)0x0;
  sVar5 = strlen((char *)param_2);
  psVar4 = __cxx11::string::_M_replace((string *)&local_88,0,0,param_2,sVar5);
  psVar1 = psVar4 + 0x10;
  local_a0 = *(longlong *)(psVar4 + 8);
  if (*(string **)psVar4 == psVar1) {
    uVar10 = local_a0 + 1;
    psVar9 = psVar1;
    psVar12 = (string *)local_98;
    if (7 < (uint)uVar10) {
      uVar7 = 0;
      do {
        uVar6 = (int)uVar7 + 8;
        uVar8 = (ulonglong)uVar6;
        *(undefined8 *)((string *)local_98 + uVar7) = *(undefined8 *)(psVar1 + uVar7);
        uVar7 = uVar8;
      } while (uVar6 < ((uint)uVar10 & 0xfffffff8));
      psVar12 = (string *)local_98 + uVar8;
      psVar9 = psVar1 + uVar8;
    }
    lVar11 = 0;
    if ((uVar10 & 4) != 0) {
      *(undefined4 *)psVar12 = *(undefined4 *)psVar9;
      lVar11 = 4;
    }
    if ((uVar10 & 2) != 0) {
      *(undefined2 *)(psVar12 + lVar11) = *(undefined2 *)(psVar9 + lVar11);
      lVar11 = lVar11 + 2;
    }
    if ((uVar10 & 1) != 0) {
      psVar12[lVar11] = psVar9[lVar11];
    }
    local_a0 = *(longlong *)(psVar4 + 8);
    local_a8 = (string *)local_98;
  }
  else {
    local_98[0] = *(undefined8 *)(psVar4 + 0x10);
    local_a8 = *(string **)psVar4;
  }
  *(string **)psVar4 = psVar1;
  *(undefined8 *)(psVar4 + 8) = 0;
  psVar4[0x10] = (string)0x0;
  runtime_error::runtime_error((runtime_error *)this,&local_a8);
  if (local_a8 != (string *)local_98) {
    operator_delete(local_a8);
  }
  if (local_88 != (string *)local_78) {
    operator_delete(local_88);
  }
  if (local_68[0] != local_58) {
    operator_delete(local_68[0]);
  }
  *(undefined8 *)(this + 0x10) = uVar3;
  *(longlong **)(this + 0x18) = plVar2;
  *(undefined ***)this = &PTR__system_error_1400dd4c0;
  return;
}



// std::system_error::system_error(std::error_code, std::__cxx11::string const&)

void __thiscall
std::system_error::system_error(system_error *this,ulonglong *param_1,undefined8 *param_2)

{
  longlong *plVar1;
  ulonglong uVar2;
  string *psVar3;
  uint uVar4;
  ulonglong uVar5;
  string *psVar6;
  ulonglong uVar7;
  ulonglong uVar8;
  string *psVar9;
  longlong lVar10;
  longlong *plVar11;
  string *local_a8;
  longlong local_a0;
  longlong local_98 [2];
  string *local_88;
  ulonglong local_80;
  string local_78;
  undefined7 uStack_77;
  string *local_68;
  ulonglong local_60;
  ulonglong local_58 [3];
  
  plVar1 = (longlong *)param_1[1];
  uVar2 = *param_1;
  (**(code **)(*plVar1 + 0x20))((string *)&local_68,plVar1,uVar2 & 0xffffffff);
  uVar8 = param_2[1];
  psVar6 = (string *)*param_2;
  local_78 = (string)0x0;
  local_80 = 0;
  local_88 = &local_78;
  __cxx11::string::reserve((string *)&local_88,uVar8 + 2);
  if (0x3fffffffffffffff - local_80 < uVar8) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::string::_M_append((string *)&local_88,psVar6,uVar8);
  if (0x3fffffffffffffff - local_80 < 2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::string::_M_append((string *)&local_88,(string *)&DAT_1400c86b5,2);
  uVar8 = local_80 + local_60;
  if (local_88 == &local_78) {
    if ((0xf < uVar8) && (local_68 != (string *)local_58)) goto LAB_1400833a9;
LAB_1400833b2:
    if (0x3fffffffffffffff - local_80 < local_60) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::append");
    }
    psVar3 = __cxx11::string::_M_append((string *)&local_88,local_68,local_60);
    plVar11 = local_98;
    psVar6 = psVar3 + 0x10;
    local_a0 = *(longlong *)(psVar3 + 8);
    local_a8 = *(string **)psVar3;
    if (local_a8 == psVar6) {
      uVar8 = local_a0 + 1;
      psVar9 = psVar6;
      if (7 < (uint)uVar8) {
        uVar7 = 0;
        do {
          uVar4 = (int)uVar7 + 8;
          uVar5 = (ulonglong)uVar4;
          *(undefined8 *)((longlong)plVar11 + uVar7) = *(undefined8 *)(psVar6 + uVar7);
          uVar7 = uVar5;
        } while (uVar4 < ((uint)uVar8 & 0xfffffff8));
LAB_1400834e3:
        plVar11 = (longlong *)((longlong)local_98 + uVar5);
        psVar6 = psVar9 + uVar5;
      }
LAB_14008352f:
      local_a8 = (string *)local_98;
      lVar10 = 0;
      if ((uVar8 & 4) != 0) {
        *(undefined4 *)plVar11 = *(undefined4 *)psVar6;
        lVar10 = 4;
      }
      if ((uVar8 & 2) != 0) {
        *(undefined2 *)((longlong)plVar11 + lVar10) = *(undefined2 *)(psVar6 + lVar10);
        lVar10 = lVar10 + 2;
      }
      if ((uVar8 & 1) != 0) {
        *(string *)((longlong)plVar11 + lVar10) = psVar6[lVar10];
      }
      local_a0 = *(longlong *)(psVar3 + 8);
      goto LAB_1400833ff;
    }
  }
  else {
    if (uVar8 <= CONCAT71(uStack_77,local_78)) goto LAB_1400833b2;
    if (local_68 == (string *)local_58) {
      local_58[0] = 0xf;
    }
LAB_1400833a9:
    if (local_58[0] < uVar8) goto LAB_1400833b2;
    psVar3 = __cxx11::string::_M_replace((string *)&local_68,0,0,local_88,local_80);
    plVar11 = local_98;
    psVar6 = psVar3 + 0x10;
    local_a0 = *(longlong *)(psVar3 + 8);
    local_a8 = *(string **)psVar3;
    if (local_a8 == psVar6) {
      uVar8 = local_a0 + 1;
      psVar9 = psVar6;
      if (7 < (uint)uVar8) {
        uVar7 = 0;
        do {
          uVar4 = (int)uVar7 + 8;
          uVar5 = (ulonglong)uVar4;
          *(undefined8 *)((longlong)plVar11 + uVar7) = *(undefined8 *)(psVar6 + uVar7);
          uVar7 = uVar5;
        } while (uVar4 < ((uint)uVar8 & 0xfffffff8));
        goto LAB_1400834e3;
      }
      goto LAB_14008352f;
    }
  }
  local_98[0] = *(longlong *)(psVar3 + 0x10);
  psVar9 = psVar6;
LAB_1400833ff:
  *(string **)psVar3 = psVar9;
  *(longlong *)(psVar3 + 8) = 0;
  psVar3[0x10] = (string)0x0;
  runtime_error::runtime_error((runtime_error *)this,&local_a8);
  if (local_a8 != (string *)local_98) {
    operator_delete(local_a8);
  }
  if (local_88 != &local_78) {
    operator_delete(local_88);
  }
  if (local_68 != (string *)local_58) {
    operator_delete(local_68);
  }
  *(ulonglong *)(this + 0x10) = uVar2;
  *(longlong **)(this + 0x18) = plVar1;
  *(undefined ***)this = &PTR__system_error_1400dd4c0;
  return;
}



// std::system_error::~system_error()

void __thiscall std::system_error::~system_error(system_error *this)

{
  *(undefined ***)this = &PTR__system_error_1400dd4c0;
  runtime_error::~runtime_error((runtime_error *)this);
  operator_delete(this);
  return;
}



// std::system_error::~system_error()

void __thiscall std::system_error::~system_error(system_error *this)

{
  *(undefined ***)this = &PTR__system_error_1400dd4c0;
  runtime_error::~runtime_error((runtime_error *)this);
  return;
}



// WARNING: Instruction at (ram,0x0001400838f8) overlaps instruction at (ram,0x0001400838f4)
// 
// std::istreambuf_iterator<char, std::char_traits<char> >
// std::__facet_shims::__time_get<char>(std::integral_constant<bool, false>, std::locale::facet
// const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char)

__facet_shims * __thiscall
std::__facet_shims::__time_get<char>
          (__facet_shims *this,undefined8 param_1,ulonglong *param_2,undefined8 *param_3,
          undefined8 *param_4,ulonglong *param_5,undefined8 param_6,undefined8 param_7,byte param_8)

{
  uint uVar1;
  ulonglong uVar2;
  char *pcVar3;
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  uVar1 = param_8 - 100 & 0xff;
  uVar2 = (longlong)&switchD_14008367a::switchdataD_1400c4da8 +
          (longlong)(int)(&switchD_14008367a::switchdataD_1400c4da8)[uVar1];
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(uVar1) {
  case 0:
    (**(code **)(*param_2 + 0x20))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  default:
    (**(code **)(*param_2 + 0x38))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 9:
    (**(code **)(*param_2 + 0x30))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 0x10:
    (**(code **)(*param_2 + 0x18))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 0x13:
    (**(code **)(*param_2 + 0x28))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 0x16:
    goto switchD_14008367a_caseD_16;
  case 0x17:
  case 0x18:
  case 0x19:
  case 0x1a:
  case 0x1b:
  case 0x1c:
  case 0x1d:
  case 0x1e:
  case 0x20:
  case 0x21:
  case 0x22:
  case 0x23:
  case 0x24:
  case 0x25:
  case 0x27:
  case 0x28:
  case 0x2a:
  case 0x2b:
switchD_14008367a_caseD_17:
    (**(code **)(uVar2 + 0x30))(this,param_2,&local_18,&local_28,param_5);
    return this;
  case 0x1f:
switchD_14008367a_caseD_1f:
    (**(code **)(uVar2 + 0x28))(this,param_2,&local_18,&local_28,param_5);
    return this;
  case 0x26:
    return (__facet_shims *)
           (ulonglong)
           ((int)uVar2 + -0x76b3fffc +
           (uint)(0xfffffffebff3b257 <
                 (ulonglong)(longlong)(int)(&switchD_14008367a::switchdataD_1400c4da8)[uVar1]));
  case 0x29:
    pcVar3 = (char *)(uVar2 & 0xffffffffffffff90);
    *pcVar3 = *pcVar3 + (char)pcVar3;
    local_28 = *(undefined8 *)pcVar3;
    uStack_20 = *(undefined8 *)(pcVar3 + 8);
    param_2 = param_5;
    this = (__facet_shims *)&switchD_14008367a::switchdataD_1400c4da8;
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
    switch(param_8 + 0x9c) {
    case 0:
      (**(code **)(*param_5 + 0x20))
                (&switchD_14008367a::switchdataD_1400c4da8,param_5,&local_18,&local_28,param_5,
                 param_6,param_7);
      return (__facet_shims *)&switchD_14008367a::switchdataD_1400c4da8;
    default:
      (**(code **)(*param_5 + 0x38))
                (&switchD_14008367a::switchdataD_1400c4da8,param_5,&local_18,&local_28,param_5,
                 param_6,param_7);
      return (__facet_shims *)&switchD_14008367a::switchdataD_1400c4da8;
    case 9:
      uVar2 = *param_5;
      goto switchD_14008367a_caseD_17;
    case 0x10:
      uVar2 = *param_5;
      break;
    case 0x13:
      uVar2 = *param_5;
      goto switchD_14008367a_caseD_1f;
    }
switchD_14008367a_caseD_16:
    (**(code **)(uVar2 + 0x18))(this,param_2,&local_18,&local_28,param_5);
    return this;
  }
}



// WARNING: Instruction at (ram,0x000140083a48) overlaps instruction at (ram,0x000140083a44)
// 
// std::istreambuf_iterator<char, std::char_traits<char> >
// std::__facet_shims::__time_get<char>(std::integral_constant<bool, true>, std::locale::facet
// const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, std::ios_base&, std::_Ios_Iostate&, tm*, char)

__facet_shims * __thiscall
std::__facet_shims::__time_get<char>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,longlong *param_5,undefined8 param_6,undefined8 param_7,byte param_8)

{
  byte bVar1;
  uint uVar2;
  ulonglong uVar3;
  char *pcVar4;
  __facet_shims *p_Var5;
  uint *puVar6;
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
  puVar6 = &switchD_1400837ca::switchdataD_1400c56d0;
  uVar2 = param_8 - 100 & 0xff;
  uVar3 = (ulonglong)(int)(&switchD_1400837ca::switchdataD_1400c56d0)[uVar2];
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(uVar2) {
  case 0:
    (**(code **)(*param_2 + 0x20))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  default:
    (**(code **)(*param_2 + 0x38))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 9:
    (**(code **)(*param_2 + 0x30))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 0x10:
    (**(code **)(*param_2 + 0x18))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 0x13:
    (**(code **)(*param_2 + 0x28))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case 0x16:
    (**(code **)((longlong)&UINT_1400c56e8 + uVar3))(this,param_2,&local_18,&local_28,param_5);
    return this;
  case 0x17:
  case 0x18:
  case 0x19:
  case 0x1a:
  case 0x1b:
  case 0x1c:
  case 0x1d:
  case 0x1e:
  case 0x20:
  case 0x21:
  case 0x22:
  case 0x23:
  case 0x24:
  case 0x25:
  case 0x27:
  case 0x28:
  case 0x2a:
  case 0x2b:
    (**(code **)((longlong)&UINT_1400c5700 + uVar3))(this,param_2,&local_18,&local_28,param_5);
    return this;
  case 0x1f:
    (**(code **)((longlong)&UINT_1400c56f8 + uVar3))(this,param_2,&local_18,&local_28,param_5);
    return this;
  case 0x26:
    bVar1 = ((char)((longlong)&switchD_1400837ca::switchdataD_1400c56d0 + uVar3) + -4) -
            (0xfffffffebff3a92f < uVar3);
    cRam00000006403db1d2 = cRam00000006403db1d2 + -0x30;
    break;
  case 0x29:
    pcVar4 = (char *)((longlong)&switchD_1400837ca::switchdataD_1400c56d0 + uVar3 &
                     0xffffffffffffff90);
    *pcVar4 = *pcVar4 + (char)pcVar4;
    local_28 = *(undefined8 *)pcVar4;
    uStack_20 = *(undefined8 *)(pcVar4 + 8);
    bVar1 = param_8 + 0x9c;
    puVar6 = &switchD_140083a6a::switchdataD_1400c5728;
    param_2 = param_5;
  }
                    // WARNING: Could not recover jumptable at 0x000140083a6a. Too many branches
                    // WARNING: Treating indirect jump as call
  p_Var5 = (__facet_shims *)
           (*(code *)((longlong)(int)puVar6[bVar1] + (longlong)puVar6))
                     (puVar6,param_2,param_5,param_6);
  return p_Var5;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// std::__facet_shims::__time_get<wchar_t>(std::integral_constant<bool, false>, std::locale::facet
// const*, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, char)

__facet_shims * __thiscall
std::__facet_shims::__time_get<wchar_t>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,undefined8 param_5,undefined8 param_6,undefined8 param_7,char param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(param_8 + -100) {
  case '\0':
    (**(code **)(*param_2 + 0x20))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  default:
    (**(code **)(*param_2 + 0x38))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case '\t':
    (**(code **)(*param_2 + 0x30))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case '\x10':
    (**(code **)(*param_2 + 0x18))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case '\x13':
    (**(code **)(*param_2 + 0x28))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  }
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// std::__facet_shims::__time_get<wchar_t>(std::integral_constant<bool, true>, std::locale::facet
// const*, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, std::ios_base&,
// std::_Ios_Iostate&, tm*, char)

__facet_shims * __thiscall
std::__facet_shims::__time_get<wchar_t>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,undefined8 param_5,undefined8 param_6,undefined8 param_7,char param_8)

{
  undefined8 local_28;
  undefined8 uStack_20;
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_3;
  uStack_10 = param_3[1];
  local_28 = *param_4;
  uStack_20 = param_4[1];
                    // WARNING (jumptable): Sanity check requires truncation of jumptable
                    // WARNING: Could not find normalized switch variable to match jumptable
  switch(param_8 + -100) {
  case '\0':
    (**(code **)(*param_2 + 0x20))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  default:
    (**(code **)(*param_2 + 0x38))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case '\t':
    (**(code **)(*param_2 + 0x30))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case '\x10':
    (**(code **)(*param_2 + 0x18))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  case '\x13':
    (**(code **)(*param_2 + 0x28))(this,param_2,&local_18,&local_28,param_5,param_6,param_7);
    return this;
  }
}



// std::istreambuf_iterator<char, std::char_traits<char> >
// std::__facet_shims::__money_get<char>(std::integral_constant<bool, false>, std::locale::facet
// const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double*,
// std::__facet_shims::__any_string*)

__facet_shims * __thiscall
std::__facet_shims::__money_get<char>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,undefined1 param_5,undefined8 param_6,int *param_7,longlong param_8,
          undefined8 *param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  int iVar5;
  ulonglong *puVar6;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  ulonglong uStack_70;
  undefined8 local_68;
  ulonglong local_60;
  undefined1 local_51;
  ulonglong *local_50 [3];
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  uVar3 = *param_4;
  uVar4 = param_4[1];
  if (param_8 == 0) {
    local_50[0] = std::string::_S_construct(0,'\0');
    local_88 = uVar3;
    uStack_80 = uVar4;
    local_78 = uVar1;
    uStack_70 = uVar2;
    (**(code **)(*param_2 + 0x18))
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,local_50);
    if (*param_7 == 0) {
      if ((code *)param_9[4] != (code *)0x0) {
        (*(code *)param_9[4])(param_9);
      }
      if ((int)local_50[0][-1] < 0) {
        puVar6 = (ulonglong *)std::string::_Rep::_M_clone((_Rep *)(local_50[0] + -3),&local_51,0);
      }
      else {
        puVar6 = local_50[0];
        if (_CRT_MT == 0) {
          *(int *)(local_50[0] + -1) = (int)local_50[0][-1] + 1;
        }
        else {
          LOCK();
          *(int *)(local_50[0] + -1) = (int)local_50[0][-1] + 1;
          UNLOCK();
        }
      }
      *param_9 = puVar6;
      param_9[1] = local_50[0][-3];
      param_9[4] = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
    }
    iVar5 = _CRT_MT;
    *(undefined8 *)this = local_68;
    *(ulonglong *)(this + 8) = uVar2 & 0xffffffff00000000 | local_60 & 0xffffffff;
    if (iVar5 == 0) {
      iVar5 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar6 = local_50[0] + -1;
      iVar5 = (int)*puVar6;
      *(int *)puVar6 = (int)*puVar6 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::string::_Rep::_M_destroy(local_50[0] + -3);
    }
  }
  else {
    local_78 = uVar3;
    uStack_70 = uVar4;
    local_68 = uVar1;
    local_60 = uVar2;
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_68,&local_78,param_5,param_6,param_7,param_8)
    ;
  }
  return this;
}



// std::istreambuf_iterator<char, std::char_traits<char> >
// std::__facet_shims::__money_get<char>(std::integral_constant<bool, true>, std::locale::facet
// const*, std::istreambuf_iterator<char, std::char_traits<char> >, std::istreambuf_iterator<char,
// std::char_traits<char> >, bool, std::ios_base&, std::_Ios_Iostate&, long double*,
// std::__facet_shims::__any_string*)

__facet_shims * __thiscall
std::__facet_shims::__money_get<char>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,undefined1 param_5,undefined8 param_6,int *param_7,longlong param_8,
          longlong *param_9)

{
  ulonglong uVar1;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  ulonglong uStack_70;
  undefined8 local_68;
  ulonglong local_60;
  undefined1 *local_58;
  longlong local_50;
  undefined1 local_48 [24];
  
  local_78 = *param_3;
  uVar1 = param_3[1];
  local_88 = *param_4;
  uStack_80 = param_4[1];
  if (param_8 == 0) {
    local_48[0] = 0;
    local_50 = 0;
    uStack_70 = uVar1;
    local_58 = local_48;
    (**(code **)(*param_2 + 0x18))
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,&local_58);
    if (*param_7 == 0) {
      if ((code *)param_9[4] != (code *)0x0) {
        (*(code *)param_9[4])(param_9);
      }
      *param_9 = (longlong)(param_9 + 2);
      _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag_isra_0
                (param_9,local_58,(longlong)(local_58 + local_50));
      param_9[4] = (longlong)_text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
    }
    *(undefined8 *)this = local_68;
    *(ulonglong *)(this + 8) = uVar1 & 0xffffffff00000000 | local_60 & 0xffffffff;
    if (local_58 != local_48) {
      operator_delete(local_58);
    }
  }
  else {
    local_68 = local_78;
    local_78 = local_88;
    uStack_70 = uStack_80;
    local_60 = uVar1;
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_68,&local_78,param_5,param_6,param_7,param_8)
    ;
  }
  return this;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// std::__facet_shims::__money_get<wchar_t>(std::integral_constant<bool, false>, std::locale::facet
// const*, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, long double*, std::__facet_shims::__any_string*)

__facet_shims * __thiscall
std::__facet_shims::__money_get<wchar_t>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,undefined1 param_5,undefined8 param_6,int *param_7,longlong param_8,
          undefined8 *param_9)

{
  undefined8 uVar1;
  ulonglong uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  int iVar5;
  ulonglong *puVar6;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  ulonglong uStack_70;
  undefined8 local_68;
  ulonglong local_60;
  undefined1 local_51;
  ulonglong *local_50 [3];
  
  uVar1 = *param_3;
  uVar2 = param_3[1];
  uVar3 = *param_4;
  uVar4 = param_4[1];
  if (param_8 == 0) {
    local_50[0] = std::wstring::_S_construct(0,0);
    local_88 = uVar3;
    uStack_80 = uVar4;
    local_78 = uVar1;
    uStack_70 = uVar2;
    (**(code **)(*param_2 + 0x18))
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,local_50);
    if (*param_7 == 0) {
      if ((code *)param_9[4] != (code *)0x0) {
        (*(code *)param_9[4])(param_9);
      }
      if ((int)local_50[0][-1] < 0) {
        puVar6 = (ulonglong *)std::wstring::_Rep::_M_clone((_Rep *)(local_50[0] + -3),&local_51,0);
      }
      else {
        puVar6 = local_50[0];
        if (_CRT_MT == 0) {
          *(int *)(local_50[0] + -1) = (int)local_50[0][-1] + 1;
        }
        else {
          LOCK();
          *(int *)(local_50[0] + -1) = (int)local_50[0][-1] + 1;
          UNLOCK();
        }
      }
      *param_9 = puVar6;
      param_9[1] = local_50[0][-3];
      param_9[4] = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
    }
    iVar5 = _CRT_MT;
    *(undefined8 *)this = local_68;
    *(ulonglong *)(this + 8) = uVar2 & 0xffffffffffff0000 | local_60 & 0xffff;
    if (iVar5 == 0) {
      iVar5 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar6 = local_50[0] + -1;
      iVar5 = (int)*puVar6;
      *(int *)puVar6 = (int)*puVar6 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::wstring::_Rep::_M_destroy(local_50[0] + -3);
    }
  }
  else {
    local_78 = uVar3;
    uStack_70 = uVar4;
    local_68 = uVar1;
    local_60 = uVar2;
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_68,&local_78,param_5,param_6,param_7,param_8)
    ;
  }
  return this;
}



// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// std::__facet_shims::__money_get<wchar_t>(std::integral_constant<bool, true>, std::locale::facet
// const*, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >,
// std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// std::_Ios_Iostate&, long double*, std::__facet_shims::__any_string*)

__facet_shims * __thiscall
std::__facet_shims::__money_get<wchar_t>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined8 *param_4,undefined1 param_5,undefined8 param_6,int *param_7,longlong param_8,
          longlong *param_9)

{
  ulonglong uVar1;
  undefined8 local_88;
  undefined8 uStack_80;
  undefined8 local_78;
  ulonglong uStack_70;
  undefined8 local_68;
  ulonglong local_60;
  undefined2 *local_58;
  longlong local_50;
  undefined2 local_48 [12];
  
  local_78 = *param_3;
  uVar1 = param_3[1];
  local_88 = *param_4;
  uStack_80 = param_4[1];
  if (param_8 == 0) {
    local_48[0] = 0;
    local_50 = 0;
    uStack_70 = uVar1;
    local_58 = local_48;
    (**(code **)(*param_2 + 0x18))
              (&local_68,param_2,&local_78,&local_88,param_5,param_6,param_7,&local_58);
    if (*param_7 == 0) {
      if ((code *)param_9[4] != (code *)0x0) {
        (*(code *)param_9[4])(param_9);
      }
      *param_9 = (longlong)(param_9 + 2);
      _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag_isra_0
                (param_9,local_58,(longlong)(local_58 + local_50));
      param_9[4] = (longlong)_text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
    }
    *(undefined8 *)this = local_68;
    *(ulonglong *)(this + 8) = uVar1 & 0xffffffffffff0000 | local_60 & 0xffff;
    if (local_58 != local_48) {
      operator_delete(local_58);
    }
  }
  else {
    local_68 = local_78;
    local_78 = local_88;
    uStack_70 = uStack_80;
    local_60 = uVar1;
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_68,&local_78,param_5,param_6,param_7,param_8)
    ;
  }
  return this;
}



// std::ostreambuf_iterator<char, std::char_traits<char> >
// std::__facet_shims::__money_put<char>(std::integral_constant<bool, false>, std::locale::facet
// const*, std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char, long
// double, std::__facet_shims::__any_string const*)

__facet_shims * __thiscall
std::__facet_shims::__money_put<char>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined1 param_4,undefined8 param_5,char param_6,undefined1 (*param_7) [10],
          undefined8 *param_8)

{
  ulonglong *puVar1;
  int iVar2;
  undefined1 local_68 [10];
  undefined8 local_58;
  undefined8 uStack_50;
  ulonglong *local_40 [3];
  
  local_58 = *param_3;
  uStack_50 = param_3[1];
  local_68 = *param_7;
  if (param_8 == (undefined8 *)0x0) {
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_58,param_4,param_5,(int)param_6,local_68);
  }
  else {
    if (param_8[4] == 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("uninitialized __any_string");
    }
    local_40[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            ((undefined1 *)*param_8,(longlong)((undefined1 *)*param_8 + param_8[1]))
    ;
    (**(code **)(*param_2 + 0x18))(this,param_2,&local_58,param_4,param_5,(int)param_6,local_40);
    if (_CRT_MT == 0) {
      iVar2 = (int)local_40[0][-1];
      *(int *)(local_40[0] + -1) = iVar2 + -1;
    }
    else {
      LOCK();
      puVar1 = local_40[0] + -1;
      iVar2 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      std::string::_Rep::_M_destroy(local_40[0] + -3);
    }
  }
  return this;
}



// std::ostreambuf_iterator<char, std::char_traits<char> >
// std::__facet_shims::__money_put<char>(std::integral_constant<bool, true>, std::locale::facet
// const*, std::ostreambuf_iterator<char, std::char_traits<char> >, bool, std::ios_base&, char, long
// double, std::__facet_shims::__any_string const*)

__facet_shims * __thiscall
std::__facet_shims::__money_put<char>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined1 param_4,undefined8 param_5,char param_6,undefined1 (*param_7) [10],
          undefined8 *param_8)

{
  undefined1 *_Src;
  ulonglong _Size;
  undefined1 local_a8 [10];
  undefined8 local_98;
  undefined8 uStack_90;
  ulonglong local_80;
  ulonglong *local_78;
  ulonglong local_70;
  ulonglong local_68 [5];
  
  local_98 = *param_3;
  uStack_90 = param_3[1];
  local_a8 = *param_7;
  if (param_8 == (undefined8 *)0x0) {
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_98,param_4,param_5,(int)param_6,local_a8);
    return this;
  }
  if (param_8[4] == 0) {
LAB_14008469f:
                    // WARNING: Subroutine does not return
    __throw_logic_error("uninitialized __any_string");
  }
  _Src = (undefined1 *)*param_8;
  _Size = param_8[1];
  local_78 = local_68;
  if ((_Src == (undefined1 *)0x0) && (_Size != 0)) {
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
    goto LAB_14008469f;
  }
  local_80 = _Size;
  if (_Size < 0x10) {
    if (_Size == 1) {
      local_68[0] = CONCAT71(local_68[0]._1_7_,*_Src);
      goto LAB_14008458b;
    }
    if (_Size == 0) goto LAB_14008458b;
  }
  else {
    local_78 = (ulonglong *)__cxx11::string::_M_create(&local_78,&local_80,0);
    local_68[0] = local_80;
  }
  memcpy(local_78,_Src,_Size);
LAB_14008458b:
  *(undefined1 *)((longlong)local_78 + local_80) = 0;
  local_70 = local_80;
  (**(code **)(*param_2 + 0x18))(this,param_2,&local_98,param_4,param_5,(int)param_6,&local_78);
  if (local_78 != local_68) {
    operator_delete(local_78);
  }
  return this;
}



// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// std::__facet_shims::__money_put<wchar_t>(std::integral_constant<bool, false>, std::locale::facet
// const*, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, long double, std::__facet_shims::__any_string const*)

__facet_shims * __thiscall
std::__facet_shims::__money_put<wchar_t>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined1 param_4,undefined8 param_5,undefined2 param_6,undefined1 (*param_7) [10],
          undefined8 *param_8)

{
  ulonglong *puVar1;
  int iVar2;
  undefined1 local_68 [10];
  undefined8 local_58;
  undefined8 uStack_50;
  ulonglong *local_40 [3];
  
  local_58 = *param_3;
  uStack_50 = param_3[1];
  local_68 = *param_7;
  if (param_8 == (undefined8 *)0x0) {
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_58,param_4,param_5,param_6,local_68);
  }
  else {
    if (param_8[4] == 0) {
                    // WARNING: Subroutine does not return
      __throw_logic_error("uninitialized __any_string");
    }
    local_40[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            ((undefined2 *)*param_8,(longlong)((undefined2 *)*param_8 + param_8[1]))
    ;
    (**(code **)(*param_2 + 0x18))(this,param_2,&local_58,param_4,param_5,param_6,local_40);
    if (_CRT_MT == 0) {
      iVar2 = (int)local_40[0][-1];
      *(int *)(local_40[0] + -1) = iVar2 + -1;
    }
    else {
      LOCK();
      puVar1 = local_40[0] + -1;
      iVar2 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      std::wstring::_Rep::_M_destroy(local_40[0] + -3);
    }
  }
  return this;
}



// std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// std::__facet_shims::__money_put<wchar_t>(std::integral_constant<bool, true>, std::locale::facet
// const*, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >, bool, std::ios_base&,
// wchar_t, long double, std::__facet_shims::__any_string const*)

__facet_shims * __thiscall
std::__facet_shims::__money_put<wchar_t>
          (__facet_shims *this,undefined8 param_1,longlong *param_2,undefined8 *param_3,
          undefined1 param_4,undefined8 param_5,undefined2 param_6,undefined1 (*param_7) [10],
          undefined8 *param_8)

{
  undefined2 *puVar1;
  undefined1 local_88 [10];
  undefined8 local_78;
  undefined8 uStack_70;
  undefined1 *local_68 [2];
  undefined1 local_58 [40];
  
  local_78 = *param_3;
  uStack_70 = param_3[1];
  local_88 = *param_7;
  if (param_8 == (undefined8 *)0x0) {
    (**(code **)(*param_2 + 0x10))(this,param_2,&local_78,param_4,param_5,param_6,local_88);
    return this;
  }
  if (param_8[4] != 0) {
    puVar1 = (undefined2 *)*param_8;
    local_68[0] = local_58;
    if ((puVar1 != (undefined2 *)0x0) || (param_8[1] == 0)) {
      _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
                (local_68,puVar1,(longlong)(puVar1 + param_8[1]));
      (**(code **)(*param_2 + 0x18))(this,param_2,&local_78,param_4,param_5,param_6,local_68);
      if (local_68[0] == local_58) {
        return this;
      }
      operator_delete(local_68[0]);
      return this;
    }
    _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("uninitialized __any_string");
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db8f0;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400de8a0;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db930;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400dcc20;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db8f0;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400de8a0;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIcED2Ev_1400db930;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400dcc20;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db970;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400de8e0;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db9b0;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400dcc60;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db970;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400de8e0;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_112collate_shimIwED2Ev_1400db9b0;
  plVar2 = (longlong *)param_1[3];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__collate_1400dcc60;
  std::locale::facet::_S_destroy_c_locale(param_1 + 2);
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED0Ev(messages<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400db9f0;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::messages<char>::~messages(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED0Ev(messages<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400dba30;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::messages<char>::~messages(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev(messages<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400db9f0;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::messages<char>::~messages(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev(messages<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIcED2Ev_1400dba30;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::messages<char>::~messages(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED0Ev(messages<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dba70;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::messages<wchar_t>::~messages(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED0Ev(messages<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dbab0;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::messages<wchar_t>::~messages(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev(messages<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dba70;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::messages<wchar_t>::~messages(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev(messages<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113messages_shimIwED2Ev_1400dbab0;
  plVar2 = *(longlong **)(param_1 + 0x20);
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::messages<wchar_t>::~messages(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED0Ev(numpunct<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbaf0;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::numpunct<char>::~numpunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED0Ev(numpunct<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbb40;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::numpunct<char>::~numpunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev(numpunct<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbaf0;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::numpunct<char>::~numpunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev(numpunct<char> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIcED2Ev_1400dbb40;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::numpunct<char>::~numpunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED0Ev(numpunct<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbb90;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::numpunct<wchar_t>::~numpunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED0Ev(numpunct<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbbe0;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::numpunct<wchar_t>::~numpunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev(numpunct<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbb90;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::numpunct<wchar_t>::~numpunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev(numpunct<wchar_t> *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113numpunct_shimIwED2Ev_1400dbbe0;
  plVar2 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(*(longlong *)(param_1 + 0x20) + 0x18) = 0;
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  std::__cxx11::numpunct<wchar_t>::~numpunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc30;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400dec50;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc80;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400dcdc0;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc30;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400dec50;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIcED2Ev_1400dbc80;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400dcdc0;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbce0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400deca0;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbd30;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400dce20;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbce0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400deca0;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_113time_get_shimIwED2Ev_1400dbd30;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__time_get_1400dce20;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbd90;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dedf0;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbdc0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dce80;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbd90;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dedf0;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIcED2Ev_1400dbdc0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dce80;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbdf0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dee20;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbe20;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dceb0;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbdf0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dee20;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_get_shimIwED2Ev_1400dbe20;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_get_1400dceb0;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe50;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dee50;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe80;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dcee0;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe50;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dee50;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIcED2Ev_1400dbe80;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dcee0;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbeb0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dee80;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED0Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbee0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dcf10;
  std::locale::facet::~facet();
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbeb0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dee80;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev(undefined8 *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  
  *param_1 = &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_114money_put_shimIwED2Ev_1400dbee0;
  plVar2 = (longlong *)param_1[2];
  if (_CRT_MT == 0) {
    iVar3 = (int)plVar2[1];
    *(int *)(plVar2 + 1) = iVar3 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar2 + 1;
    iVar3 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar3 == 1) {
    (**(code **)(*plVar2 + 8))();
  }
  *param_1 = &PTR__money_put_1400dcf10;
  std::locale::facet::~facet();
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED0Ev
               (moneypunct<char,false> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf10;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<char,false>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED0Ev
               (moneypunct<char,false> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf80;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<char,false>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev
               (moneypunct<char,false> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf10;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<char,false>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev
               (moneypunct<char,false> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb0EED2Ev_1400dbf80;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<char,false>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED0Ev
               (moneypunct<char,true> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dbff0;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<char,true>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED0Ev
               (moneypunct<char,true> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dc060;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<char,true>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev
               (moneypunct<char,true> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dbff0;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<char,true>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev
               (moneypunct<char,true> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIcLb1EED2Ev_1400dc060;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<char,true>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED0Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc0d0;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED0Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc140;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc0d0;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb0EED2Ev_1400dc140;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED0Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc1b0;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED0Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc220;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<>::~moneypunct(param_1);
  operator_delete(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc1b0;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::moneypunct<>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev(moneypunct<> *param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  int iVar4;
  
  *(undefined ***)param_1 =
       &PTR__text__ZNSt13__facet_shims12_GLOBAL__N_115moneypunct_shimIwLb1EED2Ev_1400dc220;
  lVar2 = *(longlong *)(param_1 + 0x20);
  plVar3 = *(longlong **)(param_1 + 0x18);
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  if (_CRT_MT == 0) {
    iVar4 = (int)plVar3[1];
    *(int *)(plVar3 + 1) = iVar4 + -1;
  }
  else {
    LOCK();
    plVar1 = plVar3 + 1;
    iVar4 = (int)*plVar1;
    *(int *)plVar1 = (int)*plVar1 + -1;
    UNLOCK();
  }
  if (iVar4 == 1) {
    (**(code **)(*plVar3 + 8))();
  }
  std::__cxx11::moneypunct<>::~moneypunct(param_1);
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv(longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *param_1;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv(undefined8 *param_1)

{
  if ((undefined8 *)*param_1 != param_1 + 2) {
    operator_delete((undefined8 *)*param_1);
    return;
  }
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv(longlong *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  lVar3 = *param_1;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::wstring::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  return;
}



void _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv(undefined8 *param_1)

{
  if ((undefined8 *)*param_1 != param_1 + 2) {
    operator_delete((undefined8 *)*param_1);
    return;
  }
  return;
}



// void std::__facet_shims::__messages_get<char>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, char const*,
// unsigned long long)

void std::__facet_shims::__messages_get<char>
               (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined4 param_4,
               undefined4 param_5,undefined4 param_6,undefined1 *param_7,longlong param_8)

{
  ulonglong *puVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 local_39;
  ulonglong *local_38;
  longlong *local_30 [2];
  
  local_38 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                       (param_7,(longlong)(param_7 + param_8));
  (**(code **)(*param_2 + 0x18))(local_30,param_2,param_4,param_5,param_6,&local_38);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  if ((int)local_30[0][-1] < 0) {
    plVar3 = std::string::_Rep::_M_clone((_Rep *)(local_30[0] + -3),&local_39,0);
  }
  else {
    plVar3 = local_30[0];
    if (_CRT_MT == 0) {
      *(int *)(local_30[0] + -1) = (int)local_30[0][-1] + 1;
    }
    else {
      LOCK();
      *(int *)(local_30[0] + -1) = (int)local_30[0][-1] + 1;
      UNLOCK();
    }
  }
  iVar2 = _CRT_MT;
  *param_3 = plVar3;
  param_3[1] = local_30[0][-3];
  param_3[4] = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
  if (iVar2 == 0) {
    iVar2 = (int)local_30[0][-1];
    *(int *)(local_30[0] + -1) = iVar2 + -1;
  }
  else {
    LOCK();
    plVar3 = local_30[0] + -1;
    iVar2 = (int)*plVar3;
    *(int *)plVar3 = (int)*plVar3 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy(local_30[0] + -3);
  }
  if (_CRT_MT == 0) {
    iVar2 = (int)local_38[-1];
    *(int *)(local_38 + -1) = iVar2 + -1;
  }
  else {
    LOCK();
    puVar1 = local_38 + -1;
    iVar2 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::string::_Rep::_M_destroy(local_38 + -3);
  return;
}



// void std::__facet_shims::__messages_get<char>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, char const*,
// unsigned long long)

void std::__facet_shims::__messages_get<char>
               (undefined8 param_1,longlong *param_2,longlong *param_3,undefined4 param_4,
               undefined4 param_5,undefined4 param_6,undefined1 *param_7,longlong param_8)

{
  PVOID pvVar1;
  string *unaff_RBP;
  string *unaff_R13;
  undefined1 *local_78 [2];
  undefined1 local_68 [16];
  undefined1 *local_58;
  longlong local_50;
  undefined1 local_48 [24];
  
  local_78[0] = local_68;
  if ((param_7 == (undefined1 *)0x0) && (param_8 != 0)) {
    pvVar1 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
    __cxx11::string::_M_dispose(unaff_R13);
    __cxx11::string::_M_dispose(unaff_RBP);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar1);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)local_78,param_7,(longlong)(param_7 + param_8));
  (**(code **)(*param_2 + 0x18))(&local_58,param_2,param_4,param_5,param_6,local_78);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  *param_3 = (longlong)(param_3 + 2);
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag_isra_0
            (param_3,local_58,(longlong)(local_58 + local_50));
  param_3[4] = (longlong)_text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  if (local_78[0] != local_68) {
    operator_delete(local_78[0]);
  }
  return;
}



// void std::__facet_shims::__messages_get<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, wchar_t const*,
// unsigned long long)

void std::__facet_shims::__messages_get<wchar_t>
               (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined4 param_4,
               undefined4 param_5,undefined4 param_6,undefined2 *param_7,longlong param_8)

{
  ulonglong *puVar1;
  int iVar2;
  longlong *plVar3;
  undefined1 local_39;
  ulonglong *local_38;
  longlong *local_30 [2];
  
  local_38 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                       (param_7,(longlong)(param_7 + param_8));
  (**(code **)(*param_2 + 0x18))(local_30,param_2,param_4,param_5,param_6,&local_38);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  if ((int)local_30[0][-1] < 0) {
    plVar3 = std::wstring::_Rep::_M_clone((_Rep *)(local_30[0] + -3),&local_39,0);
  }
  else {
    plVar3 = local_30[0];
    if (_CRT_MT == 0) {
      *(int *)(local_30[0] + -1) = (int)local_30[0][-1] + 1;
    }
    else {
      LOCK();
      *(int *)(local_30[0] + -1) = (int)local_30[0][-1] + 1;
      UNLOCK();
    }
  }
  iVar2 = _CRT_MT;
  *param_3 = plVar3;
  param_3[1] = local_30[0][-3];
  param_3[4] = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
  if (iVar2 == 0) {
    iVar2 = (int)local_30[0][-1];
    *(int *)(local_30[0] + -1) = iVar2 + -1;
  }
  else {
    LOCK();
    plVar3 = local_30[0] + -1;
    iVar2 = (int)*plVar3;
    *(int *)plVar3 = (int)*plVar3 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::wstring::_Rep::_M_destroy(local_30[0] + -3);
  }
  if (_CRT_MT == 0) {
    iVar2 = (int)local_38[-1];
    *(int *)(local_38 + -1) = iVar2 + -1;
  }
  else {
    LOCK();
    puVar1 = local_38 + -1;
    iVar2 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::wstring::_Rep::_M_destroy(local_38 + -3);
  return;
}



// void std::__facet_shims::__messages_get<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__facet_shims::__any_string&, int, int, int, wchar_t const*,
// unsigned long long)

void std::__facet_shims::__messages_get<wchar_t>
               (undefined8 param_1,longlong *param_2,longlong *param_3,undefined4 param_4,
               undefined4 param_5,undefined4 param_6,undefined2 *param_7,longlong param_8)

{
  PVOID pvVar1;
  wstring *unaff_RBP;
  wstring *unaff_R13;
  undefined1 *local_78 [2];
  undefined1 local_68 [16];
  undefined2 *local_58;
  longlong local_50;
  undefined2 local_48 [12];
  
  local_78[0] = local_68;
  if ((param_7 == (undefined2 *)0x0) && (param_8 != 0)) {
    pvVar1 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
    __cxx11::wstring::_M_dispose(unaff_R13);
    __cxx11::wstring::_M_dispose(unaff_RBP);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar1);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            (local_78,param_7,(longlong)(param_7 + param_8));
  (**(code **)(*param_2 + 0x18))(&local_58,param_2,param_4,param_5,param_6,local_78);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  *param_3 = (longlong)(param_3 + 2);
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag_isra_0
            (param_3,local_58,(longlong)(local_58 + local_50));
  param_3[4] = (longlong)_text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  if (local_78[0] != local_68) {
    operator_delete(local_78[0]);
  }
  return;
}



// int std::__facet_shims::__messages_open<char>(std::integral_constant<bool, false>,
// std::locale::facet const*, char const*, unsigned long long, std::locale const&)

ulonglong std::__facet_shims::__messages_open<char>
                    (undefined8 param_1,longlong *param_2,undefined1 *param_3,longlong param_4,
                    undefined8 param_5)

{
  ulonglong *puVar1;
  int iVar2;
  ulonglong uVar3;
  ulonglong *local_20 [2];
  
  local_20[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                          (param_3,(longlong)(param_3 + param_4));
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2,local_20,param_5);
  if (_CRT_MT == 0) {
    iVar2 = (int)local_20[0][-1];
    *(int *)(local_20[0] + -1) = iVar2 + -1;
  }
  else {
    LOCK();
    puVar1 = local_20[0] + -1;
    iVar2 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return uVar3;
  }
  std::string::_Rep::_M_destroy(local_20[0] + -3);
  return uVar3 & 0xffffffff;
}



// int std::__facet_shims::__messages_open<char>(std::integral_constant<bool, true>,
// std::locale::facet const*, char const*, unsigned long long, std::locale const&)

undefined4
std::__facet_shims::__messages_open<char>
          (undefined8 param_1,longlong *param_2,undefined1 *param_3,longlong param_4,
          undefined8 param_5)

{
  undefined4 uVar1;
  PVOID pvVar2;
  string *unaff_RDI;
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  local_38[0] = local_28;
  if ((param_3 == (undefined1 *)0x0) && (param_4 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
    __cxx11::string::_M_dispose(unaff_RDI);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)local_38,param_3,(longlong)(param_3 + param_4));
  uVar1 = (**(code **)(*param_2 + 0x10))(param_2,local_38,param_5);
  if (local_38[0] != local_28) {
    operator_delete(local_38[0]);
  }
  return uVar1;
}



// int std::__facet_shims::__messages_open<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*, char const*, unsigned long long, std::locale const&)

ulonglong std::__facet_shims::__messages_open<wchar_t>
                    (undefined8 param_1,longlong *param_2,undefined1 *param_3,longlong param_4,
                    undefined8 param_5)

{
  ulonglong *puVar1;
  int iVar2;
  ulonglong uVar3;
  ulonglong *local_20 [2];
  
  local_20[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                          (param_3,(longlong)(param_3 + param_4));
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2,local_20,param_5);
  if (_CRT_MT == 0) {
    iVar2 = (int)local_20[0][-1];
    *(int *)(local_20[0] + -1) = iVar2 + -1;
  }
  else {
    LOCK();
    puVar1 = local_20[0] + -1;
    iVar2 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return uVar3;
  }
  std::string::_Rep::_M_destroy(local_20[0] + -3);
  return uVar3 & 0xffffffff;
}



// int std::__facet_shims::__messages_open<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*, char const*, unsigned long long, std::locale const&)

undefined4
std::__facet_shims::__messages_open<wchar_t>
          (undefined8 param_1,longlong *param_2,undefined1 *param_3,longlong param_4,
          undefined8 param_5)

{
  undefined4 uVar1;
  PVOID pvVar2;
  string *unaff_RDI;
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  local_38[0] = local_28;
  if ((param_3 == (undefined1 *)0x0) && (param_4 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0();
    __cxx11::string::_M_dispose(unaff_RDI);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)local_38,param_3,(longlong)(param_3 + param_4));
  uVar1 = (**(code **)(*param_2 + 0x10))(param_2,local_38,param_5);
  if (local_38[0] != local_28) {
    operator_delete(local_38[0]);
  }
  return uVar1;
}



// void std::__facet_shims::__messages_close<char>(std::integral_constant<bool, false>,
// std::locale::facet const*, int)

void std::__facet_shims::__messages_close<char>
               (undefined8 param_1,longlong *param_2,undefined4 param_3)

{
                    // WARNING: Could not recover jumptable at 0x000140086ef9. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x20))(param_2,param_3);
  return;
}



// void std::__facet_shims::__messages_close<char>(std::integral_constant<bool, true>,
// std::locale::facet const*, int)

void std::__facet_shims::__messages_close<char>
               (undefined8 param_1,longlong *param_2,undefined4 param_3)

{
                    // WARNING: Could not recover jumptable at 0x000140086f09. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x20))(param_2,param_3);
  return;
}



// void std::__facet_shims::__messages_close<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*, int)

void std::__facet_shims::__messages_close<wchar_t>
               (undefined8 param_1,longlong *param_2,undefined4 param_3)

{
                    // WARNING: Could not recover jumptable at 0x000140086f19. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x20))(param_2,param_3);
  return;
}



// void std::__facet_shims::__messages_close<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*, int)

void std::__facet_shims::__messages_close<wchar_t>
               (undefined8 param_1,longlong *param_2,undefined4 param_3)

{
                    // WARNING: Could not recover jumptable at 0x000140086f29. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x20))(param_2,param_3);
  return;
}



// int std::__facet_shims::__collate_compare<char>(std::integral_constant<bool, false>,
// std::locale::facet const*, char const*, char const*, char const*, char const*)

int std::__facet_shims::__collate_compare<char>
              (undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4,
              undefined8 param_5)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140086f4b. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = (**(code **)(*param_2 + 0x10))(param_2,param_3,param_4,param_5);
  return iVar1;
}



// int std::__facet_shims::__collate_compare<char>(std::integral_constant<bool, true>,
// std::locale::facet const*, char const*, char const*, char const*, char const*)

int std::__facet_shims::__collate_compare<char>
              (undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4,
              undefined8 param_5)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140086f6b. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = (**(code **)(*param_2 + 0x10))(param_2,param_3,param_4,param_5);
  return iVar1;
}



// int std::__facet_shims::__collate_compare<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*, wchar_t const*, wchar_t const*, wchar_t const*, wchar_t const*)

int std::__facet_shims::__collate_compare<wchar_t>
              (undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4,
              undefined8 param_5)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140086f8b. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = (**(code **)(*param_2 + 0x10))(param_2,param_3,param_4,param_5);
  return iVar1;
}



// int std::__facet_shims::__collate_compare<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*, wchar_t const*, wchar_t const*, wchar_t const*, wchar_t const*)

int std::__facet_shims::__collate_compare<wchar_t>
              (undefined8 param_1,longlong *param_2,undefined8 param_3,undefined8 param_4,
              undefined8 param_5)

{
  int iVar1;
  
                    // WARNING: Could not recover jumptable at 0x000140086fab. Too many branches
                    // WARNING: Treating indirect jump as call
  iVar1 = (**(code **)(*param_2 + 0x10))(param_2,param_3,param_4,param_5);
  return iVar1;
}



// void std::__facet_shims::__collate_transform<char>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__facet_shims::__any_string&, char const*, char const*)

void std::__facet_shims::__collate_transform<char>
               (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 param_4,
               undefined8 param_5)

{
  int iVar1;
  longlong *plVar2;
  undefined1 local_11;
  longlong *local_10;
  
  (**(code **)(*param_2 + 0x18))(&local_10,param_2,param_4,param_5);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  if ((int)local_10[-1] < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(local_10 + -3),&local_11,0);
  }
  else {
    plVar2 = local_10;
    if (_CRT_MT == 0) {
      *(int *)(local_10 + -1) = (int)local_10[-1] + 1;
    }
    else {
      LOCK();
      *(int *)(local_10 + -1) = (int)local_10[-1] + 1;
      UNLOCK();
    }
  }
  *param_3 = plVar2;
  param_3[1] = local_10[-3];
  param_3[4] = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
  if (_CRT_MT == 0) {
    iVar1 = (int)local_10[-1];
    *(int *)(local_10 + -1) = iVar1 + -1;
  }
  else {
    LOCK();
    plVar2 = local_10 + -1;
    iVar1 = (int)*plVar2;
    *(int *)plVar2 = (int)*plVar2 + -1;
    UNLOCK();
  }
  if (0 < iVar1) {
    return;
  }
  std::string::_Rep::_M_destroy(local_10 + -3);
  return;
}



// void std::__facet_shims::__collate_transform<char>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__facet_shims::__any_string&, char const*, char const*)

void std::__facet_shims::__collate_transform<char>
               (undefined8 param_1,longlong *param_2,longlong *param_3,undefined8 param_4,
               undefined8 param_5)

{
  undefined1 *local_38;
  longlong local_30;
  undefined1 local_28 [24];
  
  (**(code **)(*param_2 + 0x18))(&local_38,param_2,param_4,param_5);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  *param_3 = (longlong)(param_3 + 2);
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag_isra_0
            (param_3,local_38,(longlong)(local_38 + local_30));
  param_3[4] = (longlong)_text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIcEEvPv;
  if (local_38 != local_28) {
    operator_delete(local_38);
  }
  return;
}



// void std::__facet_shims::__collate_transform<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__facet_shims::__any_string&, wchar_t const*, wchar_t const*)

void std::__facet_shims::__collate_transform<wchar_t>
               (undefined8 param_1,longlong *param_2,undefined8 *param_3,undefined8 param_4,
               undefined8 param_5)

{
  int iVar1;
  longlong *plVar2;
  undefined1 local_11;
  longlong *local_10;
  
  (**(code **)(*param_2 + 0x18))(&local_10,param_2,param_4,param_5);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  if ((int)local_10[-1] < 0) {
    plVar2 = std::wstring::_Rep::_M_clone((_Rep *)(local_10 + -3),&local_11,0);
  }
  else {
    plVar2 = local_10;
    if (_CRT_MT == 0) {
      *(int *)(local_10 + -1) = (int)local_10[-1] + 1;
    }
    else {
      LOCK();
      *(int *)(local_10 + -1) = (int)local_10[-1] + 1;
      UNLOCK();
    }
  }
  *param_3 = plVar2;
  param_3[1] = local_10[-3];
  param_3[4] = _text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
  if (_CRT_MT == 0) {
    iVar1 = (int)local_10[-1];
    *(int *)(local_10 + -1) = iVar1 + -1;
  }
  else {
    LOCK();
    plVar2 = local_10 + -1;
    iVar1 = (int)*plVar2;
    *(int *)plVar2 = (int)*plVar2 + -1;
    UNLOCK();
  }
  if (0 < iVar1) {
    return;
  }
  std::wstring::_Rep::_M_destroy(local_10 + -3);
  return;
}



// void std::__facet_shims::__collate_transform<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__facet_shims::__any_string&, wchar_t const*, wchar_t const*)

void std::__facet_shims::__collate_transform<wchar_t>
               (undefined8 param_1,longlong *param_2,longlong *param_3,undefined8 param_4,
               undefined8 param_5)

{
  undefined2 *local_38;
  longlong local_30;
  undefined2 local_28 [12];
  
  (**(code **)(*param_2 + 0x18))(&local_38,param_2,param_4,param_5);
  if ((code *)param_3[4] != (code *)0x0) {
    (*(code *)param_3[4])(param_3);
  }
  *param_3 = (longlong)(param_3 + 2);
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag_isra_0
            (param_3,local_38,(longlong)(local_38 + local_30));
  param_3[4] = (longlong)_text__ZNSt13__facet_shims12_GLOBAL__N_116__destroy_stringIwEEvPv;
  if (local_38 != local_28) {
    operator_delete(local_38);
  }
  return;
}



// std::time_base::dateorder
// std::__facet_shims::__time_get_dateorder<char>(std::integral_constant<bool, false>,
// std::locale::facet const*)

void std::__facet_shims::__time_get_dateorder<char>(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001400872d6. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x10))(param_2);
  return;
}



// std::time_base::dateorder
// std::__facet_shims::__time_get_dateorder<char>(std::integral_constant<bool, true>,
// std::locale::facet const*)

void std::__facet_shims::__time_get_dateorder<char>(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001400872e6. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x10))(param_2);
  return;
}



// std::time_base::dateorder
// std::__facet_shims::__time_get_dateorder<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*)

void std::__facet_shims::__time_get_dateorder<wchar_t>(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x0001400872f6. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x10))(param_2);
  return;
}



// std::time_base::dateorder
// std::__facet_shims::__time_get_dateorder<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*)

void std::__facet_shims::__time_get_dateorder<wchar_t>(undefined8 param_1,longlong *param_2)

{
                    // WARNING: Could not recover jumptable at 0x000140087306. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_2 + 0x10))(param_2);
  return;
}



// void std::__facet_shims::__numpunct_fill_cache<char>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__numpunct_cache<char>*)

void std::__facet_shims::__numpunct_fill_cache<char>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined1 uVar5;
  undefined1 *puVar6;
  longlong local_40 [2];
  
  uVar5 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined1 *)(param_3 + 0x48) = uVar5;
  uVar5 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 0x88) = 1;
  *(undefined1 *)(param_3 + 0x49) = uVar5;
  lVar3 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  (**(code **)(lVar3 + 0x20))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar6 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar6,uVar4,0);
  puVar6[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar4;
  *(undefined1 **)(param_3 + 0x10) = puVar6;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x28))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar6 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar6,uVar4,0);
  iVar2 = _CRT_MT;
  puVar6[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x28) = puVar6;
  *(ulonglong *)(param_3 + 0x30) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x30))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar6 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar6,uVar4,0);
  iVar2 = _CRT_MT;
  puVar6[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x38) = puVar6;
  *(ulonglong *)(param_3 + 0x40) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  return;
}



// void std::__facet_shims::__numpunct_fill_cache<char>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__numpunct_cache<char>*)

void std::__facet_shims::__numpunct_fill_cache<char>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined1 uVar3;
  undefined1 *puVar4;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48 [24];
  
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined1 *)(param_3 + 0x48) = uVar3;
  uVar3 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 0x88) = 1;
  *(undefined1 *)(param_3 + 0x49) = uVar3;
  lVar1 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  (**(code **)(lVar1 + 0x20))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar4 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar4,uVar2,0);
  puVar4[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar2;
  *(undefined1 **)(param_3 + 0x10) = puVar4;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar4 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar4,uVar2,0);
  puVar4[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x28) = puVar4;
  *(ulonglong *)(param_3 + 0x30) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_58,param_2);
  puVar4 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar4,local_50,0);
  puVar4[local_50] = 0;
  *(undefined1 **)(param_3 + 0x38) = puVar4;
  *(ulonglong *)(param_3 + 0x40) = local_50;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  return;
}



// void std::__facet_shims::__numpunct_fill_cache<wchar_t>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__numpunct_cache<wchar_t>*)

void std::__facet_shims::__numpunct_fill_cache<wchar_t>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined2 uVar5;
  undefined1 *puVar6;
  undefined2 *puVar7;
  longlong local_40;
  
  uVar5 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined2 *)(param_3 + 0x48) = uVar5;
  uVar5 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 200) = 1;
  *(undefined2 *)(param_3 + 0x4a) = uVar5;
  lVar3 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  (**(code **)(lVar3 + 0x20))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  puVar6 = operator_new__(uVar4 + 1);
  std::string::copy((string *)&local_40,puVar6,uVar4,0);
  puVar6[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar4;
  *(undefined1 **)(param_3 + 0x10) = puVar6;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (0x3ffffffffffffffc < uVar4 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar7 = operator_new__((uVar4 + 1) * 2);
  std::wstring::copy((wstring *)&local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  *(undefined2 **)(param_3 + 0x28) = puVar7;
  puVar7[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x30) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (0x3ffffffffffffffc < uVar4 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar7 = operator_new__((uVar4 + 1) * 2);
  std::wstring::copy((wstring *)&local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  *(undefined2 **)(param_3 + 0x38) = puVar7;
  puVar7[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x40) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
  return;
}



// void std::__facet_shims::__numpunct_fill_cache<wchar_t>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__numpunct_cache<wchar_t>*)

void std::__facet_shims::__numpunct_fill_cache<wchar_t>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined2 uVar3;
  undefined1 *puVar4;
  undefined2 *puVar5;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48 [16];
  
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined2 *)(param_3 + 0x48) = uVar3;
  uVar3 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 200) = 1;
  *(undefined2 *)(param_3 + 0x4a) = uVar3;
  lVar1 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  (**(code **)(lVar1 + 0x20))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar4 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar4,uVar2,0);
  puVar4[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar2;
  *(undefined1 **)(param_3 + 0x10) = puVar4;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_58,param_2);
  uVar2 = local_50;
  if (0x3ffffffffffffffc < local_50 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar5 = operator_new__((local_50 + 1) * 2);
  __cxx11::wstring::copy((wstring *)&local_58,puVar5,uVar2,0);
  *(undefined2 **)(param_3 + 0x28) = puVar5;
  puVar5[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x30) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_58,param_2);
  if (local_50 + 1 < 0x3ffffffffffffffd) {
    puVar5 = operator_new__((local_50 + 1) * 2);
    __cxx11::wstring::copy((wstring *)&local_58,puVar5,local_50,0);
    *(undefined2 **)(param_3 + 0x38) = puVar5;
    puVar5[local_50] = 0;
    *(ulonglong *)(param_3 + 0x40) = local_50;
    if (local_58 != local_48) {
      operator_delete(local_58);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// void std::__facet_shims::__moneypunct_fill_cache<char, false>(std::integral_constant<bool,
// false>, std::locale::facet const*, std::__moneypunct_cache<char, false>*)

void std::__facet_shims::__moneypunct_fill_cache<char,false>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined1 uVar5;
  undefined4 uVar6;
  undefined1 *puVar7;
  longlong local_40 [2];
  
  uVar5 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined1 *)(param_3 + 0x21) = uVar5;
  uVar5 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 0x22) = uVar5;
  uVar6 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x6f) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar6;
  lVar3 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar3 + 0x20))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  puVar7[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar4;
  *(undefined1 **)(param_3 + 0x10) = puVar7;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x28))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x28) = puVar7;
  *(ulonglong *)(param_3 + 0x30) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x30))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x38) = puVar7;
  *(ulonglong *)(param_3 + 0x40) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x38))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x48) = puVar7;
  *(ulonglong *)(param_3 + 0x50) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  uVar6 = (**(code **)(*param_2 + 0x48))(param_2);
  *(undefined4 *)(param_3 + 0x5c) = uVar6;
  uVar6 = (**(code **)(*param_2 + 0x50))(param_2);
  *(undefined4 *)(param_3 + 0x60) = uVar6;
  return;
}



// void std::__facet_shims::__moneypunct_fill_cache<char, false>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__moneypunct_cache<char, false>*)

void std::__facet_shims::__moneypunct_fill_cache<char,false>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined1 uVar3;
  undefined4 uVar4;
  undefined1 *puVar5;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48 [24];
  
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined1 *)(param_3 + 0x21) = uVar3;
  uVar3 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 0x22) = uVar3;
  uVar4 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x6f) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar4;
  lVar1 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar1 + 0x20))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar2;
  *(undefined1 **)(param_3 + 0x10) = puVar5;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x28) = puVar5;
  *(ulonglong *)(param_3 + 0x30) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x38) = puVar5;
  *(ulonglong *)(param_3 + 0x40) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x38))((string *)&local_58,param_2);
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,local_50,0);
  puVar5[local_50] = 0;
  *(undefined1 **)(param_3 + 0x48) = puVar5;
  *(ulonglong *)(param_3 + 0x50) = local_50;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  uVar4 = (**(code **)(*param_2 + 0x48))(param_2);
  *(undefined4 *)(param_3 + 0x5c) = uVar4;
  uVar4 = (**(code **)(*param_2 + 0x50))(param_2);
  *(undefined4 *)(param_3 + 0x60) = uVar4;
  return;
}



// void std::__facet_shims::__moneypunct_fill_cache<char, true>(std::integral_constant<bool, false>,
// std::locale::facet const*, std::__moneypunct_cache<char, true>*)

void std::__facet_shims::__moneypunct_fill_cache<char,true>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined1 uVar5;
  undefined4 uVar6;
  undefined1 *puVar7;
  longlong local_40 [2];
  
  uVar5 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined1 *)(param_3 + 0x21) = uVar5;
  uVar5 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 0x22) = uVar5;
  uVar6 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x6f) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar6;
  lVar3 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar3 + 0x20))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  puVar7[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar4;
  *(undefined1 **)(param_3 + 0x10) = puVar7;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x28))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x28) = puVar7;
  *(ulonglong *)(param_3 + 0x30) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x30))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x38) = puVar7;
  *(ulonglong *)(param_3 + 0x40) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  (**(code **)(*param_2 + 0x38))((string *)local_40,param_2);
  uVar4 = *(ulonglong *)(local_40[0] + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)local_40,puVar7,uVar4,0);
  iVar2 = _CRT_MT;
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x48) = puVar7;
  *(ulonglong *)(param_3 + 0x50) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40[0] + -8);
    *(int *)(local_40[0] + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40[0] + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40[0] + -0x18));
  }
  uVar6 = (**(code **)(*param_2 + 0x48))(param_2);
  *(undefined4 *)(param_3 + 0x5c) = uVar6;
  uVar6 = (**(code **)(*param_2 + 0x50))(param_2);
  *(undefined4 *)(param_3 + 0x60) = uVar6;
  return;
}



// void std::__facet_shims::__moneypunct_fill_cache<char, true>(std::integral_constant<bool, true>,
// std::locale::facet const*, std::__moneypunct_cache<char, true>*)

void std::__facet_shims::__moneypunct_fill_cache<char,true>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined1 uVar3;
  undefined4 uVar4;
  undefined1 *puVar5;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48 [24];
  
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined1 *)(param_3 + 0x21) = uVar3;
  uVar3 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined1 *)(param_3 + 0x22) = uVar3;
  uVar4 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x6f) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar4;
  lVar1 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar1 + 0x20))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x18) = uVar2;
  *(undefined1 **)(param_3 + 0x10) = puVar5;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x28) = puVar5;
  *(ulonglong *)(param_3 + 0x30) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x38) = puVar5;
  *(ulonglong *)(param_3 + 0x40) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x38))((string *)&local_58,param_2);
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,local_50,0);
  puVar5[local_50] = 0;
  *(undefined1 **)(param_3 + 0x48) = puVar5;
  *(ulonglong *)(param_3 + 0x50) = local_50;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  uVar4 = (**(code **)(*param_2 + 0x48))(param_2);
  *(undefined4 *)(param_3 + 0x5c) = uVar4;
  uVar4 = (**(code **)(*param_2 + 0x50))(param_2);
  *(undefined4 *)(param_3 + 0x60) = uVar4;
  return;
}



// void std::__facet_shims::__moneypunct_fill_cache<wchar_t, false>(std::integral_constant<bool,
// false>, std::locale::facet const*, std::__moneypunct_cache<wchar_t, false>*)

void std::__facet_shims::__moneypunct_fill_cache<>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined2 uVar5;
  undefined4 uVar6;
  undefined1 *puVar7;
  undefined2 *puVar8;
  longlong local_40;
  
  uVar5 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined2 *)(param_3 + 0x22) = uVar5;
  uVar5 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined2 *)(param_3 + 0x24) = uVar5;
  uVar6 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x7a) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar6;
  lVar3 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar3 + 0x20))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)&local_40,puVar7,uVar4,0);
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x10) = puVar7;
  iVar2 = _CRT_MT;
  *(ulonglong *)(param_3 + 0x18) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (0x3ffffffffffffffc < uVar4 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar8 = operator_new__((uVar4 + 1) * 2);
  std::wstring::copy((wstring *)&local_40,puVar8,uVar4,0);
  iVar2 = _CRT_MT;
  *(undefined2 **)(param_3 + 0x28) = puVar8;
  puVar8[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x30) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (0x3ffffffffffffffc < uVar4 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar8 = operator_new__((uVar4 + 1) * 2);
  std::wstring::copy((wstring *)&local_40,puVar8,uVar4,0);
  iVar2 = _CRT_MT;
  *(undefined2 **)(param_3 + 0x38) = puVar8;
  puVar8[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x40) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x38))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (uVar4 + 1 < 0x3ffffffffffffffd) {
    puVar8 = operator_new__((uVar4 + 1) * 2);
    std::wstring::copy((wstring *)&local_40,puVar8,uVar4,0);
    iVar2 = _CRT_MT;
    *(undefined2 **)(param_3 + 0x48) = puVar8;
    puVar8[uVar4] = 0;
    *(ulonglong *)(param_3 + 0x50) = uVar4;
    if (iVar2 == 0) {
      iVar2 = *(int *)(local_40 + -8);
      *(int *)(local_40 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_40 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
    }
    uVar6 = (**(code **)(*param_2 + 0x48))(param_2);
    *(undefined4 *)(param_3 + 0x5c) = uVar6;
    uVar6 = (**(code **)(*param_2 + 0x50))(param_2);
    *(undefined4 *)(param_3 + 0x60) = uVar6;
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// void std::__facet_shims::__moneypunct_fill_cache<wchar_t, false>(std::integral_constant<bool,
// true>, std::locale::facet const*, std::__moneypunct_cache<wchar_t, false>*)

void std::__facet_shims::__moneypunct_fill_cache<>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  undefined1 *puVar5;
  undefined2 *puVar6;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48 [16];
  
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined2 *)(param_3 + 0x22) = uVar3;
  uVar3 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined2 *)(param_3 + 0x24) = uVar3;
  uVar4 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x7a) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar4;
  lVar1 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar1 + 0x20))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x10) = puVar5;
  *(ulonglong *)(param_3 + 0x18) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_58,param_2);
  uVar2 = local_50;
  if (0x3ffffffffffffffc < local_50 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar6 = operator_new__((local_50 + 1) * 2);
  __cxx11::wstring::copy((wstring *)&local_58,puVar6,uVar2,0);
  *(undefined2 **)(param_3 + 0x28) = puVar6;
  puVar6[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x30) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_58,param_2);
  uVar2 = local_50;
  if (local_50 + 1 < 0x3ffffffffffffffd) {
    puVar6 = operator_new__((local_50 + 1) * 2);
    __cxx11::wstring::copy((wstring *)&local_58,puVar6,uVar2,0);
    *(undefined2 **)(param_3 + 0x38) = puVar6;
    puVar6[uVar2] = 0;
    *(ulonglong *)(param_3 + 0x40) = uVar2;
    if (local_58 != local_48) {
      operator_delete(local_58);
    }
    (**(code **)(*param_2 + 0x38))((string *)&local_58,param_2);
    if (local_50 + 1 < 0x3ffffffffffffffd) {
      puVar6 = operator_new__((local_50 + 1) * 2);
      __cxx11::wstring::copy((wstring *)&local_58,puVar6,local_50,0);
      *(undefined2 **)(param_3 + 0x48) = puVar6;
      puVar6[local_50] = 0;
      *(ulonglong *)(param_3 + 0x50) = local_50;
      if (local_58 != local_48) {
        operator_delete(local_58);
      }
      uVar4 = (**(code **)(*param_2 + 0x48))(param_2);
      *(undefined4 *)(param_3 + 0x5c) = uVar4;
      uVar4 = (**(code **)(*param_2 + 0x50))(param_2);
      *(undefined4 *)(param_3 + 0x60) = uVar4;
      return;
    }
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// void std::__facet_shims::__moneypunct_fill_cache<wchar_t, true>(std::integral_constant<bool,
// false>, std::locale::facet const*, std::__moneypunct_cache<wchar_t, true>*)

void std::__facet_shims::__moneypunct_fill_cache<>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined2 uVar5;
  undefined4 uVar6;
  undefined1 *puVar7;
  undefined2 *puVar8;
  longlong local_40;
  
  uVar5 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined2 *)(param_3 + 0x22) = uVar5;
  uVar5 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined2 *)(param_3 + 0x24) = uVar5;
  uVar6 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x7a) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar6;
  lVar3 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar3 + 0x20))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  puVar7 = operator_new__(uVar4 + 1);
  std::string::copy((string *)&local_40,puVar7,uVar4,0);
  puVar7[uVar4] = 0;
  *(undefined1 **)(param_3 + 0x10) = puVar7;
  iVar2 = _CRT_MT;
  *(ulonglong *)(param_3 + 0x18) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (0x3ffffffffffffffc < uVar4 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar8 = operator_new__((uVar4 + 1) * 2);
  std::wstring::copy((wstring *)&local_40,puVar8,uVar4,0);
  iVar2 = _CRT_MT;
  *(undefined2 **)(param_3 + 0x28) = puVar8;
  puVar8[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x30) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (0x3ffffffffffffffc < uVar4 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar8 = operator_new__((uVar4 + 1) * 2);
  std::wstring::copy((wstring *)&local_40,puVar8,uVar4,0);
  iVar2 = _CRT_MT;
  *(undefined2 **)(param_3 + 0x38) = puVar8;
  puVar8[uVar4] = 0;
  *(ulonglong *)(param_3 + 0x40) = uVar4;
  if (iVar2 == 0) {
    iVar2 = *(int *)(local_40 + -8);
    *(int *)(local_40 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(local_40 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
  }
  (**(code **)(*param_2 + 0x38))((string *)&local_40,param_2);
  uVar4 = *(ulonglong *)(local_40 + -0x18);
  if (uVar4 + 1 < 0x3ffffffffffffffd) {
    puVar8 = operator_new__((uVar4 + 1) * 2);
    std::wstring::copy((wstring *)&local_40,puVar8,uVar4,0);
    iVar2 = _CRT_MT;
    *(undefined2 **)(param_3 + 0x48) = puVar8;
    puVar8[uVar4] = 0;
    *(ulonglong *)(param_3 + 0x50) = uVar4;
    if (iVar2 == 0) {
      iVar2 = *(int *)(local_40 + -8);
      *(int *)(local_40 + -8) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)(local_40 + -8);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 < 1) {
      std::wstring::_Rep::_M_destroy((void *)(local_40 + -0x18));
    }
    uVar6 = (**(code **)(*param_2 + 0x48))(param_2);
    *(undefined4 *)(param_3 + 0x5c) = uVar6;
    uVar6 = (**(code **)(*param_2 + 0x50))(param_2);
    *(undefined4 *)(param_3 + 0x60) = uVar6;
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// void std::__facet_shims::__moneypunct_fill_cache<wchar_t, true>(std::integral_constant<bool,
// true>, std::locale::facet const*, std::__moneypunct_cache<wchar_t, true>*)

void std::__facet_shims::__moneypunct_fill_cache<>
               (undefined8 param_1,longlong *param_2,longlong param_3)

{
  longlong lVar1;
  ulonglong uVar2;
  undefined2 uVar3;
  undefined4 uVar4;
  undefined1 *puVar5;
  undefined2 *puVar6;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48 [16];
  
  uVar3 = (**(code **)(*param_2 + 0x10))(param_2);
  *(undefined2 *)(param_3 + 0x22) = uVar3;
  uVar3 = (**(code **)(*param_2 + 0x18))(param_2);
  *(undefined2 *)(param_3 + 0x24) = uVar3;
  uVar4 = (**(code **)(*param_2 + 0x40))(param_2);
  *(undefined1 *)(param_3 + 0x7a) = 1;
  *(undefined4 *)(param_3 + 0x58) = uVar4;
  lVar1 = *param_2;
  *(undefined8 *)(param_3 + 0x10) = 0;
  *(undefined8 *)(param_3 + 0x28) = 0;
  *(undefined8 *)(param_3 + 0x38) = 0;
  *(undefined8 *)(param_3 + 0x48) = 0;
  (**(code **)(lVar1 + 0x20))((string *)&local_58,param_2);
  uVar2 = local_50;
  puVar5 = operator_new__(local_50 + 1);
  __cxx11::string::copy((string *)&local_58,puVar5,uVar2,0);
  puVar5[uVar2] = 0;
  *(undefined1 **)(param_3 + 0x10) = puVar5;
  *(ulonglong *)(param_3 + 0x18) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x28))((string *)&local_58,param_2);
  uVar2 = local_50;
  if (0x3ffffffffffffffc < local_50 + 1) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar6 = operator_new__((local_50 + 1) * 2);
  __cxx11::wstring::copy((wstring *)&local_58,puVar6,uVar2,0);
  *(undefined2 **)(param_3 + 0x28) = puVar6;
  puVar6[uVar2] = 0;
  *(ulonglong *)(param_3 + 0x30) = uVar2;
  if (local_58 != local_48) {
    operator_delete(local_58);
  }
  (**(code **)(*param_2 + 0x30))((string *)&local_58,param_2);
  uVar2 = local_50;
  if (local_50 + 1 < 0x3ffffffffffffffd) {
    puVar6 = operator_new__((local_50 + 1) * 2);
    __cxx11::wstring::copy((wstring *)&local_58,puVar6,uVar2,0);
    *(undefined2 **)(param_3 + 0x38) = puVar6;
    puVar6[uVar2] = 0;
    *(ulonglong *)(param_3 + 0x40) = uVar2;
    if (local_58 != local_48) {
      operator_delete(local_58);
    }
    (**(code **)(*param_2 + 0x38))((string *)&local_58,param_2);
    if (local_50 + 1 < 0x3ffffffffffffffd) {
      puVar6 = operator_new__((local_50 + 1) * 2);
      __cxx11::wstring::copy((wstring *)&local_58,puVar6,local_50,0);
      *(undefined2 **)(param_3 + 0x48) = puVar6;
      puVar6[local_50] = 0;
      *(ulonglong *)(param_3 + 0x50) = local_50;
      if (local_58 != local_48) {
        operator_delete(local_58);
      }
      uVar4 = (**(code **)(*param_2 + 0x48))(param_2);
      *(undefined4 *)(param_3 + 0x5c) = uVar4;
      uVar4 = (**(code **)(*param_2 + 0x50))(param_2);
      *(undefined4 *)(param_3 + 0x60) = uVar4;
      return;
    }
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// std::__ios_failure::~__ios_failure()

void __thiscall std::__ios_failure::~__ios_failure(__ios_failure *this)

{
  *(undefined ***)this = &PTR____ios_failure_1400dd4f0;
  __destroy_ios_failure((undefined8 *)(this + 0x20));
  *(undefined ***)this = &PTR__failure_1400dcf40;
  system_error::~system_error((system_error *)this);
  operator_delete(this);
  return;
}



// std::__ios_failure::~__ios_failure()

void __thiscall std::__ios_failure::~__ios_failure(__ios_failure *this)

{
  *(undefined ***)this = &PTR____ios_failure_1400dd4f0;
  __destroy_ios_failure((undefined8 *)(this + 0x20));
  *(undefined ***)this = &PTR__failure_1400dcf40;
  system_error::~system_error((system_error *)this);
  return;
}



// std::bad_exception::~bad_exception()

void __thiscall std::bad_exception::~bad_exception(bad_exception *this)

{
  operator_delete(this);
  return;
}



// std::bad_exception::~bad_exception()

void __thiscall std::bad_exception::~bad_exception(void)

{
  return;
}



// std::wistream& std::wistream::_M_extract<void*>(void*&)

wistream * __thiscall std::wistream::_M_extract<void*>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x60))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<bool>(bool&)

wistream * __thiscall std::wistream::_M_extract<bool>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x10))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<double>(double&)

wistream * __thiscall std::wistream::_M_extract<double>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x50))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<long double>(long double&)

wistream * __thiscall std::wistream::_M_extract<>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x58))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<float>(float&)

wistream * __thiscall std::wistream::_M_extract<float>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x48))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<unsigned int>(unsigned int&)

wistream * __thiscall std::wistream::_M_extract<>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x28))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<long>(long&)

wistream * __thiscall std::wistream::_M_extract<long>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x18))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<unsigned long>(unsigned long&)

wistream * __thiscall std::wistream::_M_extract<>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x30))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<unsigned short>(unsigned short&)

wistream * __thiscall std::wistream::_M_extract<>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x20))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<long long>(long long&)

wistream * __thiscall std::wistream::_M_extract<long_long>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x38))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream& std::wistream::_M_extract<unsigned long long>(unsigned long long&)

wistream * __thiscall std::wistream::_M_extract<>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [27];
  sentry local_1d;
  uint local_1c [3];
  
  sentry::sentry(&local_1d,(longlong *)this,'\0');
  if (local_1d != (sentry)0x0) {
    local_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x40))(local_38,plVar1,&local_48,&local_58,pwVar2,local_1c,param_1);
    if (local_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::get(wchar_t*, long long)

void __thiscall std::wistream::get(wistream *this,short *param_1,longlong param_2)

{
  longlong *plVar1;
  short sVar2;
  
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xf0);
  if (plVar1 != (longlong *)0x0) {
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,10);
    get(this,param_1,param_2,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// WARNING: Type propagation algorithm not settling
// std::wistream::get(wchar_t*, long long, wchar_t)

wistream * __thiscall
std::wistream::get(wistream *this,short *param_1,longlong param_2,short param_3)

{
  longlong *plVar1;
  short *psVar2;
  short sVar3;
  longlong lVar4;
  uint uVar5;
  sentry local_39 [9];
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_39,(longlong *)this,'\x01');
  if (local_39[0] == (sentry)0x0) {
    lVar4 = *(longlong *)(this + 8);
    if (0 < param_2) {
      *param_1 = 0;
    }
    if (lVar4 != 0) {
      return this;
    }
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar3 = *(short *)plVar1[2];
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x48))(plVar1);
    }
    lVar4 = *(longlong *)(this + 8);
    while (lVar4 + 1 < param_2) {
      if (sVar3 == -1) goto LAB_14008a01c;
      if (param_3 == sVar3) goto LAB_14008a056;
      *param_1 = sVar3;
      *(longlong *)(this + 8) = lVar4 + 1;
      psVar2 = (short *)plVar1[2];
      if (psVar2 < (short *)plVar1[3]) {
        sVar3 = *psVar2;
        plVar1[2] = (longlong)(psVar2 + 1);
      }
      else {
        sVar3 = (**(code **)(*plVar1 + 0x50))(plVar1);
      }
      if (sVar3 == -1) {
        lVar4 = *(longlong *)(this + 8);
        param_1 = param_1 + 1;
        goto LAB_14008a01c;
      }
      if ((short *)plVar1[2] < (short *)plVar1[3]) {
        sVar3 = *(short *)plVar1[2];
      }
      else {
        sVar3 = (**(code **)(*plVar1 + 0x48))(plVar1);
      }
      param_1 = param_1 + 1;
      lVar4 = *(longlong *)(this + 8);
    }
    if (sVar3 == -1) {
LAB_14008a01c:
      if (0 < param_2) {
        *param_1 = 0;
      }
      uVar5 = 6;
      if (lVar4 != 0) {
        uVar5 = 2;
      }
      goto LAB_140089f45;
    }
LAB_14008a056:
    if (0 < param_2) {
      *param_1 = 0;
    }
    if (lVar4 != 0) {
      return this;
    }
  }
  uVar5 = 4;
LAB_140089f45:
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              uVar5 | *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::wistream::get(std::wstreambuf&)

void __thiscall std::wistream::get(wistream *this,longlong *param_1)

{
  longlong *plVar1;
  short sVar2;
  
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xf0);
  if (plVar1 != (longlong *)0x0) {
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,10);
    get(this,param_1,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wistream::get(std::wstreambuf&, wchar_t)

wistream * __thiscall std::wistream::get(wistream *this,longlong *param_1,short param_2)

{
  longlong *plVar1;
  short *psVar2;
  short sVar3;
  uint uVar4;
  longlong lVar5;
  sentry local_39 [9];
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_39,(longlong *)this,'\x01');
  if (local_39[0] == (sentry)0x0) {
    lVar5 = *(longlong *)(this + 8);
joined_r0x00014008a278:
    if (lVar5 != 0) {
      return this;
    }
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar3 = *(short *)plVar1[2];
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x48))(plVar1);
    }
    if (sVar3 == -1) {
      *(undefined8 *)(this + 8) = 0;
LAB_14008a2e3:
      uVar4 = 6;
      goto LAB_14008a1a6;
    }
    lVar5 = 0;
    if (sVar3 != param_2) {
      do {
        psVar2 = (short *)param_1[5];
        if (psVar2 < (short *)param_1[6]) {
          *psVar2 = sVar3;
          param_1[5] = (longlong)(psVar2 + 1);
        }
        else {
          sVar3 = (**(code **)(*param_1 + 0x68))(param_1,sVar3);
          if (sVar3 == -1) break;
        }
        psVar2 = (short *)plVar1[2];
        lVar5 = lVar5 + 1;
        if ((short *)plVar1[3] <= psVar2) {
          sVar3 = (**(code **)(*plVar1 + 0x50))(plVar1);
          if (sVar3 != -1) goto LAB_14008a23a;
LAB_14008a2a0:
          if (lVar5 < 0) {
            *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
          }
          else {
            *(longlong *)(this + 8) = lVar5;
            if (lVar5 == 0) goto LAB_14008a2e3;
          }
          uVar4 = 2;
          goto LAB_14008a1a6;
        }
        sVar3 = *psVar2;
        plVar1[2] = (longlong)(psVar2 + 1);
        if (sVar3 == -1) goto LAB_14008a2a0;
LAB_14008a23a:
        if ((short *)plVar1[2] < (short *)plVar1[3]) {
          sVar3 = *(short *)plVar1[2];
        }
        else {
          sVar3 = (**(code **)(*plVar1 + 0x48))(plVar1);
        }
        if (sVar3 == -1) goto LAB_14008a2a0;
      } while (param_2 != sVar3);
      if (lVar5 < 0) {
        *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
        return this;
      }
      *(longlong *)(this + 8) = lVar5;
      goto joined_r0x00014008a278;
    }
    *(undefined8 *)(this + 8) = 0;
  }
  uVar4 = 4;
LAB_14008a1a6:
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              uVar4 | *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::wistream::get(wchar_t&)

wistream * __thiscall std::wistream::get(wistream *this,short *param_1)

{
  longlong *plVar1;
  short *psVar2;
  short sVar3;
  uint uVar4;
  sentry local_19 [9];
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_19,(longlong *)this,'\x01');
  if (local_19[0] == (sentry)0x0) {
    if (*(longlong *)(this + 8) != 0) {
      return this;
    }
    uVar4 = 4;
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    psVar2 = (short *)plVar1[2];
    if (psVar2 < (short *)plVar1[3]) {
      sVar3 = *psVar2;
      plVar1[2] = (longlong)(psVar2 + 1);
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x50))();
    }
    if (sVar3 != -1) {
      *(undefined8 *)(this + 8) = 1;
      *param_1 = sVar3;
      return this;
    }
    uVar4 = (-(uint)(*(longlong *)(this + 8) == 0) & 4) + 2;
  }
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              uVar4 | *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::wistream::get()

ulonglong __thiscall std::wistream::get(wistream *this)

{
  longlong *plVar1;
  ushort *puVar2;
  ulonglong uVar3;
  uint uVar4;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 == (sentry)0x0) {
    if (*(longlong *)(this + 8) != 0) {
      return 0xffffffff;
    }
    uVar4 = 4;
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    puVar2 = (ushort *)plVar1[2];
    if (puVar2 < (ushort *)plVar1[3]) {
      uVar3 = (ulonglong)*puVar2;
      plVar1[2] = (longlong)(puVar2 + 1);
    }
    else {
      uVar3 = (**(code **)(*plVar1 + 0x50))();
    }
    if ((short)uVar3 != -1) {
      *(undefined8 *)(this + 8) = 1;
      return uVar3;
    }
    uVar4 = (-(uint)(*(longlong *)(this + 8) == 0) & 4) + 2;
  }
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              uVar4 | *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return 0xffffffff;
}



// std::wistream::peek()

ulonglong __thiscall std::wistream::peek(wistream *this)

{
  longlong *plVar1;
  ulonglong uVar2;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 == (sentry)0x0) {
    uVar2 = 0xffffffff;
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((ushort *)plVar1[2] < (ushort *)plVar1[3]) {
      uVar2 = (ulonglong)*(ushort *)plVar1[2];
    }
    else {
      uVar2 = (**(code **)(*plVar1 + 0x48))();
    }
    if ((short)uVar2 == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
      uVar2 = uVar2 & 0xffffffff;
    }
  }
  return uVar2;
}



// std::wistream::read(wchar_t*, long long)

wistream * __thiscall std::wistream::read(wistream *this,undefined8 param_1,longlong param_2)

{
  longlong lVar1;
  sentry local_19;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_19,(longlong *)this,'\x01');
  if (local_19 != (sentry)0x0) {
    lVar1 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                        0x40))(*(longlong **)
                                (this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),param_1,
                               param_2);
    *(longlong *)(this + 8) = lVar1;
    if (param_2 != lVar1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 6);
      return this;
    }
  }
  return this;
}



// std::wistream::swap(std::wistream&)

void __thiscall std::wistream::swap(wistream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  lVar4 = param_1[1];
  this_00[0xe2] = wVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  return;
}



// std::wistream::sync()

undefined8 __thiscall std::wistream::sync(wistream *this)

{
  int iVar1;
  sentry local_9;
  
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if ((local_9 != (sentry)0x0) &&
     (*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) != (longlong *)0x0)) {
    iVar1 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                        0x30))();
    if (iVar1 != -1) {
      return 0;
    }
    wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
  }
  return 0xffffffff;
}



// std::wistream::seekg(std::fpos<int>)

wistream * __thiscall std::wistream::seekg(wistream *this,undefined8 *param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 local_48;
  undefined8 uStack_40;
  longlong local_38 [3];
  sentry local_19 [17];
  
  uVar1 = *param_1;
  uVar2 = param_1[1];
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) &
              0xfffffffd);
  sentry::sentry(local_19,(longlong *)this,'\x01');
  if ((local_19[0] != (sentry)0x0) &&
     (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0)) {
    local_48 = uVar1;
    uStack_40 = uVar2;
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x28))
              (local_38,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               &local_48,8);
    if (local_38[0] == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  return this;
}



// std::wistream::seekg(long long, std::_Ios_Seekdir)

wistream * __thiscall std::wistream::seekg(wistream *this,undefined8 param_1,undefined4 param_2)

{
  longlong local_38 [3];
  sentry local_19;
  
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) &
              0xfffffffd);
  sentry::sentry(&local_19,(longlong *)this,'\x01');
  if ((local_19 != (sentry)0x0) &&
     (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0)) {
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x20))
              (local_38,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               param_1,param_2,8);
    if (local_38[0] == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  return this;
}



// std::wistream::tellg()

undefined8 * std::wistream::tellg(undefined8 *param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined8 local_38;
  undefined4 local_30;
  sentry local_19 [9];
  
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  sentry::sentry(local_19,param_2,'\x01');
  if ((local_19[0] != (sentry)0x0) &&
     ((*(byte *)((longlong)param_2 + *(longlong *)(*param_2 + -0x18) + 0x20) & 5) == 0)) {
    plVar1 = *(longlong **)((longlong)param_2 + *(longlong *)(*param_2 + -0x18) + 0xe8);
    (**(code **)(*plVar1 + 0x20))(&local_38,plVar1,0,1,8);
    *param_1 = local_38;
    *(undefined4 *)(param_1 + 1) = local_30;
  }
  return param_1;
}



// std::wistream::unget()

wistream * __thiscall std::wistream::unget(wistream *this)

{
  longlong *plVar1;
  ulonglong uVar2;
  short sVar3;
  wios *this_00;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) &
              0xfffffffd);
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 == (sentry)0x0) {
    return this;
  }
  this_00 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
  plVar1 = *(longlong **)(this_00 + 0xe8);
  if (plVar1 != (longlong *)0x0) {
    uVar2 = plVar1[2];
    if ((ulonglong)plVar1[1] < uVar2) {
      sVar3 = *(short *)(uVar2 - 2);
      plVar1[2] = uVar2 - 2;
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x58))(plVar1,0xffff);
    }
    if (sVar3 != -1) {
      return this;
    }
    this_00 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
  }
  wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
  return this;
}



// std::wistream::ignore()

wistream * __thiscall std::wistream::ignore(wistream *this)

{
  longlong *plVar1;
  short *psVar2;
  short sVar3;
  sentry local_9;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_9,(longlong *)this,'\x01');
  if (local_9 != (sentry)0x0) {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    psVar2 = (short *)plVar1[2];
    if (psVar2 < (short *)plVar1[3]) {
      sVar3 = *psVar2;
      plVar1[2] = (longlong)(psVar2 + 1);
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x50))();
    }
    if (sVar3 != -1) {
      *(undefined8 *)(this + 8) = 1;
      return this;
    }
    wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
  }
  return this;
}



// std::wistream::ignore(long long)

wistream * __thiscall std::wistream::ignore(wistream *this,longlong param_1)

{
  longlong *plVar1;
  short *psVar2;
  short *psVar3;
  short sVar4;
  wistream *pwVar5;
  longlong lVar6;
  longlong lVar7;
  sentry sVar8;
  sentry local_39;
  
  if (param_1 == 1) {
    pwVar5 = ignore(this);
    return pwVar5;
  }
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_39,(longlong *)this,'\x01');
  if ((param_1 < 1) || (local_39 == (sentry)0x0)) {
    return this;
  }
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
  if ((short *)plVar1[2] < (short *)plVar1[3]) {
    sVar4 = *(short *)plVar1[2];
  }
  else {
    sVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
  }
  sVar8 = (sentry)0x0;
  do {
    while( true ) {
      lVar7 = *(longlong *)(this + 8);
      if (lVar7 < param_1) {
        if (sVar4 == -1) goto LAB_14008af5f;
      }
      else {
        if (param_1 != 0x7fffffffffffffff) {
          return this;
        }
        if (sVar4 == -1) goto LAB_14008b05d;
        lVar7 = -0x8000000000000000;
        sVar8 = local_39;
      }
      psVar2 = (short *)plVar1[3];
      psVar3 = (short *)plVar1[2];
      lVar6 = (longlong)psVar2 - (longlong)psVar3 >> 1;
      if (param_1 - lVar7 < lVar6) {
        lVar6 = param_1 - lVar7;
      }
      if (lVar6 < 2) break;
      psVar3 = psVar3 + lVar6;
      plVar1[2] = (longlong)psVar3;
      *(longlong *)(this + 8) = lVar6 + lVar7;
      if (psVar3 < psVar2) {
        sVar4 = *psVar3;
      }
      else {
LAB_14008b030:
        sVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
      }
    }
    *(longlong *)(this + 8) = lVar7 + 1;
    if (psVar3 < psVar2) {
      sVar4 = *psVar3;
      plVar1[2] = (longlong)(psVar3 + 1);
    }
    else {
      sVar4 = (**(code **)(*plVar1 + 0x50))(plVar1);
    }
    if (sVar4 == -1) {
      if (*(longlong *)(this + 8) < param_1) {
LAB_14008af5f:
        if ((param_1 == 0x7fffffffffffffff) && (sVar8 != (sentry)0x0)) {
          *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
        }
      }
      else {
        if (param_1 != 0x7fffffffffffffff) {
          return this;
        }
LAB_14008b05d:
        if (sVar8 != (sentry)0x0) {
          *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
        }
      }
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
      return this;
    }
    if ((short *)plVar1[3] <= (short *)plVar1[2]) goto LAB_14008b030;
    sVar4 = *(short *)plVar1[2];
  } while( true );
}



// std::wistream::ignore(long long, unsigned short)

wistream * __thiscall std::wistream::ignore(wistream *this,longlong param_1,short param_2)

{
  longlong *plVar1;
  short *psVar2;
  short *psVar3;
  short *psVar4;
  short sVar5;
  wistream *pwVar6;
  short *psVar7;
  short *psVar8;
  short *psVar9;
  longlong lVar10;
  sentry sVar11;
  sentry local_49 [9];
  
  if (param_2 == -1) {
    pwVar6 = ignore(this,param_1);
    return pwVar6;
  }
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_49,(longlong *)this,'\x01');
  if ((param_1 < 1) || (local_49[0] == (sentry)0x0)) {
    return this;
  }
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
  if ((short *)plVar1[2] < (short *)plVar1[3]) {
    sVar5 = *(short *)plVar1[2];
  }
  else {
    sVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
  }
  sVar11 = (sentry)0x0;
LAB_14008b1bf:
  do {
    lVar10 = *(longlong *)(this + 8);
    if (lVar10 < param_1) {
      if (sVar5 == -1) goto LAB_14008b1d2;
      if (sVar5 == param_2) {
        if ((param_1 != 0x7fffffffffffffff) || (sVar11 == (sentry)0x0)) {
LAB_14008b35c:
          *(longlong *)(this + 8) = lVar10 + 1;
          goto LAB_14008b340;
        }
LAB_14008b331:
        *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
LAB_14008b340:
        if ((ulonglong)plVar1[2] < (ulonglong)plVar1[3]) {
          plVar1[2] = plVar1[2] + 2;
          return this;
        }
        (**(code **)(*plVar1 + 0x50))(plVar1);
        return this;
      }
    }
    else {
      if (param_1 != 0x7fffffffffffffff) {
        return this;
      }
      if (sVar5 == -1) goto LAB_14008b304;
      if (sVar5 == param_2) {
        if (sVar11 == (sentry)0x0) {
          if (lVar10 == 0x7fffffffffffffff) goto LAB_14008b340;
          goto LAB_14008b35c;
        }
        goto LAB_14008b331;
      }
      lVar10 = -0x8000000000000000;
      sVar11 = local_49[0];
    }
    psVar2 = (short *)plVar1[3];
    psVar7 = (short *)plVar1[2];
    psVar8 = (short *)((longlong)psVar2 - (longlong)psVar7 >> 1);
    if (param_1 - lVar10 < (longlong)psVar8) {
      psVar8 = (short *)(param_1 - lVar10);
    }
    psVar3 = psVar7;
    psVar9 = psVar8;
    psVar4 = psVar7;
    if (1 < (longlong)psVar8) {
      while (psVar4 != (short *)0x0) {
        if (param_2 == *psVar3) {
          psVar8 = (short *)((longlong)psVar3 - (longlong)psVar7 >> 1);
          break;
        }
        psVar9 = (short *)((longlong)psVar9 + -1);
        psVar3 = psVar3 + 1;
        psVar4 = psVar9;
      }
      psVar7 = psVar7 + (longlong)psVar8;
      plVar1[2] = (longlong)psVar7;
      *(longlong *)(this + 8) = (longlong)psVar8 + lVar10;
      if (psVar7 < psVar2) goto LAB_14008b28f;
LAB_14008b2c9:
      sVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
      goto LAB_14008b1bf;
    }
    *(longlong *)(this + 8) = lVar10 + 1;
    if (psVar7 < psVar2) {
      sVar5 = *psVar7;
      plVar1[2] = (longlong)(psVar7 + 1);
    }
    else {
      sVar5 = (**(code **)(*plVar1 + 0x50))(plVar1);
    }
    if (sVar5 == -1) {
      if (*(longlong *)(this + 8) < param_1) {
LAB_14008b1d2:
        if ((param_1 == 0x7fffffffffffffff) && (sVar11 != (sentry)0x0)) {
          *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
        }
      }
      else {
        if (param_1 != 0x7fffffffffffffff) {
          return this;
        }
LAB_14008b304:
        if (sVar11 != (sentry)0x0) {
          *(undefined8 *)(this + 8) = 0x7fffffffffffffff;
        }
      }
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
      return this;
    }
    psVar7 = (short *)plVar1[2];
    if ((short *)plVar1[3] <= psVar7) goto LAB_14008b2c9;
LAB_14008b28f:
    sVar5 = *psVar7;
  } while( true );
}



// std::wistream::sentry::sentry(std::wistream&, bool)

void __thiscall std::wistream::sentry::sentry(sentry *this,longlong *param_1,char param_2)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  short *psVar4;
  char cVar5;
  short sVar6;
  wios *this_00;
  uint uVar7;
  
  lVar1 = *param_1;
  *this = (sentry)0x0;
  this_00 = (wios *)(*(longlong *)(lVar1 + -0x18) + (longlong)param_1);
  uVar7 = *(uint *)(this_00 + 0x20);
  if (uVar7 == 0) {
    if (*(wostream **)(this_00 + 0xd8) == (wostream *)0x0) {
      if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_14008b473:
        *this = (sentry)0x1;
        return;
      }
    }
    else {
      wostream::flush(*(wostream **)(this_00 + 0xd8));
      this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_14008b44e:
        uVar7 = *(uint *)(this_00 + 0x20);
        if (uVar7 == 0) goto LAB_14008b473;
        goto LAB_14008b455;
      }
    }
    plVar2 = *(longlong **)(this_00 + 0xe8);
    if ((short *)plVar2[2] < (short *)plVar2[3]) {
      sVar6 = *(short *)plVar2[2];
    }
    else {
      sVar6 = (**(code **)(*plVar2 + 0x48))(plVar2);
      this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    }
    plVar3 = *(longlong **)(this_00 + 0xf0);
    if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (sVar6 != -1) {
      do {
        cVar5 = (**(code **)(*plVar3 + 0x10))(plVar3,0x20);
        if (cVar5 == '\0') {
          this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
          goto LAB_14008b44e;
        }
        psVar4 = (short *)plVar2[2];
        if (psVar4 < (short *)plVar2[3]) {
          sVar6 = *psVar4;
          plVar2[2] = (longlong)(psVar4 + 1);
        }
        else {
          sVar6 = (**(code **)(*plVar2 + 0x50))(plVar2);
        }
        if (sVar6 == -1) break;
        if ((short *)plVar2[2] < (short *)plVar2[3]) {
          sVar6 = *(short *)plVar2[2];
        }
        else {
          sVar6 = (**(code **)(*plVar2 + 0x48))(plVar2);
        }
      } while (sVar6 != -1);
      this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
    }
    uVar7 = *(uint *)(this_00 + 0x20) | 2;
  }
LAB_14008b455:
  wios::clear(this_00,uVar7 | 4);
  return;
}



// std::wistream::sentry::sentry(std::wistream&, bool)

void __thiscall std::wistream::sentry::sentry(sentry *this,longlong *param_1,char param_2)

{
  longlong lVar1;
  longlong *plVar2;
  longlong *plVar3;
  short *psVar4;
  char cVar5;
  short sVar6;
  wios *this_00;
  uint uVar7;
  
  lVar1 = *param_1;
  *this = (sentry)0x0;
  this_00 = (wios *)(*(longlong *)(lVar1 + -0x18) + (longlong)param_1);
  uVar7 = *(uint *)(this_00 + 0x20);
  if (uVar7 == 0) {
    if (*(wostream **)(this_00 + 0xd8) == (wostream *)0x0) {
      if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_14008b643:
        *this = (sentry)0x1;
        return;
      }
    }
    else {
      wostream::flush(*(wostream **)(this_00 + 0xd8));
      this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      if ((param_2 != '\0') || (((byte)this_00[0x19] & 0x10) == 0)) {
LAB_14008b61e:
        uVar7 = *(uint *)(this_00 + 0x20);
        if (uVar7 == 0) goto LAB_14008b643;
        goto LAB_14008b625;
      }
    }
    plVar2 = *(longlong **)(this_00 + 0xe8);
    if ((short *)plVar2[2] < (short *)plVar2[3]) {
      sVar6 = *(short *)plVar2[2];
    }
    else {
      sVar6 = (**(code **)(*plVar2 + 0x48))(plVar2);
      this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    }
    plVar3 = *(longlong **)(this_00 + 0xf0);
    if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (sVar6 != -1) {
      do {
        cVar5 = (**(code **)(*plVar3 + 0x10))(plVar3,0x20);
        if (cVar5 == '\0') {
          this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
          goto LAB_14008b61e;
        }
        psVar4 = (short *)plVar2[2];
        if (psVar4 < (short *)plVar2[3]) {
          sVar6 = *psVar4;
          plVar2[2] = (longlong)(psVar4 + 1);
        }
        else {
          sVar6 = (**(code **)(*plVar2 + 0x50))(plVar2);
        }
        if (sVar6 == -1) break;
        if ((short *)plVar2[2] < (short *)plVar2[3]) {
          sVar6 = *(short *)plVar2[2];
        }
        else {
          sVar6 = (**(code **)(*plVar2 + 0x48))(plVar2);
        }
      } while (sVar6 != -1);
      this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
    }
    uVar7 = *(uint *)(this_00 + 0x20) | 2;
  }
LAB_14008b625:
  wios::clear(this_00,uVar7 | 4);
  return;
}



// std::wistream::getline(wchar_t*, long long)

void __thiscall std::wistream::getline(wistream *this,short *param_1,longlong param_2)

{
  longlong *plVar1;
  short sVar2;
  
  plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xf0);
  if (plVar1 != (longlong *)0x0) {
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,10);
    getline(this,param_1,param_2,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wistream::getline(wchar_t*, long long, wchar_t)

wistream * __thiscall
std::wistream::getline(wistream *this,short *param_1,longlong param_2,short param_3)

{
  longlong *plVar1;
  short *_Dst;
  short *psVar2;
  short sVar3;
  short *psVar4;
  short *_Src;
  uint uVar5;
  short *psVar6;
  longlong lVar7;
  short *psVar8;
  short *psVar9;
  longlong lVar10;
  sentry local_49 [9];
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(local_49,(longlong *)this,'\x01');
  if (local_49[0] == (sentry)0x0) {
LAB_14008b831:
    lVar7 = *(longlong *)(this + 8);
    if (0 < param_2) {
      *param_1 = 0;
    }
joined_r0x00014008b982:
    if (lVar7 != 0) {
      return this;
    }
LAB_14008b846:
    uVar5 = 4;
  }
  else {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar3 = *(short *)plVar1[2];
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x48))();
    }
    lVar10 = *(longlong *)(this + 8);
    lVar7 = lVar10 + 1;
    if (lVar7 < param_2) {
      _Dst = param_1;
      if (sVar3 != -1) {
        do {
          param_1 = _Dst;
          if (sVar3 == param_3) goto LAB_14008b959;
          psVar8 = (short *)plVar1[3];
          _Src = (short *)plVar1[2];
          psVar4 = (short *)((param_2 - lVar10) + -1);
          psVar9 = (short *)((longlong)psVar8 - (longlong)_Src >> 1);
          if ((longlong)psVar4 <= (longlong)psVar9) {
            psVar9 = psVar4;
          }
          psVar4 = _Src;
          psVar6 = psVar9;
          psVar2 = _Src;
          if ((longlong)psVar9 < 2) {
            *_Dst = sVar3;
            param_1 = _Dst + 1;
            *(longlong *)(this + 8) = lVar7;
            if (_Src < psVar8) {
              sVar3 = *_Src;
              plVar1[2] = (longlong)(_Src + 1);
            }
            else {
              sVar3 = (**(code **)(*plVar1 + 0x50))();
            }
            if (sVar3 == -1) {
              lVar10 = *(longlong *)(this + 8);
              goto LAB_14008ba3e;
            }
            if ((short *)plVar1[2] < (short *)plVar1[3]) {
              sVar3 = *(short *)plVar1[2];
              lVar10 = *(longlong *)(this + 8);
            }
            else {
              sVar3 = (**(code **)(*plVar1 + 0x48))();
              lVar10 = *(longlong *)(this + 8);
            }
          }
          else {
            while (psVar2 != (short *)0x0) {
              if (*psVar4 == param_3) {
                psVar9 = (short *)((longlong)psVar4 - (longlong)_Src >> 1);
                if (psVar9 == (short *)0x0) goto LAB_14008b921;
                break;
              }
              psVar6 = (short *)((longlong)psVar6 + -1);
              psVar4 = psVar4 + 1;
              psVar2 = psVar6;
            }
            param_1 = _Dst + (longlong)psVar9;
            memcpy(_Dst,_Src,(longlong)psVar9 * 2);
            psVar8 = (short *)plVar1[3];
            _Src = (short *)(plVar1[2] + (longlong)psVar9 * 2);
LAB_14008b921:
            lVar10 = (longlong)psVar9 + *(longlong *)(this + 8);
            plVar1[2] = (longlong)_Src;
            *(longlong *)(this + 8) = lVar10;
            if (_Src < psVar8) {
              sVar3 = *_Src;
            }
            else {
              sVar3 = (**(code **)(*plVar1 + 0x48))();
              lVar10 = *(longlong *)(this + 8);
            }
          }
          lVar7 = lVar10 + 1;
          if (param_2 <= lVar7) goto LAB_14008ba14;
          _Dst = param_1;
        } while (sVar3 != -1);
        goto LAB_14008ba97;
      }
    }
    else {
LAB_14008ba14:
      if (sVar3 != -1) {
        if (sVar3 == param_3) {
LAB_14008b959:
          *(longlong *)(this + 8) = lVar7;
          if ((ulonglong)plVar1[3] <= (ulonglong)plVar1[2]) {
            (**(code **)(*plVar1 + 0x50))(plVar1);
            goto LAB_14008b831;
          }
          plVar1[2] = plVar1[2] + 2;
          if (0 < param_2) {
            *param_1 = 0;
          }
          goto joined_r0x00014008b982;
        }
        if (0 < param_2) {
          *param_1 = 0;
        }
        goto LAB_14008b846;
      }
LAB_14008ba97:
      lVar10 = *(longlong *)(this + 8);
    }
LAB_14008ba3e:
    if (0 < param_2) {
      *param_1 = 0;
    }
    uVar5 = 6;
    if (lVar10 != 0) {
      uVar5 = 2;
    }
  }
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              uVar5 | *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  return this;
}



// std::wistream::putback(wchar_t)

wistream * __thiscall std::wistream::putback(wistream *this,short param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  short sVar3;
  wios *this_00;
  sentry local_19 [9];
  
  *(undefined8 *)(this + 8) = 0;
  wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
              *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) &
              0xfffffffd);
  sentry::sentry(local_19,(longlong *)this,'\x01');
  if (local_19[0] == (sentry)0x0) {
    return this;
  }
  this_00 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
  plVar1 = *(longlong **)(this_00 + 0xe8);
  if (plVar1 != (longlong *)0x0) {
    uVar2 = plVar1[2];
    if (((ulonglong)plVar1[1] < uVar2) && (sVar3 = *(short *)(uVar2 - 2), param_1 == sVar3)) {
      plVar1[2] = uVar2 - 2;
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x58))(plVar1,param_1);
    }
    if (sVar3 != -1) {
      return this;
    }
    this_00 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
  }
  wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
  return this;
}



// std::wistream::readsome(wchar_t*, long long)

undefined8 __thiscall std::wistream::readsome(wistream *this,undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  longlong lVar2;
  undefined8 uVar3;
  sentry local_19;
  
  *(undefined8 *)(this + 8) = 0;
  sentry::sentry(&local_19,(longlong *)this,'\x01');
  if (local_19 != (sentry)0x0) {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    if (plVar1[3] == plVar1[2]) {
      lVar2 = (**(code **)(*plVar1 + 0x38))();
    }
    else {
      lVar2 = plVar1[3] - plVar1[2] >> 1;
    }
    if (0 < lVar2) {
      if (lVar2 <= param_2) {
        param_2 = lVar2;
      }
      uVar3 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                          0x40))(*(longlong **)
                                  (this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),param_1,
                                 param_2);
      *(undefined8 *)(this + 8) = uVar3;
      return uVar3;
    }
    if (lVar2 == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 2);
    }
  }
  return *(undefined8 *)(this + 8);
}



// std::wistream::wistream(std::wistream&&)

void __thiscall std::wistream::wistream(wistream *this,longlong *param_1)

{
  ios_base *this_00;
  wistream wVar1;
  undefined8 uVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x10);
  ios_base::ios_base(this_00);
  *(undefined2 *)(this + 0xf0) = 0;
  *(undefined ***)this = &PTR__wistream_1400dd558;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x108) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x10) = &PTR__wistream_1400dd580;
  lVar3 = param_1[1];
  *(undefined8 *)(this + 0xe8) = 0;
  *(longlong *)(this + 8) = lVar3;
  lVar3 = *param_1;
  this[0xf2] = (wistream)0x0;
  lVar3 = *(longlong *)(lVar3 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar3);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this + 0xe0));
  uVar2 = *(undefined8 *)(lVar3 + 0xd8);
  *(undefined8 *)(this + 0xf8) = 0;
  *(undefined8 *)(lVar3 + 0xd8) = 0;
  *(undefined8 *)(this + 0xe8) = uVar2;
  *(undefined2 *)(this + 0xf0) = *(undefined2 *)(lVar3 + 0xe0);
  wVar1 = *(wistream *)(lVar3 + 0xe2);
  param_1[1] = 0;
  this[0xf2] = wVar1;
  return;
}



// std::wistream::wistream(std::wstreambuf*)

void __thiscall std::wistream::wistream(wistream *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)(this + 0x10));
  *(undefined2 *)(this + 0xf0) = 0;
  *(undefined ***)this = &PTR__wistream_1400dd558;
  *(undefined8 *)(this + 0xe8) = 0;
  this[0xf2] = (wistream)0x0;
  *(undefined ***)(this + 0x10) = &PTR__wistream_1400dd580;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x108) = (undefined1  [16])0x0;
  wios::init((wios *)(this + 0x10),param_1);
  return;
}



// std::wistream::wistream()

void __thiscall std::wistream::wistream(wistream *this)

{
  ios_base::ios_base((ios_base *)(this + 0x10));
  this[0xf2] = (wistream)0x0;
  *(undefined2 *)(this + 0xf0) = 0;
  *(undefined ***)this = &PTR__wistream_1400dd558;
  *(undefined8 *)(this + 0xe8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wistream_1400dd580;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x108) = (undefined1  [16])0x0;
  wios::init((wios *)(this + 0x10),0);
  return;
}



// std::wistream::wistream(std::wistream&&)

void __thiscall std::wistream::wistream(wistream *this,longlong *param_1,longlong *param_2)

{
  ios_base iVar1;
  longlong lVar2;
  undefined8 uVar3;
  ios_base *this_00;
  longlong lVar4;
  
  lVar4 = *param_1;
  lVar2 = param_1[1];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar2;
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar4 + -0x18));
  lVar4 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar4);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(lVar4 + 0xd8);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(lVar4 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar4 + 0xe0);
  iVar1 = *(ios_base *)(lVar4 + 0xe2);
  param_2[1] = 0;
  this_00[0xe2] = iVar1;
  return;
}



// std::wistream::wistream(std::wstreambuf*)

void __thiscall std::wistream::wistream(wistream *this,longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  lVar3 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)this = lVar1;
  *(longlong *)(this + lVar3) = lVar2;
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),param_2);
  return;
}



// std::wistream::wistream()

void __thiscall std::wistream::wistream(wistream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  lVar3 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)this = lVar1;
  *(longlong *)(this + lVar3) = lVar2;
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  return;
}



// std::wistream::~wistream()

void __thiscall std::wistream::~wistream(wistream *this)

{
  *(undefined ***)this = &PTR__wistream_1400dd558;
  *(undefined8 *)(this + 8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x10));
  operator_delete(this);
  return;
}



// std::wistream::~wistream()

void __thiscall std::wistream::~wistream(wistream *this)

{
  *(undefined ***)this = &PTR__wistream_1400dd558;
  *(undefined8 *)(this + 8) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x10));
  return;
}



// std::wistream::~wistream()

void __thiscall std::wistream::~wistream(wistream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[1];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wistream&&)

wistream * __thiscall std::wistream::operator=(wistream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  lVar4 = param_1[1];
  this_00[0xe2] = wVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wistream& (*)(std::wistream&))

void __thiscall std::wistream::operator>>(undefined8 param_1_00,undefined *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014008c250. Too many branches
                    // WARNING: Treating indirect jump as call
  (*(code *)param_2)();
  return;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::ios_base& (*)(std::ios_base&))

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wios& (*)(std::wios&))

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wstreambuf*)

wistream * __thiscall std::wistream::operator>>(wistream *this,longlong *param_1)

{
  longlong lVar1;
  uint uVar2;
  sentry local_1a;
  char local_19 [9];
  
  sentry::sentry(&local_1a,(longlong *)this,'\0');
  if (local_1a == (sentry)0x0) {
    if (param_1 != (longlong *)0x0) {
      return this;
    }
LAB_14008c31d:
    lVar1 = *(longlong *)this;
  }
  else {
    lVar1 = *(longlong *)this;
    if (param_1 != (longlong *)0x0) {
      lVar1 = __copy_streambufs_eof<>
                        (*(longlong **)(this + *(longlong *)(lVar1 + -0x18) + 0xe8),param_1,local_19
                        );
      if (lVar1 != 0) {
        if (local_19[0] == '\0') {
          return this;
        }
        lVar1 = *(longlong *)this;
        uVar2 = 2;
        goto LAB_14008c2fa;
      }
      if (local_19[0] != '\0') {
        lVar1 = *(longlong *)this;
        uVar2 = 6;
        goto LAB_14008c2fa;
      }
      goto LAB_14008c31d;
    }
  }
  uVar2 = 4;
LAB_14008c2fa:
  wios::clear((wios *)(this + *(longlong *)(lVar1 + -0x18)),
              uVar2 | *(uint *)((wios *)(this + *(longlong *)(lVar1 + -0x18)) + 0x20));
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(void*&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x60))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(bool&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x10))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(double&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x50))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(long double&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x58))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(float&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x48))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(int&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined4 *param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [23];
  sentry local_21;
  uint local_20;
  undefined4 local_1c [3];
  
  sentry::sentry(&local_21,(longlong *)this,'\0');
  if (local_21 != (sentry)0x0) {
    local_20 = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x18))(local_38,plVar1,&local_48,&local_58,pwVar2,&local_20,local_1c);
    *param_1 = local_1c[0];
    if (local_20 != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  local_20 |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(unsigned int&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x28))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(long&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x18))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(unsigned long&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x30))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(short&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined2 *param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 local_58;
  undefined8 local_50;
  undefined8 local_48;
  undefined8 local_40;
  undefined1 local_38 [23];
  sentry local_21;
  uint local_20;
  int local_1c [3];
  
  sentry::sentry(&local_21,(longlong *)this,'\0');
  if (local_21 != (sentry)0x0) {
    local_20 = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    local_48 = *(undefined8 *)(pwVar2 + 0xe8);
    local_40 = 0xffff;
    local_58 = 0;
    local_50 = 0xffff;
    (**(code **)(*plVar1 + 0x18))(local_38,plVar1,&local_48,&local_58,pwVar2,&local_20,local_1c);
    if (local_1c[0] < -0x8000) {
      local_20 = local_20 | 4;
      *param_1 = 0x8000;
    }
    else if (local_1c[0] < 0x8000) {
      *param_1 = (short)local_1c[0];
      if (local_20 == 0) {
        return this;
      }
    }
    else {
      local_20 = local_20 | 4;
      *param_1 = 0x7fff;
    }
    wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                local_20 |
                *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(unsigned short&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x20))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(long long&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x38))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wistream::TEMPNAMEPLACEHOLDERVALUE(unsigned long long&)

wistream * __thiscall std::wistream::operator>>(wistream *this,undefined8 param_1)

{
  longlong *plVar1;
  wistream *pwVar2;
  undefined8 uStack_58;
  undefined8 uStack_50;
  undefined8 uStack_48;
  undefined8 uStack_40;
  undefined1 auStack_38 [27];
  sentry sStack_1d;
  uint auStack_1c [3];
  
  sentry::sentry(&sStack_1d,(longlong *)this,'\0');
  if (sStack_1d != (sentry)0x0) {
    auStack_1c[0] = 0;
    pwVar2 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar2 + 0x100);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    uStack_48 = *(undefined8 *)(pwVar2 + 0xe8);
    uStack_40 = 0xffff;
    uStack_58 = 0;
    uStack_50 = 0xffff;
    (**(code **)(*plVar1 + 0x40))(auStack_38,plVar1,&uStack_48,&uStack_58,pwVar2,auStack_1c,param_1)
    ;
    if (auStack_1c[0] != 0) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  auStack_1c[0] |
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20));
      return this;
    }
  }
  return this;
}



// std::wostream::put(wchar_t)

wostream * __thiscall std::wostream::put(wostream *this,short param_1)

{
  longlong *plVar1;
  short *psVar2;
  longlong lVar3;
  undefined4 uVar4;
  int iVar5;
  wios *this_00;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    plVar1 = *(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8);
    psVar2 = (short *)plVar1[5];
    if (psVar2 < (short *)plVar1[6]) {
      *psVar2 = param_1;
      plVar1[5] = (longlong)(psVar2 + 1);
    }
    else {
      param_1 = (**(code **)(*plVar1 + 0x68))(plVar1,param_1);
    }
    if (param_1 == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar3 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar3 + 0x19) & 0x20) != 0) {
    uVar4 = uncaught_exception();
    if (((char)uVar4 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar3 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar5 = (**(code **)(*plVar1 + 0x30))();
      if (iVar5 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::swap(std::wostream&)

void __thiscall std::wostream::swap(wostream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  this_00[0xe2] = wVar1;
  return;
}



// std::wostream::flush()

wostream * __thiscall std::wostream::flush(wostream *this)

{
  longlong lVar1;
  longlong *plVar2;
  int iVar3;
  undefined4 uVar4;
  wios *this_00;
  sentry local_28 [8];
  longlong *local_20;
  
  if (*(longlong *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) != 0) {
    sentry::sentry(local_28,(longlong *)this);
    if (local_28[0] != (sentry)0x0) {
      iVar3 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                          0x30))();
      if (iVar3 == -1) {
        wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                    *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1)
        ;
      }
    }
    lVar1 = *(longlong *)(*local_20 + -0x18);
    if ((*(byte *)((longlong)local_20 + lVar1 + 0x19) & 0x20) != 0) {
      uVar4 = uncaught_exception();
      if (((char)uVar4 == '\0') &&
         (plVar2 = *(longlong **)((longlong)local_20 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
        iVar3 = (**(code **)(*plVar2 + 0x30))();
        if (iVar3 == -1) {
          this_00 = (wios *)((longlong)local_20 + *(longlong *)(*local_20 + -0x18));
          wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
        }
      }
    }
  }
  return this;
}



// std::wostream::seekp(std::fpos<int>)

wostream * __thiscall std::wostream::seekp(wostream *this,undefined8 *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined4 uVar5;
  int iVar6;
  wios *this_00;
  undefined8 local_58;
  undefined8 uStack_50;
  longlong local_48 [2];
  sentry local_38 [8];
  longlong *local_30;
  
  uVar3 = *param_1;
  uVar4 = param_1[1];
  sentry::sentry(local_38,(longlong *)this);
  if (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0) {
    local_58 = uVar3;
    uStack_50 = uVar4;
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x28))
              (local_48,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               &local_58,0x10);
    if (local_48[0] == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  lVar1 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar1 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_30 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar2 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::seekp(long long, std::_Ios_Seekdir)

wostream * __thiscall std::wostream::seekp(wostream *this,undefined8 param_1,undefined4 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined4 uVar3;
  int iVar4;
  wios *this_00;
  longlong local_48 [2];
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (((byte)this[*(longlong *)(*(longlong *)this + -0x18) + 0x20] & 5) == 0) {
    (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) + 0x20))
              (local_48,*(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),
               param_1,param_2,0x10);
    if (local_48[0] == -1) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 4);
    }
  }
  lVar1 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar1 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_30 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar2 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::tellp()

undefined8 * std::wostream::tellp(undefined8 *param_1,longlong *param_2)

{
  longlong lVar1;
  longlong *plVar2;
  undefined4 uVar3;
  int iVar4;
  wios *this;
  undefined8 local_38;
  undefined4 local_30;
  sentry local_28 [8];
  longlong *local_20;
  
  sentry::sentry(local_28,param_2);
  lVar1 = *param_2;
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  if ((*(byte *)((longlong)param_2 + *(longlong *)(lVar1 + -0x18) + 0x20) & 5) == 0) {
    plVar2 = *(longlong **)((longlong)param_2 + *(longlong *)(lVar1 + -0x18) + 0xe8);
    (**(code **)(*plVar2 + 0x20))(&local_38,plVar2,0,1,0x10);
    *param_1 = local_38;
    *(undefined4 *)(param_1 + 1) = local_30;
  }
  lVar1 = *(longlong *)(*local_20 + -0x18);
  if ((*(byte *)((longlong)local_20 + lVar1 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_20 + lVar1 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar2 + 0x30))();
      if (iVar4 == -1) {
        this = (wios *)(*(longlong *)(*local_20 + -0x18) + (longlong)local_20);
        wios::clear(this,*(uint *)(this + 0x20) | 1);
      }
    }
  }
  return param_1;
}



// std::wostream::write(wchar_t const*, long long)

wostream * __thiscall std::wostream::write(wostream *this,undefined8 param_1,longlong param_2)

{
  longlong *plVar1;
  undefined4 uVar2;
  int iVar3;
  longlong lVar4;
  wios *this_00;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    lVar4 = (**(code **)(**(longlong **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) +
                        0x60))(*(longlong **)
                                (this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8),param_1,
                               param_2);
    if (param_2 != lVar4) {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar4 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar4 + 0x19) & 0x20) != 0) {
    uVar2 = uncaught_exception();
    if (((char)uVar2 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar4 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar3 = (**(code **)(*plVar1 + 0x30))();
      if (iVar3 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::sentry::sentry(std::wostream&)

void __thiscall std::wostream::sentry::sentry(sentry *this,longlong *param_1)

{
  longlong lVar1;
  wios *this_00;
  uint uVar2;
  
  lVar1 = *param_1;
  *(longlong **)(this + 8) = param_1;
  *this = (sentry)0x0;
  this_00 = (wios *)(*(longlong *)(lVar1 + -0x18) + (longlong)param_1);
  uVar2 = *(uint *)(this_00 + 0x20);
  if (*(wostream **)(this_00 + 0xd8) != (wostream *)0x0) {
    if (uVar2 != 0) goto LAB_14008cea0;
    flush(*(wostream **)(this_00 + 0xd8));
    this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  }
  uVar2 = *(uint *)(this_00 + 0x20);
  if (uVar2 == 0) {
    *this = (sentry)0x1;
    return;
  }
LAB_14008cea0:
  if ((uVar2 & 1) == 0) {
    return;
  }
  wios::clear(this_00,uVar2 | 4);
  return;
}



// std::wostream::sentry::sentry(std::wostream&)

void __thiscall std::wostream::sentry::sentry(sentry *this,longlong *param_1)

{
  longlong lVar1;
  wios *this_00;
  uint uVar2;
  
  lVar1 = *param_1;
  *(longlong **)(this + 8) = param_1;
  *this = (sentry)0x0;
  this_00 = (wios *)(*(longlong *)(lVar1 + -0x18) + (longlong)param_1);
  uVar2 = *(uint *)(this_00 + 0x20);
  if (*(wostream **)(this_00 + 0xd8) != (wostream *)0x0) {
    if (uVar2 != 0) goto LAB_14008cf20;
    flush(*(wostream **)(this_00 + 0xd8));
    this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  }
  uVar2 = *(uint *)(this_00 + 0x20);
  if (uVar2 == 0) {
    *this = (sentry)0x1;
    return;
  }
LAB_14008cf20:
  if ((uVar2 & 1) == 0) {
    return;
  }
  wios::clear(this_00,uVar2 | 4);
  return;
}



// std::wostream::sentry::~sentry()

void __thiscall std::wostream::sentry::~sentry(sentry *this)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  int iVar4;
  wios *this_00;
  
  plVar1 = *(longlong **)(this + 8);
  lVar2 = *(longlong *)(*plVar1 + -0x18);
  if ((*(byte *)((longlong)plVar1 + lVar2 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plVar1 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar1 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (wios *)((longlong)*(longlong **)(this + 8) +
                          *(longlong *)(**(longlong **)(this + 8) + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return;
}



// std::wostream::sentry::~sentry()

void __thiscall std::wostream::sentry::~sentry(sentry *this)

{
  longlong *plVar1;
  longlong lVar2;
  undefined4 uVar3;
  int iVar4;
  wios *this_00;
  
  plVar1 = *(longlong **)(this + 8);
  lVar2 = *(longlong *)(*plVar1 + -0x18);
  if ((*(byte *)((longlong)plVar1 + lVar2 + 0x19) & 0x20) != 0) {
    uVar3 = uncaught_exception();
    if (((char)uVar3 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plVar1 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar4 = (**(code **)(*plVar1 + 0x30))();
      if (iVar4 == -1) {
        this_00 = (wios *)((longlong)*(longlong **)(this + 8) +
                          *(longlong *)(**(longlong **)(this + 8) + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return;
}



// std::wostream::_M_write(wchar_t const*, long long)

wostream * __thiscall std::wostream::_M_write(wostream *this,undefined8 param_1,longlong param_2)

{
  uint uVar1;
  longlong *plVar2;
  short *psVar3;
  short sVar4;
  short sVar5;
  undefined4 uVar6;
  int iVar7;
  longlong lVar8;
  wios *pwVar9;
  longlong lVar10;
  longlong lVar11;
  sentry asStack_58 [8];
  longlong *plStack_50;
  
  sentry::sentry(asStack_58,(longlong *)this);
  if (asStack_58[0] != (sentry)0x0) {
    pwVar9 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
    lVar11 = *(longlong *)(pwVar9 + 0x10);
    if (param_2 < lVar11) {
      uVar1 = *(uint *)(pwVar9 + 0x18);
      if ((uVar1 & 0xb0) == 0x20) {
LAB_1400b8188:
        iVar7 = *(int *)(pwVar9 + 0x20);
      }
      else {
        lVar10 = lVar11 - param_2;
        if (pwVar9[0xe2] == (wios)0x0) {
          plVar2 = *(longlong **)(pwVar9 + 0xf0);
          if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            __throw_bad_cast();
          }
          sVar5 = (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
          *(short *)(pwVar9 + 0xe0) = sVar5;
          lVar8 = *(longlong *)this;
          pwVar9[0xe2] = (wios)0x1;
          pwVar9 = (wios *)(this + *(longlong *)(lVar8 + -0x18));
        }
        else {
          sVar5 = *(short *)(pwVar9 + 0xe0);
        }
        do {
          plVar2 = *(longlong **)(pwVar9 + 0xe8);
          psVar3 = (short *)plVar2[5];
          if (psVar3 < (short *)plVar2[6]) {
            *psVar3 = sVar5;
            plVar2[5] = (longlong)(psVar3 + 1);
            sVar4 = sVar5;
          }
          else {
            sVar4 = (**(code **)(*plVar2 + 0x68))(plVar2,sVar5);
            pwVar9 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
          }
          if (sVar4 == -1) {
            wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
            pwVar9 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
            goto LAB_1400b8188;
          }
          lVar10 = lVar10 + -1;
        } while (lVar10 != 0);
        iVar7 = *(int *)(pwVar9 + 0x20);
      }
      if (iVar7 == 0) {
        lVar8 = (**(code **)(**(longlong **)(pwVar9 + 0xe8) + 0x60))
                          (*(longlong **)(pwVar9 + 0xe8),param_1,param_2);
        lVar10 = *(longlong *)this;
        if (param_2 != lVar8) {
          wios::clear((wios *)(this + *(longlong *)(lVar10 + -0x18)),
                      *(uint *)((wios *)(this + *(longlong *)(lVar10 + -0x18)) + 0x20) | 1);
          lVar10 = *(longlong *)this;
        }
        pwVar9 = (wios *)(this + *(longlong *)(lVar10 + -0x18));
        if (((uVar1 & 0xb0) == 0x20) && (*(int *)(pwVar9 + 0x20) == 0)) {
          lVar11 = lVar11 - param_2;
          if (pwVar9[0xe2] == (wios)0x0) {
            plVar2 = *(longlong **)(pwVar9 + 0xf0);
            if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              __throw_bad_cast();
            }
            sVar5 = (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
            *(short *)(pwVar9 + 0xe0) = sVar5;
            lVar10 = *(longlong *)this;
            pwVar9[0xe2] = (wios)0x1;
            pwVar9 = (wios *)(this + *(longlong *)(lVar10 + -0x18));
          }
          else {
            sVar5 = *(short *)(pwVar9 + 0xe0);
          }
          do {
            plVar2 = *(longlong **)(pwVar9 + 0xe8);
            psVar3 = (short *)plVar2[5];
            if (psVar3 < (short *)plVar2[6]) {
              *psVar3 = sVar5;
              plVar2[5] = (longlong)(psVar3 + 1);
              sVar4 = sVar5;
            }
            else {
              sVar4 = (**(code **)(*plVar2 + 0x68))(plVar2,sVar5);
              pwVar9 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
            }
            if (sVar4 == -1) {
              wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
              goto LAB_1400b8221;
            }
            lVar11 = lVar11 + -1;
          } while (lVar11 != 0);
        }
      }
    }
    else {
      lVar11 = (**(code **)(**(longlong **)(pwVar9 + 0xe8) + 0x60))
                         (*(longlong **)(pwVar9 + 0xe8),param_1,param_2);
      pwVar9 = (wios *)(this + *(longlong *)(*(longlong *)this + -0x18));
      if (param_2 != lVar11) {
        wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
LAB_1400b8221:
        *(undefined8 *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0x10) = 0;
        goto LAB_1400b819c;
      }
    }
    *(undefined8 *)(pwVar9 + 0x10) = 0;
  }
LAB_1400b819c:
  lVar11 = *(longlong *)(*plStack_50 + -0x18);
  if (((((*(byte *)((longlong)plStack_50 + lVar11 + 0x19) & 0x20) != 0) &&
       (uVar6 = uncaught_exception(), (char)uVar6 == '\0')) &&
      (plVar2 = *(longlong **)((longlong)plStack_50 + lVar11 + 0xe8), plVar2 != (longlong *)0x0)) &&
     (iVar7 = (**(code **)(*plVar2 + 0x30))(), iVar7 == -1)) {
    pwVar9 = (wios *)((longlong)plStack_50 + *(longlong *)(*plStack_50 + -0x18));
    wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<void const*>(void const*)

wostream * __thiscall std::wostream::_M_insert<>(wostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    (**(code **)(*plVar1 + 0x48))(local_48,plVar1,&local_58,pwVar7,uVar4,param_1);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<bool>(bool)

wostream * __thiscall std::wostream::_M_insert<bool>(wostream *this,undefined1 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wios *this_00;
  wostream *pwVar7;
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    (**(code **)(*plVar1 + 0x10))(local_48,plVar1,&local_58,pwVar7,uVar4,param_1);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<double>(double)

wostream * __thiscall std::wostream::_M_insert<double>(wostream *this,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong local_68;
  ulonglong local_60;
  undefined1 local_58 [8];
  char local_50;
  sentry local_48 [8];
  longlong *local_40;
  
  sentry::sentry(local_48,(longlong *)this);
  if (local_48[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_68 = *(longlong *)(pwVar7 + 0xe8);
    local_60 = (ulonglong)(local_68 == 0);
    (**(code **)(*plVar1 + 0x38))(local_58,plVar1,&local_68,pwVar7,uVar4,param_2);
    if (local_50 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_40 + -0x18);
  if ((*(byte *)((longlong)local_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_40 + *(longlong *)(*local_40 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<long double>(long double)

wostream * __thiscall std::wostream::_M_insert<>(wostream *this,undefined1 (*param_1) [10])

{
  undefined1 auVar1 [10];
  longlong *plVar2;
  longlong lVar3;
  longlong *plVar4;
  undefined2 uVar5;
  undefined4 uVar6;
  int iVar7;
  wostream *pwVar8;
  wios *this_00;
  undefined1 local_68 [10];
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  auVar1 = *param_1;
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar8 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar2 = *(longlong **)(pwVar8 + 0xf8);
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar8[0xe2] == (wostream)0x0) {
      plVar4 = *(longlong **)(pwVar8 + 0xf0);
      if (plVar4 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar5 = (**(code **)(*plVar4 + 0x50))(plVar4,0x20);
      lVar3 = *(longlong *)this;
      *(undefined2 *)(pwVar8 + 0xe0) = uVar5;
      pwVar8[0xe2] = (wostream)0x1;
      pwVar8 = this + *(longlong *)(lVar3 + -0x18);
    }
    else {
      uVar5 = *(undefined2 *)(pwVar8 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar8 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    local_68 = auVar1;
    (**(code **)(*plVar2 + 0x40))(local_48,plVar2,&local_58,pwVar8,uVar5,local_68);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar3 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar3 + 0x19) & 0x20) != 0) {
    uVar6 = uncaught_exception();
    if (((char)uVar6 == '\0') &&
       (plVar2 = *(longlong **)((longlong)local_30 + lVar3 + 0xe8), plVar2 != (longlong *)0x0)) {
      iVar7 = (**(code **)(*plVar2 + 0x30))();
      if (iVar7 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<long>(long)

wostream * __thiscall std::wostream::_M_insert<long>(wostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    (**(code **)(*plVar1 + 0x18))(local_48,plVar1,&local_58,pwVar7,uVar4,param_1);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<unsigned long>(unsigned long)

wostream * __thiscall std::wostream::_M_insert<>(wostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    (**(code **)(*plVar1 + 0x20))(local_48,plVar1,&local_58,pwVar7,uVar4,param_1);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<long long>(long long)

wostream * __thiscall std::wostream::_M_insert<long_long>(wostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    (**(code **)(*plVar1 + 0x28))(local_48,plVar1,&local_58,pwVar7,uVar4,param_1);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream& std::wostream::_M_insert<unsigned long long>(unsigned long long)

wostream * __thiscall std::wostream::_M_insert<>(wostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong local_58;
  ulonglong local_50;
  undefined1 local_48 [8];
  char local_40;
  sentry local_38 [8];
  longlong *local_30;
  
  sentry::sentry(local_38,(longlong *)this);
  if (local_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    local_58 = *(longlong *)(pwVar7 + 0xe8);
    local_50 = (ulonglong)(local_58 == 0);
    (**(code **)(*plVar1 + 0x30))(local_48,plVar1,&local_58,pwVar7,uVar4,param_1);
    if (local_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*local_30 + -0x18);
  if ((*(byte *)((longlong)local_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)local_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)local_30 + *(longlong *)(*local_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::wostream(std::wostream&&)

void __thiscall std::wostream::wostream(wostream *this,longlong *param_1)

{
  ios_base *this_00;
  undefined8 uVar1;
  longlong lVar2;
  
  this_00 = (ios_base *)(this + 8);
  ios_base::ios_base(this_00);
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  lVar2 = *param_1;
  this[0xea] = (wostream)0x0;
  lVar2 = (longlong)param_1 + *(longlong *)(lVar2 + -0x18);
  *(undefined ***)this = &PTR__wostream_1400dd5a8;
  *(undefined ***)(this + 8) = &PTR__wostream_1400dd5d0;
  ios_base::_M_move(this_00,lVar2);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this + 0xd8));
  uVar1 = *(undefined8 *)(lVar2 + 0xd8);
  *(undefined8 *)(this + 0xf0) = 0;
  *(undefined8 *)(lVar2 + 0xd8) = 0;
  *(undefined8 *)(this + 0xe0) = uVar1;
  *(undefined2 *)(this + 0xe8) = *(undefined2 *)(lVar2 + 0xe0);
  this[0xea] = *(wostream *)(lVar2 + 0xe2);
  return;
}



// std::wostream::wostream(std::wstreambuf*)

void __thiscall std::wostream::wostream(wostream *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)(this + 8));
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined8 *)(this + 0xe0) = 0;
  this[0xea] = (wostream)0x0;
  *(undefined ***)this = &PTR__wostream_1400dd5a8;
  *(undefined ***)(this + 8) = &PTR__wostream_1400dd5d0;
  wios::init((wios *)(this + 8),param_1);
  return;
}



// std::wostream::wostream(std::wiostream&)

void __thiscall std::wostream::wostream(wostream *this)

{
  ios_base::ios_base((ios_base *)(this + 8));
  *(undefined8 *)(this + 0xe0) = 0;
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  this[0xea] = (wostream)0x0;
  *(undefined ***)this = &PTR__wostream_1400dd5a8;
  *(undefined ***)(this + 8) = &PTR__wostream_1400dd5d0;
  return;
}



// std::wostream::wostream()

void __thiscall std::wostream::wostream(wostream *this)

{
  ios_base::ios_base((ios_base *)(this + 8));
  *(undefined2 *)(this + 0xe8) = 0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined8 *)(this + 0xe0) = 0;
  this[0xea] = (wostream)0x0;
  *(undefined ***)this = &PTR__wostream_1400dd5a8;
  *(undefined ***)(this + 8) = &PTR__wostream_1400dd5d0;
  wios::init((wios *)(this + 8),0);
  return;
}



// std::wostream::wostream(std::wostream&&)

void __thiscall std::wostream::wostream(wostream *this,longlong *param_1,longlong *param_2)

{
  undefined8 uVar1;
  ios_base *this_00;
  longlong lVar2;
  
  lVar2 = *param_1;
  *(longlong *)this = lVar2;
  this_00 = (ios_base *)(this + *(longlong *)(lVar2 + -0x18));
  *(longlong *)this_00 = param_1[1];
  lVar2 = (longlong)param_2 + *(longlong *)(*param_2 + -0x18);
  ios_base::_M_move(this_00,lVar2);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar1 = *(undefined8 *)(lVar2 + 0xd8);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(lVar2 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar2 + 0xe0);
  this_00[0xe2] = *(ios_base *)(lVar2 + 0xe2);
  return;
}



// std::wostream::wostream(std::wstreambuf*)

void __thiscall std::wostream::wostream(wostream *this,longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = lVar2;
  wios::init((wios *)(this + lVar1),param_2);
  return;
}



// std::wostream::wostream(std::wiostream&)

void __thiscall std::wostream::wostream(wostream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = *param_1;
  lVar2 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  return;
}



// std::wostream::wostream()

void __thiscall std::wostream::wostream(wostream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = param_1[1];
  wios::init((wios *)(this + lVar1),0);
  return;
}



// std::wostream::~wostream()

void __thiscall std::wostream::~wostream(wostream *this)

{
  *(undefined ***)this = &PTR__wostream_1400dd5a8;
  *(undefined ***)(this + 8) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 8));
  operator_delete(this);
  return;
}



// std::wostream::~wostream()

void __thiscall std::wostream::~wostream(wostream *this)

{
  *(undefined ***)this = &PTR__wostream_1400dd5a8;
  *(undefined ***)(this + 8) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 8));
  return;
}



// std::wostream::~wostream()

void __thiscall std::wostream::~wostream(wostream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[1];
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(std::wostream&&)

wostream * __thiscall std::wostream::operator=(wostream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18));
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  this_00[0xe2] = wVar1;
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(std::wostream& (*)(std::wostream&))

void __thiscall std::wostream::operator<<(undefined8 param_1_00,undefined *param_2)

{
                    // WARNING: Could not recover jumptable at 0x00014008e3a0. Too many branches
                    // WARNING: Treating indirect jump as call
  (*(code *)param_2)();
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(std::ios_base& (*)(std::ios_base&))

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(std::wios& (*)(std::wios&))

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined *param_1)

{
  (*(code *)param_1)(this + *(longlong *)(*(longlong *)this + -0x18));
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(void const*)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x48))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(std::wstreambuf*)

wostream * __thiscall std::wostream::operator<<(wostream *this,longlong *param_1)

{
  longlong *plVar1;
  undefined4 uVar2;
  int iVar3;
  longlong lVar4;
  uint uVar5;
  wios *this_00;
  undefined1 local_29;
  sentry local_28 [8];
  longlong *local_20;
  
  sentry::sentry(local_28,(longlong *)this);
  if (local_28[0] == (sentry)0x0) {
    if (param_1 != (longlong *)0x0) goto LAB_14008e450;
    lVar4 = *(longlong *)this;
    uVar5 = 1;
  }
  else {
    lVar4 = *(longlong *)this;
    if (param_1 == (longlong *)0x0) {
      uVar5 = 1;
    }
    else {
      lVar4 = __copy_streambufs_eof<>
                        (param_1,*(longlong **)(this + *(longlong *)(lVar4 + -0x18) + 0xe8),
                         &local_29);
      if (lVar4 != 0) goto LAB_14008e450;
      lVar4 = *(longlong *)this;
      uVar5 = 4;
    }
  }
  wios::clear((wios *)(this + *(longlong *)(lVar4 + -0x18)),
              uVar5 | *(uint *)((wios *)(this + *(longlong *)(lVar4 + -0x18)) + 0x20));
LAB_14008e450:
  lVar4 = *(longlong *)(*local_20 + -0x18);
  if (((((*(byte *)((longlong)local_20 + lVar4 + 0x19) & 0x20) != 0) &&
       (uVar2 = uncaught_exception(), (char)uVar2 == '\0')) &&
      (plVar1 = *(longlong **)((longlong)local_20 + lVar4 + 0xe8), plVar1 != (longlong *)0x0)) &&
     (iVar3 = (**(code **)(*plVar1 + 0x30))(), iVar3 == -1)) {
    this_00 = (wios *)((longlong)local_20 + *(longlong *)(*local_20 + -0x18));
    wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(bool)

void __thiscall std::wostream::operator<<(wostream *this,undefined1 param_1)

{
  _M_insert<bool>(this,param_1);
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(double)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined8 param_2)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_68;
  ulonglong uStack_60;
  undefined1 auStack_58 [8];
  char cStack_50;
  sentry asStack_48 [8];
  longlong *plStack_40;
  
  sentry::sentry(asStack_48,(longlong *)this);
  if (asStack_48[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_68 = *(longlong *)(pwVar7 + 0xe8);
    uStack_60 = (ulonglong)(lStack_68 == 0);
    (**(code **)(*plVar1 + 0x38))(auStack_58,plVar1,&lStack_68,pwVar7,uVar4,param_2);
    if (cStack_50 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_40 + -0x18);
  if ((*(byte *)((longlong)plStack_40 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_40 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_40 + *(longlong *)(*plStack_40 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(long double)

void __thiscall std::wostream::operator<<(wostream *this,undefined1 (*param_1) [10])

{
  undefined1 local_18 [2] [10];
  
  local_18[0] = *param_1;
  _M_insert<>(this,local_18);
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(float)

void __thiscall std::wostream::operator<<(wostream *this,float param_1)

{
  _M_insert<double>(this,(double)param_1);
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(int)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x18))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(unsigned int)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x20))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(long)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x18))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(unsigned long)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined4 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x20))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(short)

void __thiscall std::wostream::operator<<(wostream *this,ushort param_1)

{
  if (((*(uint *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0x18) & 0x4a) != 0x40) &&
     ((*(uint *)(this + *(longlong *)(*(longlong *)this + -0x18) + 0x18) & 0x4a) != 8)) {
    _M_insert<long>(this,(int)(short)param_1);
    return;
  }
  _M_insert<long>(this,(uint)param_1);
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(unsigned short)

void __thiscall std::wostream::operator<<(wostream *this,ushort param_1)

{
  _M_insert<>(this,(uint)param_1);
  return;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(long long)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x28))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::wostream::TEMPNAMEPLACEHOLDERVALUE(unsigned long long)

wostream * __thiscall std::wostream::operator<<(wostream *this,undefined8 param_1)

{
  longlong *plVar1;
  longlong lVar2;
  longlong *plVar3;
  undefined2 uVar4;
  undefined4 uVar5;
  int iVar6;
  wostream *pwVar7;
  wios *this_00;
  longlong lStack_58;
  ulonglong uStack_50;
  undefined1 auStack_48 [8];
  char cStack_40;
  sentry asStack_38 [8];
  longlong *plStack_30;
  
  sentry::sentry(asStack_38,(longlong *)this);
  if (asStack_38[0] != (sentry)0x0) {
    pwVar7 = this + *(longlong *)(*(longlong *)this + -0x18);
    plVar1 = *(longlong **)(pwVar7 + 0xf8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pwVar7[0xe2] == (wostream)0x0) {
      plVar3 = *(longlong **)(pwVar7 + 0xf0);
      if (plVar3 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      uVar4 = (**(code **)(*plVar3 + 0x50))(plVar3,0x20);
      lVar2 = *(longlong *)this;
      *(undefined2 *)(pwVar7 + 0xe0) = uVar4;
      pwVar7[0xe2] = (wostream)0x1;
      pwVar7 = this + *(longlong *)(lVar2 + -0x18);
    }
    else {
      uVar4 = *(undefined2 *)(pwVar7 + 0xe0);
    }
    lStack_58 = *(longlong *)(pwVar7 + 0xe8);
    uStack_50 = (ulonglong)(lStack_58 == 0);
    (**(code **)(*plVar1 + 0x30))(auStack_48,plVar1,&lStack_58,pwVar7,uVar4,param_1);
    if (cStack_40 != '\0') {
      wios::clear((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),
                  *(uint *)((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)) + 0x20) | 1);
    }
  }
  lVar2 = *(longlong *)(*plStack_30 + -0x18);
  if ((*(byte *)((longlong)plStack_30 + lVar2 + 0x19) & 0x20) != 0) {
    uVar5 = uncaught_exception();
    if (((char)uVar5 == '\0') &&
       (plVar1 = *(longlong **)((longlong)plStack_30 + lVar2 + 0xe8), plVar1 != (longlong *)0x0)) {
      iVar6 = (**(code **)(*plVar1 + 0x30))();
      if (iVar6 == -1) {
        this_00 = (wios *)((longlong)plStack_30 + *(longlong *)(*plStack_30 + -0x18));
        wios::clear(this_00,*(uint *)(this_00 + 0x20) | 1);
      }
    }
  }
  return this;
}



// std::random_device::_M_init_pretr1(std::__cxx11::string const&)

void __thiscall std::random_device::_M_init_pretr1(random_device *this,undefined8 *param_1)

{
  byte *pbVar1;
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  pbVar1 = (byte *)*param_1;
  if ((((param_1[1] != 7) || (*(int *)pbVar1 != 0x3931746d)) || (*(int *)(pbVar1 + 3) != 0x37333939)
      ) && (9 < *pbVar1 - 0x30)) {
    _M_init(this,param_1);
    return;
  }
  local_38[0] = local_28;
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)local_38,"default",0x1400c5d3e);
  _M_init(this,local_38);
  if (local_38[0] != local_28) {
    operator_delete(local_38[0]);
  }
  return;
}



// std::random_device::_M_init_pretr1(std::string const&)

void __thiscall std::random_device::_M_init_pretr1(random_device *this,undefined8 *param_1)

{
  _M_init(this,(undefined1 *)*param_1,*(longlong *)((undefined1 *)*param_1 + -0x18));
  return;
}



// std::random_device::_M_getval_pretr1()

ulonglong __thiscall std::random_device::_M_getval_pretr1(random_device *this)

{
  int iVar1;
  ulonglong uVar2;
  int *piVar3;
  longlong lVar4;
  uint *_DstBuf;
  uint auStack_2c [3];
  
  if (*(code **)(this + 8) != (code *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014008e9cf. Too many branches
                    // WARNING: Treating indirect jump as call
    uVar2 = (**(code **)(this + 8))(*(undefined8 *)this);
    return uVar2;
  }
  lVar4 = 4;
  _DstBuf = auStack_2c;
  do {
    while( true ) {
      iVar1 = read(*(int *)(this + 0x10),_DstBuf,(uint)lVar4);
      if (iVar1 < 1) break;
      _DstBuf = (uint *)((longlong)_DstBuf + (longlong)iVar1);
      lVar4 = lVar4 - iVar1;
      if (lVar4 == 0) {
        return (ulonglong)auStack_2c[0];
      }
    }
    if (iVar1 != -1) break;
    piVar3 = _errno();
  } while (*piVar3 == 4);
                    // WARNING: Subroutine does not return
  __throw_runtime_error("random_device could not be read");
}



// std::random_device::_M_fini()

void std::random_device::_M_fini(void)

{
  return;
}



// std::random_device::_M_init(char const*, unsigned long long)

void __thiscall
std::random_device::_M_init(random_device *this,undefined1 *param_1,longlong param_2)

{
  undefined1 *local_38 [2];
  undefined1 local_28 [16];
  
  local_38[0] = local_28;
  if ((param_1 == (undefined1 *)0x0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string: construction from null is not valid");
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)local_38,param_1,(longlong)(param_1 + param_2));
  _M_init(this,local_38);
  if (local_38[0] != local_28) {
    operator_delete(local_38[0]);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x00014008e94b)
// WARNING: Removing unreachable block (ram,0x00014008e8c1)
// WARNING: Removing unreachable block (ram,0x00014008e988)
// WARNING: Removing unreachable block (ram,0x00014008e886)
// WARNING: Removing unreachable block (ram,0x00014008e93c)
// WARNING: Removing unreachable block (ram,0x00014008e8ee)
// WARNING: Removing unreachable block (ram,0x00014008e8a6)
// std::random_device::_M_init(std::__cxx11::string const&)

void __thiscall std::random_device::_M_init(random_device *this,undefined8 *param_1)

{
  longlong lVar1;
  int *piVar2;
  code *pcVar3;
  
  *(undefined8 *)this = 0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  lVar1 = param_1[1];
  if (lVar1 == 7) {
    if ((*(int *)*param_1 != 0x61666564) || (*(int *)((longlong)*param_1 + 3) != 0x746c7561))
    goto LAB_14008e82b;
LAB_14008e810:
    pcVar3 = _text__ZNSt12_GLOBAL__N_114__winxp_rand_sEPv;
  }
  else {
    if (lVar1 == 6) {
      piVar2 = (int *)*param_1;
      if ((*piVar2 == 0x65736472) && ((short)piVar2[1] == 0x6465)) {
        piVar2 = (int *)cpuid_basic_info(0);
        if (((*piVar2 == 0) || ((piVar2[1] != 0x68747541 && (piVar2[1] != 0x756e6547)))) ||
           (lVar1 = cpuid_Extended_Feature_Enumeration_info(7),
           (*(uint *)(lVar1 + 4) & 0x40000) == 0)) goto LAB_14008e8f4;
LAB_14008e946:
        lVar1 = cpuid_Version_info(1);
        pcVar3 = _text__ZNSt12_GLOBAL__N_119__x86_rdseed_rdrandEPv;
        if ((*(uint *)(lVar1 + 0xc) & 0x40000000) == 0) {
          pcVar3 = _text__ZNSt12_GLOBAL__N_112__x86_rdseedEPv;
        }
        goto LAB_14008e8d2;
      }
      if ((*piVar2 != 0x61726472) || ((short)piVar2[1] != 0x646e)) {
        if ((*piVar2 != 0x646e6172) || ((short)piVar2[1] != 0x735f)) goto LAB_14008e82b;
        goto LAB_14008e810;
      }
    }
    else if (lVar1 == 5) {
      if ((*(int *)*param_1 != 0x6e726472) || ((char)((int *)*param_1)[1] != 'd'))
      goto LAB_14008e82b;
    }
    else {
      if (lVar1 == 2) {
        if (*(short *)*param_1 != 0x7768) {
LAB_14008e82b:
                    // WARNING: Subroutine does not return
          __throw_runtime_error
                    ("random_device::random_device(const std::string&): unsupported token");
        }
      }
      else if ((lVar1 != 8) || (*(longlong *)*param_1 != 0x6572617764726168)) goto LAB_14008e82b;
      piVar2 = (int *)cpuid_basic_info(0);
      if ((*piVar2 != 0) &&
         (((piVar2[1] == 0x68747541 || (piVar2[1] == 0x756e6547)) &&
          (lVar1 = cpuid_Extended_Feature_Enumeration_info(7), (*(uint *)(lVar1 + 4) & 0x40000) != 0
          )))) goto LAB_14008e946;
    }
    piVar2 = (int *)cpuid_basic_info(0);
    if ((*piVar2 == 0) ||
       (((piVar2[1] != 0x756e6547 && (piVar2[1] != 0x68747541)) ||
        (lVar1 = cpuid_Version_info(1), (*(uint *)(lVar1 + 0xc) & 0x40000000) == 0)))) {
LAB_14008e8f4:
                    // WARNING: Subroutine does not return
      __throw_runtime_error
                ("random_device::random_device(const std::string&): device not available");
    }
    pcVar3 = _text__ZNSt12_GLOBAL__N_112__x86_rdrandEPv;
  }
LAB_14008e8d2:
  *(code **)(this + 8) = pcVar3;
  return;
}



// std::random_device::_M_init(std::string const&)

void __thiscall std::random_device::_M_init(random_device *this,undefined8 *param_1)

{
  _M_init(this,(undefined1 *)*param_1,*(longlong *)((undefined1 *)*param_1 + -0x18));
  return;
}



// std::random_device::_M_getval()

ulonglong __thiscall std::random_device::_M_getval(random_device *this)

{
  int iVar1;
  ulonglong uVar2;
  int *piVar3;
  longlong lVar4;
  uint *_DstBuf;
  uint local_2c [3];
  
  if (*(code **)(this + 8) != (code *)0x0) {
                    // WARNING: Could not recover jumptable at 0x00014008e9cf. Too many branches
                    // WARNING: Treating indirect jump as call
    uVar2 = (**(code **)(this + 8))(*(undefined8 *)this);
    return uVar2;
  }
  lVar4 = 4;
  _DstBuf = local_2c;
  do {
    while( true ) {
      iVar1 = read(*(int *)(this + 0x10),_DstBuf,(uint)lVar4);
      if (iVar1 < 1) break;
      _DstBuf = (uint *)((longlong)_DstBuf + (longlong)iVar1);
      lVar4 = lVar4 - iVar1;
      if (lVar4 == 0) {
        return (ulonglong)local_2c[0];
      }
    }
    if (iVar1 != -1) break;
    piVar3 = _errno();
  } while (*piVar3 == 4);
                    // WARNING: Subroutine does not return
  __throw_runtime_error("random_device could not be read");
}



// std::runtime_error::runtime_error(std::runtime_error&&)

void __thiscall std::runtime_error::runtime_error(runtime_error *this,longlong param_1)

{
  longlong lVar1;
  int iVar2;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar1 = *(longlong *)(param_1 + 8);
  *(longlong *)(this + 8) = lVar1;
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar1 + -8);
    if (iVar2 < 1) {
LAB_14008ea83:
      *(undefined4 *)(lVar1 + -8) = 1;
      return;
    }
  }
  else {
    if (*(int *)(lVar1 + -8) < 1) {
      lVar1 = *(longlong *)(this + 8);
      goto LAB_14008ea83;
    }
    lVar1 = *(longlong *)(this + 8);
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
      UNLOCK();
      return;
    }
    iVar2 = *(int *)(lVar1 + -8);
  }
  *(int *)(lVar1 + -8) = iVar2 + 1;
  return;
}



// std::runtime_error::runtime_error(char const*)

void __thiscall std::runtime_error::runtime_error(runtime_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  return;
}



// std::runtime_error::runtime_error(std::__cxx11::string const&)

void __thiscall std::runtime_error::runtime_error(runtime_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  return;
}



// std::runtime_error::runtime_error(std::runtime_error const&)

void __thiscall std::runtime_error::runtime_error(runtime_error *this,longlong param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_9;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar1 = *(longlong *)(param_1 + 8);
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_9,0);
    *(longlong **)(this + 8) = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)(this + 8) = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)(this + 8) = lVar1;
  return;
}



// std::runtime_error::runtime_error(std::string const&)

void __thiscall std::runtime_error::runtime_error(runtime_error *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),local_19,0);
    *(longlong **)(this + 8) = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)(this + 8) = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)(this + 8) = lVar1;
  return;
}



// std::runtime_error::~runtime_error()

void __thiscall std::runtime_error::~runtime_error(runtime_error *this)

{
  ~runtime_error(this);
  operator_delete(this);
  return;
}



// std::runtime_error::~runtime_error()

void __thiscall std::runtime_error::~runtime_error(runtime_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::runtime_error::TEMPNAMEPLACEHOLDERVALUE(std::runtime_error&&)

runtime_error * __thiscall std::runtime_error::operator=(runtime_error *this,longlong param_1)

{
  std::string::swap((string *)(this + 8),(longlong *)(param_1 + 8));
  return this;
}



// std::runtime_error::TEMPNAMEPLACEHOLDERVALUE(std::runtime_error const&)

runtime_error * __thiscall std::runtime_error::operator=(runtime_error *this,longlong param_1)

{
  std::string::assign((string *)(this + 8),(longlong *)(param_1 + 8));
  return this;
}



// std::wiostream::swap(std::wiostream&)

void __thiscall std::wiostream::swap(wiostream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  lVar4 = param_1[1];
  this_00[0xe2] = wVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  return;
}



// std::wiostream::wiostream(std::wiostream&&)

void __thiscall std::wiostream::wiostream(wiostream *this,longlong *param_1)

{
  ios_base *this_00;
  undefined8 uVar1;
  longlong lVar2;
  
  this_00 = (ios_base *)(this + 0x18);
  ios_base::ios_base(this_00);
  *(undefined2 *)(this + 0xf8) = 0;
  *(undefined **)this = &DAT_1400d6eb8;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x18) = &DAT_1400d6ee0;
  lVar2 = param_1[1];
  *(undefined8 *)(this + 0xf0) = 0;
  *(longlong *)(this + 8) = lVar2;
  lVar2 = *param_1;
  this[0xfa] = (wiostream)0x0;
  lVar2 = *(longlong *)(lVar2 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar2);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this + 0xe8));
  uVar1 = *(undefined8 *)(lVar2 + 0xd8);
  *(undefined8 *)(this + 0x100) = 0;
  *(undefined8 *)(lVar2 + 0xd8) = 0;
  *(undefined8 *)(this + 0xf0) = uVar1;
  *(undefined2 *)(this + 0xf8) = *(undefined2 *)(lVar2 + 0xe0);
  this[0xfa] = *(wiostream *)(lVar2 + 0xe2);
  param_1[1] = 0;
  *(undefined ***)this = &PTR__wiostream_1400dd628;
  *(undefined ***)(this + 0x10) = &PTR__wiostream_1400dd650;
  *(undefined ***)(this + 0x18) = &PTR__wiostream_1400dd678;
  return;
}



// std::wiostream::wiostream(std::wstreambuf*)

void __thiscall std::wiostream::wiostream(wiostream *this,longlong param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x18);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6eb8;
  *(undefined **)(this + 0x18) = &DAT_1400d6ee0;
  *(undefined8 *)(this + 0xf0) = 0;
  *(undefined2 *)(this + 0xf8) = 0;
  this[0xfa] = (wiostream)0x0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,param_1);
  *(undefined **)(this + 0x10) = &DAT_1400d6f08;
  *(undefined **)(this + 0x18) = &DAT_1400d6f30;
  wios::init((wios *)this_00,param_1);
  *(undefined ***)this = &PTR__wiostream_1400dd628;
  *(undefined ***)(this + 0x10) = &PTR__wiostream_1400dd650;
  *(undefined ***)(this + 0x18) = &PTR__wiostream_1400dd678;
  return;
}



// std::wiostream::wiostream()

void __thiscall std::wiostream::wiostream(wiostream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x18);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6eb8;
  this[0xfa] = (wiostream)0x0;
  *(undefined8 *)(this + 0xf0) = 0;
  *(undefined2 *)(this + 0xf8) = 0;
  *(undefined **)(this + 0x18) = &DAT_1400d6ee0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6f08;
  *(undefined **)(this + 0x18) = &DAT_1400d6f30;
  wios::init((wios *)this_00,0);
  *(undefined ***)this = &PTR__wiostream_1400dd628;
  *(undefined ***)(this + 0x10) = &PTR__wiostream_1400dd650;
  *(undefined ***)(this + 0x18) = &PTR__wiostream_1400dd678;
  return;
}



// std::wiostream::wiostream(std::wiostream&&)

void __thiscall std::wiostream::wiostream(wiostream *this,longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  undefined8 uVar2;
  ios_base *this_00;
  longlong lVar3;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar1 + -0x18));
  lVar3 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar3);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(lVar3 + 0xd8);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(lVar3 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  lVar1 = param_1[4];
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar3 + 0xe0);
  this_00[0xe2] = *(ios_base *)(lVar3 + 0xe2);
  lVar3 = param_1[3];
  param_2[1] = 0;
  *(longlong *)(this + 0x10) = lVar3;
  *(longlong *)(this + *(longlong *)(lVar3 + -0x18) + 0x10) = lVar1;
  lVar1 = *param_1;
  lVar3 = param_1[5];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar3;
  *(longlong *)(this + 0x10) = param_1[6];
  return;
}



// std::wiostream::wiostream(std::wstreambuf*)

void __thiscall std::wiostream::wiostream(wiostream *this,longlong *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),param_2);
  lVar1 = param_1[3];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[4];
  wios::init((wios *)(this + lVar1 + 0x10),param_2);
  lVar1 = *param_1;
  lVar2 = param_1[5];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[6];
  return;
}



// std::wiostream::wiostream()

void __thiscall std::wiostream::wiostream(wiostream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = param_1[3];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[4];
  wios::init((wios *)(this + lVar1 + 0x10),0);
  lVar1 = *param_1;
  lVar2 = param_1[5];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[6];
  return;
}



// std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this)

{
  *(undefined **)this = &DAT_1400d6eb8;
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6f08;
  *(undefined ***)(this + 0x18) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x18));
  operator_delete(this);
  return;
}



// std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this)

{
  *(undefined **)this = &DAT_1400d6eb8;
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6f08;
  *(undefined ***)(this + 0x18) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x18));
  return;
}



// std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[5];
  *(longlong *)(this + 0x10) = param_1[6];
  lVar1 = param_1[3];
  *(longlong *)(this + 0x10) = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18) + 0x10) = param_1[4];
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::wiostream::TEMPNAMEPLACEHOLDERVALUE(std::wiostream&&)

wiostream * __thiscall std::wiostream::operator=(wiostream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  lVar4 = param_1[1];
  this_00[0xe2] = wVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  return this;
}



// std::codecvt_byname<char, char, int>::codecvt_byname(char const*, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<char, char, int>::codecvt_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<char, char, int>::codecvt_byname(std::string const&, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<char, char, int>::codecvt_byname(char const*, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<char, char, int>::codecvt_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<char, char, int>::codecvt_byname(std::string const&, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<char, char, int>::~codecvt_byname()

void __thiscall std::codecvt_byname<>::~codecvt_byname(codecvt_byname<> *this)

{
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  codecvt<>::~codecvt((codecvt<> *)this);
  operator_delete(this);
  return;
}



// std::codecvt_byname<char, char, int>::~codecvt_byname()

void __thiscall std::codecvt_byname<>::~codecvt_byname(codecvt_byname<> *this)

{
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::codecvt_byname<char, char, int>::~codecvt_byname()

void __thiscall std::codecvt_byname<>::~codecvt_byname(codecvt_byname<> *this)

{
  *(undefined ***)this = &PTR__codecvt_byname_1400dd6a0;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::codecvt_byname<wchar_t, char, int>::codecvt_byname(char const*, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<wchar_t, char, int>::codecvt_byname(std::__cxx11::string const&, unsigned
// long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<wchar_t, char, int>::codecvt_byname(std::string const&, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<wchar_t, char, int>::codecvt_byname(char const*, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<wchar_t, char, int>::codecvt_byname(std::__cxx11::string const&, unsigned
// long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<wchar_t, char, int>::codecvt_byname(std::string const&, unsigned long long)

void __thiscall
std::codecvt_byname<>::codecvt_byname(codecvt_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  
  _Str1 = (char *)*param_1;
  codecvt<>::codecvt((codecvt<> *)this,param_2);
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::codecvt_byname<wchar_t, char, int>::~codecvt_byname()

void __thiscall std::codecvt_byname<>::~codecvt_byname(codecvt_byname<> *this)

{
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  codecvt<>::~codecvt((codecvt<> *)this);
  operator_delete(this);
  return;
}



// std::codecvt_byname<wchar_t, char, int>::~codecvt_byname()

void __thiscall std::codecvt_byname<>::~codecvt_byname(codecvt_byname<> *this)

{
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::codecvt_byname<wchar_t, char, int>::~codecvt_byname()

void __thiscall std::codecvt_byname<>::~codecvt_byname(codecvt_byname<> *this)

{
  *(undefined ***)this = &PTR__codecvt_byname_1400dd700;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::collate_byname<char>::collate_byname(char const*, unsigned long long)

void __thiscall
std::collate_byname<char>::collate_byname(collate_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd760;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::collate_byname<char>::collate_byname(std::string const&, unsigned long long)

void __thiscall
std::collate_byname<char>::collate_byname
          (collate_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd760;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::collate_byname<char>::collate_byname(char const*, unsigned long long)

void __thiscall
std::collate_byname<char>::collate_byname(collate_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd760;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::collate_byname<char>::collate_byname(std::string const&, unsigned long long)

void __thiscall
std::collate_byname<char>::collate_byname
          (collate_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd760;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::collate_byname<char>::~collate_byname()

void __thiscall std::collate_byname<char>::~collate_byname(collate_byname<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8a0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::collate_byname<char>::~collate_byname()

void __thiscall std::collate_byname<char>::~collate_byname(collate_byname<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8a0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::collate_byname<char>::~collate_byname()

void __thiscall std::collate_byname<char>::~collate_byname(collate_byname<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8a0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::collate_byname<wchar_t>::collate_byname(char const*, unsigned long long)

void __thiscall
std::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd7a0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::collate_byname<wchar_t>::collate_byname(std::string const&, unsigned long long)

void __thiscall
std::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd7a0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::collate_byname<wchar_t>::collate_byname(char const*, unsigned long long)

void __thiscall
std::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd7a0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::collate_byname<wchar_t>::collate_byname(std::string const&, unsigned long long)

void __thiscall
std::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dd7a0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::collate_byname<wchar_t>::~collate_byname()

void __thiscall std::collate_byname<wchar_t>::~collate_byname(collate_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::collate_byname<wchar_t>::~collate_byname()

void __thiscall std::collate_byname<wchar_t>::~collate_byname(collate_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::collate_byname<wchar_t>::~collate_byname()

void __thiscall std::collate_byname<wchar_t>::~collate_byname(collate_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::overflow_error::overflow_error(char const*)

void __thiscall std::overflow_error::overflow_error(overflow_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__overflow_error_1400dd7e0;
  return;
}



// std::overflow_error::overflow_error(std::__cxx11::string const&)

void __thiscall std::overflow_error::overflow_error(overflow_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__overflow_error_1400dd7e0;
  return;
}



// std::overflow_error::overflow_error(std::string const&)

void __thiscall std::overflow_error::overflow_error(overflow_error *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__overflow_error_1400dd7e0;
  return;
}



// std::overflow_error::~overflow_error()

void __thiscall std::overflow_error::~overflow_error(overflow_error *this)

{
  *(undefined ***)this = &PTR__overflow_error_1400dd7e0;
  runtime_error::~runtime_error((runtime_error *)this);
  operator_delete(this);
  return;
}



// std::overflow_error::~overflow_error()

void __thiscall std::overflow_error::~overflow_error(overflow_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::streambuf::pubseekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

undefined8 * std::streambuf::pubseekoff(undefined8 *param_1,longlong *param_2)

{
  if (*(code **)(*param_2 + 0x20) == seekoff) {
    *param_1 = 0xffffffffffffffff;
    *(undefined4 *)(param_1 + 1) = 0;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::streambuf::pubseekpos(std::fpos<int>, std::_Ios_Openmode)

streambuf * __thiscall
std::streambuf::pubseekpos(streambuf *this,longlong *param_1,undefined8 *param_2)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_2;
  uStack_10 = param_2[1];
  if (*(code **)(*param_1 + 0x28) == seekpos) {
    *(undefined8 *)this = 0xffffffffffffffff;
    *(undefined4 *)(this + 8) = 0;
    return this;
  }
  (**(code **)(*param_1 + 0x28))(this,param_1,&local_18);
  return this;
}



// std::streambuf::__safe_gbump(long long)

void __thiscall std::streambuf::__safe_gbump(streambuf *this,longlong param_1)

{
  *(longlong *)(this + 0x10) = *(longlong *)(this + 0x10) + param_1;
  return;
}



// std::streambuf::__safe_pbump(long long)

void __thiscall std::streambuf::__safe_pbump(streambuf *this,longlong param_1)

{
  *(longlong *)(this + 0x28) = *(longlong *)(this + 0x28) + param_1;
  return;
}



// std::streambuf::setg(char*, char*, char*)

void __thiscall
std::streambuf::setg(streambuf *this,undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  *(undefined8 *)(this + 8) = param_1;
  *(undefined8 *)(this + 0x10) = param_2;
  *(undefined8 *)(this + 0x18) = param_3;
  return;
}



// std::streambuf::setp(char*, char*)

void __thiscall std::streambuf::setp(streambuf *this,undefined8 param_1,undefined8 param_2)

{
  *(undefined8 *)(this + 0x30) = param_2;
  *(undefined8 *)(this + 0x20) = param_1;
  *(undefined8 *)(this + 0x28) = param_1;
  return;
}



// std::streambuf::swap(std::streambuf&)

void __thiscall std::streambuf::swap(streambuf *this,longlong param_1)

{
  undefined8 uVar1;
  locale local_20 [8];
  
  uVar1 = *(undefined8 *)(this + 8);
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(param_1 + 8) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x10);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(param_1 + 0x10) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x18);
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined8 *)(param_1 + 0x18) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x20);
  *(undefined8 *)(this + 0x20) = *(undefined8 *)(param_1 + 0x20);
  *(undefined8 *)(param_1 + 0x20) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x28);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(param_1 + 0x28) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x30);
  *(undefined8 *)(this + 0x30) = *(undefined8 *)(param_1 + 0x30);
  *(undefined8 *)(param_1 + 0x30) = uVar1;
  locale::locale(local_20,(undefined8 *)(this + 0x38));
  locale::operator=((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  locale::operator=((locale *)(param_1 + 0x38),(undefined8 *)local_20);
  locale::~locale(local_20);
  return;
}



// std::streambuf::sync()

undefined8 std::streambuf::sync(void)

{
  return 0;
}



// std::streambuf::gbump(int)

void __thiscall std::streambuf::gbump(streambuf *this,int param_1)

{
  *(longlong *)(this + 0x10) = *(longlong *)(this + 0x10) + (longlong)param_1;
  return;
}



// std::streambuf::imbue(std::locale const&)

void std::streambuf::imbue(void)

{
  return;
}



// std::streambuf::pbump(int)

void __thiscall std::streambuf::pbump(streambuf *this,int param_1)

{
  *(longlong *)(this + 0x28) = *(longlong *)(this + 0x28) + (longlong)param_1;
  return;
}



// std::streambuf::sgetc()

ulonglong __thiscall std::streambuf::sgetc(streambuf *this)

{
  ulonglong uVar1;
  
  if (*(byte **)(this + 0x10) < *(byte **)(this + 0x18)) {
    uVar1 = (ulonglong)**(byte **)(this + 0x10);
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x48) != underflow) {
                    // WARNING: Could not recover jumptable at 0x0001400906d8. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this + 0x48))();
      return uVar1;
    }
  }
  return uVar1;
}



// std::streambuf::sgetn(char*, long long)

void std::streambuf::sgetn(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400906e3. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x40))();
  return;
}



// std::streambuf::sputc(char)

ulonglong __thiscall std::streambuf::sputc(streambuf *this,byte param_1)

{
  ulonglong uVar1;
  
  uVar1 = (ulonglong)param_1;
  if (*(byte **)(this + 0x28) < *(byte **)(this + 0x30)) {
    **(byte **)(this + 0x28) = param_1;
    *(longlong *)(this + 0x28) = *(longlong *)(this + 0x28) + 1;
  }
  else {
    if (*(code **)(*(longlong *)this + 0x68) != overflow) {
                    // WARNING: Could not recover jumptable at 0x000140090733. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this + 0x68))(this,uVar1);
      return uVar1;
    }
    uVar1 = 0xffffffff;
  }
  return uVar1;
}



// std::streambuf::sputn(char const*, long long)

void std::streambuf::sputn(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140090743. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x60))();
  return;
}



// std::streambuf::uflow()

ulonglong __thiscall std::streambuf::uflow(streambuf *this)

{
  byte bVar1;
  int iVar2;
  
  if (*(code **)(*(longlong *)this + 0x48) != underflow) {
    iVar2 = (**(code **)(*(longlong *)this + 0x48))();
    if (iVar2 != -1) {
      bVar1 = **(byte **)(this + 0x10);
      *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;
      return (ulonglong)bVar1;
    }
  }
  return 0xffffffff;
}



// std::streambuf::sbumpc()

ulonglong __thiscall std::streambuf::sbumpc(streambuf *this)

{
  code *UNRECOVERED_JUMPTABLE;
  int iVar1;
  byte *pbVar2;
  ulonglong uVar3;
  
  pbVar2 = *(byte **)(this + 0x10);
  if (pbVar2 < *(byte **)(this + 0x18)) {
LAB_1400907ae:
    uVar3 = (ulonglong)*pbVar2;
    *(byte **)(this + 0x10) = pbVar2 + 1;
  }
  else {
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x50);
    if (UNRECOVERED_JUMPTABLE != uflow) {
                    // WARNING: Could not recover jumptable at 0x0001400907f4. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar3 = (*UNRECOVERED_JUMPTABLE)();
      return uVar3;
    }
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x48);
    if (UNRECOVERED_JUMPTABLE != underflow) {
      iVar1 = (*UNRECOVERED_JUMPTABLE)();
      if (iVar1 != -1) {
        pbVar2 = *(byte **)(this + 0x10);
        goto LAB_1400907ae;
      }
    }
    uVar3 = 0xffffffff;
  }
  return uVar3;
}



void _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(longlong *param_1)

{
  if ((ulonglong)param_1[2] < (ulonglong)param_1[3]) {
    param_1[2] = param_1[2] + 1;
    return;
  }
                    // WARNING: Could not recover jumptable at 0x00014009083b. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x50))();
  return;
}



void _text__ZNSt15basic_streambufIcSt11char_traitsIcEE6sbumpcEv_isra_0(longlong *param_1)

{
  if ((ulonglong)param_1[2] < (ulonglong)param_1[3]) {
    param_1[2] = param_1[2] + 1;
    return;
  }
                    // WARNING: Could not recover jumptable at 0x00014009085b. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x50))();
  return;
}



// std::streambuf::setbuf(char*, long long)

undefined8 std::streambuf::setbuf(undefined8 param_1)

{
  return param_1;
}



// std::streambuf::snextc()

ulonglong __thiscall std::streambuf::snextc(streambuf *this)

{
  code *pcVar1;
  int iVar2;
  byte *pbVar3;
  ulonglong uVar4;
  byte *pbVar5;
  
  pbVar5 = *(byte **)(this + 0x18);
  if (*(byte **)(this + 0x10) < pbVar5) {
    pbVar3 = *(byte **)(this + 0x10) + 1;
    *(byte **)(this + 0x10) = pbVar3;
  }
  else {
    pcVar1 = *(code **)(*(longlong *)this + 0x50);
    if (pcVar1 == uflow) {
      pcVar1 = *(code **)(*(longlong *)this + 0x48);
      if (pcVar1 == underflow) {
        return 0xffffffff;
      }
      iVar2 = (*pcVar1)();
      if (iVar2 == -1) {
        return 0xffffffff;
      }
      pbVar5 = *(byte **)(this + 0x18);
      pbVar3 = (byte *)(*(longlong *)(this + 0x10) + 1);
      *(byte **)(this + 0x10) = pbVar3;
    }
    else {
      iVar2 = (*pcVar1)();
      if (iVar2 == -1) {
        return 0xffffffff;
      }
      pbVar3 = *(byte **)(this + 0x10);
      pbVar5 = *(byte **)(this + 0x18);
    }
  }
  if (pbVar3 < pbVar5) {
    return (ulonglong)*pbVar3;
  }
  if (*(code **)(*(longlong *)this + 0x48) == underflow) {
    return 0xffffffff;
  }
                    // WARNING: Could not recover jumptable at 0x0001400908e7. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar4 = (**(code **)(*(longlong *)this + 0x48))();
  return uVar4;
}



// std::streambuf::stossc()

void __thiscall std::streambuf::stossc(streambuf *this)

{
  code *UNRECOVERED_JUMPTABLE;
  int iVar1;
  
  if (*(ulonglong *)(this + 0x10) < *(ulonglong *)(this + 0x18)) {
    *(ulonglong *)(this + 0x10) = *(ulonglong *)(this + 0x10) + 1;
  }
  else {
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x50);
    if (UNRECOVERED_JUMPTABLE != uflow) {
                    // WARNING: Could not recover jumptable at 0x0001400909a8. Too many branches
                    // WARNING: Treating indirect jump as call
      (*UNRECOVERED_JUMPTABLE)(this);
      return;
    }
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x48);
    if (UNRECOVERED_JUMPTABLE != underflow) {
      iVar1 = (*UNRECOVERED_JUMPTABLE)(this);
      if (iVar1 != -1) {
        *(longlong *)(this + 0x10) = *(longlong *)(this + 0x10) + 1;
        return;
      }
    }
  }
  return;
}



// std::streambuf::xsgetn(char*, long long)

longlong __thiscall std::streambuf::xsgetn(streambuf *this,undefined1 *param_1,longlong param_2)

{
  code *pcVar1;
  int iVar2;
  uint uVar3;
  void *pvVar4;
  size_t _Size;
  longlong lVar5;
  size_t _Size_00;
  
  lVar5 = 0;
  if (param_2 < 1) {
    return 0;
  }
  do {
    pvVar4 = *(void **)(this + 0x10);
    _Size = *(longlong *)(this + 0x18) - (longlong)pvVar4;
    if (_Size != 0) {
      _Size_00 = param_2 - lVar5;
      if ((longlong)_Size_00 < (longlong)_Size) {
        memcpy(param_1,pvVar4,_Size_00);
        *(size_t *)(this + 0x10) = *(longlong *)(this + 0x10) + _Size_00;
        return param_2;
      }
      lVar5 = lVar5 + _Size;
      pvVar4 = memcpy(param_1,pvVar4,_Size);
      *(size_t *)(this + 0x10) = *(longlong *)(this + 0x10) + _Size;
      if (param_2 <= lVar5) {
        return lVar5;
      }
      param_1 = (undefined1 *)(_Size + (longlong)pvVar4);
    }
    pcVar1 = *(code **)(*(longlong *)this + 0x50);
    if (pcVar1 == uflow) {
      pcVar1 = *(code **)(*(longlong *)this + 0x48);
      if (pcVar1 == underflow) {
        return lVar5;
      }
      iVar2 = (*pcVar1)(this);
      if (iVar2 == -1) {
        return lVar5;
      }
      uVar3 = (uint)**(byte **)(this + 0x10);
      *(byte **)(this + 0x10) = *(byte **)(this + 0x10) + 1;
    }
    else {
      uVar3 = (*pcVar1)(this);
      if (uVar3 == 0xffffffff) {
        return lVar5;
      }
    }
    lVar5 = lVar5 + 1;
    *param_1 = (char)uVar3;
    param_1 = param_1 + 1;
    if (param_2 <= lVar5) {
      return lVar5;
    }
  } while( true );
}



// std::streambuf::xsputn(char const*, long long)

longlong __thiscall std::streambuf::xsputn(streambuf *this,undefined1 *param_1,longlong param_2)

{
  void *_Dst;
  int iVar1;
  size_t _Size;
  longlong lVar2;
  size_t _Size_00;
  
  lVar2 = 0;
  if (param_2 < 1) {
    return 0;
  }
  while( true ) {
    _Dst = *(void **)(this + 0x28);
    _Size = *(longlong *)(this + 0x30) - (longlong)_Dst;
    if (_Size != 0) {
      _Size_00 = param_2 - lVar2;
      if ((longlong)_Size_00 < (longlong)_Size) {
        memcpy(_Dst,param_1,_Size_00);
        *(size_t *)(this + 0x28) = *(longlong *)(this + 0x28) + _Size_00;
        return param_2;
      }
      lVar2 = lVar2 + _Size;
      memcpy(_Dst,param_1,_Size);
      *(size_t *)(this + 0x28) = *(longlong *)(this + 0x28) + _Size;
      if (param_2 <= lVar2) {
        return lVar2;
      }
      param_1 = param_1 + _Size;
    }
    if (*(code **)(*(longlong *)this + 0x68) == overflow) {
      return lVar2;
    }
    iVar1 = (**(code **)(*(longlong *)this + 0x68))(this,*param_1);
    if (iVar1 == -1) break;
    lVar2 = lVar2 + 1;
    param_1 = param_1 + 1;
    if (param_2 <= lVar2) {
      return lVar2;
    }
  }
  return lVar2;
}



// std::streambuf::pubsync()

undefined8 __thiscall std::streambuf::pubsync(streambuf *this)

{
  undefined8 uVar1;
  
  if (*(code **)(*(longlong *)this + 0x30) == sync) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140090b90. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x30))();
  return uVar1;
}



// std::streambuf::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

undefined8 * std::streambuf::seekoff(undefined8 *param_1)

{
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



// std::streambuf::seekpos(std::fpos<int>, std::_Ios_Openmode)

undefined8 * std::streambuf::seekpos(undefined8 *param_1)

{
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



// std::streambuf::sungetc()

ulonglong __thiscall std::streambuf::sungetc(streambuf *this)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 0x10);
  if (*(ulonglong *)(this + 8) < uVar1) {
    *(ulonglong *)(this + 0x10) = uVar1 - 1;
    uVar1 = (ulonglong)*(byte *)(uVar1 - 1);
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x58) != pbackfail) {
                    // WARNING: Could not recover jumptable at 0x000140090c1d. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this + 0x58))(this,0xffffffff);
      return uVar1;
    }
  }
  return uVar1;
}



// std::streambuf::in_avail()

void __thiscall std::streambuf::in_avail(streambuf *this)

{
  if ((*(longlong *)(this + 0x18) == *(longlong *)(this + 0x10)) &&
     (*(code **)(*(longlong *)this + 0x38) != showmanyc)) {
                    // WARNING: Could not recover jumptable at 0x000140090c40. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)(*(longlong *)this + 0x38))();
    return;
  }
  return;
}



// std::streambuf::overflow(int)

undefined8 std::streambuf::overflow(void)

{
  return 0xffffffff;
}



// std::streambuf::pubimbue(std::locale const&)

locale * std::streambuf::pubimbue(locale *param_1,longlong *param_2,undefined8 *param_3)

{
  locale::locale(param_1,(undefined8 *)(param_2 + 7));
  if (*(code **)(*param_2 + 0x10) != imbue) {
    (**(code **)(*param_2 + 0x10))(param_2,param_3);
  }
  locale::operator=((locale *)(param_2 + 7),param_3);
  return param_1;
}



// std::streambuf::pbackfail(int)

undefined8 std::streambuf::pbackfail(void)

{
  return 0xffffffff;
}



// std::streambuf::pubsetbuf(char*, long long)

void std::streambuf::pubsetbuf(longlong *param_1)

{
  if (*(code **)(*param_1 + 0x18) == setbuf) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140090d03. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x18))(param_1);
  return;
}



// std::streambuf::showmanyc()

undefined8 std::streambuf::showmanyc(void)

{
  return 0;
}



// std::streambuf::sputbackc(char)

ulonglong __thiscall std::streambuf::sputbackc(streambuf *this,char param_1)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 0x10);
  if ((*(ulonglong *)(this + 8) < uVar1) && (*(char *)(uVar1 - 1) == param_1)) {
    *(ulonglong *)(this + 0x10) = uVar1 - 1;
    uVar1 = (ulonglong)*(byte *)(uVar1 - 1);
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x58) != pbackfail) {
                    // WARNING: Could not recover jumptable at 0x000140090d5b. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this + 0x58))(this,param_1);
      return uVar1;
    }
  }
  return uVar1;
}



// std::streambuf::underflow()

undefined8 std::streambuf::underflow(void)

{
  return 0xffffffff;
}



// std::streambuf::streambuf(std::streambuf const&)

void __thiscall std::streambuf::streambuf(streambuf *this,longlong param_1)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined8 *)(this + 0x20) = *(undefined8 *)(param_1 + 0x20);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(this + 0x30) = *(undefined8 *)(param_1 + 0x30);
  locale::locale((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  return;
}



// std::streambuf::streambuf()

void __thiscall std::streambuf::streambuf(streambuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  return;
}



// std::streambuf::streambuf(std::streambuf const&)

void __thiscall std::streambuf::streambuf(streambuf *this,longlong param_1)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined8 *)(this + 0x20) = *(undefined8 *)(param_1 + 0x20);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(this + 0x30) = *(undefined8 *)(param_1 + 0x30);
  locale::locale((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  return;
}



// std::streambuf::streambuf()

void __thiscall std::streambuf::streambuf(streambuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  return;
}



// std::streambuf::~streambuf()

void __thiscall std::streambuf::~streambuf(streambuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x38));
  operator_delete(this);
  return;
}



// std::streambuf::~streambuf()

void __thiscall std::streambuf::~streambuf(streambuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x38));
  return;
}



// std::streambuf::~streambuf()

void __thiscall std::streambuf::~streambuf(streambuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x38));
  return;
}



// std::streambuf::TEMPNAMEPLACEHOLDERVALUE(std::streambuf const&)

streambuf * __thiscall std::streambuf::operator=(streambuf *this,longlong param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar1 = *(undefined8 *)(param_1 + 0x18);
  uVar2 = *(undefined8 *)(param_1 + 0x20);
  uVar3 = *(undefined8 *)(param_1 + 0x28);
  uVar4 = *(undefined8 *)(param_1 + 0x30);
  uVar5 = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = uVar5;
  *(undefined8 *)(this + 0x18) = uVar1;
  *(undefined8 *)(this + 0x20) = uVar2;
  *(undefined8 *)(this + 0x28) = uVar3;
  *(undefined8 *)(this + 0x30) = uVar4;
  locale::operator=((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  return this;
}



// std::wstreambuf::pubseekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

undefined8 * std::wstreambuf::pubseekoff(undefined8 *param_1,longlong *param_2)

{
  if (*(code **)(*param_2 + 0x20) == seekoff) {
    *param_1 = 0xffffffffffffffff;
    *(undefined4 *)(param_1 + 1) = 0;
    return param_1;
  }
  (**(code **)(*param_2 + 0x20))(param_1);
  return param_1;
}



// std::wstreambuf::pubseekpos(std::fpos<int>, std::_Ios_Openmode)

wstreambuf * __thiscall
std::wstreambuf::pubseekpos(wstreambuf *this,longlong *param_1,undefined8 *param_2)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_2;
  uStack_10 = param_2[1];
  if (*(code **)(*param_1 + 0x28) == seekpos) {
    *(undefined8 *)this = 0xffffffffffffffff;
    *(undefined4 *)(this + 8) = 0;
    return this;
  }
  (**(code **)(*param_1 + 0x28))(this,param_1,&local_18);
  return this;
}



// std::wstreambuf::__safe_gbump(long long)

void __thiscall std::wstreambuf::__safe_gbump(wstreambuf *this,longlong param_1)

{
  *(longlong *)(this + 0x10) = *(longlong *)(this + 0x10) + param_1 * 2;
  return;
}



// std::wstreambuf::__safe_pbump(long long)

void __thiscall std::wstreambuf::__safe_pbump(wstreambuf *this,longlong param_1)

{
  *(longlong *)(this + 0x28) = *(longlong *)(this + 0x28) + param_1 * 2;
  return;
}



// std::wstreambuf::setg(wchar_t*, wchar_t*, wchar_t*)

void __thiscall
std::wstreambuf::setg(wstreambuf *this,undefined8 param_1,undefined8 param_2,undefined8 param_3)

{
  *(undefined8 *)(this + 8) = param_1;
  *(undefined8 *)(this + 0x10) = param_2;
  *(undefined8 *)(this + 0x18) = param_3;
  return;
}



// std::wstreambuf::setp(wchar_t*, wchar_t*)

void __thiscall std::wstreambuf::setp(wstreambuf *this,undefined8 param_1,undefined8 param_2)

{
  *(undefined8 *)(this + 0x30) = param_2;
  *(undefined8 *)(this + 0x20) = param_1;
  *(undefined8 *)(this + 0x28) = param_1;
  return;
}



// std::wstreambuf::swap(std::wstreambuf&)

void __thiscall std::wstreambuf::swap(wstreambuf *this,longlong param_1)

{
  undefined8 uVar1;
  locale local_20 [8];
  
  uVar1 = *(undefined8 *)(this + 8);
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(param_1 + 8) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x10);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(param_1 + 0x10) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x18);
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined8 *)(param_1 + 0x18) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x20);
  *(undefined8 *)(this + 0x20) = *(undefined8 *)(param_1 + 0x20);
  *(undefined8 *)(param_1 + 0x20) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x28);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(param_1 + 0x28) = uVar1;
  uVar1 = *(undefined8 *)(this + 0x30);
  *(undefined8 *)(this + 0x30) = *(undefined8 *)(param_1 + 0x30);
  *(undefined8 *)(param_1 + 0x30) = uVar1;
  locale::locale(local_20,(undefined8 *)(this + 0x38));
  locale::operator=((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  locale::operator=((locale *)(param_1 + 0x38),(undefined8 *)local_20);
  locale::~locale(local_20);
  return;
}



// std::wstreambuf::sync()

undefined8 std::wstreambuf::sync(void)

{
  return 0;
}



// std::wstreambuf::gbump(int)

void __thiscall std::wstreambuf::gbump(wstreambuf *this,int param_1)

{
  *(longlong *)(this + 0x10) = *(longlong *)(this + 0x10) + (longlong)param_1 * 2;
  return;
}



// std::wstreambuf::imbue(std::locale const&)

void std::wstreambuf::imbue(void)

{
  return;
}



// std::wstreambuf::pbump(int)

void __thiscall std::wstreambuf::pbump(wstreambuf *this,int param_1)

{
  *(longlong *)(this + 0x28) = *(longlong *)(this + 0x28) + (longlong)param_1 * 2;
  return;
}



// std::wstreambuf::sgetc()

ulonglong __thiscall std::wstreambuf::sgetc(wstreambuf *this)

{
  ulonglong uVar1;
  
  if (*(ushort **)(this + 0x10) < *(ushort **)(this + 0x18)) {
    uVar1 = (ulonglong)**(ushort **)(this + 0x10);
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x48) != underflow) {
                    // WARNING: Could not recover jumptable at 0x000140091178. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this + 0x48))();
      return uVar1;
    }
  }
  return uVar1;
}



// std::wstreambuf::sgetn(wchar_t*, long long)

void std::wstreambuf::sgetn(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x000140091183. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x40))();
  return;
}



// std::wstreambuf::sputc(wchar_t)

ulonglong __thiscall std::wstreambuf::sputc(wstreambuf *this,ulonglong param_1)

{
  undefined2 *puVar1;
  ulonglong uVar2;
  
  puVar1 = *(undefined2 **)(this + 0x28);
  if (puVar1 < *(undefined2 **)(this + 0x30)) {
    *puVar1 = (short)param_1;
    *(undefined2 **)(this + 0x28) = puVar1 + 1;
    uVar2 = param_1 & 0xffffffff;
  }
  else {
    uVar2 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x68) != overflow) {
                    // WARNING: Could not recover jumptable at 0x0001400911cb. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar2 = (**(code **)(*(longlong *)this + 0x68))(this,param_1 & 0xffff);
      return uVar2;
    }
  }
  return uVar2;
}



// std::wstreambuf::sputn(wchar_t const*, long long)

void std::wstreambuf::sputn(longlong *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400911d3. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x60))();
  return;
}



// std::wstreambuf::uflow()

ulonglong __thiscall std::wstreambuf::uflow(wstreambuf *this)

{
  ushort uVar1;
  short sVar2;
  
  if (*(code **)(*(longlong *)this + 0x48) != underflow) {
    sVar2 = (**(code **)(*(longlong *)this + 0x48))();
    if (sVar2 != -1) {
      uVar1 = **(ushort **)(this + 0x10);
      *(ushort **)(this + 0x10) = *(ushort **)(this + 0x10) + 1;
      return (ulonglong)uVar1;
    }
  }
  return 0xffffffff;
}



// std::wstreambuf::sbumpc()

ulonglong __thiscall std::wstreambuf::sbumpc(wstreambuf *this)

{
  code *UNRECOVERED_JUMPTABLE;
  short sVar1;
  ushort *puVar2;
  ulonglong uVar3;
  
  puVar2 = *(ushort **)(this + 0x10);
  if (puVar2 < *(ushort **)(this + 0x18)) {
LAB_14009123e:
    uVar3 = (ulonglong)*puVar2;
    *(ushort **)(this + 0x10) = puVar2 + 1;
  }
  else {
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x50);
    if (UNRECOVERED_JUMPTABLE != uflow) {
                    // WARNING: Could not recover jumptable at 0x000140091284. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar3 = (*UNRECOVERED_JUMPTABLE)();
      return uVar3;
    }
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x48);
    if (UNRECOVERED_JUMPTABLE != underflow) {
      sVar1 = (*UNRECOVERED_JUMPTABLE)();
      if (sVar1 != -1) {
        puVar2 = *(ushort **)(this + 0x10);
        goto LAB_14009123e;
      }
    }
    uVar3 = 0xffffffff;
  }
  return uVar3;
}



void _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(longlong *param_1)

{
  if ((ulonglong)param_1[2] < (ulonglong)param_1[3]) {
    param_1[2] = param_1[2] + 2;
    return;
  }
                    // WARNING: Could not recover jumptable at 0x0001400912cb. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x50))();
  return;
}



void _text__ZNSt15basic_streambufIwSt11char_traitsIwEE6sbumpcEv_isra_0(longlong *param_1)

{
  if ((ulonglong)param_1[2] < (ulonglong)param_1[3]) {
    param_1[2] = param_1[2] + 2;
    return;
  }
                    // WARNING: Could not recover jumptable at 0x0001400912eb. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x50))();
  return;
}



// std::wstreambuf::setbuf(wchar_t*, long long)

undefined8 std::wstreambuf::setbuf(undefined8 param_1)

{
  return param_1;
}



// std::wstreambuf::snextc()

ulonglong __thiscall std::wstreambuf::snextc(wstreambuf *this)

{
  code *pcVar1;
  short sVar2;
  ulonglong uVar3;
  short *psVar4;
  
  psVar4 = *(short **)(this + 0x10);
  if (*(short **)(this + 0x18) <= psVar4) {
    pcVar1 = *(code **)(*(longlong *)this + 0x50);
    if (pcVar1 != uflow) {
      sVar2 = (*pcVar1)();
      goto LAB_140091319;
    }
    pcVar1 = *(code **)(*(longlong *)this + 0x48);
    if (pcVar1 == underflow) {
      return 0xffffffff;
    }
    sVar2 = (*pcVar1)();
    if (sVar2 == -1) {
      return 0xffffffff;
    }
    psVar4 = *(short **)(this + 0x10);
  }
  sVar2 = *psVar4;
  *(short **)(this + 0x10) = psVar4 + 1;
LAB_140091319:
  if (sVar2 != -1) {
    if (*(ushort **)(this + 0x10) < *(ushort **)(this + 0x18)) {
      return (ulonglong)**(ushort **)(this + 0x10);
    }
    if (*(code **)(*(longlong *)this + 0x48) != underflow) {
                    // WARNING: Could not recover jumptable at 0x0001400913a4. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar3 = (**(code **)(*(longlong *)this + 0x48))();
      return uVar3;
    }
  }
  return 0xffffffff;
}



// std::wstreambuf::stossc()

void __thiscall std::wstreambuf::stossc(wstreambuf *this)

{
  code *UNRECOVERED_JUMPTABLE;
  short sVar1;
  
  if (*(ulonglong *)(this + 0x10) < *(ulonglong *)(this + 0x18)) {
    *(ulonglong *)(this + 0x10) = *(ulonglong *)(this + 0x10) + 2;
  }
  else {
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x50);
    if (UNRECOVERED_JUMPTABLE != uflow) {
                    // WARNING: Could not recover jumptable at 0x000140091438. Too many branches
                    // WARNING: Treating indirect jump as call
      (*UNRECOVERED_JUMPTABLE)(this);
      return;
    }
    UNRECOVERED_JUMPTABLE = *(code **)(*(longlong *)this + 0x48);
    if (UNRECOVERED_JUMPTABLE != underflow) {
      sVar1 = (*UNRECOVERED_JUMPTABLE)(this);
      if (sVar1 != -1) {
        *(longlong *)(this + 0x10) = *(longlong *)(this + 0x10) + 2;
        return;
      }
    }
  }
  return;
}



// std::wstreambuf::xsgetn(wchar_t*, long long)

longlong __thiscall std::wstreambuf::xsgetn(wstreambuf *this,short *param_1,longlong param_2)

{
  code *pcVar1;
  short sVar2;
  void *_Src;
  longlong lVar3;
  longlong lVar4;
  
  lVar4 = 0;
  if (0 < param_2) {
    while( true ) {
      _Src = *(void **)(this + 0x10);
      if (*(void **)(this + 0x18) != _Src) {
        lVar3 = (longlong)*(void **)(this + 0x18) - (longlong)_Src >> 1;
        if (param_2 - lVar4 < lVar3) {
          lVar3 = param_2 - lVar4;
        }
        if (lVar3 != 0) {
          memcpy(param_1,_Src,lVar3 * 2);
          _Src = *(void **)(this + 0x10);
        }
        lVar4 = lVar4 + lVar3;
        param_1 = param_1 + lVar3;
        *(void **)(this + 0x10) = (void *)((longlong)_Src + lVar3 * 2);
      }
      if (param_2 <= lVar4) break;
      pcVar1 = *(code **)(*(longlong *)this + 0x50);
      if (pcVar1 == uflow) {
        pcVar1 = *(code **)(*(longlong *)this + 0x48);
        if (pcVar1 == underflow) {
          return lVar4;
        }
        sVar2 = (*pcVar1)(this);
        if (sVar2 == -1) {
          return lVar4;
        }
        sVar2 = **(short **)(this + 0x10);
        *(short **)(this + 0x10) = *(short **)(this + 0x10) + 1;
      }
      else {
        sVar2 = (*pcVar1)(this);
      }
      if (sVar2 == -1) {
        return lVar4;
      }
      lVar4 = lVar4 + 1;
      *param_1 = sVar2;
      param_1 = param_1 + 1;
      if (param_2 <= lVar4) {
        return lVar4;
      }
    }
  }
  return lVar4;
}



// std::wstreambuf::xsputn(wchar_t const*, long long)

longlong __thiscall std::wstreambuf::xsputn(wstreambuf *this,undefined2 *param_1,longlong param_2)

{
  short sVar1;
  void *_Dst;
  longlong lVar2;
  longlong lVar3;
  
  lVar3 = 0;
  if (0 < param_2) {
    while( true ) {
      _Dst = *(void **)(this + 0x28);
      if (*(void **)(this + 0x30) != _Dst) {
        lVar2 = (longlong)*(void **)(this + 0x30) - (longlong)_Dst >> 1;
        if (param_2 - lVar3 < lVar2) {
          lVar2 = param_2 - lVar3;
        }
        if (lVar2 != 0) {
          memcpy(_Dst,param_1,lVar2 * 2);
          _Dst = *(void **)(this + 0x28);
        }
        lVar3 = lVar3 + lVar2;
        param_1 = param_1 + lVar2;
        *(void **)(this + 0x28) = (void *)((longlong)_Dst + lVar2 * 2);
      }
      if (param_2 <= lVar3) break;
      if (*(code **)(*(longlong *)this + 0x68) == overflow) {
        return lVar3;
      }
      sVar1 = (**(code **)(*(longlong *)this + 0x68))(this,*param_1);
      if (sVar1 == -1) {
        return lVar3;
      }
      lVar3 = lVar3 + 1;
      param_1 = param_1 + 1;
      if (param_2 <= lVar3) {
        return lVar3;
      }
    }
  }
  return lVar3;
}



// std::wstreambuf::pubsync()

undefined8 __thiscall std::wstreambuf::pubsync(wstreambuf *this)

{
  undefined8 uVar1;
  
  if (*(code **)(*(longlong *)this + 0x30) == sync) {
    return 0;
  }
                    // WARNING: Could not recover jumptable at 0x000140091620. Too many branches
                    // WARNING: Treating indirect jump as call
  uVar1 = (**(code **)(*(longlong *)this + 0x30))();
  return uVar1;
}



// std::wstreambuf::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

undefined8 * std::wstreambuf::seekoff(undefined8 *param_1)

{
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



// std::wstreambuf::seekpos(std::fpos<int>, std::_Ios_Openmode)

undefined8 * std::wstreambuf::seekpos(undefined8 *param_1)

{
  *param_1 = 0xffffffffffffffff;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



// std::wstreambuf::sungetc()

ulonglong __thiscall std::wstreambuf::sungetc(wstreambuf *this)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar2 = *(ulonglong *)(this + 0x10);
  if (*(ulonglong *)(this + 8) < uVar2) {
    uVar1 = (ulonglong)*(ushort *)(uVar2 - 2);
    *(ulonglong *)(this + 0x10) = uVar2 - 2;
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x58) != pbackfail) {
                    // WARNING: Could not recover jumptable at 0x0001400916ad. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar2 = (**(code **)(*(longlong *)this + 0x58))(this,0xffff);
      return uVar2;
    }
  }
  return uVar1;
}



// std::wstreambuf::in_avail()

longlong __thiscall std::wstreambuf::in_avail(wstreambuf *this)

{
  longlong lVar1;
  
  if (*(longlong *)(this + 0x18) == *(longlong *)(this + 0x10)) {
    lVar1 = 0;
    if (*(code **)(*(longlong *)this + 0x38) != showmanyc) {
                    // WARNING: Could not recover jumptable at 0x0001400916dd. Too many branches
                    // WARNING: Treating indirect jump as call
      lVar1 = (**(code **)(*(longlong *)this + 0x38))();
      return lVar1;
    }
  }
  else {
    lVar1 = *(longlong *)(this + 0x18) - *(longlong *)(this + 0x10) >> 1;
  }
  return lVar1;
}



// std::wstreambuf::overflow(unsigned short)

undefined8 std::wstreambuf::overflow(void)

{
  return 0xffffffff;
}



// std::wstreambuf::pubimbue(std::locale const&)

locale * std::wstreambuf::pubimbue(locale *param_1,longlong *param_2,undefined8 *param_3)

{
  locale::locale(param_1,(undefined8 *)(param_2 + 7));
  if (*(code **)(*param_2 + 0x10) != imbue) {
    (**(code **)(*param_2 + 0x10))(param_2,param_3);
  }
  locale::operator=((locale *)(param_2 + 7),param_3);
  return param_1;
}



// std::wstreambuf::pbackfail(unsigned short)

undefined8 std::wstreambuf::pbackfail(void)

{
  return 0xffffffff;
}



// std::wstreambuf::pubsetbuf(wchar_t*, long long)

void std::wstreambuf::pubsetbuf(longlong *param_1)

{
  if (*(code **)(*param_1 + 0x18) == setbuf) {
    return;
  }
                    // WARNING: Could not recover jumptable at 0x000140091793. Too many branches
                    // WARNING: Treating indirect jump as call
  (**(code **)(*param_1 + 0x18))(param_1);
  return;
}



// std::wstreambuf::showmanyc()

undefined8 std::wstreambuf::showmanyc(void)

{
  return 0;
}



// std::wstreambuf::sputbackc(wchar_t)

ulonglong __thiscall std::wstreambuf::sputbackc(wstreambuf *this,ulonglong param_1)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 0x10);
  if ((*(ulonglong *)(this + 8) < uVar1) && (*(short *)(uVar1 - 2) == (short)param_1)) {
    *(ulonglong *)(this + 0x10) = uVar1 - 2;
    uVar1 = param_1 & 0xffffffff;
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(longlong *)this + 0x58) != pbackfail) {
                    // WARNING: Could not recover jumptable at 0x0001400917eb. Too many branches
                    // WARNING: Treating indirect jump as call
      uVar1 = (**(code **)(*(longlong *)this + 0x58))(this,param_1 & 0xffff);
      return uVar1;
    }
  }
  return uVar1;
}



// std::wstreambuf::underflow()

undefined8 std::wstreambuf::underflow(void)

{
  return 0xffffffff;
}



// std::wstreambuf::wstreambuf(std::wstreambuf const&)

void __thiscall std::wstreambuf::wstreambuf(wstreambuf *this,longlong param_1)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined8 *)(this + 0x20) = *(undefined8 *)(param_1 + 0x20);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(this + 0x30) = *(undefined8 *)(param_1 + 0x30);
  locale::locale((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  return;
}



// std::wstreambuf::wstreambuf()

void __thiscall std::wstreambuf::wstreambuf(wstreambuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  return;
}



// std::wstreambuf::wstreambuf(std::wstreambuf const&)

void __thiscall std::wstreambuf::wstreambuf(wstreambuf *this,longlong param_1)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined8 *)(this + 0x20) = *(undefined8 *)(param_1 + 0x20);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(this + 0x30) = *(undefined8 *)(param_1 + 0x30);
  locale::locale((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  return;
}



// std::wstreambuf::wstreambuf()

void __thiscall std::wstreambuf::wstreambuf(wstreambuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  return;
}



// std::wstreambuf::~wstreambuf()

void __thiscall std::wstreambuf::~wstreambuf(wstreambuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x38));
  operator_delete(this);
  return;
}



// std::wstreambuf::~wstreambuf()

void __thiscall std::wstreambuf::~wstreambuf(wstreambuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x38));
  return;
}



// std::wstreambuf::~wstreambuf()

void __thiscall std::wstreambuf::~wstreambuf(wstreambuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x38));
  return;
}



// std::wstreambuf::TEMPNAMEPLACEHOLDERVALUE(std::wstreambuf const&)

wstreambuf * __thiscall std::wstreambuf::operator=(wstreambuf *this,longlong param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  
  uVar1 = *(undefined8 *)(param_1 + 0x18);
  uVar2 = *(undefined8 *)(param_1 + 0x20);
  uVar3 = *(undefined8 *)(param_1 + 0x28);
  uVar4 = *(undefined8 *)(param_1 + 0x30);
  uVar5 = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = uVar5;
  *(undefined8 *)(this + 0x18) = uVar1;
  *(undefined8 *)(this + 0x20) = uVar2;
  *(undefined8 *)(this + 0x28) = uVar3;
  *(undefined8 *)(this + 0x30) = uVar4;
  locale::operator=((locale *)(this + 0x38),(undefined8 *)(param_1 + 0x38));
  return this;
}



// std::messages_byname<char>::messages_byname(char const*, unsigned long long)

void __thiscall
std::messages_byname<char>::messages_byname
          (messages_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400deb30;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dd910;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::messages_byname<char>::messages_byname(std::string const&, unsigned long long)

void __thiscall
std::messages_byname<char>::messages_byname
          (messages_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::messages_byname<char>::messages_byname(char const*, unsigned long long)

void __thiscall
std::messages_byname<char>::messages_byname
          (messages_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400deb30;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dd910;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::messages_byname<char>::messages_byname(std::string const&, unsigned long long)

void __thiscall
std::messages_byname<char>::messages_byname
          (messages_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::messages_byname<char>::~messages_byname()

void __thiscall std::messages_byname<char>::~messages_byname(messages_byname<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb30;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::messages_byname<char>::~messages_byname()

void __thiscall std::messages_byname<char>::~messages_byname(messages_byname<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb30;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::messages_byname<char>::~messages_byname()

void __thiscall std::messages_byname<char>::~messages_byname(messages_byname<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb30;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::messages_byname<wchar_t>::messages_byname(char const*, unsigned long long)

void __thiscall
std::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400deb70;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dd950;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::messages_byname<wchar_t>::messages_byname(std::string const&, unsigned long long)

void __thiscall
std::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::messages_byname<wchar_t>::messages_byname(char const*, unsigned long long)

void __thiscall
std::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400deb70;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dd950;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::messages_byname<wchar_t>::messages_byname(std::string const&, unsigned long long)

void __thiscall
std::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::messages_byname<wchar_t>::~messages_byname()

void __thiscall std::messages_byname<wchar_t>::~messages_byname(messages_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb70;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::messages_byname<wchar_t>::~messages_byname()

void __thiscall std::messages_byname<wchar_t>::~messages_byname(messages_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb70;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::messages_byname<wchar_t>::~messages_byname()

void __thiscall std::messages_byname<wchar_t>::~messages_byname(messages_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb70;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::numpunct_byname<char>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<char>::numpunct_byname(std::string const&, unsigned long long)

void __thiscall
std::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<char>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<char>::numpunct_byname(std::string const&, unsigned long long)

void __thiscall
std::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<char>::~numpunct_byname()

void __thiscall std::numpunct_byname<char>::~numpunct_byname(numpunct_byname<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  numpunct<char>::~numpunct((numpunct<char> *)this);
  operator_delete(this);
  return;
}



// std::numpunct_byname<char>::~numpunct_byname()

void __thiscall std::numpunct_byname<char>::~numpunct_byname(numpunct_byname<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  numpunct<char>::~numpunct((numpunct<char> *)this);
  return;
}



// std::numpunct_byname<char>::~numpunct_byname()

void __thiscall std::numpunct_byname<char>::~numpunct_byname(numpunct_byname<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dd990;
  numpunct<char>::~numpunct((numpunct<char> *)this);
  return;
}



// std::numpunct_byname<wchar_t>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<wchar_t>::numpunct_byname(std::string const&, unsigned long long)

void __thiscall
std::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<wchar_t>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<wchar_t>::numpunct_byname(std::string const&, unsigned long long)

void __thiscall
std::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::numpunct_byname<wchar_t>::~numpunct_byname()

void __thiscall std::numpunct_byname<wchar_t>::~numpunct_byname(numpunct_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  numpunct<wchar_t>::~numpunct((numpunct<wchar_t> *)this);
  operator_delete(this);
  return;
}



// std::numpunct_byname<wchar_t>::~numpunct_byname()

void __thiscall std::numpunct_byname<wchar_t>::~numpunct_byname(numpunct_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  numpunct<wchar_t>::~numpunct((numpunct<wchar_t> *)this);
  return;
}



// std::numpunct_byname<wchar_t>::~numpunct_byname()

void __thiscall std::numpunct_byname<wchar_t>::~numpunct_byname(numpunct_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dd9e0;
  numpunct<wchar_t>::~numpunct((numpunct<wchar_t> *)this);
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda30;
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(std::string const&, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda30;
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda30;
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(std::string const&, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda30;
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get_byname()

void __thiscall std::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dec50;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get_byname()

void __thiscall std::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dec50;
  locale::facet::~facet();
  return;
}



// std::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get_byname()

void __thiscall std::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dec50;
  locale::facet::~facet();
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda80;
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get_byname(std::string const&, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda80;
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda80;
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get_byname(std::string const&, unsigned long long)

void __thiscall
std::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dda80;
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get_byname()

void __thiscall std::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400deca0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get_byname()

void __thiscall std::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400deca0;
  locale::facet::~facet();
  return;
}



// std::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get_byname()

void __thiscall std::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400deca0;
  locale::facet::~facet();
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::time_put_byname(char const*, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddad0;
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::time_put_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddad0;
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::time_put_byname(std::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddad0;
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::time_put_byname(char const*, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddad0;
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::time_put_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddad0;
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::time_put_byname(std::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddad0;
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::~time_put_byname()

void __thiscall std::time_put_byname<>::~time_put_byname(time_put_byname<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400decf0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::~time_put_byname()

void __thiscall std::time_put_byname<>::~time_put_byname(time_put_byname<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400decf0;
  locale::facet::~facet();
  return;
}



// std::time_put_byname<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::~time_put_byname()

void __thiscall std::time_put_byname<>::~time_put_byname(time_put_byname<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400decf0;
  locale::facet::~facet();
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put_byname(char const*, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddb00;
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddb00;
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put_byname(std::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddb00;
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put_byname(char const*, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddb00;
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddb00;
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put_byname(std::string const&, unsigned long long)

void __thiscall
std::time_put_byname<>::time_put_byname
          (time_put_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_put_byname_1400ddb00;
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_put_byname()

void __thiscall std::time_put_byname<>::~time_put_byname(time_put_byname<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400ded20;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_put_byname()

void __thiscall std::time_put_byname<>::~time_put_byname(time_put_byname<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400ded20;
  locale::facet::~facet();
  return;
}



// std::time_put_byname<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_put_byname()

void __thiscall std::time_put_byname<>::~time_put_byname(time_put_byname<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400ded20;
  locale::facet::~facet();
  return;
}



// std::underflow_error::underflow_error(char const*)

void __thiscall std::underflow_error::underflow_error(underflow_error *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__underflow_error_1400ddb30;
  return;
}



// std::underflow_error::underflow_error(std::__cxx11::string const&)

void __thiscall std::underflow_error::underflow_error(underflow_error *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__underflow_error_1400ddb30;
  return;
}



// std::underflow_error::underflow_error(std::string const&)

void __thiscall std::underflow_error::underflow_error(underflow_error *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__underflow_error_1400ddb30;
  return;
}



// std::underflow_error::~underflow_error()

void __thiscall std::underflow_error::~underflow_error(underflow_error *this)

{
  *(undefined ***)this = &PTR__underflow_error_1400ddb30;
  runtime_error::~runtime_error((runtime_error *)this);
  operator_delete(this);
  return;
}



// std::underflow_error::~underflow_error()

void __thiscall std::underflow_error::~underflow_error(underflow_error *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__runtime_error_1400dd5f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::__numpunct_cache<char>::_M_cache(std::locale const&)

void __thiscall
std::__numpunct_cache<char>::_M_cache(__numpunct_cache<char> *this,longlong *param_1)

{
  ulonglong *puVar1;
  longlong *plVar2;
  char *pcVar3;
  ctype<char> *this_00;
  undefined8 uVar4;
  int iVar5;
  undefined *puVar6;
  __numpunct_cache<char> _Var7;
  longlong lVar8;
  size_t sVar9;
  undefined1 *puVar10;
  undefined1 *puVar11;
  char *pcVar12;
  char *pcVar13;
  ulonglong *local_60;
  ulonglong *local_58;
  ulonglong *local_50 [2];
  
  lVar8 = locale::id::_M_id((id *)&numpunct<char>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (*(code **)(*plVar2 + 0x20) == numpunct<char>::do_grouping) {
    pcVar12 = (char *)0xffffffffffffffff;
    pcVar13 = *(char **)(plVar2[2] + 0x10);
    if (pcVar13 != (char *)0x0) {
      sVar9 = strlen(pcVar13);
      pcVar12 = pcVar13 + sVar9;
    }
    local_60 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                         (pcVar13,(longlong)pcVar12);
  }
  else {
    (**(code **)(*plVar2 + 0x20))(&local_60,plVar2);
  }
  sVar9 = local_60[-3];
  *(size_t *)(this + 0x18) = sVar9;
  pcVar12 = operator_new__(sVar9);
  std::string::copy((string *)&local_60,pcVar12,*(ulonglong *)(this + 0x18),0);
  _Var7 = (__numpunct_cache<char>)0x0;
  if (*(longlong *)(this + 0x18) != 0) {
    _Var7 = (__numpunct_cache<char>)((byte)(*pcVar12 - 1U) < 0x7e);
  }
  this[0x20] = _Var7;
  if (*(code **)(*plVar2 + 0x28) == numpunct<char>::do_truename) {
    pcVar13 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x28);
    if (pcVar3 != (char *)0x0) {
      sVar9 = strlen(pcVar3);
      pcVar13 = pcVar3 + sVar9;
    }
    local_58 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                         (pcVar3,(longlong)pcVar13);
  }
  else {
    (**(code **)(*plVar2 + 0x28))(&local_58,plVar2);
  }
  sVar9 = local_58[-3];
  *(size_t *)(this + 0x30) = sVar9;
  puVar10 = operator_new__(sVar9);
  std::string::copy((string *)&local_58,puVar10,*(ulonglong *)(this + 0x30),0);
  if (*(code **)(*plVar2 + 0x30) == numpunct<char>::do_falsename) {
    pcVar13 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x38);
    if (pcVar3 != (char *)0x0) {
      sVar9 = strlen(pcVar3);
      pcVar13 = pcVar3 + sVar9;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar13);
  }
  else {
    (**(code **)(*plVar2 + 0x30))(local_50,plVar2);
  }
  sVar9 = local_50[0][-3];
  *(size_t *)(this + 0x40) = sVar9;
  puVar11 = operator_new__(sVar9);
  std::string::copy((string *)local_50,puVar11,*(ulonglong *)(this + 0x40),0);
  if (*(code **)(*plVar2 + 0x10) == numpunct<char>::do_decimal_point) {
    _Var7 = *(__numpunct_cache<char> *)(plVar2[2] + 0x48);
  }
  else {
    _Var7 = (__numpunct_cache<char>)(**(code **)(*plVar2 + 0x10))(plVar2);
  }
  this[0x48] = _Var7;
  if (*(code **)(*plVar2 + 0x18) == numpunct<char>::do_thousands_sep) {
    _Var7 = *(__numpunct_cache<char> *)(plVar2[2] + 0x49);
  }
  else {
    _Var7 = (__numpunct_cache<char>)(**(code **)(*plVar2 + 0x18))(plVar2);
  }
  this[0x49] = _Var7;
  lVar8 = locale::id::_M_id((id *)&ctype<char>::id);
  this_00 = *(ctype<char> **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (this_00 != (ctype<char> *)0x0) {
    _text__ZNKSt5ctypeIcE5widenEPKcS2_Pc_isra_0
              (this_00,__num_base::_S_atoms_out,__num_base::_S_atoms_out + 0x24,this + 0x4a);
    puVar6 = __num_base::_S_atoms_in;
    if (this_00[0x38] == (ctype<char>)0x1) {
      uVar4 = *(undefined8 *)(__num_base::_S_atoms_in + 8);
      *(undefined8 *)(this + 0x6e) = *(undefined8 *)__num_base::_S_atoms_in;
      *(undefined8 *)(this + 0x76) = uVar4;
      uVar4 = *(undefined8 *)(puVar6 + 0x12);
      *(undefined8 *)(this + 0x78) = *(undefined8 *)(puVar6 + 10);
      *(undefined8 *)(this + 0x80) = uVar4;
    }
    else {
      if (this_00[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(this_00);
      }
      if (*(code **)(*(longlong *)this_00 + 0x38) == ctype<char>::do_widen) {
        uVar4 = *(undefined8 *)(puVar6 + 8);
        *(undefined8 *)(this + 0x6e) = *(undefined8 *)puVar6;
        *(undefined8 *)(this + 0x76) = uVar4;
        uVar4 = *(undefined8 *)(puVar6 + 0x12);
        *(undefined8 *)(this + 0x78) = *(undefined8 *)(puVar6 + 10);
        *(undefined8 *)(this + 0x80) = uVar4;
      }
      else {
        (**(code **)(*(longlong *)this_00 + 0x38))(this_00,puVar6,puVar6 + 0x1a,this + 0x6e);
      }
    }
    *(char **)(this + 0x10) = pcVar12;
    *(undefined1 **)(this + 0x28) = puVar10;
    *(undefined1 **)(this + 0x38) = puVar11;
    this[0x88] = (__numpunct_cache<char>)0x1;
    if (_CRT_MT == 0) {
      iVar5 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar1 = local_50[0] + -1;
      iVar5 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::string::_Rep::_M_destroy(local_50[0] + -3);
    }
    if (_CRT_MT == 0) {
      iVar5 = (int)local_58[-1];
      *(int *)(local_58 + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar1 = local_58 + -1;
      iVar5 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::string::_Rep::_M_destroy(local_58 + -3);
    }
    if (_CRT_MT == 0) {
      iVar5 = (int)local_60[-1];
      *(int *)(local_60 + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar1 = local_60 + -1;
      iVar5 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::string::_Rep::_M_destroy(local_60 + -3);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__numpunct_cache<char>::__numpunct_cache(unsigned long long)

void __thiscall
std::__numpunct_cache<char>::__numpunct_cache(__numpunct_cache<char> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
  this[0x20] = (__numpunct_cache<char>)0x0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined2 *)(this + 0x48) = 0;
  this[0x88] = (__numpunct_cache<char>)0x0;
  return;
}



// std::__numpunct_cache<char>::__numpunct_cache(unsigned long long)

void __thiscall
std::__numpunct_cache<char>::__numpunct_cache(__numpunct_cache<char> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
  this[0x20] = (__numpunct_cache<char>)0x0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined2 *)(this + 0x48) = 0;
  this[0x88] = (__numpunct_cache<char>)0x0;
  return;
}



// std::__numpunct_cache<char>::~__numpunct_cache()

void __thiscall std::__numpunct_cache<char>::~__numpunct_cache(__numpunct_cache<char> *this)

{
  ~__numpunct_cache(this);
  operator_delete(this);
  return;
}



// std::__numpunct_cache<char>::~__numpunct_cache()

void __thiscall std::__numpunct_cache<char>::~__numpunct_cache(__numpunct_cache<char> *this)

{
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
  if (this[0x88] != (__numpunct_cache<char>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__numpunct_cache<char>::~__numpunct_cache()

void __thiscall std::__numpunct_cache<char>::~__numpunct_cache(__numpunct_cache<char> *this)

{
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb60;
  if (this[0x88] != (__numpunct_cache<char>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__numpunct_cache<wchar_t>::_M_cache(std::locale const&)

void __thiscall
std::__numpunct_cache<wchar_t>::_M_cache(__numpunct_cache<wchar_t> *this,longlong *param_1)

{
  ulonglong *puVar1;
  longlong *plVar2;
  char *_Str;
  wchar_t *pwVar3;
  ulonglong uVar4;
  int iVar5;
  __numpunct_cache<wchar_t> _Var6;
  undefined2 uVar7;
  longlong lVar8;
  size_t sVar9;
  undefined2 *puVar10;
  undefined2 *puVar11;
  char *pcVar12;
  wchar_t *pwVar13;
  ulonglong *local_50;
  ulonglong *local_48;
  ulonglong *local_40;
  
  lVar8 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (*(code **)(*plVar2 + 0x20) == numpunct<wchar_t>::do_grouping) {
    pcVar12 = (char *)0xffffffffffffffff;
    _Str = *(char **)(plVar2[2] + 0x10);
    if (_Str != (char *)0x0) {
      sVar9 = strlen(_Str);
      pcVar12 = _Str + sVar9;
    }
    local_50 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                         (_Str,(longlong)pcVar12);
  }
  else {
    (**(code **)(*plVar2 + 0x20))(&local_50,plVar2);
  }
  sVar9 = local_50[-3];
  *(size_t *)(this + 0x18) = sVar9;
  pcVar12 = operator_new__(sVar9);
  std::string::copy((string *)&local_50,pcVar12,*(ulonglong *)(this + 0x18),0);
  _Var6 = (__numpunct_cache<wchar_t>)0x0;
  if (*(longlong *)(this + 0x18) != 0) {
    _Var6 = (__numpunct_cache<wchar_t>)((byte)(*pcVar12 - 1U) < 0x7e);
  }
  this[0x20] = _Var6;
  if (*(code **)(*plVar2 + 0x28) == numpunct<wchar_t>::do_truename) {
    pwVar13 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x28);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar9 = wcslen(pwVar3);
      pwVar13 = pwVar3 + sVar9;
    }
    local_48 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                         (pwVar3,(longlong)pwVar13);
  }
  else {
    (**(code **)(*plVar2 + 0x28))(&local_48,plVar2);
  }
  uVar4 = local_48[-3];
  *(ulonglong *)(this + 0x30) = uVar4;
  if (0x3ffffffffffffffc < uVar4) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar10 = operator_new__(uVar4 * 2);
  std::wstring::copy((wstring *)&local_48,puVar10,*(ulonglong *)(this + 0x30),0);
  if (*(code **)(*plVar2 + 0x30) == numpunct<wchar_t>::do_falsename) {
    pwVar13 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x38);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar9 = wcslen(pwVar3);
      pwVar13 = pwVar3 + sVar9;
    }
    local_40 = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                         (pwVar3,(longlong)pwVar13);
  }
  else {
    (**(code **)(*plVar2 + 0x30))(&local_40,plVar2);
  }
  uVar4 = local_40[-3];
  *(ulonglong *)(this + 0x40) = uVar4;
  if (0x3ffffffffffffffc < uVar4) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar11 = operator_new__(uVar4 * 2);
  std::wstring::copy((wstring *)&local_40,puVar11,*(ulonglong *)(this + 0x40),0);
  lVar8 = *plVar2;
  if (*(code **)(lVar8 + 0x10) == numpunct<wchar_t>::do_decimal_point) {
    uVar7 = *(undefined2 *)(plVar2[2] + 0x48);
  }
  else {
    uVar7 = (**(code **)(lVar8 + 0x10))(plVar2);
    lVar8 = *plVar2;
  }
  *(undefined2 *)(this + 0x48) = uVar7;
  if (*(code **)(lVar8 + 0x18) == numpunct<wchar_t>::do_thousands_sep) {
    uVar7 = *(undefined2 *)(plVar2[2] + 0x4a);
  }
  else {
    uVar7 = (**(code **)(lVar8 + 0x18))(plVar2);
  }
  *(undefined2 *)(this + 0x4a) = uVar7;
  lVar8 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  (**(code **)(*plVar2 + 0x58))
            (plVar2,__num_base::_S_atoms_out,__num_base::_S_atoms_out + 0x24,this + 0x4c);
  (**(code **)(*plVar2 + 0x58))
            (plVar2,__num_base::_S_atoms_in,__num_base::_S_atoms_in + 0x1a,this + 0x94);
  *(char **)(this + 0x10) = pcVar12;
  *(undefined2 **)(this + 0x28) = puVar10;
  *(undefined2 **)(this + 0x38) = puVar11;
  this[200] = (__numpunct_cache<wchar_t>)0x1;
  if (_CRT_MT == 0) {
    iVar5 = (int)local_40[-1];
    *(int *)(local_40 + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_40 + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::wstring::_Rep::_M_destroy(local_40 + -3);
  }
  if (_CRT_MT == 0) {
    iVar5 = (int)local_48[-1];
    *(int *)(local_48 + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_48 + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::wstring::_Rep::_M_destroy(local_48 + -3);
  }
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[-1];
    *(int *)(local_50 + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50 + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar5) {
    return;
  }
  std::string::_Rep::_M_destroy(local_50 + -3);
  return;
}



// std::__numpunct_cache<wchar_t>::__numpunct_cache(unsigned long long)

void __thiscall
std::__numpunct_cache<wchar_t>::__numpunct_cache(__numpunct_cache<wchar_t> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
  this[0x20] = (__numpunct_cache<wchar_t>)0x0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined4 *)(this + 0x48) = 0;
  this[200] = (__numpunct_cache<wchar_t>)0x0;
  return;
}



// std::__numpunct_cache<wchar_t>::__numpunct_cache(unsigned long long)

void __thiscall
std::__numpunct_cache<wchar_t>::__numpunct_cache(__numpunct_cache<wchar_t> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
  this[0x20] = (__numpunct_cache<wchar_t>)0x0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined4 *)(this + 0x48) = 0;
  this[200] = (__numpunct_cache<wchar_t>)0x0;
  return;
}



// std::__numpunct_cache<wchar_t>::~__numpunct_cache()

void __thiscall std::__numpunct_cache<wchar_t>::~__numpunct_cache(__numpunct_cache<wchar_t> *this)

{
  ~__numpunct_cache(this);
  operator_delete(this);
  return;
}



// std::__numpunct_cache<wchar_t>::~__numpunct_cache()

void __thiscall std::__numpunct_cache<wchar_t>::~__numpunct_cache(__numpunct_cache<wchar_t> *this)

{
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
  if (this[200] != (__numpunct_cache<wchar_t>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__numpunct_cache<wchar_t>::~__numpunct_cache()

void __thiscall std::__numpunct_cache<wchar_t>::~__numpunct_cache(__numpunct_cache<wchar_t> *this)

{
  *(undefined ***)this = &PTR____numpunct_cache_1400ddb80;
  if (this[200] != (__numpunct_cache<wchar_t>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__time_get_state::_M_finalize_state(tm*)

void __thiscall std::__time_get_state::_M_finalize_state(__time_get_state *this,longlong param_1)

{
  __time_get_state _Var1;
  uint uVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  ushort uVar6;
  ulonglong uVar7;
  uint uVar8;
  bool bVar9;
  
  uVar6 = *(ushort *)this;
  if ((~uVar6 & 0x101) == 0) {
    *(int *)(param_1 + 8) = *(int *)(param_1 + 8) + 0xc;
  }
  _Var1 = *this;
  uVar7 = (ulonglong)(byte)_Var1;
  if ((char)_Var1 < '\0') {
    iVar4 = 0;
    if (((byte)this[1] & 2) != 0) {
      iVar4 = *(int *)(param_1 + 0x14) % 100;
    }
    *(int *)(param_1 + 0x14) = (*(int *)(this + 4) + -0x13) * 100 + iVar4;
  }
  if ((uVar6 & 0x402) == 0x400) {
    if (((~(byte)_Var1 & 0x18) == 0) || (((byte)_Var1 & 4) == 0)) {
      uVar2 = *(uint *)(param_1 + 0x10);
      if (((byte)_Var1 & 8) == 0) goto LAB_140093b4d;
    }
    else {
      iVar4 = *(int *)(param_1 + 0x1c);
      uVar8 = *(int *)(param_1 + 0x14) + 0x76c;
      iVar5 = (int)uVar8 % 400;
      bVar9 = (uVar8 & 3) == 0;
      iVar3 = 0;
      while ((int)uVar8 % 100 != 0) {
        if (iVar4 < (int)(uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)
                                       [(longlong)iVar3 + (ulonglong)bVar9 * 0xd])
        goto LAB_140093a54;
        iVar3 = iVar3 + 1;
      }
      if (iVar5 == 0) goto LAB_140093be7;
      do {
        if (iVar4 < (int)(uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)[iVar3])
        goto LAB_140093a54;
        iVar3 = iVar3 + 1;
      } while (iVar5 != 0);
      uVar6 = (&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)[(longlong)iVar3 + (ulonglong)bVar9 * 0xd];
      while ((int)(uint)uVar6 <= iVar4) {
        iVar3 = iVar3 + 1;
LAB_140093be7:
        uVar6 = (&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)[(longlong)iVar3 + (ulonglong)bVar9 * 0xd];
      }
LAB_140093a54:
      if (((byte)_Var1 & 8) == 0) {
        uVar2 = iVar3 - 1;
        *(uint *)(param_1 + 0x10) = uVar2;
      }
      else {
        uVar2 = *(uint *)(param_1 + 0x10);
      }
      if (((byte)_Var1 & 0x10) == 0) {
        if (((int)uVar8 % 100 != 0) || (uVar8 = 0, iVar5 == 0)) {
          uVar8 = (uint)bVar9;
        }
        *(uint *)(param_1 + 0xc) =
             (iVar4 - (uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)
                                    [(longlong)(iVar3 + -1) + (longlong)(int)uVar8 * 0xd]) + 1;
      }
      uVar8 = (byte)*this | 0x18;
      uVar7 = (ulonglong)uVar8;
      *this = SUB41(uVar8,0);
      uVar6 = *(ushort *)this;
      if ((uVar8 & 8) == 0) {
LAB_140093b4d:
        if (0xb < uVar2) goto LAB_1400937bd;
      }
    }
    uVar2 = _text__ZNSt12_GLOBAL__N_115day_of_the_weekEiii
                      (*(int *)(param_1 + 0x14),uVar2,*(int *)(param_1 + 0xc));
    *(uint *)(param_1 + 0x18) = uVar2;
  }
  if ((uVar6 & 0x404) == 0x400) {
    if (((uVar7 & 8) != 0) || (*(uint *)(param_1 + 0x10) < 0xc)) {
      uVar2 = *(int *)(param_1 + 0x14) + 0x76c;
      if (((int)uVar2 % 100 != 0) ||
         (uVar8 = 0, (uVar2 * -0x3d70a3d7 + 0x51eb850 >> 4 | uVar2 * -0x70000000) < 0xa3d70b)) {
        uVar8 = (uint)((uVar2 & 3) == 0);
      }
      *(uint *)(param_1 + 0x1c) =
           *(int *)(param_1 + 0xc) + -1 +
           (uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)
                         [(longlong)(int)uVar8 * 0xd + (longlong)(int)*(uint *)(param_1 + 0x10)];
    }
  }
LAB_1400937bd:
  if (((uVar7 & 0x60) != 0) && ((uVar7 & 2) != 0)) {
    iVar4 = *(int *)(param_1 + 0x14);
    if ((uVar7 & 4) == 0) {
      uVar2 = _text__ZNSt12_GLOBAL__N_115day_of_the_weekEiii(iVar4,0,1);
      uVar8 = ((uint)(uVar7 >> 5) ^ 1) & 1;
      *(uint *)(param_1 + 0x1c) =
           (int)((uVar8 - uVar2) + 7) % 7 + (((byte)this[2] & 0x3f) - 1) * 7 +
           (int)((*(int *)(param_1 + 0x18) - uVar8) + 7) % 7;
    }
    if ((~(uint)uVar7 & 0x18) != 0) {
      uVar2 = iVar4 + 0x76c;
      iVar4 = *(int *)(param_1 + 0x1c);
      iVar3 = 0;
      while( true ) {
        if ((int)uVar2 % 100 == 0) {
          while ((int)uVar2 % 400 != 0) {
            if (iVar4 < (int)(uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)[iVar3])
            goto LAB_140093920;
            iVar3 = iVar3 + 1;
          }
        }
        if (iVar4 < (int)(uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)
                                       [(ulonglong)((uVar2 & 3) == 0) * 0xd + (longlong)iVar3])
        break;
        iVar3 = iVar3 + 1;
      }
LAB_140093920:
      if ((uVar7 & 8) == 0) {
        *(int *)(param_1 + 0x10) = iVar3 + -1;
      }
      if ((uVar7 & 0x10) == 0) {
        if (((int)uVar2 % 100 != 0) || (uVar8 = 0, (int)uVar2 % 400 == 0)) {
          uVar8 = (uint)((uVar2 & 3) == 0);
        }
        *(uint *)(param_1 + 0xc) =
             (iVar4 - (uint)(ushort)(&_rdata__ZNSt12_GLOBAL__N_1L8mon_ydayE)
                                    [(longlong)(iVar3 + -1) + (longlong)(int)uVar8 * 0xd]) + 1;
      }
    }
  }
  return;
}



// std::invalid_argument::invalid_argument(char const*)

void __thiscall std::invalid_argument::invalid_argument(invalid_argument *this,char *param_1)

{
  size_t sVar1;
  ulonglong *puVar2;
  char *pcVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  pcVar3 = (char *)0xffffffffffffffff;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    pcVar3 = param_1 + sVar1;
  }
  puVar2 = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                     (param_1,(longlong)pcVar3);
  *(ulonglong **)(this + 8) = puVar2;
  *(undefined ***)this = &PTR__invalid_argument_1400ddba0;
  return;
}



// std::invalid_argument::invalid_argument(std::__cxx11::string const&)

void __thiscall std::invalid_argument::invalid_argument(invalid_argument *this,undefined8 *param_1)

{
  ulonglong uVar1;
  
  uVar1 = param_1[1];
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  __cow_string::__cow_string((__cow_string *)(this + 8),(undefined1 *)*param_1,uVar1);
  *(undefined ***)this = &PTR__invalid_argument_1400ddba0;
  return;
}



// std::invalid_argument::invalid_argument(std::string const&)

void __thiscall std::invalid_argument::invalid_argument(invalid_argument *this,longlong *param_1)

{
  longlong *plVar1;
  undefined1 local_19 [9];
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  plVar1 = (longlong *)*param_1;
  if ((int)plVar1[-1] < 0) {
    plVar1 = std::string::_Rep::_M_clone((_Rep *)(plVar1 + -3),local_19,0);
  }
  else if (_CRT_MT == 0) {
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
  }
  else {
    LOCK();
    *(int *)(plVar1 + -1) = (int)plVar1[-1] + 1;
    UNLOCK();
  }
  *(longlong **)(this + 8) = plVar1;
  *(undefined ***)this = &PTR__invalid_argument_1400ddba0;
  return;
}



// std::invalid_argument::~invalid_argument()

void __thiscall std::invalid_argument::~invalid_argument(invalid_argument *this)

{
  *(undefined ***)this = &PTR__invalid_argument_1400ddba0;
  logic_error::~logic_error((logic_error *)this);
  operator_delete(this);
  return;
}



// std::invalid_argument::~invalid_argument()

void __thiscall std::invalid_argument::~invalid_argument(invalid_argument *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__logic_error_1400dd2f0;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::__timepunct_cache<char>::__timepunct_cache(unsigned long long)

void __thiscall
std::__timepunct_cache<char>::__timepunct_cache(__timepunct_cache<char> *this,longlong param_1)

{
  this[0x188] = (__timepunct_cache<char>)0x0;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbd0;
  *(undefined8 *)(this + 0x180) = 0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x50) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x60) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x70) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x80) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x90) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xa0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xb0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xc0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xd0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xe0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x120) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x130) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x140) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x150) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  return;
}



// std::__timepunct_cache<char>::__timepunct_cache(unsigned long long)

void __thiscall
std::__timepunct_cache<char>::__timepunct_cache(__timepunct_cache<char> *this,longlong param_1)

{
  this[0x188] = (__timepunct_cache<char>)0x0;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbd0;
  *(undefined8 *)(this + 0x180) = 0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x50) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x60) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x70) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x80) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x90) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xa0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xb0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xc0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xd0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xe0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x120) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x130) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x140) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x150) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  return;
}



// std::__timepunct_cache<char>::~__timepunct_cache()

void __thiscall std::__timepunct_cache<char>::~__timepunct_cache(__timepunct_cache<char> *this)

{
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbd0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__timepunct_cache<char>::~__timepunct_cache()

void __thiscall std::__timepunct_cache<char>::~__timepunct_cache(__timepunct_cache<char> *this)

{
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbd0;
  locale::facet::~facet();
  return;
}



// std::__timepunct_cache<char>::~__timepunct_cache()

void __thiscall std::__timepunct_cache<char>::~__timepunct_cache(__timepunct_cache<char> *this)

{
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbd0;
  locale::facet::~facet();
  return;
}



// std::__timepunct_cache<wchar_t>::__timepunct_cache(unsigned long long)

void __thiscall
std::__timepunct_cache<wchar_t>::__timepunct_cache
          (__timepunct_cache<wchar_t> *this,longlong param_1)

{
  this[0x188] = (__timepunct_cache<wchar_t>)0x0;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbf0;
  *(undefined8 *)(this + 0x180) = 0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x50) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x60) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x70) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x80) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x90) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xa0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xb0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xc0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xd0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xe0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x120) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x130) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x140) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x150) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  return;
}



// std::__timepunct_cache<wchar_t>::__timepunct_cache(unsigned long long)

void __thiscall
std::__timepunct_cache<wchar_t>::__timepunct_cache
          (__timepunct_cache<wchar_t> *this,longlong param_1)

{
  this[0x188] = (__timepunct_cache<wchar_t>)0x0;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbf0;
  *(undefined8 *)(this + 0x180) = 0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x50) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x60) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x70) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x80) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x90) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xa0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xb0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xc0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xd0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xe0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf0) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x100) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x110) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x120) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x130) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x140) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x150) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  return;
}



// std::__timepunct_cache<wchar_t>::~__timepunct_cache()

void __thiscall
std::__timepunct_cache<wchar_t>::~__timepunct_cache(__timepunct_cache<wchar_t> *this)

{
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbf0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__timepunct_cache<wchar_t>::~__timepunct_cache()

void __thiscall
std::__timepunct_cache<wchar_t>::~__timepunct_cache(__timepunct_cache<wchar_t> *this)

{
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbf0;
  locale::facet::~facet();
  return;
}



// std::__timepunct_cache<wchar_t>::~__timepunct_cache()

void __thiscall
std::__timepunct_cache<wchar_t>::~__timepunct_cache(__timepunct_cache<wchar_t> *this)

{
  *(undefined ***)this = &PTR____timepunct_cache_1400ddbf0;
  locale::facet::~facet();
  return;
}



// std::moneypunct_byname<char, false>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, false>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, false>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, false>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd0f0;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, false>::~moneypunct_byname()

void __thiscall
std::moneypunct_byname<char,false>::~moneypunct_byname(moneypunct_byname<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  operator_delete(this);
  return;
}



// std::moneypunct_byname<char, false>::~moneypunct_byname()

void __thiscall
std::moneypunct_byname<char,false>::~moneypunct_byname(moneypunct_byname<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  return;
}



// std::moneypunct_byname<char, false>::~moneypunct_byname()

void __thiscall
std::moneypunct_byname<char,false>::~moneypunct_byname(moneypunct_byname<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc10;
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  return;
}



// std::moneypunct_byname<char, true>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, true>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, true>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, true>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd160;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<char, true>::~moneypunct_byname()

void __thiscall
std::moneypunct_byname<char,true>::~moneypunct_byname(moneypunct_byname<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  moneypunct<char,true>::~moneypunct((moneypunct<char,true> *)this);
  operator_delete(this);
  return;
}



// std::moneypunct_byname<char, true>::~moneypunct_byname()

void __thiscall
std::moneypunct_byname<char,true>::~moneypunct_byname(moneypunct_byname<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  moneypunct<char,true>::~moneypunct((moneypunct<char,true> *)this);
  return;
}



// std::moneypunct_byname<char, true>::~moneypunct_byname()

void __thiscall
std::moneypunct_byname<char,true>::~moneypunct_byname(moneypunct_byname<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddc80;
  moneypunct<char,true>::~moneypunct((moneypunct<char,true> *)this);
  return;
}



// std::moneypunct_byname<wchar_t, false>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, false>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, false>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, false>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd1d0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, false>::~moneypunct_byname()

void __thiscall std::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  operator_delete(this);
  return;
}



// std::moneypunct_byname<wchar_t, false>::~moneypunct_byname()

void __thiscall std::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::moneypunct_byname<wchar_t, false>::~moneypunct_byname()

void __thiscall std::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddcf0;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::moneypunct_byname<wchar_t, true>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, true>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, true>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, true>::moneypunct_byname(std::string const&, unsigned long long)

void __thiscall
std::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dd240;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::moneypunct_byname<wchar_t, true>::~moneypunct_byname()

void __thiscall std::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  operator_delete(this);
  return;
}



// std::moneypunct_byname<wchar_t, true>::~moneypunct_byname()

void __thiscall std::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::moneypunct_byname<wchar_t, true>::~moneypunct_byname()

void __thiscall std::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400ddd60;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::__moneypunct_cache<char, false>::_M_cache(std::locale const&)

void __thiscall
std::__moneypunct_cache<char,false>::_M_cache
          (__moneypunct_cache<char,false> *this,longlong *param_1)

{
  ulonglong *puVar1;
  longlong *plVar2;
  char *pcVar3;
  ctype<char> *pcVar4;
  int iVar5;
  __moneypunct_cache<char,false> _Var6;
  undefined4 uVar7;
  longlong lVar8;
  size_t sVar9;
  undefined1 *puVar10;
  size_t sVar11;
  undefined1 *puVar12;
  size_t sVar13;
  undefined1 *puVar14;
  size_t sVar15;
  char *pcVar16;
  ulonglong *local_50 [2];
  
  lVar8 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (*(code **)(*plVar2 + 0x28) == moneypunct<char,false>::do_curr_symbol) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x28);
    if (pcVar3 != (char *)0x0) {
      sVar9 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar9;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x28))(local_50,plVar2);
  }
  sVar9 = local_50[0][-3];
  puVar10 = operator_new__(sVar9);
  std::string::copy((string *)local_50,puVar10,sVar9,0);
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::string::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x30) == moneypunct<char,false>::do_positive_sign) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x38);
    if (pcVar3 != (char *)0x0) {
      sVar11 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar11;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x30))((string *)local_50,plVar2);
  }
  sVar11 = local_50[0][-3];
  puVar12 = operator_new__(sVar11);
  std::string::copy((string *)local_50,puVar12,sVar11,0);
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::string::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x38) == moneypunct<char,false>::do_negative_sign) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x48);
    if (pcVar3 != (char *)0x0) {
      sVar13 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar13;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x38))((string *)local_50,plVar2);
  }
  sVar13 = local_50[0][-3];
  puVar14 = operator_new__(sVar13);
  std::string::copy((string *)local_50,puVar14,sVar13,0);
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::string::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x20) == moneypunct<char,false>::do_grouping) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x10);
    if (pcVar3 != (char *)0x0) {
      sVar15 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar15;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x20))((string *)local_50,plVar2);
  }
  sVar15 = local_50[0][-3];
  pcVar16 = operator_new__(sVar15);
  std::string::copy((string *)local_50,pcVar16,sVar15,0);
  *(size_t *)(this + 0x18) = sVar15;
  _Var6 = (__moneypunct_cache<char,false>)0x0;
  *(char **)(this + 0x10) = pcVar16;
  if (sVar15 != 0) {
    _Var6 = (__moneypunct_cache<char,false>)((byte)(*pcVar16 - 1U) < 0x7e);
  }
  this[0x20] = _Var6;
  if (*(code **)(*plVar2 + 0x10) == moneypunct<char,false>::do_decimal_point) {
    _Var6 = *(__moneypunct_cache<char,false> *)(plVar2[2] + 0x21);
  }
  else {
    _Var6 = (__moneypunct_cache<char,false>)(**(code **)(*plVar2 + 0x10))(plVar2);
  }
  this[0x21] = _Var6;
  if (*(code **)(*plVar2 + 0x18) == moneypunct<char,false>::do_thousands_sep) {
    _Var6 = *(__moneypunct_cache<char,false> *)(plVar2[2] + 0x22);
  }
  else {
    _Var6 = (__moneypunct_cache<char,false>)(**(code **)(*plVar2 + 0x18))(plVar2);
  }
  this[0x22] = _Var6;
  lVar8 = *plVar2;
  *(size_t *)(this + 0x30) = sVar9;
  *(undefined1 **)(this + 0x28) = puVar10;
  *(size_t *)(this + 0x40) = sVar11;
  *(undefined1 **)(this + 0x38) = puVar12;
  *(size_t *)(this + 0x50) = sVar13;
  *(undefined1 **)(this + 0x48) = puVar14;
  if (*(code **)(lVar8 + 0x40) == moneypunct<char,false>::do_frac_digits) {
    uVar7 = *(undefined4 *)(plVar2[2] + 0x58);
  }
  else {
    uVar7 = (**(code **)(lVar8 + 0x40))(plVar2);
    lVar8 = *plVar2;
  }
  *(undefined4 *)(this + 0x58) = uVar7;
  if (*(code **)(lVar8 + 0x48) == moneypunct<char,false>::do_pos_format) {
    uVar7 = *(undefined4 *)(plVar2[2] + 0x5c);
  }
  else {
    uVar7 = (**(code **)(lVar8 + 0x48))(plVar2);
  }
  *(undefined4 *)(this + 0x5c) = uVar7;
  if (*(code **)(*plVar2 + 0x50) == moneypunct<char,false>::do_neg_format) {
    uVar7 = *(undefined4 *)(plVar2[2] + 0x60);
  }
  else {
    uVar7 = (**(code **)(*plVar2 + 0x50))(plVar2);
  }
  *(undefined4 *)(this + 0x60) = uVar7;
  lVar8 = locale::id::_M_id((id *)&ctype<char>::id);
  pcVar4 = *(ctype<char> **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (pcVar4 != (ctype<char> *)0x0) {
    _text__ZNKSt5ctypeIcE5widenEPKcS2_Pc_isra_0
              (pcVar4,money_base::_S_atoms,money_base::_S_atoms + 0xb,this + 100);
    this[0x6f] = (__moneypunct_cache<char,false>)0x1;
    if (_CRT_MT == 0) {
      iVar5 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar1 = local_50[0] + -1;
      iVar5 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::string::_Rep::_M_destroy(local_50[0] + -3);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__moneypunct_cache<char, false>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<char,false>::__moneypunct_cache
          (__moneypunct_cache<char,false> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
  this[0x20] = (__moneypunct_cache<char,false>)0x0;
  *(undefined2 *)(this + 0x21) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x6f] = (__moneypunct_cache<char,false>)0x0;
  return;
}



// std::__moneypunct_cache<char, false>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<char,false>::__moneypunct_cache
          (__moneypunct_cache<char,false> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
  this[0x20] = (__moneypunct_cache<char,false>)0x0;
  *(undefined2 *)(this + 0x21) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x6f] = (__moneypunct_cache<char,false>)0x0;
  return;
}



// std::__moneypunct_cache<char, false>::~__moneypunct_cache()

void __thiscall
std::__moneypunct_cache<char,false>::~__moneypunct_cache(__moneypunct_cache<char,false> *this)

{
  ~__moneypunct_cache(this);
  operator_delete(this);
  return;
}



// std::__moneypunct_cache<char, false>::~__moneypunct_cache()

void __thiscall
std::__moneypunct_cache<char,false>::~__moneypunct_cache(__moneypunct_cache<char,false> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
  if (this[0x6f] != (__moneypunct_cache<char,false>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<char, false>::~__moneypunct_cache()

void __thiscall
std::__moneypunct_cache<char,false>::~__moneypunct_cache(__moneypunct_cache<char,false> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddd0;
  if (this[0x6f] != (__moneypunct_cache<char,false>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<char, true>::_M_cache(std::locale const&)

void __thiscall
std::__moneypunct_cache<char,true>::_M_cache(__moneypunct_cache<char,true> *this,longlong *param_1)

{
  ulonglong *puVar1;
  longlong *plVar2;
  char *pcVar3;
  ctype<char> *pcVar4;
  int iVar5;
  __moneypunct_cache<char,true> _Var6;
  undefined4 uVar7;
  longlong lVar8;
  size_t sVar9;
  undefined1 *puVar10;
  size_t sVar11;
  undefined1 *puVar12;
  size_t sVar13;
  undefined1 *puVar14;
  size_t sVar15;
  char *pcVar16;
  ulonglong *local_50 [2];
  
  lVar8 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (*(code **)(*plVar2 + 0x28) == moneypunct<char,true>::do_curr_symbol) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x28);
    if (pcVar3 != (char *)0x0) {
      sVar9 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar9;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x28))(local_50,plVar2);
  }
  sVar9 = local_50[0][-3];
  puVar10 = operator_new__(sVar9);
  std::string::copy((string *)local_50,puVar10,sVar9,0);
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::string::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x30) == moneypunct<char,true>::do_positive_sign) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x38);
    if (pcVar3 != (char *)0x0) {
      sVar11 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar11;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x30))((string *)local_50,plVar2);
  }
  sVar11 = local_50[0][-3];
  puVar12 = operator_new__(sVar11);
  std::string::copy((string *)local_50,puVar12,sVar11,0);
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::string::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x38) == moneypunct<char,true>::do_negative_sign) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x48);
    if (pcVar3 != (char *)0x0) {
      sVar13 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar13;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x38))((string *)local_50,plVar2);
  }
  sVar13 = local_50[0][-3];
  puVar14 = operator_new__(sVar13);
  std::string::copy((string *)local_50,puVar14,sVar13,0);
  if (_CRT_MT == 0) {
    iVar5 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar5 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar5 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar5 < 1) {
    std::string::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x20) == moneypunct<char,true>::do_grouping) {
    pcVar16 = (char *)0xffffffffffffffff;
    pcVar3 = *(char **)(plVar2[2] + 0x10);
    if (pcVar3 != (char *)0x0) {
      sVar15 = strlen(pcVar3);
      pcVar16 = pcVar3 + sVar15;
    }
    local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                            (pcVar3,(longlong)pcVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x20))((string *)local_50,plVar2);
  }
  sVar15 = local_50[0][-3];
  pcVar16 = operator_new__(sVar15);
  std::string::copy((string *)local_50,pcVar16,sVar15,0);
  *(size_t *)(this + 0x18) = sVar15;
  _Var6 = (__moneypunct_cache<char,true>)0x0;
  *(char **)(this + 0x10) = pcVar16;
  if (sVar15 != 0) {
    _Var6 = (__moneypunct_cache<char,true>)((byte)(*pcVar16 - 1U) < 0x7e);
  }
  this[0x20] = _Var6;
  if (*(code **)(*plVar2 + 0x10) == moneypunct<char,true>::do_decimal_point) {
    _Var6 = *(__moneypunct_cache<char,true> *)(plVar2[2] + 0x21);
  }
  else {
    _Var6 = (__moneypunct_cache<char,true>)(**(code **)(*plVar2 + 0x10))(plVar2);
  }
  this[0x21] = _Var6;
  if (*(code **)(*plVar2 + 0x18) == moneypunct<char,true>::do_thousands_sep) {
    _Var6 = *(__moneypunct_cache<char,true> *)(plVar2[2] + 0x22);
  }
  else {
    _Var6 = (__moneypunct_cache<char,true>)(**(code **)(*plVar2 + 0x18))(plVar2);
  }
  this[0x22] = _Var6;
  lVar8 = *plVar2;
  *(size_t *)(this + 0x30) = sVar9;
  *(undefined1 **)(this + 0x28) = puVar10;
  *(size_t *)(this + 0x40) = sVar11;
  *(undefined1 **)(this + 0x38) = puVar12;
  *(size_t *)(this + 0x50) = sVar13;
  *(undefined1 **)(this + 0x48) = puVar14;
  if (*(code **)(lVar8 + 0x40) == moneypunct<char,true>::do_frac_digits) {
    uVar7 = *(undefined4 *)(plVar2[2] + 0x58);
  }
  else {
    uVar7 = (**(code **)(lVar8 + 0x40))(plVar2);
    lVar8 = *plVar2;
  }
  *(undefined4 *)(this + 0x58) = uVar7;
  if (*(code **)(lVar8 + 0x48) == moneypunct<char,true>::do_pos_format) {
    uVar7 = *(undefined4 *)(plVar2[2] + 0x5c);
  }
  else {
    uVar7 = (**(code **)(lVar8 + 0x48))(plVar2);
  }
  *(undefined4 *)(this + 0x5c) = uVar7;
  if (*(code **)(*plVar2 + 0x50) == moneypunct<char,true>::do_neg_format) {
    uVar7 = *(undefined4 *)(plVar2[2] + 0x60);
  }
  else {
    uVar7 = (**(code **)(*plVar2 + 0x50))(plVar2);
  }
  *(undefined4 *)(this + 0x60) = uVar7;
  lVar8 = locale::id::_M_id((id *)&ctype<char>::id);
  pcVar4 = *(ctype<char> **)(*(longlong *)(*param_1 + 8) + lVar8 * 8);
  if (pcVar4 != (ctype<char> *)0x0) {
    _text__ZNKSt5ctypeIcE5widenEPKcS2_Pc_isra_0
              (pcVar4,money_base::_S_atoms,money_base::_S_atoms + 0xb,this + 100);
    this[0x6f] = (__moneypunct_cache<char,true>)0x1;
    if (_CRT_MT == 0) {
      iVar5 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar5 + -1;
    }
    else {
      LOCK();
      puVar1 = local_50[0] + -1;
      iVar5 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar5 < 1) {
      std::string::_Rep::_M_destroy(local_50[0] + -3);
    }
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__moneypunct_cache<char, true>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<char,true>::__moneypunct_cache
          (__moneypunct_cache<char,true> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
  this[0x20] = (__moneypunct_cache<char,true>)0x0;
  *(undefined2 *)(this + 0x21) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x6f] = (__moneypunct_cache<char,true>)0x0;
  return;
}



// std::__moneypunct_cache<char, true>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<char,true>::__moneypunct_cache
          (__moneypunct_cache<char,true> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
  this[0x20] = (__moneypunct_cache<char,true>)0x0;
  *(undefined2 *)(this + 0x21) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x6f] = (__moneypunct_cache<char,true>)0x0;
  return;
}



// std::__moneypunct_cache<char, true>::~__moneypunct_cache()

void __thiscall
std::__moneypunct_cache<char,true>::~__moneypunct_cache(__moneypunct_cache<char,true> *this)

{
  ~__moneypunct_cache(this);
  operator_delete(this);
  return;
}



// std::__moneypunct_cache<char, true>::~__moneypunct_cache()

void __thiscall
std::__moneypunct_cache<char,true>::~__moneypunct_cache(__moneypunct_cache<char,true> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
  if (this[0x6f] != (__moneypunct_cache<char,true>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<char, true>::~__moneypunct_cache()

void __thiscall
std::__moneypunct_cache<char,true>::~__moneypunct_cache(__moneypunct_cache<char,true> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dddf0;
  if (this[0x6f] != (__moneypunct_cache<char,true>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<wchar_t, false>::_M_cache(std::locale const&)

void __thiscall std::__moneypunct_cache<>::_M_cache(__moneypunct_cache<> *this,longlong *param_1)

{
  ulonglong *puVar1;
  longlong *plVar2;
  wchar_t *pwVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  char *_Str;
  int iVar7;
  __moneypunct_cache<> _Var8;
  undefined2 uVar9;
  undefined4 uVar10;
  longlong lVar11;
  size_t sVar12;
  undefined2 *puVar13;
  undefined2 *puVar14;
  undefined2 *puVar15;
  wchar_t *pwVar16;
  char *pcVar17;
  ulonglong *local_50 [2];
  
  lVar11 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar11 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (*(code **)(*plVar2 + 0x28) == moneypunct<>::do_curr_symbol) {
    pwVar16 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x28);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar12 = wcslen(pwVar3);
      pwVar16 = pwVar3 + sVar12;
    }
    local_50[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            (pwVar3,(longlong)pwVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x28))(local_50,plVar2);
  }
  uVar4 = local_50[0][-3];
  if (0x3ffffffffffffffc < uVar4) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar13 = operator_new__(uVar4 * 2);
  std::wstring::copy((wstring *)local_50,puVar13,uVar4,0);
  if (_CRT_MT == 0) {
    iVar7 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar7 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar7 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar7 < 1) {
    std::wstring::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x30) == moneypunct<>::do_positive_sign) {
    pwVar16 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x38);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar12 = wcslen(pwVar3);
      pwVar16 = pwVar3 + sVar12;
    }
    local_50[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            (pwVar3,(longlong)pwVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x30))((wstring *)local_50,plVar2);
  }
  uVar5 = local_50[0][-3];
  if (0x3ffffffffffffffc < uVar5) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar14 = operator_new__(uVar5 * 2);
  std::wstring::copy((wstring *)local_50,puVar14,uVar5,0);
  if (_CRT_MT == 0) {
    iVar7 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar7 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar7 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar7 < 1) {
    std::wstring::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x38) == moneypunct<>::do_negative_sign) {
    pwVar16 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x48);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar12 = wcslen(pwVar3);
      pwVar16 = pwVar3 + sVar12;
    }
    local_50[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            (pwVar3,(longlong)pwVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x38))((wstring *)local_50,plVar2);
  }
  uVar6 = local_50[0][-3];
  if (uVar6 < 0x3ffffffffffffffd) {
    puVar15 = operator_new__(uVar6 * 2);
    std::wstring::copy((wstring *)local_50,puVar15,uVar6,0);
    if (_CRT_MT == 0) {
      iVar7 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar7 + -1;
    }
    else {
      LOCK();
      puVar1 = local_50[0] + -1;
      iVar7 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar7 < 1) {
      std::wstring::_Rep::_M_destroy(local_50[0] + -3);
    }
    if (*(code **)(*plVar2 + 0x20) == moneypunct<>::do_grouping) {
      pcVar17 = (char *)0xffffffffffffffff;
      _Str = *(char **)(plVar2[2] + 0x10);
      if (_Str != (char *)0x0) {
        sVar12 = strlen(_Str);
        pcVar17 = _Str + sVar12;
      }
      local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                              (_Str,(longlong)pcVar17);
    }
    else {
      (**(code **)(*plVar2 + 0x20))((wstring *)local_50,plVar2);
    }
    sVar12 = local_50[0][-3];
    pcVar17 = operator_new__(sVar12);
    std::string::copy((string *)local_50,pcVar17,sVar12,0);
    *(size_t *)(this + 0x18) = sVar12;
    _Var8 = (__moneypunct_cache<>)0x0;
    *(char **)(this + 0x10) = pcVar17;
    if (sVar12 != 0) {
      _Var8 = (__moneypunct_cache<>)((byte)(*pcVar17 - 1U) < 0x7e);
    }
    lVar11 = *plVar2;
    this[0x20] = _Var8;
    if (*(code **)(lVar11 + 0x10) == moneypunct<>::do_decimal_point) {
      uVar9 = *(undefined2 *)(plVar2[2] + 0x22);
    }
    else {
      uVar9 = (**(code **)(lVar11 + 0x10))(plVar2);
      lVar11 = *plVar2;
    }
    *(undefined2 *)(this + 0x22) = uVar9;
    if (*(code **)(lVar11 + 0x18) == moneypunct<>::do_thousands_sep) {
      uVar9 = *(undefined2 *)(plVar2[2] + 0x24);
    }
    else {
      uVar9 = (**(code **)(lVar11 + 0x18))(plVar2);
      lVar11 = *plVar2;
    }
    *(undefined2 *)(this + 0x24) = uVar9;
    *(ulonglong *)(this + 0x30) = uVar4;
    *(undefined2 **)(this + 0x28) = puVar13;
    *(ulonglong *)(this + 0x40) = uVar5;
    *(undefined2 **)(this + 0x38) = puVar14;
    *(ulonglong *)(this + 0x50) = uVar6;
    *(undefined2 **)(this + 0x48) = puVar15;
    if (*(code **)(lVar11 + 0x40) == moneypunct<>::do_frac_digits) {
      uVar10 = *(undefined4 *)(plVar2[2] + 0x58);
    }
    else {
      uVar10 = (**(code **)(lVar11 + 0x40))(plVar2);
      lVar11 = *plVar2;
    }
    *(undefined4 *)(this + 0x58) = uVar10;
    if (*(code **)(lVar11 + 0x48) == moneypunct<>::do_pos_format) {
      uVar10 = *(undefined4 *)(plVar2[2] + 0x5c);
    }
    else {
      uVar10 = (**(code **)(lVar11 + 0x48))(plVar2);
    }
    *(undefined4 *)(this + 0x5c) = uVar10;
    if (*(code **)(*plVar2 + 0x50) == moneypunct<>::do_neg_format) {
      uVar10 = *(undefined4 *)(plVar2[2] + 0x60);
    }
    else {
      uVar10 = (**(code **)(*plVar2 + 0x50))(plVar2);
    }
    *(undefined4 *)(this + 0x60) = uVar10;
    lVar11 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar11 * 8);
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    (**(code **)(*plVar2 + 0x58))(plVar2,money_base::_S_atoms,money_base::_S_atoms + 0xb,this + 100)
    ;
    this[0x7a] = (__moneypunct_cache<>)0x1;
    std::string::_Rep::_M_dispose(local_50[0] + -3);
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// std::__moneypunct_cache<wchar_t, false>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<>::__moneypunct_cache(__moneypunct_cache<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
  this[0x20] = (__moneypunct_cache<>)0x0;
  *(undefined4 *)(this + 0x22) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x7a] = (__moneypunct_cache<>)0x0;
  return;
}



// std::__moneypunct_cache<wchar_t, false>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<>::__moneypunct_cache(__moneypunct_cache<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
  this[0x20] = (__moneypunct_cache<>)0x0;
  *(undefined4 *)(this + 0x22) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x7a] = (__moneypunct_cache<>)0x0;
  return;
}



// std::__moneypunct_cache<wchar_t, false>::~__moneypunct_cache()

void __thiscall std::__moneypunct_cache<>::~__moneypunct_cache(__moneypunct_cache<> *this)

{
  ~__moneypunct_cache(this);
  operator_delete(this);
  return;
}



// std::__moneypunct_cache<wchar_t, false>::~__moneypunct_cache()

void __thiscall std::__moneypunct_cache<>::~__moneypunct_cache(__moneypunct_cache<> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
  if (this[0x7a] != (__moneypunct_cache<>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<wchar_t, false>::~__moneypunct_cache()

void __thiscall std::__moneypunct_cache<>::~__moneypunct_cache(__moneypunct_cache<> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde10;
  if (this[0x7a] != (__moneypunct_cache<>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<wchar_t, true>::_M_cache(std::locale const&)

void __thiscall std::__moneypunct_cache<>::_M_cache(__moneypunct_cache<> *this,longlong *param_1)

{
  ulonglong *puVar1;
  longlong *plVar2;
  wchar_t *pwVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  char *_Str;
  int iVar7;
  __moneypunct_cache<> _Var8;
  undefined2 uVar9;
  undefined4 uVar10;
  longlong lVar11;
  size_t sVar12;
  undefined2 *puVar13;
  undefined2 *puVar14;
  undefined2 *puVar15;
  wchar_t *pwVar16;
  char *pcVar17;
  ulonglong *local_50 [2];
  
  lVar11 = locale::id::_M_id((id *)&moneypunct<>::id);
  plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar11 * 8);
  if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  if (*(code **)(*plVar2 + 0x28) == moneypunct<>::do_curr_symbol) {
    pwVar16 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x28);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar12 = wcslen(pwVar3);
      pwVar16 = pwVar3 + sVar12;
    }
    local_50[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            (pwVar3,(longlong)pwVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x28))(local_50,plVar2);
  }
  uVar4 = local_50[0][-3];
  if (0x3ffffffffffffffc < uVar4) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar13 = operator_new__(uVar4 * 2);
  std::wstring::copy((wstring *)local_50,puVar13,uVar4,0);
  if (_CRT_MT == 0) {
    iVar7 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar7 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar7 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar7 < 1) {
    std::wstring::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x30) == moneypunct<>::do_positive_sign) {
    pwVar16 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x38);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar12 = wcslen(pwVar3);
      pwVar16 = pwVar3 + sVar12;
    }
    local_50[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            (pwVar3,(longlong)pwVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x30))((wstring *)local_50,plVar2);
  }
  uVar5 = local_50[0][-3];
  if (0x3ffffffffffffffc < uVar5) {
                    // WARNING: Subroutine does not return
    __cxa_throw_bad_array_new_length();
  }
  puVar14 = operator_new__(uVar5 * 2);
  std::wstring::copy((wstring *)local_50,puVar14,uVar5,0);
  if (_CRT_MT == 0) {
    iVar7 = (int)local_50[0][-1];
    *(int *)(local_50[0] + -1) = iVar7 + -1;
  }
  else {
    LOCK();
    puVar1 = local_50[0] + -1;
    iVar7 = (int)*puVar1;
    *(int *)puVar1 = (int)*puVar1 + -1;
    UNLOCK();
  }
  if (iVar7 < 1) {
    std::wstring::_Rep::_M_destroy(local_50[0] + -3);
  }
  if (*(code **)(*plVar2 + 0x38) == moneypunct<>::do_negative_sign) {
    pwVar16 = (wchar_t *)0xfffffffffffffffe;
    pwVar3 = *(wchar_t **)(plVar2[2] + 0x48);
    if (pwVar3 != (wchar_t *)0x0) {
      sVar12 = wcslen(pwVar3);
      pwVar16 = pwVar3 + sVar12;
    }
    local_50[0] = _text__ZNSbIwSt11char_traitsIwESaIwEE12_S_constructIPKwEEPwT_S7_RKS1_St20forward_iterator_tag_isra_0
                            (pwVar3,(longlong)pwVar16);
  }
  else {
    (**(code **)(*plVar2 + 0x38))((wstring *)local_50,plVar2);
  }
  uVar6 = local_50[0][-3];
  if (uVar6 < 0x3ffffffffffffffd) {
    puVar15 = operator_new__(uVar6 * 2);
    std::wstring::copy((wstring *)local_50,puVar15,uVar6,0);
    if (_CRT_MT == 0) {
      iVar7 = (int)local_50[0][-1];
      *(int *)(local_50[0] + -1) = iVar7 + -1;
    }
    else {
      LOCK();
      puVar1 = local_50[0] + -1;
      iVar7 = (int)*puVar1;
      *(int *)puVar1 = (int)*puVar1 + -1;
      UNLOCK();
    }
    if (iVar7 < 1) {
      std::wstring::_Rep::_M_destroy(local_50[0] + -3);
    }
    if (*(code **)(*plVar2 + 0x20) == moneypunct<>::do_grouping) {
      pcVar17 = (char *)0xffffffffffffffff;
      _Str = *(char **)(plVar2[2] + 0x10);
      if (_Str != (char *)0x0) {
        sVar12 = strlen(_Str);
        pcVar17 = _Str + sVar12;
      }
      local_50[0] = _text__ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag_isra_0
                              (_Str,(longlong)pcVar17);
    }
    else {
      (**(code **)(*plVar2 + 0x20))((wstring *)local_50,plVar2);
    }
    sVar12 = local_50[0][-3];
    pcVar17 = operator_new__(sVar12);
    std::string::copy((string *)local_50,pcVar17,sVar12,0);
    *(size_t *)(this + 0x18) = sVar12;
    _Var8 = (__moneypunct_cache<>)0x0;
    *(char **)(this + 0x10) = pcVar17;
    if (sVar12 != 0) {
      _Var8 = (__moneypunct_cache<>)((byte)(*pcVar17 - 1U) < 0x7e);
    }
    lVar11 = *plVar2;
    this[0x20] = _Var8;
    if (*(code **)(lVar11 + 0x10) == moneypunct<>::do_decimal_point) {
      uVar9 = *(undefined2 *)(plVar2[2] + 0x22);
    }
    else {
      uVar9 = (**(code **)(lVar11 + 0x10))(plVar2);
      lVar11 = *plVar2;
    }
    *(undefined2 *)(this + 0x22) = uVar9;
    if (*(code **)(lVar11 + 0x18) == moneypunct<>::do_thousands_sep) {
      uVar9 = *(undefined2 *)(plVar2[2] + 0x24);
    }
    else {
      uVar9 = (**(code **)(lVar11 + 0x18))(plVar2);
      lVar11 = *plVar2;
    }
    *(undefined2 *)(this + 0x24) = uVar9;
    *(ulonglong *)(this + 0x30) = uVar4;
    *(undefined2 **)(this + 0x28) = puVar13;
    *(ulonglong *)(this + 0x40) = uVar5;
    *(undefined2 **)(this + 0x38) = puVar14;
    *(ulonglong *)(this + 0x50) = uVar6;
    *(undefined2 **)(this + 0x48) = puVar15;
    if (*(code **)(lVar11 + 0x40) == moneypunct<>::do_frac_digits) {
      uVar10 = *(undefined4 *)(plVar2[2] + 0x58);
    }
    else {
      uVar10 = (**(code **)(lVar11 + 0x40))(plVar2);
      lVar11 = *plVar2;
    }
    *(undefined4 *)(this + 0x58) = uVar10;
    if (*(code **)(lVar11 + 0x48) == moneypunct<>::do_pos_format) {
      uVar10 = *(undefined4 *)(plVar2[2] + 0x5c);
    }
    else {
      uVar10 = (**(code **)(lVar11 + 0x48))(plVar2);
    }
    *(undefined4 *)(this + 0x5c) = uVar10;
    if (*(code **)(*plVar2 + 0x50) == moneypunct<>::do_neg_format) {
      uVar10 = *(undefined4 *)(plVar2[2] + 0x60);
    }
    else {
      uVar10 = (**(code **)(*plVar2 + 0x50))(plVar2);
    }
    *(undefined4 *)(this + 0x60) = uVar10;
    lVar11 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + lVar11 * 8);
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    (**(code **)(*plVar2 + 0x58))(plVar2,money_base::_S_atoms,money_base::_S_atoms + 0xb,this + 100)
    ;
    this[0x7a] = (__moneypunct_cache<>)0x1;
    std::string::_Rep::_M_dispose(local_50[0] + -3);
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// std::__moneypunct_cache<wchar_t, true>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<>::__moneypunct_cache(__moneypunct_cache<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde30;
  this[0x20] = (__moneypunct_cache<>)0x0;
  *(undefined4 *)(this + 0x22) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x7a] = (__moneypunct_cache<>)0x0;
  return;
}



// std::__moneypunct_cache<wchar_t, true>::__moneypunct_cache(unsigned long long)

void __thiscall
std::__moneypunct_cache<>::__moneypunct_cache(__moneypunct_cache<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde30;
  this[0x20] = (__moneypunct_cache<>)0x0;
  *(undefined4 *)(this + 0x22) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined8 *)(this + 0x5c) = 0;
  this[0x7a] = (__moneypunct_cache<>)0x0;
  return;
}



// std::__moneypunct_cache<wchar_t, true>::~__moneypunct_cache()

void __thiscall std::__moneypunct_cache<>::~__moneypunct_cache(__moneypunct_cache<> *this)

{
  ~__moneypunct_cache(this);
  operator_delete(this);
  return;
}



// std::__moneypunct_cache<wchar_t, true>::~__moneypunct_cache()

void __thiscall std::__moneypunct_cache<>::~__moneypunct_cache(__moneypunct_cache<> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde30;
  if (this[0x7a] != (__moneypunct_cache<>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__moneypunct_cache<wchar_t, true>::~__moneypunct_cache()

void __thiscall std::__moneypunct_cache<>::~__moneypunct_cache(__moneypunct_cache<> *this)

{
  *(undefined ***)this = &PTR____moneypunct_cache_1400dde30;
  if (this[0x7a] != (__moneypunct_cache<>)0x0) {
    if (*(void **)(this + 0x10) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x10));
    }
    if (*(void **)(this + 0x28) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x28));
    }
    if (*(void **)(this + 0x38) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x38));
    }
    if (*(void **)(this + 0x48) != (void *)0x0) {
      operator_delete__(*(void **)(this + 0x48));
    }
  }
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf8_base<char32_t>::~__codecvt_utf8_base()

void __thiscall
std::__codecvt_utf8_base<char32_t>::~__codecvt_utf8_base(__codecvt_utf8_base<char32_t> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__codecvt_utf8_base<char32_t>::~__codecvt_utf8_base()

void __thiscall
std::__codecvt_utf8_base<char32_t>::~__codecvt_utf8_base(__codecvt_utf8_base<char32_t> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf8_base<char16_t>::~__codecvt_utf8_base()

void __thiscall
std::__codecvt_utf8_base<char16_t>::~__codecvt_utf8_base(__codecvt_utf8_base<char16_t> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__codecvt_utf8_base<char16_t>::~__codecvt_utf8_base()

void __thiscall
std::__codecvt_utf8_base<char16_t>::~__codecvt_utf8_base(__codecvt_utf8_base<char16_t> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf8_base<wchar_t>::~__codecvt_utf8_base()

void __thiscall
std::__codecvt_utf8_base<wchar_t>::~__codecvt_utf8_base(__codecvt_utf8_base<wchar_t> *this)

{
  *(undefined ***)this = &PTR____codecvt_utf8_base_1400ddf10;
  codecvt<>::~codecvt((codecvt<> *)this);
  operator_delete(this);
  return;
}



// std::__codecvt_utf8_base<wchar_t>::~__codecvt_utf8_base()

void __thiscall
std::__codecvt_utf8_base<wchar_t>::~__codecvt_utf8_base(__codecvt_utf8_base<wchar_t> *this)

{
  *(undefined ***)this = &PTR____codecvt_utf8_base_1400ddf10;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::__iosfail_type_info::~__iosfail_type_info()

void __thiscall std::__iosfail_type_info::~__iosfail_type_info(__iosfail_type_info *this)

{
  *(undefined ***)this = &PTR____iosfail_type_info_1400ddf70;
  __cxxabiv1::__si_class_type_info::~__si_class_type_info((__si_class_type_info *)this);
  operator_delete(this);
  return;
}



// std::__iosfail_type_info::~__iosfail_type_info()

void __thiscall std::__iosfail_type_info::~__iosfail_type_info(__iosfail_type_info *this)

{
  *(undefined ***)this = &PTR____iosfail_type_info_1400ddf70;
  __cxxabiv1::__si_class_type_info::~__si_class_type_info((__si_class_type_info *)this);
  return;
}



void _text__ZNSt19ostreambuf_iteratorIcSt11char_traitsIcEE6_M_putEPKcx_isra_0
               (undefined8 *param_1,undefined8 param_2,longlong param_3)

{
  longlong lVar1;
  
  if (*(char *)(param_1 + 1) == '\0') {
    lVar1 = (**(code **)(*(longlong *)*param_1 + 0x60))();
    if (param_3 != lVar1) {
      *(undefined1 *)(param_1 + 1) = 1;
    }
  }
  return;
}



// std::__codecvt_utf16_base<char32_t>::~__codecvt_utf16_base()

void __thiscall
std::__codecvt_utf16_base<char32_t>::~__codecvt_utf16_base(__codecvt_utf16_base<char32_t> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__codecvt_utf16_base<char32_t>::~__codecvt_utf16_base()

void __thiscall
std::__codecvt_utf16_base<char32_t>::~__codecvt_utf16_base(__codecvt_utf16_base<char32_t> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf16_base<char16_t>::~__codecvt_utf16_base()

void __thiscall
std::__codecvt_utf16_base<char16_t>::~__codecvt_utf16_base(__codecvt_utf16_base<char16_t> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__codecvt_utf16_base<char16_t>::~__codecvt_utf16_base()

void __thiscall
std::__codecvt_utf16_base<char16_t>::~__codecvt_utf16_base(__codecvt_utf16_base<char16_t> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf16_base<wchar_t>::~__codecvt_utf16_base()

void __thiscall
std::__codecvt_utf16_base<wchar_t>::~__codecvt_utf16_base(__codecvt_utf16_base<wchar_t> *this)

{
  *(undefined ***)this = &PTR____codecvt_utf16_base_1400de090;
  codecvt<>::~codecvt((codecvt<> *)this);
  operator_delete(this);
  return;
}



// std::__codecvt_utf16_base<wchar_t>::~__codecvt_utf16_base()

void __thiscall
std::__codecvt_utf16_base<wchar_t>::~__codecvt_utf16_base(__codecvt_utf16_base<wchar_t> *this)

{
  *(undefined ***)this = &PTR____codecvt_utf16_base_1400de090;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::bad_array_new_length::~bad_array_new_length()

void __thiscall std::bad_array_new_length::~bad_array_new_length(bad_array_new_length *this)

{
  *(undefined ***)this = &PTR__bad_array_new_length_1400de0f0;
  bad_alloc::~bad_alloc((bad_alloc *)this);
  operator_delete(this);
  return;
}



// std::bad_array_new_length::~bad_array_new_length()

void __thiscall std::bad_array_new_length::~bad_array_new_length(bad_array_new_length *this)

{
  *(undefined ***)this = &PTR__bad_array_new_length_1400de0f0;
  bad_alloc::~bad_alloc((bad_alloc *)this);
  return;
}



// std::__codecvt_utf8_utf16_base<char32_t>::~__codecvt_utf8_utf16_base()

void __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::~__codecvt_utf8_utf16_base
          (__codecvt_utf8_utf16_base<char32_t> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__codecvt_utf8_utf16_base<char32_t>::~__codecvt_utf8_utf16_base()

void __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::~__codecvt_utf8_utf16_base
          (__codecvt_utf8_utf16_base<char32_t> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf8_utf16_base<char16_t>::~__codecvt_utf8_utf16_base()

void __thiscall
std::__codecvt_utf8_utf16_base<char16_t>::~__codecvt_utf8_utf16_base
          (__codecvt_utf8_utf16_base<char16_t> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__codecvt_utf8_utf16_base<char16_t>::~__codecvt_utf8_utf16_base()

void __thiscall
std::__codecvt_utf8_utf16_base<char16_t>::~__codecvt_utf8_utf16_base
          (__codecvt_utf8_utf16_base<char16_t> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  return;
}



// std::__codecvt_utf8_utf16_base<wchar_t>::~__codecvt_utf8_utf16_base()

void __thiscall
std::__codecvt_utf8_utf16_base<wchar_t>::~__codecvt_utf8_utf16_base
          (__codecvt_utf8_utf16_base<wchar_t> *this)

{
  *(undefined ***)this = &PTR____codecvt_utf8_utf16_base_1400de520;
  codecvt<>::~codecvt((codecvt<> *)this);
  operator_delete(this);
  return;
}



// std::__codecvt_utf8_utf16_base<wchar_t>::~__codecvt_utf8_utf16_base()

void __thiscall
std::__codecvt_utf8_utf16_base<wchar_t>::~__codecvt_utf8_utf16_base
          (__codecvt_utf8_utf16_base<wchar_t> *this)

{
  *(undefined ***)this = &PTR____codecvt_utf8_utf16_base_1400de520;
  codecvt<>::~codecvt((codecvt<> *)this);
  return;
}



// std::_V2::error_category::~error_category()

void __thiscall std::_V2::error_category::~error_category(error_category *this)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(this);
  return;
}



// std::_V2::error_category::~error_category()

void __thiscall std::_V2::error_category::~error_category(void)

{
  return;
}



// std::_V2::system_category()

undefined ** std::_V2::system_category(void)

{
  return &_data__ZN12_GLOBAL__N_124system_category_instanceE;
}



// std::_V2::generic_category()

undefined ** std::_V2::generic_category(void)

{
  return &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
}



// std::__pad<char, std::char_traits<char> >::_S_pad(std::ios_base&, char, char*, char const*, long
// long, long long)

void std::__pad<>::_S_pad
               (longlong param_1,char param_2,ctype<char> *param_3,ctype<char> *param_4,
               longlong param_5,size_t param_6)

{
  ctype<char> cVar1;
  ctype<char> cVar2;
  uint uVar3;
  longlong lVar4;
  ulonglong uVar5;
  ctype<char> *pcVar6;
  size_t _Size;
  ctype<char> *pcVar7;
  
  uVar3 = *(uint *)(param_1 + 0x18) & 0xb0;
  _Size = param_5 - param_6;
  if (uVar3 == 0x20) {
    if (param_6 != 0) {
      memcpy(param_3,param_4,param_6);
    }
    if (_Size == 0) {
      return;
    }
    memset(param_3 + param_6,(int)param_2,_Size);
    return;
  }
  if (uVar3 == 0x10) {
    lVar4 = locale::id::_M_id((id *)&ctype<char>::id);
    pcVar6 = *(ctype<char> **)(*(longlong *)(*(longlong *)(param_1 + 0xd0) + 8) + lVar4 * 8);
    if (pcVar6 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (pcVar6[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(pcVar6);
      cVar2 = (ctype<char>)0x2d;
      if (*(code **)(*(longlong *)pcVar6 + 0x30) != ctype<char>::do_widen) {
        cVar2 = (ctype<char>)(**(code **)(*(longlong *)pcVar6 + 0x30))(pcVar6,0x2d);
      }
      cVar1 = *param_4;
      if (cVar1 != cVar2) {
        if (pcVar6[0x38] != (ctype<char>)0x0) goto LAB_1400973ff;
        ctype<char>::_M_widen_init(pcVar6);
        cVar2 = (ctype<char>)0x2b;
        if (*(code **)(*(longlong *)pcVar6 + 0x30) != ctype<char>::do_widen) {
          cVar2 = (ctype<char>)(**(code **)(*(longlong *)pcVar6 + 0x30))(pcVar6,0x2b);
        }
        cVar1 = *param_4;
        if (cVar1 != cVar2) {
          if (pcVar6[0x38] != (ctype<char>)0x0) goto LAB_140097408;
          ctype<char>::_M_widen_init(pcVar6);
          cVar2 = (ctype<char>)0x30;
          if (*(code **)(*(longlong *)pcVar6 + 0x30) != ctype<char>::do_widen) {
            cVar2 = (ctype<char>)(**(code **)(*(longlong *)pcVar6 + 0x30))(pcVar6,0x30);
          }
          if ((*param_4 != cVar2) || ((longlong)param_6 < 2)) goto LAB_140097393;
          if (pcVar6[0x38] != (ctype<char>)0x0) goto LAB_140097413;
          uVar5 = _text__ZNKSt5ctypeIcE5widenEc_part_0(pcVar6,0x78);
          cVar2 = param_4[1];
          if (cVar2 != SUB81(uVar5,0)) {
            if (pcVar6[0x38] != (ctype<char>)0x0) goto LAB_140097424;
            uVar5 = _text__ZNKSt5ctypeIcE5widenEc_part_0(pcVar6,0x58);
            cVar1 = SUB81(uVar5,0);
            cVar2 = param_4[1];
            goto LAB_14009742b;
          }
          goto LAB_1400975f0;
        }
      }
LAB_140097530:
      *param_3 = cVar2;
      pcVar7 = param_4 + 1;
      pcVar6 = param_3 + 1;
      lVar4 = 1;
      goto LAB_140097395;
    }
    cVar1 = *param_4;
    cVar2 = cVar1;
    if (pcVar6[0x66] == cVar1) goto LAB_140097530;
LAB_1400973ff:
    cVar2 = cVar1;
    if (cVar1 == pcVar6[100]) goto LAB_140097530;
LAB_140097408:
    if ((pcVar6[0x69] != cVar1) || ((longlong)param_6 < 2)) goto LAB_140097393;
LAB_140097413:
    cVar2 = param_4[1];
    if (cVar2 == pcVar6[0xb1]) {
LAB_1400975f0:
      pcVar6 = param_3 + 2;
      pcVar7 = param_4 + 2;
      lVar4 = 2;
      *param_3 = *param_4;
      param_3[1] = param_4[1];
      goto LAB_140097395;
    }
LAB_140097424:
    cVar1 = pcVar6[0x91];
LAB_14009742b:
    if (cVar1 == cVar2) goto LAB_1400975f0;
    if (_Size == 0) goto LAB_14009745b;
    lVar4 = 0;
LAB_140097440:
    memset(param_3,(int)param_2,_Size);
    pcVar6 = param_3;
  }
  else {
LAB_140097393:
    lVar4 = 0;
    pcVar6 = param_3;
    pcVar7 = param_4;
LAB_140097395:
    param_3 = pcVar6;
    param_4 = pcVar7;
    if (_Size != 0) goto LAB_140097440;
  }
  param_6 = param_6 - lVar4;
  if (param_6 == 0) {
    return;
  }
  param_3 = pcVar6 + _Size;
LAB_14009745b:
  memcpy(param_3,param_4,param_6);
  return;
}



// std::__pad<wchar_t, std::char_traits<wchar_t> >::_S_pad(std::ios_base&, wchar_t, wchar_t*,
// wchar_t const*, long long, long long)

void std::__pad<>::_S_pad
               (longlong param_1,short param_2,short *param_3,short *param_4,longlong param_5,
               longlong param_6)

{
  longlong *plVar1;
  short sVar2;
  uint uVar3;
  ulonglong uVar4;
  longlong lVar5;
  short *psVar6;
  ulonglong uVar7;
  short *psVar8;
  
  uVar3 = *(uint *)(param_1 + 0x18) & 0xb0;
  uVar7 = param_5 - param_6;
  if (uVar3 == 0x20) {
    if (param_6 != 0) {
      memcpy(param_3,param_4,param_6 * 2);
    }
    if (uVar7 == 0) {
      return;
    }
    uVar4 = 0;
    psVar6 = param_3 + param_6;
    if ((uVar7 & 1) != 0) {
      *psVar6 = param_2;
      uVar4 = 1;
      if (uVar7 == 1) {
        return;
      }
    }
    do {
      psVar6[uVar4] = param_2;
      psVar6[uVar4 + 1] = param_2;
      uVar4 = uVar4 + 2;
    } while (uVar7 != uVar4);
    return;
  }
  if (uVar3 == 0x10) {
    lVar5 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar1 = *(longlong **)(*(longlong *)(*(longlong *)(param_1 + 0xd0) + 8) + lVar5 * 8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,0x2d);
    if ((*param_4 == sVar2) ||
       (sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,0x2b), *param_4 == sVar2)) {
      *param_3 = sVar2;
      psVar8 = param_4 + 1;
      psVar6 = param_3 + 1;
      lVar5 = 1;
      goto LAB_140097682;
    }
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1);
    if ((*param_4 != sVar2) || (param_6 < 2)) goto LAB_140097680;
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,0x78);
    if ((param_4[1] == sVar2) ||
       (sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1), param_4[1] == sVar2)) {
      psVar6 = param_3 + 2;
      psVar8 = param_4 + 2;
      lVar5 = 2;
      *param_3 = *param_4;
      param_3[1] = param_4[1];
      goto LAB_140097682;
    }
    lVar5 = 0;
    if (uVar7 == 0) goto LAB_1400976cc;
LAB_140097687:
    uVar4 = 0;
    if ((uVar7 & 1) != 0) {
      *param_3 = param_2;
      uVar4 = 1;
      if (uVar7 == 1) goto LAB_1400976b2;
    }
    do {
      param_3[uVar4] = param_2;
      param_3[uVar4 + 1] = param_2;
      uVar4 = uVar4 + 2;
    } while (uVar7 != uVar4);
  }
  else {
LAB_140097680:
    lVar5 = 0;
    psVar6 = param_3;
    psVar8 = param_4;
LAB_140097682:
    param_3 = psVar6;
    param_4 = psVar8;
    if (uVar7 != 0) goto LAB_140097687;
  }
LAB_1400976b2:
  param_6 = param_6 - lVar5;
  if (param_6 == 0) {
    return;
  }
  param_3 = param_3 + uVar7;
LAB_1400976cc:
  memcpy(param_3,param_4,param_6 * 2);
  return;
}



// std::ctype<char>::classic_table()

undefined * std::ctype<char>::classic_table(void)

{
  return &_rdata__ZZNSt5ctypeIcE13classic_tableEvE16_S_classic_table;
}



// std::ctype<char>::ctype(unsigned short const*, bool, unsigned long long)

void __thiscall
std::ctype<char>::ctype(ctype<char> *this,undefined *param_1,byte param_2,longlong param_3)

{
  ulonglong uVar1;
  undefined8 *puVar2;
  
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined8 *)(this + 0x39) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined8 *)(this + 0x131) = 0;
  *(undefined ***)this = &PTR__ctype_1400de580;
  this[0x18] = (ctype<char>)(param_1 != (undefined *)0x0 & param_2);
  if (param_1 == (undefined *)0x0) {
    param_1 = &_rdata__ZZNSt5ctypeIcE13classic_tableEvE16_S_classic_table;
  }
  *(undefined **)(this + 0x30) = param_1;
  puVar2 = (undefined8 *)((ulonglong)(this + 0x41) & 0xfffffffffffffff8);
  for (uVar1 = (ulonglong)
               (((int)this - (int)(undefined8 *)((ulonglong)(this + 0x41) & 0xfffffffffffffff8)) +
                0x139U >> 3); uVar1 != 0; uVar1 = uVar1 - 1) {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  }
  this[0x38] = (ctype<char>)0x0;
  *(undefined8 *)(this + 0x139) = 0;
  *(undefined8 *)(this + 0x231) = 0;
  puVar2 = (undefined8 *)((ulonglong)(this + 0x141) & 0xfffffffffffffff8);
  for (uVar1 = (ulonglong)
               (((int)this - (int)(undefined8 *)((ulonglong)(this + 0x141) & 0xfffffffffffffff8)) +
                0x239U >> 3); uVar1 != 0; uVar1 = uVar1 - 1) {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  }
  this[0x239] = (ctype<char>)0x0;
  return;
}



// std::ctype<char>::ctype(int*, unsigned short const*, bool, unsigned long long)

void __thiscall
std::ctype<char>::ctype
          (ctype<char> *this,undefined8 param_2_00,undefined *param_2,byte param_3,longlong param_4)

{
  ulonglong uVar1;
  undefined8 *puVar2;
  
  *(uint *)(this + 8) = (uint)(param_4 != 0);
  *(undefined8 *)(this + 0x39) = 0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__ctype_1400de580;
  *(undefined8 *)(this + 0x131) = 0;
  this[0x18] = (ctype<char>)(param_2 != (undefined *)0x0 & param_3);
  if (param_2 == (undefined *)0x0) {
    param_2 = &_rdata__ZZNSt5ctypeIcE13classic_tableEvE16_S_classic_table;
  }
  *(undefined **)(this + 0x30) = param_2;
  puVar2 = (undefined8 *)((ulonglong)(this + 0x41) & 0xfffffffffffffff8);
  for (uVar1 = (ulonglong)
               (((int)this - (int)(undefined8 *)((ulonglong)(this + 0x41) & 0xfffffffffffffff8)) +
                0x139U >> 3); uVar1 != 0; uVar1 = uVar1 - 1) {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  }
  this[0x38] = (ctype<char>)0x0;
  *(undefined8 *)(this + 0x139) = 0;
  *(undefined8 *)(this + 0x231) = 0;
  puVar2 = (undefined8 *)((ulonglong)(this + 0x141) & 0xfffffffffffffff8);
  for (uVar1 = (ulonglong)
               (((int)this - (int)(undefined8 *)((ulonglong)(this + 0x141) & 0xfffffffffffffff8)) +
                0x239U >> 3); uVar1 != 0; uVar1 = uVar1 - 1) {
    *puVar2 = 0;
    puVar2 = puVar2 + 1;
  }
  this[0x239] = (ctype<char>)0x0;
  return;
}



// std::ctype<char>::~ctype()

void __thiscall std::ctype<char>::~ctype(ctype<char> *this)

{
  *(undefined ***)this = &PTR__ctype_1400de580;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  if ((this[0x18] != (ctype<char>)0x0) && (*(void **)(this + 0x30) != (void *)0x0)) {
    operator_delete__(*(void **)(this + 0x30));
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::ctype<char>::~ctype()

void __thiscall std::ctype<char>::~ctype(ctype<char> *this)

{
  *(undefined ***)this = &PTR__ctype_1400de580;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  if ((this[0x18] != (ctype<char>)0x0) && (*(void **)(this + 0x30) != (void *)0x0)) {
    operator_delete__(*(void **)(this + 0x30));
  }
  locale::facet::~facet();
  return;
}



// std::ctype<wchar_t>::_M_initialize_ctype()

void __thiscall std::ctype<wchar_t>::_M_initialize_ctype(ctype<wchar_t> *this)

{
  ctype<wchar_t> cVar1;
  wint_t wVar2;
  wctype_t wVar3;
  int iVar4;
  ushort uVar5;
  longlong lVar6;
  
  lVar6 = 0;
  do {
    iVar4 = wctob((wint_t)lVar6);
    if (iVar4 == -1) {
      cVar1 = (ctype<wchar_t>)0x0;
      goto LAB_140097abf;
    }
    this[lVar6 + 0x19] = SUB41(iVar4,0);
    lVar6 = lVar6 + 1;
  } while (lVar6 != 0x80);
  cVar1 = (ctype<wchar_t>)0x1;
LAB_140097abf:
  this[0x18] = cVar1;
  lVar6 = 0;
  do {
    wVar2 = btowc((int)lVar6);
    *(wint_t *)(this + lVar6 * 2 + 0x9a) = wVar2;
    lVar6 = lVar6 + 1;
  } while (lVar6 != 0x100);
  lVar6 = 0;
  do {
    uVar5 = (ushort)(1 << ((byte)lVar6 & 0x1f));
    *(ushort *)(this + lVar6 * 2 + 0x29a) = uVar5;
    wVar3 = _M_convert_to_wmask(this,uVar5);
    *(wctype_t *)(this + lVar6 * 2 + 0x2ba) = wVar3;
    lVar6 = lVar6 + 1;
  } while (lVar6 != 0x10);
  return;
}



// std::ctype<wchar_t>::ctype(int*, unsigned long long)

void __thiscall
std::ctype<wchar_t>::ctype(ctype<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  uVar1 = locale::facet::_S_clone_c_locale();
  this[0x18] = (ctype<wchar_t>)0x0;
  *(undefined8 *)(this + 0x10) = uVar1;
  _M_initialize_ctype(this);
  return;
}



// std::ctype<wchar_t>::ctype(unsigned long long)

void __thiscall std::ctype<wchar_t>::ctype(ctype<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  this[0x18] = (ctype<wchar_t>)0x0;
  _M_initialize_ctype(this);
  return;
}



// std::ctype<wchar_t>::~ctype()

void __thiscall std::ctype<wchar_t>::~ctype(ctype<wchar_t> *this)

{
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de1a0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::ctype<wchar_t>::~ctype()

void __thiscall std::ctype<wchar_t>::~ctype(ctype<wchar_t> *this)

{
  *(undefined ***)this = &PTR__ctype_1400de5e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de1a0;
  locale::facet::~facet();
  return;
}



// std::locale::_S_initialize()

void std::locale::_S_initialize(void)

{
  if (_CRT_MT != 0) {
    __gthr_win32_once((int *)&_S_once,_S_initialize_once);
  }
  if (_S_classic == (undefined *)0x0) {
    _Impl::_Impl((_Impl *)&_data__ZN12_GLOBAL__N_113c_locale_implE,2);
    _S_classic = &_data__ZN12_GLOBAL__N_113c_locale_implE;
    _S_global = &_data__ZN12_GLOBAL__N_113c_locale_implE;
    locale((locale *)&_data__ZN12_GLOBAL__N_18c_localeE,&_data__ZN12_GLOBAL__N_113c_locale_implE);
    return;
  }
  return;
}



// std::locale::_S_initialize_once()

void std::locale::_S_initialize_once(void)

{
  if (_S_classic != (undefined *)0x0) {
    return;
  }
  _Impl::_Impl((_Impl *)&_data__ZN12_GLOBAL__N_113c_locale_implE,2);
  _S_classic = &_data__ZN12_GLOBAL__N_113c_locale_implE;
  _S_global = &_data__ZN12_GLOBAL__N_113c_locale_implE;
  locale((locale *)&_data__ZN12_GLOBAL__N_18c_localeE,&_data__ZN12_GLOBAL__N_113c_locale_implE);
  return;
}



// std::locale::_S_normalize_category(int)

uint std::locale::_S_normalize_category(uint param_1)

{
  if ((param_1 != 0) && (((param_1 & 0x3f) == 0 || (0x3f < param_1)))) {
                    // WARNING: Subroutine does not return
    __throw_runtime_error("locale::_S_normalize_category category not found");
  }
  return param_1;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// std::locale::_Impl::_M_init_extra(std::locale::facet**)

void __thiscall std::locale::_Impl::_M_init_extra(_Impl *this,undefined8 *param_1)

{
  undefined8 uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined8 uVar4;
  undefined8 uVar5;
  undefined8 uVar6;
  int iVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  
  uVar1 = *param_1;
  uVar2 = param_1[1];
  _DAT_1400c1ba8 = 1;
  uVar3 = param_1[2];
  __data__ZNSt12_GLOBAL__N_110numpunct_cE = &PTR__numpunct_1400debb0;
  _DAT_1400c1bb0 = uVar1;
  numpunct<char>::_M_initialize_numpunct(0x1400c1ba0);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1ba8 = _DAT_1400c1ba8 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&numpunct<char>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_110numpunct_cE;
  _DAT_1400c1cc8 = 1;
  __data__ZNSt12_GLOBAL__N_19collate_cE = &PTR__collate_1400de8a0;
  _DAT_1400c1cd0 = facet::_S_get_c_locale();
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1cc8 = _DAT_1400c1cc8 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&collate<char>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_19collate_cE;
  _DAT_1400c1c48 = 1;
  __data__ZNSt12_GLOBAL__N_113moneypunct_cfE = &PTR__moneypunct_1400dd0f0;
  _DAT_1400c1c50 = uVar2;
  moneypunct<char,false>::_M_initialize_moneypunct(0x1400c1c40);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c48 = _DAT_1400c1c48 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_113moneypunct_cfE;
  _DAT_1400c1c68 = 1;
  __data__ZNSt12_GLOBAL__N_113moneypunct_ctE = &PTR__moneypunct_1400dd160;
  _DAT_1400c1c70 = uVar3;
  moneypunct<char,true>::_M_initialize_moneypunct(0x1400c1c60);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c68 = _DAT_1400c1c68 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_113moneypunct_ctE;
  __data__ZNSt12_GLOBAL__N_111money_get_cE = &PTR__money_get_1400dedf0;
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c08 = 2;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&money_get<>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_111money_get_cE;
  __data__ZNSt12_GLOBAL__N_111money_put_cE = &PTR__money_put_1400dee50;
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c28 = 2;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&money_put<>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_111money_put_cE;
  __data__ZNSt12_GLOBAL__N_110time_get_cE = &PTR__time_get_1400dec50;
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1be8 = 2;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&time_get<>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_110time_get_cE;
  messages<char>::messages((messages<char> *)&_data__ZNSt12_GLOBAL__N_110messages_cE,1);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1b68 = _DAT_1400c1b68 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&messages<char>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_110messages_cE;
  uVar4 = param_1[5];
  uVar5 = param_1[3];
  uVar6 = param_1[4];
  _DAT_1400c1bc8 = 1;
  __data__ZNSt12_GLOBAL__N_110numpunct_wE = &PTR__numpunct_1400dec00;
  _DAT_1400c1bd0 = uVar5;
  numpunct<wchar_t>::_M_initialize_numpunct(0x1400c1bc0);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1bc8 = _DAT_1400c1bc8 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_110numpunct_wE;
  _DAT_1400c1ce8 = 1;
  __data__ZNSt12_GLOBAL__N_19collate_wE = &PTR__collate_1400de8e0;
  _DAT_1400c1cf0 = facet::_S_get_c_locale();
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1ce8 = _DAT_1400c1ce8 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&collate<wchar_t>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_19collate_wE;
  _DAT_1400c1c88 = 1;
  __data__ZNSt12_GLOBAL__N_113moneypunct_wfE = &PTR__moneypunct_1400dd1d0;
  _DAT_1400c1c90 = uVar6;
  moneypunct<>::_M_initialize_moneypunct(0x1400c1c80);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c88 = _DAT_1400c1c88 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&moneypunct<>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_113moneypunct_wfE;
  _DAT_1400c1ca8 = 1;
  __data__ZNSt12_GLOBAL__N_113moneypunct_wtE = &PTR__moneypunct_1400dd240;
  _DAT_1400c1cb0 = uVar4;
  moneypunct<>::_M_initialize_moneypunct(0x1400c1ca0);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1ca8 = _DAT_1400c1ca8 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&moneypunct<>::id);
  iVar7 = _CRT_MT;
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_113moneypunct_wtE;
  __data__ZNSt12_GLOBAL__N_111money_get_wE = &PTR__money_get_1400dee20;
  if (iVar7 != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c18 = 2;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&money_get<>::id);
  iVar7 = _CRT_MT;
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_111money_get_wE;
  __data__ZNSt12_GLOBAL__N_111money_put_wE = &PTR__money_put_1400dee80;
  if (iVar7 != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1c38 = 2;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&money_put<>::id);
  iVar7 = _CRT_MT;
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_111money_put_wE;
  __data__ZNSt12_GLOBAL__N_110time_get_wE = &PTR__time_get_1400deca0;
  if (iVar7 != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1bf8 = 2;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&time_get<>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_110time_get_wE;
  messages<wchar_t>::messages((messages<wchar_t> *)&_data__ZNSt12_GLOBAL__N_110messages_wE,1);
  if (_CRT_MT != 0) {
    LOCK();
    UNLOCK();
  }
  _DAT_1400c1b88 = _DAT_1400c1b88 + 1;
  lVar10 = *(longlong *)(this + 8);
  lVar8 = locale::id::_M_id((id *)&messages<wchar_t>::id);
  *(undefined **)(lVar10 + lVar8 * 8) = &_data__ZNSt12_GLOBAL__N_110messages_wE;
  lVar10 = *(longlong *)(this + 0x18);
  lVar8 = locale::id::_M_id((id *)&numpunct<char>::id);
  *(undefined8 *)(lVar10 + lVar8 * 8) = uVar1;
  lVar10 = *(longlong *)(this + 0x18);
  lVar8 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  *(undefined8 *)(lVar10 + lVar8 * 8) = uVar2;
  lVar10 = *(longlong *)(this + 0x18);
  lVar8 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  *(undefined8 *)(lVar10 + lVar8 * 8) = uVar3;
  lVar10 = *(longlong *)(this + 0x18);
  lVar8 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  *(undefined8 *)(lVar10 + lVar8 * 8) = uVar5;
  lVar10 = *(longlong *)(this + 0x18);
  lVar9 = locale::id::_M_id((id *)&moneypunct<>::id);
  lVar8 = *(longlong *)(this + 0x18);
  *(undefined8 *)(lVar10 + lVar9 * 8) = uVar6;
  lVar10 = locale::id::_M_id((id *)&moneypunct<>::id);
  *(undefined8 *)(lVar8 + lVar10 * 8) = uVar4;
  return;
}



// std::locale::_Impl::_M_init_extra(void*, void*, char const*, char const*)

void std::locale::_Impl::_M_init_extra
               (longlong param_1,undefined8 *param_2,undefined8 param_3,undefined8 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined8 *puVar3;
  longlong lVar4;
  undefined8 uVar5;
  messages<char> *this;
  messages<wchar_t> *this_00;
  
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  puVar3[2] = 0;
  *puVar3 = &PTR__numpunct_1400debb0;
  numpunct<char>::_M_initialize_numpunct((longlong)puVar3);
  if (_CRT_MT == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&numpunct<char>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__collate_1400de8a0;
  uVar5 = facet::_S_clone_c_locale();
  iVar2 = _CRT_MT;
  puVar3[2] = uVar5;
  if (iVar2 == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&collate<char>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  puVar3[2] = 0;
  *puVar3 = &PTR__moneypunct_1400dd0f0;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)puVar3);
  if (_CRT_MT == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  puVar3[2] = 0;
  *puVar3 = &PTR__moneypunct_1400dd160;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)puVar3);
  if (_CRT_MT == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x10);
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__money_get_1400dedf0;
  if (_CRT_MT == 0) {
    *(undefined4 *)(puVar3 + 1) = 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&money_get<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x10);
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__money_put_1400dee50;
  if (_CRT_MT == 0) {
    *(undefined4 *)(puVar3 + 1) = 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&money_put<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x10);
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__time_get_1400dec50;
  if (_CRT_MT == 0) {
    *(undefined4 *)(puVar3 + 1) = 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&time_get<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  this = operator_new(0x20);
  messages<char>::messages(this,*param_2,param_4,0);
  if (_CRT_MT == 0) {
    *(int *)(this + 8) = *(int *)(this + 8) + 1;
  }
  else {
    LOCK();
    *(int *)(this + 8) = *(int *)(this + 8) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&messages<char>::id);
  *(messages<char> **)(lVar1 + lVar4 * 8) = this;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  puVar3[2] = 0;
  *puVar3 = &PTR__numpunct_1400dec00;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)puVar3);
  if (_CRT_MT == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__collate_1400de8e0;
  uVar5 = facet::_S_clone_c_locale();
  iVar2 = _CRT_MT;
  puVar3[2] = uVar5;
  if (iVar2 == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&collate<wchar_t>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  puVar3[2] = 0;
  *puVar3 = &PTR__moneypunct_1400dd1d0;
  moneypunct<>::_M_initialize_moneypunct((longlong)puVar3);
  if (_CRT_MT == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&moneypunct<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x18);
  *(undefined4 *)(puVar3 + 1) = 0;
  puVar3[2] = 0;
  *puVar3 = &PTR__moneypunct_1400dd240;
  moneypunct<>::_M_initialize_moneypunct((longlong)puVar3);
  if (_CRT_MT == 0) {
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&moneypunct<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x10);
  iVar2 = _CRT_MT;
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__money_get_1400dee20;
  if (iVar2 == 0) {
    *(undefined4 *)(puVar3 + 1) = 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&money_get<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x10);
  iVar2 = _CRT_MT;
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__money_put_1400dee80;
  if (iVar2 == 0) {
    *(undefined4 *)(puVar3 + 1) = 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&money_put<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  puVar3 = operator_new(0x10);
  iVar2 = _CRT_MT;
  *(undefined4 *)(puVar3 + 1) = 0;
  *puVar3 = &PTR__time_get_1400deca0;
  if (iVar2 == 0) {
    *(undefined4 *)(puVar3 + 1) = 1;
  }
  else {
    LOCK();
    *(int *)(puVar3 + 1) = *(int *)(puVar3 + 1) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&time_get<>::id);
  *(undefined8 **)(lVar1 + lVar4 * 8) = puVar3;
  this_00 = operator_new(0x20);
  messages<wchar_t>::messages(this_00,*param_2,param_4,0);
  if (_CRT_MT == 0) {
    *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
  }
  else {
    LOCK();
    *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1;
    UNLOCK();
  }
  lVar1 = *(longlong *)(param_1 + 8);
  lVar4 = locale::id::_M_id((id *)&messages<wchar_t>::id);
  *(messages<wchar_t> **)(lVar1 + lVar4 * 8) = this_00;
  return;
}



// WARNING: Removing unreachable block (ram,0x000140098bc2)
// std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned long long)

void __thiscall std::locale::_Impl::_M_install_cache(_Impl *this,longlong *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  longlong lVar3;
  undefined8 uVar4;
  ulonglong *puVar5;
  undefined **ppuVar6;
  longlong *plVar7;
  longlong lVar8;
  int iVar9;
  
  if ((_data__ZGVZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex == '\0') &&
     (iVar1 = __cxa_guard_acquire(&
                                  _data__ZGVZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex
                                 ), iVar1 != 0)) {
    if (_CRT_MT != 0) {
      __gthr_win32_mutex_init_function
                ((LPCRITICAL_SECTION)
                 &_data__ZZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex);
    }
    atexit(_text___tcf_0);
    __cxa_guard_release(&_data__ZGVZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex);
  }
  if ((_CRT_MT != 0) &&
     (uVar4 = __gthr_win32_mutex_lock
                        ((LPCRITICAL_SECTION)
                         &_data__ZZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex),
     (int)uVar4 != 0)) {
    puVar5 = __cxa_allocate_exception(8);
    *puVar5 = (ulonglong)&PTR____concurrence_lock_error_1400db830;
                    // WARNING: Subroutine does not return
    __cxa_throw((longlong)puVar5,&__gnu_cxx::__concurrence_lock_error::typeinfo,
                __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error);
  }
  ppuVar6 = &_S_twinned_facets;
  plVar7 = &numpunct<char>::id;
  do {
    lVar2 = *plVar7;
    if (lVar2 == 0) {
      if (_CRT_MT == 0) {
        locale::id::_S_refcount = locale::id::_S_refcount + 1;
        lVar2 = (longlong)locale::id::_S_refcount;
        *plVar7 = lVar2;
        goto LAB_140098be4;
      }
      LOCK();
      iVar1 = locale::id::_S_refcount + 1;
      UNLOCK();
      iVar9 = locale::id::_S_refcount + 1;
      LOCK();
      locale::id::_S_refcount = iVar1;
      if (*plVar7 == 0) {
        *plVar7 = (longlong)iVar9;
      }
      UNLOCK();
      lVar2 = *plVar7;
      plVar7 = (longlong *)ppuVar6[1];
      lVar8 = *plVar7;
      iVar1 = locale::id::_S_refcount;
    }
    else {
LAB_140098be4:
      plVar7 = (longlong *)ppuVar6[1];
      lVar8 = *plVar7;
      iVar1 = locale::id::_S_refcount;
    }
    lVar3 = param_2;
    if (param_2 == lVar2 + -1) {
      locale::id::_S_refcount = iVar1;
      if (lVar8 == 0) {
        if (_CRT_MT == 0) {
          locale::id::_S_refcount = iVar1 + 1;
          lVar8 = (longlong)locale::id::_S_refcount;
          *plVar7 = lVar8;
        }
        else {
          LOCK();
          locale::id::_S_refcount = iVar1 + 1;
          UNLOCK();
          LOCK();
          if (*plVar7 == 0) {
            *plVar7 = (longlong)(iVar1 + 1);
          }
          UNLOCK();
          lVar8 = *plVar7;
        }
      }
      lVar2 = lVar8 + -1;
      goto LAB_140098d1f;
    }
    if (lVar8 == 0) {
      if (_CRT_MT == 0) {
        locale::id::_S_refcount = iVar1 + 1;
        lVar8 = (longlong)locale::id::_S_refcount;
        *plVar7 = lVar8;
        iVar1 = locale::id::_S_refcount;
      }
      else {
        LOCK();
        locale::id::_S_refcount = iVar1 + 1;
        UNLOCK();
        LOCK();
        if (*plVar7 == 0) {
          *plVar7 = (longlong)(iVar1 + 1);
        }
        UNLOCK();
        lVar8 = *plVar7;
        iVar1 = locale::id::_S_refcount;
      }
    }
    locale::id::_S_refcount = iVar1;
    if (param_2 == lVar8 + -1) {
      plVar7 = (longlong *)*ppuVar6;
      lVar3 = *plVar7;
      if (lVar3 == 0) {
        if (_CRT_MT == 0) {
          locale::id::_S_refcount = iVar1 + 1;
          lVar3 = (longlong)locale::id::_S_refcount;
          *plVar7 = lVar3;
        }
        else {
          LOCK();
          locale::id::_S_refcount = iVar1 + 1;
          UNLOCK();
          LOCK();
          if (*plVar7 == 0) {
            *plVar7 = (longlong)(iVar1 + 1);
          }
          UNLOCK();
          lVar3 = *plVar7;
        }
      }
      lVar3 = lVar3 + -1;
      lVar2 = param_2;
      goto LAB_140098d1f;
    }
    plVar7 = (longlong *)ppuVar6[2];
    ppuVar6 = ppuVar6 + 2;
  } while (plVar7 != (longlong *)0x0);
  lVar2 = -1;
LAB_140098d1f:
  lVar8 = *(longlong *)(this + 0x18);
  plVar7 = (longlong *)(lVar8 + lVar3 * 8);
  if (*plVar7 == 0) {
    if (_CRT_MT == 0) {
      *(int *)(param_1 + 1) = (int)param_1[1] + 1;
      *plVar7 = (longlong)param_1;
      if (lVar2 == -1) {
        return;
      }
LAB_140098e59:
      *(int *)(param_1 + 1) = (int)param_1[1] + 1;
      *(longlong **)(lVar8 + lVar2 * 8) = param_1;
      return;
    }
    LOCK();
    *(int *)(param_1 + 1) = (int)param_1[1] + 1;
    iVar1 = _CRT_MT;
    UNLOCK();
    lVar8 = *(longlong *)(this + 0x18);
    *(longlong **)(lVar8 + lVar3 * 8) = param_1;
    if (lVar2 != -1) {
      if (iVar1 == 0) goto LAB_140098e59;
      LOCK();
      *(int *)(param_1 + 1) = (int)param_1[1] + 1;
      iVar1 = _CRT_MT;
      UNLOCK();
      *(longlong **)(*(longlong *)(this + 0x18) + lVar2 * 8) = param_1;
    }
  }
  else {
    iVar1 = _CRT_MT;
    if (param_1 != (longlong *)0x0) {
      if (*(code **)(*param_1 + 8) == facet::~facet) {
        operator_delete(param_1);
        iVar1 = _CRT_MT;
      }
      else {
        (**(code **)(*param_1 + 8))();
        iVar1 = _CRT_MT;
      }
    }
  }
  if ((iVar1 != 0) &&
     (uVar4 = __gthr_win32_mutex_unlock
                        ((LPCRITICAL_SECTION)
                         &_data__ZZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex),
     (int)uVar4 != 0)) {
    puVar5 = __cxa_allocate_exception(8);
    *puVar5 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
    __cxa_throw((longlong)puVar5,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
  }
  return;
}



// WARNING: Removing unreachable block (ram,0x0001400990a3)
// std::locale::_Impl::_M_install_facet(std::locale::id const*, std::locale::facet const*)

void __thiscall std::locale::_Impl::_M_install_facet(_Impl *this,longlong *param_1,facet *param_2)

{
  ulonglong uVar1;
  longlong *plVar2;
  void *pvVar3;
  void *pvVar4;
  int iVar5;
  void *pvVar6;
  ulonglong uVar7;
  void *pvVar8;
  longlong lVar9;
  longlong *plVar10;
  messages<wchar_t> *pmVar11;
  ulonglong uVar12;
  undefined **ppuVar13;
  longlong *plVar14;
  int iVar15;
  longlong lVar16;
  longlong *plVar17;
  longlong lVar18;
  ulonglong uVar19;
  size_t local_50;
  
  if (param_2 == (facet *)0x0) {
    return;
  }
  lVar18 = *param_1;
  if (lVar18 == 0) {
    if (_CRT_MT != 0) {
      LOCK();
      iVar15 = locale::id::_S_refcount + 1;
      UNLOCK();
      iVar5 = locale::id::_S_refcount + 1;
      LOCK();
      locale::id::_S_refcount = iVar15;
      if (*param_1 == 0) {
        *param_1 = (longlong)iVar5;
      }
      UNLOCK();
      lVar18 = *param_1;
      goto LAB_140098f5b;
    }
    locale::id::_S_refcount = locale::id::_S_refcount + 1;
    lVar16 = *(longlong *)(this + 0x10);
    lVar18 = (longlong)locale::id::_S_refcount;
    uVar19 = lVar18 - 1;
    *param_1 = lVar18;
    if (lVar16 - 1U < uVar19) goto LAB_140098f70;
  }
  else {
LAB_140098f5b:
    uVar19 = lVar18 - 1;
    if (*(longlong *)(this + 0x10) - 1U < uVar19) {
LAB_140098f70:
      uVar1 = lVar18 + 3;
      pvVar3 = *(void **)(this + 8);
      if (uVar1 >> 0x3c == 0) {
        local_50 = uVar1 * 8;
        pvVar6 = operator_new__(local_50);
        uVar12 = *(ulonglong *)(this + 0x10);
        if (uVar12 != 0) goto LAB_140098fa6;
LAB_140098fc2:
        if (uVar12 < uVar1) goto LAB_140098fc7;
      }
      else {
        pvVar6 = operator_new__(0xffffffffffffffff);
        uVar12 = *(ulonglong *)(this + 0x10);
        local_50 = 0xffffffffffffffff;
        if (uVar12 != 0) {
LAB_140098fa6:
          lVar16 = *(longlong *)(this + 8);
          uVar7 = 0;
          do {
            *(undefined8 *)((longlong)pvVar6 + uVar7 * 8) = *(undefined8 *)(lVar16 + uVar7 * 8);
            uVar7 = uVar7 + 1;
          } while (uVar7 != uVar12);
          goto LAB_140098fc2;
        }
LAB_140098fc7:
        memset((void *)((longlong)pvVar6 + uVar12 * 8),0,(lVar18 - uVar12) * 8 + 0x18);
      }
      pvVar4 = *(void **)(this + 0x18);
      pvVar8 = operator_new__(local_50);
      uVar12 = *(ulonglong *)(this + 0x10);
      if (uVar12 != 0) {
        lVar16 = *(longlong *)(this + 0x18);
        uVar7 = 0;
        do {
          *(undefined8 *)((longlong)pvVar8 + uVar7 * 8) = *(undefined8 *)(lVar16 + uVar7 * 8);
          uVar7 = uVar7 + 1;
        } while (uVar7 != uVar12);
      }
      if (uVar12 < uVar1) {
        memset((void *)((longlong)pvVar8 + uVar12 * 8),0,(lVar18 - uVar12) * 8 + 0x18);
      }
      *(ulonglong *)(this + 0x10) = uVar1;
      *(void **)(this + 8) = pvVar6;
      *(void **)(this + 0x18) = pvVar8;
      if (pvVar3 != (void *)0x0) {
        operator_delete__(pvVar3);
      }
      if (pvVar4 != (void *)0x0) {
        operator_delete__(pvVar4);
      }
    }
    if (_CRT_MT != 0) {
      LOCK();
      *(int *)(param_2 + 8) = *(int *)(param_2 + 8) + 1;
      UNLOCK();
      goto LAB_14009907f;
    }
  }
  *(int *)(param_2 + 8) = *(int *)(param_2 + 8) + 1;
LAB_14009907f:
  plVar2 = (longlong *)(*(longlong *)(this + 8) + uVar19 * 8);
  if (*plVar2 != 0) {
    ppuVar13 = &_S_twinned_facets;
    plVar10 = &numpunct<char>::id;
    do {
      lVar16 = *plVar10;
      if (lVar16 != 0) {
LAB_1400990c5:
        plVar17 = (longlong *)ppuVar13[1];
        lVar9 = *plVar17;
        if (lVar18 != lVar16) goto LAB_1400990d1;
LAB_140099150:
        lVar18 = *(longlong *)(this + 8);
        if (lVar9 == 0) {
          if (_CRT_MT != 0) {
            LOCK();
            iVar15 = locale::id::_S_refcount + 1;
            UNLOCK();
            iVar5 = locale::id::_S_refcount + 1;
            LOCK();
            locale::id::_S_refcount = iVar15;
            if (*plVar17 == 0) {
              *plVar17 = (longlong)iVar5;
            }
            UNLOCK();
            lVar9 = *plVar17;
            goto LAB_14009928f;
          }
          locale::id::_S_refcount = locale::id::_S_refcount + 1;
          plVar10 = (longlong *)(lVar18 + -8 + (longlong)locale::id::_S_refcount * 8);
          *plVar17 = (longlong)locale::id::_S_refcount;
          if (*plVar10 != 0) goto LAB_140099480;
LAB_14009918e:
          plVar10 = (longlong *)*plVar2;
          goto LAB_1400992ae;
        }
LAB_14009928f:
        plVar10 = (longlong *)(lVar18 + -8 + lVar9 * 8);
        if (*plVar10 != 0) {
          plVar17 = (longlong *)ppuVar13[1];
LAB_140099480:
          pmVar11 = facet::_M_sso_shim(param_2,plVar17);
          if (_CRT_MT == 0) {
            *(int *)(pmVar11 + 8) = *(int *)(pmVar11 + 8) + 1;
            plVar14 = (longlong *)*plVar10;
LAB_14009949f:
            iVar15 = (int)plVar14[1];
            *(int *)(plVar14 + 1) = iVar15 + -1;
          }
          else {
            LOCK();
            *(int *)(pmVar11 + 8) = *(int *)(pmVar11 + 8) + 1;
            UNLOCK();
            plVar14 = (longlong *)*plVar10;
            plVar17 = plVar14 + 1;
            if (_CRT_MT == 0) goto LAB_14009949f;
            LOCK();
            iVar15 = (int)*plVar17;
            *(int *)plVar17 = (int)*plVar17 + -1;
            UNLOCK();
          }
          if (iVar15 == 1) {
            if (*(code **)(*plVar14 + 8) != facet::~facet) {
              (**(code **)(*plVar14 + 8))();
              goto LAB_1400994ad;
            }
            goto LAB_140099475;
          }
LAB_1400994ad:
          *plVar10 = (longlong)pmVar11;
          plVar10 = (longlong *)*plVar2;
          goto LAB_1400992a3;
        }
        break;
      }
      if (_CRT_MT == 0) {
        locale::id::_S_refcount = locale::id::_S_refcount + 1;
        lVar16 = (longlong)locale::id::_S_refcount;
        *plVar10 = lVar16;
        goto LAB_1400990c5;
      }
      LOCK();
      iVar15 = locale::id::_S_refcount + 1;
      UNLOCK();
      iVar5 = locale::id::_S_refcount + 1;
      LOCK();
      locale::id::_S_refcount = iVar15;
      if (*plVar10 == 0) {
        *plVar10 = (longlong)iVar5;
      }
      UNLOCK();
      plVar17 = (longlong *)ppuVar13[1];
      lVar9 = *plVar17;
      if (lVar18 == *plVar10) goto LAB_140099150;
LAB_1400990d1:
      iVar15 = locale::id::_S_refcount;
      if (lVar9 == 0) {
        if (_CRT_MT == 0) {
          locale::id::_S_refcount = locale::id::_S_refcount + 1;
          lVar9 = (longlong)locale::id::_S_refcount;
          *plVar17 = lVar9;
          iVar15 = locale::id::_S_refcount;
        }
        else {
          LOCK();
          iVar15 = locale::id::_S_refcount + 1;
          UNLOCK();
          iVar5 = locale::id::_S_refcount + 1;
          LOCK();
          locale::id::_S_refcount = iVar15;
          if (*plVar17 == 0) {
            *plVar17 = (longlong)iVar5;
          }
          UNLOCK();
          lVar9 = *plVar17;
          iVar15 = locale::id::_S_refcount;
        }
      }
      locale::id::_S_refcount = iVar15;
      if (lVar18 == lVar9) {
        plVar17 = (longlong *)*ppuVar13;
        lVar18 = *(longlong *)(this + 8);
        lVar16 = *plVar17;
        if (lVar16 == 0) {
          if (_CRT_MT != 0) {
            LOCK();
            locale::id::_S_refcount = iVar15 + 1;
            UNLOCK();
            LOCK();
            if (*plVar17 == 0) {
              *plVar17 = (longlong)(iVar15 + 1);
            }
            UNLOCK();
            lVar16 = *plVar17;
            goto LAB_14009941d;
          }
          locale::id::_S_refcount = iVar15 + 1;
          plVar10 = (longlong *)(lVar18 + -8 + (longlong)locale::id::_S_refcount * 8);
          *plVar17 = (longlong)locale::id::_S_refcount;
          if (*plVar10 == 0) goto LAB_14009918e;
        }
        else {
LAB_14009941d:
          plVar10 = (longlong *)(lVar18 + -8 + lVar16 * 8);
          if (*plVar10 == 0) break;
          plVar17 = (longlong *)*ppuVar13;
        }
        pmVar11 = (messages<wchar_t> *)facet::_M_cow_shim(param_2,plVar17);
        if (_CRT_MT == 0) {
          *(int *)(pmVar11 + 8) = *(int *)(pmVar11 + 8) + 1;
          plVar14 = (longlong *)*plVar10;
LAB_140099450:
          iVar15 = (int)plVar14[1];
          *(int *)(plVar14 + 1) = iVar15 + -1;
        }
        else {
          LOCK();
          *(int *)(pmVar11 + 8) = *(int *)(pmVar11 + 8) + 1;
          UNLOCK();
          plVar14 = (longlong *)*plVar10;
          plVar17 = plVar14 + 1;
          if (_CRT_MT == 0) goto LAB_140099450;
          LOCK();
          iVar15 = (int)*plVar17;
          *(int *)plVar17 = (int)*plVar17 + -1;
          UNLOCK();
        }
        if (iVar15 == 1) {
          if (*(code **)(*plVar14 + 8) == facet::~facet) {
LAB_140099475:
            operator_delete(plVar14);
          }
          else {
            (**(code **)(*plVar14 + 8))();
          }
        }
        goto LAB_1400994ad;
      }
      plVar10 = (longlong *)ppuVar13[2];
      ppuVar13 = ppuVar13 + 2;
    } while (plVar10 != (longlong *)0x0);
    plVar10 = (longlong *)*plVar2;
LAB_1400992a3:
    if (_CRT_MT == 0) {
LAB_1400992ae:
      iVar15 = (int)plVar10[1];
      *(int *)(plVar10 + 1) = iVar15 + -1;
    }
    else {
      LOCK();
      plVar17 = plVar10 + 1;
      iVar15 = (int)*plVar17;
      *(int *)plVar17 = (int)*plVar17 + -1;
      UNLOCK();
    }
    if (iVar15 == 1) {
      if (*(code **)(*plVar10 + 8) == facet::~facet) {
        operator_delete(plVar10);
      }
      else {
        (**(code **)(*plVar10 + 8))();
      }
    }
  }
  lVar18 = *(longlong *)(this + 0x10);
  *plVar2 = (longlong)param_2;
  if (lVar18 != 0) {
    lVar18 = *(longlong *)(this + 0x18);
    uVar19 = 0;
    do {
      plVar2 = *(longlong **)(lVar18 + uVar19 * 8);
      if (plVar2 != (longlong *)0x0) {
        if (_CRT_MT == 0) {
          iVar15 = (int)plVar2[1];
          *(int *)(plVar2 + 1) = iVar15 + -1;
        }
        else {
          LOCK();
          plVar10 = plVar2 + 1;
          iVar15 = (int)*plVar10;
          *(int *)plVar10 = (int)*plVar10 + -1;
          UNLOCK();
        }
        if (iVar15 == 1) {
          if (*(code **)(*plVar2 + 8) == facet::~facet) {
            operator_delete(plVar2);
          }
          else {
            (**(code **)(*plVar2 + 8))();
          }
        }
        lVar18 = *(longlong *)(this + 0x18);
        *(undefined8 *)(lVar18 + uVar19 * 8) = 0;
      }
      uVar19 = uVar19 + 1;
    } while (uVar19 < *(ulonglong *)(this + 0x10));
  }
  return;
}



// std::locale::_Impl::_M_replace_facet(std::locale::_Impl const*, std::locale::id const*)

void __thiscall std::locale::_Impl::_M_replace_facet(_Impl *this,longlong param_1,longlong *param_2)

{
  facet *pfVar1;
  int iVar2;
  longlong lVar3;
  int iVar4;
  
  lVar3 = *param_2;
  if (lVar3 == 0) {
    if (_CRT_MT == 0) {
      locale::id::_S_refcount = locale::id::_S_refcount + 1;
      lVar3 = (longlong)locale::id::_S_refcount;
      *param_2 = lVar3;
    }
    else {
      LOCK();
      iVar2 = locale::id::_S_refcount + 1;
      UNLOCK();
      iVar4 = locale::id::_S_refcount + 1;
      LOCK();
      locale::id::_S_refcount = iVar2;
      if (*param_2 == 0) {
        *param_2 = (longlong)iVar4;
      }
      UNLOCK();
      lVar3 = *param_2;
    }
  }
  if ((lVar3 - 1U <= *(longlong *)(param_1 + 0x10) - 1U) &&
     (pfVar1 = *(facet **)(*(longlong *)(param_1 + 8) + (lVar3 - 1U) * 8), pfVar1 != (facet *)0x0))
  {
    _M_install_facet(this,param_2,pfVar1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_runtime_error("locale::_Impl::_M_replace_facet");
}



// std::locale::_Impl::_M_replace_category(std::locale::_Impl const*, std::locale::id const* const*)

void __thiscall
std::locale::_Impl::_M_replace_category(_Impl *this,longlong param_1,undefined8 *param_2)

{
  longlong *plVar1;
  facet *pfVar2;
  int iVar3;
  longlong lVar4;
  
  plVar1 = (longlong *)*param_2;
  iVar3 = locale::id::_S_refcount;
  while( true ) {
    if (plVar1 == (longlong *)0x0) {
      locale::id::_S_refcount = iVar3;
      return;
    }
    lVar4 = *plVar1;
    locale::id::_S_refcount = iVar3;
    if (lVar4 == 0) {
      if (_CRT_MT == 0) {
        locale::id::_S_refcount = iVar3 + 1;
        lVar4 = (longlong)locale::id::_S_refcount;
        *plVar1 = lVar4;
      }
      else {
        LOCK();
        locale::id::_S_refcount = iVar3 + 1;
        UNLOCK();
        LOCK();
        if (*plVar1 == 0) {
          *plVar1 = (longlong)(iVar3 + 1);
        }
        UNLOCK();
        lVar4 = *plVar1;
      }
    }
    if ((*(longlong *)(param_1 + 0x10) - 1U < lVar4 - 1U) ||
       (pfVar2 = *(facet **)(*(longlong *)(param_1 + 8) + (lVar4 - 1U) * 8), pfVar2 == (facet *)0x0)
       ) break;
    param_2 = param_2 + 1;
    _M_install_facet(this,plVar1,pfVar2);
    plVar1 = (longlong *)*param_2;
    iVar3 = locale::id::_S_refcount;
  }
                    // WARNING: Subroutine does not return
  __throw_runtime_error("locale::_Impl::_M_replace_facet");
}



// std::locale::_Impl::_Impl(std::locale::_Impl const&, unsigned long long)

void __thiscall std::locale::_Impl::_Impl(_Impl *this,longlong param_1,undefined4 param_2)

{
  undefined8 *puVar1;
  undefined8 *puVar2;
  longlong lVar3;
  char *_Str;
  void *pvVar4;
  undefined1 (*pauVar5) [16];
  size_t sVar6;
  longlong lVar7;
  ulonglong uVar8;
  
  uVar8 = *(ulonglong *)(param_1 + 0x10);
  *(ulonglong *)(this + 0x10) = uVar8;
  *(undefined4 *)this = param_2;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x18) = (undefined1  [16])0x0;
  sVar6 = uVar8 * 8;
  if (0xfffffffffffffff < uVar8) {
    sVar6 = 0xffffffffffffffff;
  }
  pvVar4 = operator_new__(sVar6);
  uVar8 = *(ulonglong *)(this + 0x10);
  *(void **)(this + 8) = pvVar4;
  sVar6 = 0;
  if (uVar8 != 0) {
    lVar7 = 0;
    do {
      lVar3 = *(longlong *)(*(longlong *)(param_1 + 8) + lVar7 * 8);
      *(longlong *)((longlong)pvVar4 + lVar7 * 8) = lVar3;
      if (lVar3 == 0) {
LAB_140099784:
        if (uVar8 <= lVar7 + 1U) goto LAB_1400997c0;
      }
      else {
        if (_CRT_MT == 0) {
          *(int *)(lVar3 + 8) = *(int *)(lVar3 + 8) + 1;
          goto LAB_140099784;
        }
        LOCK();
        *(int *)(lVar3 + 8) = *(int *)(lVar3 + 8) + 1;
        UNLOCK();
        uVar8 = *(ulonglong *)(this + 0x10);
        if (uVar8 <= lVar7 + 1U) goto LAB_1400997c0;
      }
      lVar7 = lVar7 + 1;
      pvVar4 = *(void **)(this + 8);
    } while( true );
  }
LAB_1400997e0:
  pvVar4 = operator_new__(sVar6);
  *(void **)(this + 0x18) = pvVar4;
  if (*(longlong *)(this + 0x10) == 0) {
LAB_140099840:
    pauVar5 = operator_new__(0x30);
    *(undefined1 (**) [16])(this + 0x20) = pauVar5;
    lVar7 = 0;
    *pauVar5 = (undefined1  [16])0x0;
    pauVar5[1] = (undefined1  [16])0x0;
    pauVar5[2] = (undefined1  [16])0x0;
    do {
      _Str = *(char **)(*(longlong *)(param_1 + 0x20) + lVar7);
      if (_Str == (char *)0x0) {
        return;
      }
      sVar6 = strlen(_Str);
      lVar3 = *(longlong *)(this + 0x20);
      pvVar4 = operator_new__(sVar6 + 1);
      *(void **)(lVar3 + lVar7) = pvVar4;
      puVar1 = (undefined8 *)(*(longlong *)(this + 0x20) + lVar7);
      puVar2 = (undefined8 *)(*(longlong *)(param_1 + 0x20) + lVar7);
      lVar7 = lVar7 + 8;
      memcpy((void *)*puVar1,(void *)*puVar2,sVar6 + 1);
    } while (lVar7 != 0x30);
    return;
  }
  lVar7 = 0;
  do {
    lVar3 = *(longlong *)(*(longlong *)(param_1 + 0x18) + lVar7 * 8);
    *(longlong *)((longlong)pvVar4 + lVar7 * 8) = lVar3;
    if (lVar3 == 0) {
LAB_140099804:
      if (*(ulonglong *)(this + 0x10) <= lVar7 + 1U) goto LAB_140099840;
    }
    else {
      if (_CRT_MT == 0) {
        *(int *)(lVar3 + 8) = *(int *)(lVar3 + 8) + 1;
        goto LAB_140099804;
      }
      LOCK();
      *(int *)(lVar3 + 8) = *(int *)(lVar3 + 8) + 1;
      UNLOCK();
      if (*(ulonglong *)(this + 0x10) <= lVar7 + 1U) goto LAB_140099840;
    }
    lVar7 = lVar7 + 1;
    pvVar4 = *(void **)(this + 0x18);
  } while( true );
LAB_1400997c0:
  sVar6 = uVar8 * 8;
  if (0xfffffffffffffff < uVar8) {
    sVar6 = 0xffffffffffffffff;
  }
  goto LAB_1400997e0;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// std::locale::_Impl::_Impl(unsigned long long)

void __thiscall std::locale::_Impl::_Impl(_Impl *this,undefined4 param_1)

{
  undefined2 *puVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  undefined8 *puVar5;
  undefined *local_a8;
  undefined *puStack_a0;
  undefined *local_98;
  undefined *puStack_90;
  undefined *local_88;
  undefined *puStack_80;
  
  _DAT_1400c1668 = 0;
  _DAT_1400c1648 = (undefined1  [16])0x0;
  _DAT_1400c1658 = (undefined1  [16])0x0;
  *(undefined4 *)this = param_1;
  *(undefined8 *)(this + 0x10) = 0x30;
  puVar5 = &_data__ZN12_GLOBAL__N_19facet_vecE;
  for (lVar4 = 0x30; lVar4 != 0; lVar4 = lVar4 + -1) {
    *puVar5 = 0;
    puVar5 = puVar5 + 1;
  }
  *(undefined8 **)(this + 8) = &_data__ZN12_GLOBAL__N_19facet_vecE;
  *(undefined8 **)(this + 0x18) = &_data__ZN12_GLOBAL__N_19cache_vecE;
  puVar5 = &_data__ZN12_GLOBAL__N_19cache_vecE;
  for (lVar4 = 0x30; lVar4 != 0; lVar4 = lVar4 + -1) {
    *puVar5 = 0;
    puVar5 = puVar5 + 1;
  }
  *(undefined **)(this + 0x20) = &_data__ZN12_GLOBAL__N_18name_vecE;
  __data__ZN12_GLOBAL__N_18name_vecE = &_data__ZN12_GLOBAL__N_16name_cE;
  puVar1 = (undefined2 *)facet::_S_get_c_name();
  __data__ZN12_GLOBAL__N_16name_cE = *puVar1;
  ctype<char>::ctype((ctype<char> *)&_data__ZN12_GLOBAL__N_17ctype_cE,(undefined *)0x0,0,1);
  _M_install_facet(this,(longlong *)&ctype<char>::id,(facet *)&_data__ZN12_GLOBAL__N_17ctype_cE);
  codecvt<>::codecvt((codecvt<> *)&_data__ZN12_GLOBAL__N_19codecvt_cE,1);
  _M_install_facet(this,(longlong *)&codecvt<>::id,(facet *)&_data__ZN12_GLOBAL__N_19codecvt_cE);
  _DAT_1400c0a48 = 0;
  _DAT_1400c0a08 = 1;
  __data__ZN12_GLOBAL__N_116numpunct_cache_cE = &PTR____numpunct_cache_1400ddb60;
  _DAT_1400c0a10 = 0;
  _DAT_1400c0a18 = 0;
  DAT_1400c0a20 = 0;
  _DAT_1400c0a28 = 0;
  _DAT_1400c0a30 = 0;
  _DAT_1400c0a38 = 0;
  _DAT_1400c0a40 = 0;
  DAT_1400c0a88 = 0;
  _DAT_1400c0768 = 1;
  __data__ZN12_GLOBAL__N_110numpunct_cE = &PTR__numpunct_1400dcd20;
  _DAT_1400c0770 = &_data__ZN12_GLOBAL__N_116numpunct_cache_cE;
  __cxx11::numpunct<char>::_M_initialize_numpunct(0x1400c0760);
  _M_install_facet(this,&__cxx11::numpunct<char>::id,(facet *)&_data__ZN12_GLOBAL__N_110numpunct_cE)
  ;
  _DAT_1400c1a18 = 1;
  __data__ZN12_GLOBAL__N_19num_get_cE = &PTR__num_get_1400de920;
  _M_install_facet(this,(longlong *)&num_get<>::id,(facet *)&_data__ZN12_GLOBAL__N_19num_get_cE);
  _DAT_1400c1a38 = 1;
  __data__ZN12_GLOBAL__N_19num_put_cE = &PTR__num_put_1400dea20;
  _M_install_facet(this,(longlong *)&num_put<>::id,(facet *)&_data__ZN12_GLOBAL__N_19num_put_cE);
  _DAT_1400c1848 = 1;
  __data__ZN12_GLOBAL__N_19collate_cE = &PTR__collate_1400dcc20;
  _DAT_1400c1850 = facet::_S_get_c_locale();
  _M_install_facet(this,&__cxx11::collate<char>::id,(facet *)&_data__ZN12_GLOBAL__N_19collate_cE);
  _DAT_1400c0ee1 = 0;
  _DAT_1400c0ec8 = 1;
  __data__ZN12_GLOBAL__N_119moneypunct_cache_cfE = &PTR____moneypunct_cache_1400dddd0;
  _DAT_1400c0ed0 = 0;
  _DAT_1400c0ed8 = 0;
  DAT_1400c0ee0 = 0;
  _DAT_1400c0ee8 = 0;
  _DAT_1400c0ef0 = 0;
  _DAT_1400c0ef8 = 0;
  _DAT_1400c0f00 = 0;
  _DAT_1400c0f08 = 0;
  _DAT_1400c0f10 = 0;
  _DAT_1400c0f18 = 0;
  _DAT_1400c0f1c = 0;
  DAT_1400c0f2f = 0;
  _DAT_1400c0928 = 1;
  __data__ZN12_GLOBAL__N_113moneypunct_cfE = &PTR__moneypunct_1400dc300;
  _DAT_1400c0930 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_cfE;
  __cxx11::moneypunct<char,false>::_M_initialize_moneypunct(0x1400c0920);
  _M_install_facet(this,(longlong *)&__cxx11::moneypunct<char,false>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_113moneypunct_cfE);
  _DAT_1400c0f48 = 1;
  DAT_1400c0f60 = 0;
  __data__ZN12_GLOBAL__N_119moneypunct_cache_ctE = &PTR____moneypunct_cache_1400dddf0;
  _DAT_1400c0f61 = 0;
  _DAT_1400c0f50 = 0;
  _DAT_1400c0f58 = 0;
  _DAT_1400c0f68 = 0;
  _DAT_1400c0f70 = 0;
  _DAT_1400c0f78 = 0;
  _DAT_1400c0f80 = 0;
  _DAT_1400c0f88 = 0;
  _DAT_1400c0f90 = 0;
  _DAT_1400c0f98 = 0;
  _DAT_1400c0f9c = 0;
  DAT_1400c0faf = 0;
  _DAT_1400c0948 = 1;
  __data__ZN12_GLOBAL__N_113moneypunct_ctE = &PTR__moneypunct_1400dc370;
  _DAT_1400c0950 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_ctE;
  __cxx11::moneypunct<char,true>::_M_initialize_moneypunct(0x1400c0940);
  _M_install_facet(this,(longlong *)&__cxx11::moneypunct<char,true>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_113moneypunct_ctE);
  _DAT_1400c0808 = 1;
  __data__ZN12_GLOBAL__N_111money_get_cE = &PTR__money_get_1400dce80;
  _M_install_facet(this,(longlong *)&__cxx11::money_get<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_111money_get_cE);
  _DAT_1400c0828 = 1;
  __data__ZN12_GLOBAL__N_111money_put_cE = &PTR__money_put_1400dcee0;
  _M_install_facet(this,(longlong *)&__cxx11::money_put<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_111money_put_cE);
  _DAT_1400c0b88 = 1;
  DAT_1400c0d08 = 0;
  __data__ZN12_GLOBAL__N_117timepunct_cache_cE = &PTR____timepunct_cache_1400ddbd0;
  _DAT_1400c0d00 = 0;
  _DAT_1400c0b90 = (undefined1  [16])0x0;
  _DAT_1400c0ba0 = (undefined1  [16])0x0;
  _DAT_1400c0bb0 = (undefined1  [16])0x0;
  _DAT_1400c0bc0 = (undefined1  [16])0x0;
  _DAT_1400c0bd0 = (undefined1  [16])0x0;
  _DAT_1400c0be0 = (undefined1  [16])0x0;
  _DAT_1400c0bf0 = (undefined1  [16])0x0;
  _DAT_1400c0c00 = (undefined1  [16])0x0;
  _DAT_1400c0c10 = (undefined1  [16])0x0;
  _DAT_1400c0c20 = (undefined1  [16])0x0;
  _DAT_1400c0c30 = (undefined1  [16])0x0;
  _DAT_1400c0c40 = (undefined1  [16])0x0;
  _DAT_1400c0c50 = (undefined1  [16])0x0;
  _DAT_1400c0c60 = (undefined1  [16])0x0;
  _DAT_1400c0c70 = (undefined1  [16])0x0;
  _DAT_1400c0c80 = (undefined1  [16])0x0;
  _DAT_1400c0c90 = (undefined1  [16])0x0;
  _DAT_1400c0ca0 = (undefined1  [16])0x0;
  _DAT_1400c0cb0 = (undefined1  [16])0x0;
  _DAT_1400c0cc0 = (undefined1  [16])0x0;
  _DAT_1400c0cd0 = (undefined1  [16])0x0;
  _DAT_1400c0ce0 = (undefined1  [16])0x0;
  _DAT_1400c0cf0 = (undefined1  [16])0x0;
  __timepunct<char>::__timepunct
            ((__timepunct<char> *)&_data__ZN12_GLOBAL__N_111timepunct_cE,
             &_data__ZN12_GLOBAL__N_117timepunct_cache_cE,1);
  _M_install_facet(this,(longlong *)&__timepunct<char>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_111timepunct_cE);
  _DAT_1400c07a8 = 1;
  __data__ZN12_GLOBAL__N_110time_get_cE = &PTR__time_get_1400dcdc0;
  _M_install_facet(this,&__cxx11::time_get<>::id,(facet *)&_data__ZN12_GLOBAL__N_110time_get_cE);
  _DAT_1400c07c8 = 1;
  __data__ZN12_GLOBAL__N_110time_put_cE = &PTR__time_put_1400decf0;
  _M_install_facet(this,(longlong *)&time_put<>::id,(facet *)&_data__ZN12_GLOBAL__N_110time_put_cE);
  __cxx11::messages<char>::messages((messages<char> *)&_data__ZN12_GLOBAL__N_110messages_cE,1);
  _M_install_facet(this,(longlong *)&__cxx11::messages<char>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_110messages_cE);
  ctype<wchar_t>::ctype((ctype<wchar_t> *)&_data__ZN12_GLOBAL__N_17ctype_wE,1);
  _M_install_facet(this,(longlong *)&ctype<wchar_t>::id,(facet *)&_data__ZN12_GLOBAL__N_17ctype_wE);
  codecvt<>::codecvt((codecvt<> *)&_data__ZN12_GLOBAL__N_19codecvt_wE,1);
  _M_install_facet(this,(longlong *)&codecvt<>::id,(facet *)&_data__ZN12_GLOBAL__N_19codecvt_wE);
  _DAT_1400c0aa8 = 1;
  DAT_1400c0ac0 = 0;
  __data__ZN12_GLOBAL__N_116numpunct_cache_wE = &PTR____numpunct_cache_1400ddb80;
  _DAT_1400c0ab0 = 0;
  _DAT_1400c0ab8 = 0;
  _DAT_1400c0ac8 = 0;
  _DAT_1400c0ad0 = 0;
  _DAT_1400c0ad8 = 0;
  _DAT_1400c0ae0 = 0;
  _DAT_1400c0ae8 = 0;
  DAT_1400c0b68 = 0;
  _DAT_1400c0788 = 1;
  __data__ZN12_GLOBAL__N_110numpunct_wE = &PTR__numpunct_1400dcd70;
  _DAT_1400c0790 = &_data__ZN12_GLOBAL__N_116numpunct_cache_wE;
  __cxx11::numpunct<wchar_t>::_M_initialize_numpunct(0x1400c0780);
  _M_install_facet(this,(longlong *)&__cxx11::numpunct<wchar_t>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_110numpunct_wE);
  _DAT_1400c1a28 = 1;
  __data__ZN12_GLOBAL__N_19num_get_wE = &PTR__num_get_1400de9a0;
  _M_install_facet(this,(longlong *)&num_get<>::id,(facet *)&_data__ZN12_GLOBAL__N_19num_get_wE);
  _DAT_1400c1a48 = 1;
  __data__ZN12_GLOBAL__N_19num_put_wE = &PTR__num_put_1400dea80;
  _M_install_facet(this,(longlong *)&num_put<>::id,(facet *)&_data__ZN12_GLOBAL__N_19num_put_wE);
  _DAT_1400c1868 = 1;
  __data__ZN12_GLOBAL__N_19collate_wE = &PTR__collate_1400dcc60;
  _DAT_1400c1870 = facet::_S_get_c_locale();
  _M_install_facet(this,(longlong *)&__cxx11::collate<wchar_t>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_19collate_wE);
  _DAT_1400c0fc8 = 1;
  DAT_1400c0fe0 = 0;
  __data__ZN12_GLOBAL__N_119moneypunct_cache_wfE = &PTR____moneypunct_cache_1400dde10;
  _DAT_1400c0fd0 = 0;
  _DAT_1400c0fd8 = 0;
  _DAT_1400c0fe2 = 0;
  _DAT_1400c0fe8 = 0;
  _DAT_1400c0ff0 = 0;
  _DAT_1400c0ff8 = 0;
  _DAT_1400c1000 = 0;
  _DAT_1400c1008 = 0;
  _DAT_1400c1010 = 0;
  _DAT_1400c1018 = 0;
  _DAT_1400c101c = 0;
  DAT_1400c103a = 0;
  _DAT_1400c0968 = 1;
  __data__ZN12_GLOBAL__N_113moneypunct_wfE = &PTR__moneypunct_1400dc3e0;
  _DAT_1400c0970 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_wfE;
  __cxx11::moneypunct<>::_M_initialize_moneypunct(0x1400c0960);
  _M_install_facet(this,(longlong *)&__cxx11::moneypunct<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_113moneypunct_wfE);
  _DAT_1400c1048 = 1;
  DAT_1400c1060 = 0;
  __data__ZN12_GLOBAL__N_119moneypunct_cache_wtE = &PTR____moneypunct_cache_1400dde30;
  _DAT_1400c1050 = 0;
  _DAT_1400c1058 = 0;
  __data__ZN12_GLOBAL__N_113moneypunct_wtE = &PTR__moneypunct_1400dc450;
  _DAT_1400c1062 = 0;
  _DAT_1400c1068 = 0;
  _DAT_1400c1070 = 0;
  _DAT_1400c1078 = 0;
  _DAT_1400c1080 = 0;
  _DAT_1400c1088 = 0;
  _DAT_1400c1090 = 0;
  _DAT_1400c1098 = 0;
  _DAT_1400c109c = 0;
  DAT_1400c10ba = 0;
  _DAT_1400c0988 = 1;
  _DAT_1400c0990 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_wtE;
  __cxx11::moneypunct<>::_M_initialize_moneypunct(0x1400c0980);
  _M_install_facet(this,(longlong *)&__cxx11::moneypunct<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_113moneypunct_wtE);
  _DAT_1400c0818 = 1;
  __data__ZN12_GLOBAL__N_111money_get_wE = &PTR__money_get_1400dceb0;
  _M_install_facet(this,(longlong *)&__cxx11::money_get<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_111money_get_wE);
  _DAT_1400c0838 = 1;
  __data__ZN12_GLOBAL__N_111money_put_wE = &PTR__money_put_1400dcf10;
  _M_install_facet(this,(longlong *)&__cxx11::money_put<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_111money_put_wE);
  _DAT_1400c0d28 = 1;
  DAT_1400c0ea8 = 0;
  __data__ZN12_GLOBAL__N_117timepunct_cache_wE = &PTR____timepunct_cache_1400ddbf0;
  _DAT_1400c0ea0 = 0;
  _DAT_1400c0d30 = (undefined1  [16])0x0;
  _DAT_1400c0d40 = (undefined1  [16])0x0;
  _DAT_1400c0d50 = (undefined1  [16])0x0;
  _DAT_1400c0d60 = (undefined1  [16])0x0;
  _DAT_1400c0d70 = (undefined1  [16])0x0;
  _DAT_1400c0d80 = (undefined1  [16])0x0;
  _DAT_1400c0d90 = (undefined1  [16])0x0;
  _DAT_1400c0da0 = (undefined1  [16])0x0;
  _DAT_1400c0db0 = (undefined1  [16])0x0;
  _DAT_1400c0dc0 = (undefined1  [16])0x0;
  _DAT_1400c0dd0 = (undefined1  [16])0x0;
  _DAT_1400c0de0 = (undefined1  [16])0x0;
  _DAT_1400c0df0 = (undefined1  [16])0x0;
  _DAT_1400c0e00 = (undefined1  [16])0x0;
  _DAT_1400c0e10 = (undefined1  [16])0x0;
  _DAT_1400c0e20 = (undefined1  [16])0x0;
  _DAT_1400c0e30 = (undefined1  [16])0x0;
  _DAT_1400c0e40 = (undefined1  [16])0x0;
  _DAT_1400c0e50 = (undefined1  [16])0x0;
  _DAT_1400c0e60 = (undefined1  [16])0x0;
  _DAT_1400c0e70 = (undefined1  [16])0x0;
  _DAT_1400c0e80 = (undefined1  [16])0x0;
  _DAT_1400c0e90 = (undefined1  [16])0x0;
  __timepunct<wchar_t>::__timepunct
            ((__timepunct<wchar_t> *)&_data__ZN12_GLOBAL__N_111timepunct_wE,
             &_data__ZN12_GLOBAL__N_117timepunct_cache_wE,1);
  _M_install_facet(this,(longlong *)&__timepunct<wchar_t>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_111timepunct_wE);
  _DAT_1400c07b8 = 1;
  __data__ZN12_GLOBAL__N_110time_get_wE = &PTR__time_get_1400dce20;
  _M_install_facet(this,(longlong *)&__cxx11::time_get<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_110time_get_wE);
  _DAT_1400c07d8 = 1;
  __data__ZN12_GLOBAL__N_110time_put_wE = &PTR__time_put_1400ded20;
  _M_install_facet(this,(longlong *)&time_put<>::id,(facet *)&_data__ZN12_GLOBAL__N_110time_put_wE);
  __cxx11::messages<wchar_t>::messages((messages<wchar_t> *)&_data__ZN12_GLOBAL__N_110messages_wE,1)
  ;
  _M_install_facet(this,(longlong *)&__cxx11::messages<wchar_t>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_110messages_wE);
  _DAT_1400c07e8 = 1;
  __data__ZN12_GLOBAL__N_111codecvt_c16E = &PTR__codecvt_1400de780;
  _M_install_facet(this,(longlong *)&codecvt<>::id,(facet *)&_data__ZN12_GLOBAL__N_111codecvt_c16E);
  _DAT_1400c07f8 = 1;
  __data__ZN12_GLOBAL__N_111codecvt_c32E = &PTR__codecvt_1400de6c0;
  _M_install_facet(this,(longlong *)&codecvt<>::id,(facet *)&_data__ZN12_GLOBAL__N_111codecvt_c32E);
  _DAT_1400c09a8 = 1;
  __data__ZN12_GLOBAL__N_114codecvt_c16_c8E = &PTR__codecvt_1400de720;
  _M_install_facet(this,(longlong *)&codecvt<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_114codecvt_c16_c8E);
  _DAT_1400c09b8 = 1;
  __data__ZN12_GLOBAL__N_114codecvt_c32_c8E = &PTR__codecvt_1400de660;
  _M_install_facet(this,(longlong *)&codecvt<>::id,
                   (facet *)&_data__ZN12_GLOBAL__N_114codecvt_c32_c8E);
  local_a8 = &_data__ZN12_GLOBAL__N_116numpunct_cache_cE;
  puStack_a0 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_cfE;
  local_98 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_ctE;
  puStack_90 = &_data__ZN12_GLOBAL__N_116numpunct_cache_wE;
  local_88 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_wfE;
  puStack_80 = &_data__ZN12_GLOBAL__N_119moneypunct_cache_wtE;
  _M_init_extra(this,&local_a8);
  lVar4 = *(longlong *)(this + 0x18);
  lVar2 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  *(undefined **)(lVar4 + lVar2 * 8) = &_data__ZN12_GLOBAL__N_116numpunct_cache_cE;
  lVar4 = *(longlong *)(this + 0x18);
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,false>::id);
  *(undefined **)(lVar4 + lVar2 * 8) = &_data__ZN12_GLOBAL__N_119moneypunct_cache_cfE;
  lVar4 = *(longlong *)(this + 0x18);
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,true>::id);
  *(undefined **)(lVar4 + lVar2 * 8) = &_data__ZN12_GLOBAL__N_119moneypunct_cache_ctE;
  lVar4 = *(longlong *)(this + 0x18);
  lVar2 = locale::id::_M_id((id *)&__timepunct<char>::id);
  *(undefined **)(lVar4 + lVar2 * 8) = &_data__ZN12_GLOBAL__N_117timepunct_cache_cE;
  lVar4 = *(longlong *)(this + 0x18);
  lVar2 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  *(undefined **)(lVar4 + lVar2 * 8) = &_data__ZN12_GLOBAL__N_116numpunct_cache_wE;
  lVar4 = *(longlong *)(this + 0x18);
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  *(undefined **)(lVar4 + lVar2 * 8) = &_data__ZN12_GLOBAL__N_119moneypunct_cache_wfE;
  lVar4 = *(longlong *)(this + 0x18);
  lVar3 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  lVar2 = *(longlong *)(this + 0x18);
  *(undefined **)(lVar4 + lVar3 * 8) = &_data__ZN12_GLOBAL__N_119moneypunct_cache_wtE;
  lVar4 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  *(undefined **)(lVar2 + lVar4 * 8) = &_data__ZN12_GLOBAL__N_117timepunct_cache_wE;
  return;
}



// std::locale::_Impl::~_Impl()

void __thiscall std::locale::_Impl::~_Impl(_Impl *this)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  void *pvVar4;
  ulonglong uVar5;
  longlong lVar6;
  
  pvVar4 = *(void **)(this + 8);
  if (pvVar4 != (void *)0x0) {
    if (*(longlong *)(this + 0x10) != 0) {
      uVar5 = 0;
      do {
        plVar2 = *(longlong **)((longlong)pvVar4 + uVar5 * 8);
        if (plVar2 != (longlong *)0x0) {
          if (_CRT_MT == 0) {
            iVar3 = (int)plVar2[1];
            *(int *)(plVar2 + 1) = iVar3 + -1;
          }
          else {
            LOCK();
            plVar1 = plVar2 + 1;
            iVar3 = (int)*plVar1;
            *(int *)plVar1 = (int)*plVar1 + -1;
            UNLOCK();
          }
          if (iVar3 == 1) {
            if (*(code **)(*plVar2 + 8) == facet::~facet) {
              operator_delete(plVar2);
            }
            else {
              (**(code **)(*plVar2 + 8))();
            }
          }
          pvVar4 = *(void **)(this + 8);
        }
        uVar5 = uVar5 + 1;
      } while (uVar5 < *(ulonglong *)(this + 0x10));
      if (pvVar4 == (void *)0x0) goto LAB_14009a7bd;
    }
    operator_delete__(pvVar4);
  }
LAB_14009a7bd:
  pvVar4 = *(void **)(this + 0x18);
  if (pvVar4 != (void *)0x0) {
    if (*(longlong *)(this + 0x10) != 0) {
      uVar5 = 0;
      do {
        plVar2 = *(longlong **)((longlong)pvVar4 + uVar5 * 8);
        if (plVar2 != (longlong *)0x0) {
          if (_CRT_MT == 0) {
            iVar3 = (int)plVar2[1];
            *(int *)(plVar2 + 1) = iVar3 + -1;
          }
          else {
            LOCK();
            plVar1 = plVar2 + 1;
            iVar3 = (int)*plVar1;
            *(int *)plVar1 = (int)*plVar1 + -1;
            UNLOCK();
          }
          if (iVar3 == 1) {
            if (*(code **)(*plVar2 + 8) == facet::~facet) {
              operator_delete(plVar2);
            }
            else {
              (**(code **)(*plVar2 + 8))();
            }
          }
          pvVar4 = *(void **)(this + 0x18);
        }
        uVar5 = uVar5 + 1;
      } while (uVar5 < *(ulonglong *)(this + 0x10));
      if (pvVar4 == (void *)0x0) goto LAB_14009a83d;
    }
    operator_delete__(pvVar4);
  }
LAB_14009a83d:
  pvVar4 = *(void **)(this + 0x20);
  lVar6 = 0;
  if (pvVar4 != (void *)0x0) {
    do {
      if (*(void **)((longlong)pvVar4 + lVar6) != (void *)0x0) {
        operator_delete__(*(void **)((longlong)pvVar4 + lVar6));
        pvVar4 = *(void **)(this + 0x20);
      }
      lVar6 = lVar6 + 8;
    } while (lVar6 != 0x30);
    if (pvVar4 != (void *)0x0) {
      operator_delete__(pvVar4);
      return;
    }
  }
  return;
}



// std::locale::facet::_S_get_c_name()

undefined1 * std::locale::facet::_S_get_c_name(void)

{
  return &_S_c_name;
}



// std::locale::facet::_S_get_c_locale()

longlong std::locale::facet::_S_get_c_locale(void)

{
  if (_CRT_MT != 0) {
    __gthr_win32_once((int *)&_S_once,_S_initialize_once);
    return _S_c_locale;
  }
  if (_S_c_locale != 0) {
    return _S_c_locale;
  }
  _S_create_c_locale(&_S_c_locale,"C");
  return _S_c_locale;
}



// std::locale::facet::_S_clone_c_locale(int*&)

undefined8 std::locale::facet::_S_clone_c_locale(void)

{
  return 0;
}



// std::locale::facet::_S_create_c_locale(int*&, char const*, int*)

void std::locale::facet::_S_create_c_locale(undefined8 *param_1,char *param_2)

{
  *param_1 = 0;
  if ((*param_2 == 'C') && (param_2[1] == '\0')) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_runtime_error("locale::facet::_S_create_c_locale name not valid");
}



// std::locale::facet::_S_initialize_once()

void std::locale::facet::_S_initialize_once(void)

{
  _S_create_c_locale(&_S_c_locale,"C");
  return;
}



// std::locale::facet::_S_destroy_c_locale(int*&)

void std::locale::facet::_S_destroy_c_locale(undefined8 *param_1)

{
  *param_1 = 0;
  return;
}



// std::locale::facet::_S_lc_ctype_c_locale(int*, char const*)

undefined8 std::locale::facet::_S_lc_ctype_c_locale(void)

{
  return 0;
}



// std::locale::facet::~facet()

void __thiscall std::locale::facet::~facet(facet *this)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(this);
  return;
}



// std::locale::facet::~facet()

void __thiscall std::locale::facet::~facet(void)

{
  return;
}



// std::locale::global(std::locale const&)

locale * __thiscall std::locale::global(locale *this,longlong *param_1)

{
  int *piVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  ulonglong *puVar4;
  longlong *plVar5;
  longlong *plVar6;
  int *piVar7;
  LPCRITICAL_SECTION local_50;
  char *local_48;
  longlong local_40;
  char local_38 [24];
  
  plVar6 = param_1;
  _S_initialize();
  local_50 = (LPCRITICAL_SECTION)_text__ZN12_GLOBAL__N_116get_locale_mutexEv();
  if (_CRT_MT == 0) {
    piVar7 = (int *)*param_1;
    piVar1 = _S_classic;
    uVar2 = _S_global;
    if (piVar7 == _S_classic) goto LAB_14009aaa2;
  }
  else {
    uVar2 = __gthr_win32_mutex_lock(local_50);
    if ((int)uVar2 != 0) {
      plVar5 = (longlong *)__gnu_cxx::__throw_concurrence_lock_error();
      if (plVar6 == (longlong *)0xffffffffffffffff) {
        plVar5 = (longlong *)__cxa_call_unexpected(plVar5);
        __gnu_cxx::__scoped_lock::~__scoped_lock((__scoped_lock *)&local_50);
      }
                    // WARNING: Subroutine does not return
      _Unwind_Resume(plVar5);
    }
    piVar7 = (int *)*param_1;
    piVar1 = _S_classic;
    uVar2 = _S_global;
    if (piVar7 == _S_classic) goto LAB_14009aaa2;
    if (_CRT_MT != 0) {
      LOCK();
      *piVar7 = *piVar7 + 1;
      UNLOCK();
      piVar1 = (int *)*param_1;
      goto LAB_14009aaa2;
    }
  }
  *piVar7 = *piVar7 + 1;
  piVar1 = piVar7;
  uVar2 = _S_global;
LAB_14009aaa2:
  _S_global = piVar1;
  name_abi_cxx11_((string *)&local_48,param_1);
  if ((local_40 != 1) || (*local_48 != '*')) {
    setlocale(0,local_48);
  }
  if (local_48 != local_38) {
    operator_delete(local_48);
  }
  if ((_CRT_MT != 0) && (uVar3 = __gthr_win32_mutex_unlock(local_50), (int)uVar3 != 0)) {
    puVar4 = __cxa_allocate_exception(8);
    *puVar4 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
    __cxa_throw((longlong)puVar4,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
  }
  locale(this,uVar2);
  return this;
}



// std::locale::classic()

undefined * std::locale::classic(void)

{
  if (_CRT_MT != 0) {
    __gthr_win32_once((int *)&_S_once,_S_initialize_once);
  }
  if (_S_classic != (undefined *)0x0) {
    return &_data__ZN12_GLOBAL__N_18c_localeE;
  }
  _Impl::_Impl((_Impl *)&_data__ZN12_GLOBAL__N_113c_locale_implE,2);
  _S_classic = &_data__ZN12_GLOBAL__N_113c_locale_implE;
  _S_global = &_data__ZN12_GLOBAL__N_113c_locale_implE;
  locale((locale *)&_data__ZN12_GLOBAL__N_18c_localeE,&_data__ZN12_GLOBAL__N_113c_locale_implE);
  return &_data__ZN12_GLOBAL__N_18c_localeE;
}



// std::locale::locale(std::locale::_Impl*)

void __thiscall std::locale::locale(locale *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::locale::locale(std::locale const&)

void __thiscall std::locale::locale(locale *this,undefined8 *param_1)

{
  int *piVar1;
  bool bVar2;
  
  piVar1 = (int *)*param_1;
  bVar2 = piVar1 != _S_classic;
  *(int **)this = piVar1;
  if (bVar2) {
    if (_CRT_MT != 0) {
      LOCK();
      *piVar1 = *piVar1 + 1;
      UNLOCK();
      return;
    }
    *piVar1 = *piVar1 + 1;
  }
  return;
}



// std::locale::locale()

void __thiscall std::locale::locale(locale *this)

{
  int iVar1;
  LPCRITICAL_SECTION p_Var2;
  undefined8 uVar3;
  ulonglong *puVar4;
  LPCRITICAL_SECTION p_Var5;
  int *piVar6;
  
  *(undefined8 *)this = 0;
  _S_initialize();
  piVar6 = _S_global;
  *(int **)this = _S_global;
  if (piVar6 == _S_classic) {
    return;
  }
  p_Var2 = (LPCRITICAL_SECTION)_text__ZN12_GLOBAL__N_116get_locale_mutexEv();
  if (_CRT_MT != 0) {
    p_Var5 = p_Var2;
    uVar3 = __gthr_win32_mutex_lock(p_Var2);
    if ((int)uVar3 != 0) {
      __gnu_cxx::__throw_concurrence_lock_error();
                    // WARNING: Subroutine does not return
      _Unwind_Resume(p_Var5);
    }
    if (_CRT_MT != 0) {
      LOCK();
      *_S_global = *_S_global + 1;
      UNLOCK();
      piVar6 = _S_global;
      goto LAB_14009acde;
    }
  }
  piVar6 = _S_global;
  *_S_global = *_S_global + 1;
LAB_14009acde:
  iVar1 = _CRT_MT;
  *(int **)this = piVar6;
  if ((iVar1 != 0) && (uVar3 = __gthr_win32_mutex_unlock(p_Var2), (int)uVar3 != 0)) {
    puVar4 = __cxa_allocate_exception(8);
    *puVar4 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
    __cxa_throw((longlong)puVar4,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
  }
  return;
}



// std::locale::~locale()

void __thiscall std::locale::~locale(locale *this)

{
  int iVar1;
  _Impl *this_00;
  
  this_00 = *(_Impl **)this;
  if (this_00 != _S_classic) {
    if (_CRT_MT == 0) {
      iVar1 = *(int *)this_00;
      *(int *)this_00 = iVar1 + -1;
    }
    else {
      LOCK();
      iVar1 = *(int *)this_00;
      *(int *)this_00 = *(int *)this_00 + -1;
      UNLOCK();
    }
    if (iVar1 == 1) {
      _Impl::~_Impl(this_00);
      operator_delete(this_00);
      return;
    }
  }
  return;
}



// std::locale::TEMPNAMEPLACEHOLDERVALUE(std::locale const&)

void __thiscall std::locale::operator=(locale *this,undefined8 *param_1)

{
  int iVar1;
  _Impl *p_Var2;
  _Impl *p_Var3;
  
  p_Var3 = _S_classic;
  p_Var2 = (_Impl *)*param_1;
  if (p_Var2 != _S_classic) {
    if (_CRT_MT == 0) {
      *(int *)p_Var2 = *(int *)p_Var2 + 1;
    }
    else {
      LOCK();
      *(int *)p_Var2 = *(int *)p_Var2 + 1;
      UNLOCK();
      p_Var3 = _S_classic;
    }
  }
  p_Var2 = *(_Impl **)this;
  if (p_Var2 != p_Var3) {
    if (_CRT_MT == 0) {
      iVar1 = *(int *)p_Var2;
      *(int *)p_Var2 = iVar1 + -1;
    }
    else {
      LOCK();
      iVar1 = *(int *)p_Var2;
      *(int *)p_Var2 = *(int *)p_Var2 + -1;
      UNLOCK();
    }
    if (iVar1 == 1) {
      _Impl::~_Impl(p_Var2);
      operator_delete(p_Var2);
      *(undefined8 *)this = *param_1;
      return;
    }
  }
  *(undefined8 *)this = *param_1;
  return;
}



// std::__cxx11::moneypunct<char, false>::_M_initialize_moneypunct(int*, char const*)

void std::__cxx11::moneypunct<char,false>::_M_initialize_moneypunct(longlong param_1)

{
  undefined *puVar1;
  longlong lVar2;
  undefined8 *puVar3;
  
  puVar3 = *(undefined8 **)(param_1 + 0x10);
  if (puVar3 == (undefined8 *)0x0) {
    puVar3 = operator_new(0x70);
    *(undefined4 *)(puVar3 + 1) = 0;
    puVar3[2] = 0;
    *puVar3 = &PTR____moneypunct_cache_1400dddd0;
    puVar3[3] = 0;
    *(undefined1 *)(puVar3 + 4) = 0;
    *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[8] = 0;
    puVar3[9] = 0;
    puVar3[10] = 0;
    *(undefined4 *)(puVar3 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar3;
  }
  *(undefined1 *)((longlong)puVar3 + 0x21) = 0x2e;
  *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x22) = 0x2c;
  lVar2 = *(longlong *)(param_1 + 0x10);
  *(undefined **)(lVar2 + 0x10) = &::_rdata;
  *(undefined **)(lVar2 + 0x28) = &::_rdata;
  *(undefined **)(lVar2 + 0x38) = &::_rdata;
  *(undefined **)(lVar2 + 0x48) = &::_rdata;
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  *(undefined4 *)(lVar2 + 0x58) = 0;
  *(undefined4 *)(lVar2 + 0x5c) = 0x4000302;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar1 = money_base::_S_atoms;
  lVar2 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 100 + lVar2) = puVar1[lVar2];
    lVar2 = lVar2 + 1;
  } while (lVar2 != 0xb);
  return;
}



// std::__cxx11::moneypunct<char, false>::moneypunct(std::__moneypunct_cache<char, false>*, unsigned
// long long)

void __thiscall
std::__cxx11::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, false>::moneypunct(unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,false>::moneypunct(moneypunct<char,false> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, false>::moneypunct(std::__moneypunct_cache<char, false>*, unsigned
// long long)

void __thiscall
std::__cxx11::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,false>::moneypunct
          (moneypunct<char,false> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, false>::moneypunct(unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,false>::moneypunct(moneypunct<char,false> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, false>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<char,false>::~moneypunct(moneypunct<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct<char, false>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<char,false>::~moneypunct(moneypunct<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  return;
}



// std::__cxx11::moneypunct<char, true>::_M_initialize_moneypunct(int*, char const*)

void std::__cxx11::moneypunct<char,true>::_M_initialize_moneypunct(longlong param_1)

{
  undefined *puVar1;
  longlong lVar2;
  undefined8 *puVar3;
  
  puVar3 = *(undefined8 **)(param_1 + 0x10);
  if (puVar3 == (undefined8 *)0x0) {
    puVar3 = operator_new(0x70);
    *(undefined4 *)(puVar3 + 1) = 0;
    puVar3[2] = 0;
    *puVar3 = &PTR____moneypunct_cache_1400dddf0;
    puVar3[3] = 0;
    *(undefined1 *)(puVar3 + 4) = 0;
    *(undefined2 *)((longlong)puVar3 + 0x21) = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[8] = 0;
    puVar3[9] = 0;
    puVar3[10] = 0;
    *(undefined4 *)(puVar3 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar3 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar3 + 0x6f) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar3;
  }
  *(undefined1 *)((longlong)puVar3 + 0x21) = 0x2e;
  *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x22) = 0x2c;
  lVar2 = *(longlong *)(param_1 + 0x10);
  *(undefined **)(lVar2 + 0x10) = &::_rdata;
  *(undefined **)(lVar2 + 0x28) = &::_rdata;
  *(undefined **)(lVar2 + 0x38) = &::_rdata;
  *(undefined **)(lVar2 + 0x48) = &::_rdata;
  *(undefined8 *)(lVar2 + 0x18) = 0;
  *(undefined8 *)(lVar2 + 0x30) = 0;
  *(undefined8 *)(lVar2 + 0x40) = 0;
  *(undefined8 *)(lVar2 + 0x50) = 0;
  *(undefined4 *)(lVar2 + 0x58) = 0;
  *(undefined4 *)(lVar2 + 0x5c) = 0x4000302;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar1 = money_base::_S_atoms;
  lVar2 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 100 + lVar2) = puVar1[lVar2];
    lVar2 = lVar2 + 1;
  } while (lVar2 != 0xb);
  return;
}



// std::__cxx11::moneypunct<char, true>::moneypunct(std::__moneypunct_cache<char, true>*, unsigned
// long long)

void __thiscall
std::__cxx11::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, true>::moneypunct(unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,true>::moneypunct(moneypunct<char,true> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, true>::moneypunct(std::__moneypunct_cache<char, true>*, unsigned
// long long)

void __thiscall
std::__cxx11::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,true>::moneypunct
          (moneypunct<char,true> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, true>::moneypunct(unsigned long long)

void __thiscall
std::__cxx11::moneypunct<char,true>::moneypunct(moneypunct<char,true> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<char, true>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<char,true>::~moneypunct(moneypunct<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct<char, true>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<char,true>::~moneypunct(moneypunct<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::_M_initialize_moneypunct(int*, char const*)

void std::__cxx11::moneypunct<>::_M_initialize_moneypunct(longlong param_1)

{
  longlong lVar1;
  undefined *puVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(param_1 + 0x10);
  if (puVar4 == (undefined8 *)0x0) {
    puVar4 = operator_new(0x80);
    *(undefined4 *)(puVar4 + 1) = 0;
    puVar4[2] = 0;
    *puVar4 = &PTR____moneypunct_cache_1400dde10;
    puVar4[3] = 0;
    *(undefined1 *)(puVar4 + 4) = 0;
    *(undefined4 *)((longlong)puVar4 + 0x22) = 0;
    puVar4[5] = 0;
    puVar4[6] = 0;
    puVar4[7] = 0;
    puVar4[8] = 0;
    puVar4[9] = 0;
    puVar4[10] = 0;
    *(undefined4 *)(puVar4 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar4 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar4 + 0x7a) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  *(undefined4 *)((longlong)puVar4 + 0x22) = 0x2c002e;
  puVar4[5] = &DAT_1400c4ce2;
  puVar4[7] = &DAT_1400c4ce2;
  puVar4[9] = &DAT_1400c4ce2;
  puVar4[2] = &::_rdata;
  puVar4[3] = 0;
  puVar4[6] = 0;
  *(undefined4 *)((longlong)puVar4 + 0x5c) = 0x4000302;
  puVar4[8] = 0;
  puVar4[10] = 0;
  *(undefined4 *)(puVar4 + 0xb) = 0;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar2 = money_base::_S_atoms;
  lVar1 = *(longlong *)(param_1 + 0x10);
  lVar3 = 0;
  do {
    *(short *)(lVar1 + 100 + lVar3 * 2) = (short)(char)puVar2[lVar3];
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0xb);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::moneypunct(std::__moneypunct_cache<wchar_t, false>*,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::moneypunct(unsigned long long)

void __thiscall std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::moneypunct(std::__moneypunct_cache<wchar_t, false>*,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::moneypunct(unsigned long long)

void __thiscall std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, false>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::_M_initialize_moneypunct(int*, char const*)

void std::__cxx11::moneypunct<>::_M_initialize_moneypunct(longlong param_1)

{
  longlong lVar1;
  undefined *puVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(param_1 + 0x10);
  if (puVar4 == (undefined8 *)0x0) {
    puVar4 = operator_new(0x80);
    *(undefined4 *)(puVar4 + 1) = 0;
    puVar4[2] = 0;
    *puVar4 = &PTR____moneypunct_cache_1400dde30;
    puVar4[3] = 0;
    *(undefined1 *)(puVar4 + 4) = 0;
    *(undefined4 *)((longlong)puVar4 + 0x22) = 0;
    puVar4[5] = 0;
    puVar4[6] = 0;
    puVar4[7] = 0;
    puVar4[8] = 0;
    puVar4[9] = 0;
    puVar4[10] = 0;
    *(undefined4 *)(puVar4 + 0xb) = 0;
    *(undefined8 *)((longlong)puVar4 + 0x5c) = 0;
    *(undefined1 *)((longlong)puVar4 + 0x7a) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  *(undefined4 *)((longlong)puVar4 + 0x22) = 0x2c002e;
  puVar4[5] = &DAT_1400c4ce2;
  puVar4[7] = &DAT_1400c4ce2;
  puVar4[9] = &DAT_1400c4ce2;
  puVar4[2] = &::_rdata;
  puVar4[3] = 0;
  puVar4[6] = 0;
  *(undefined4 *)((longlong)puVar4 + 0x5c) = 0x4000302;
  puVar4[8] = 0;
  puVar4[10] = 0;
  *(undefined4 *)(puVar4 + 0xb) = 0;
  *(undefined4 *)(*(longlong *)(param_1 + 0x10) + 0x60) = 0x4000302;
  puVar2 = money_base::_S_atoms;
  lVar1 = *(longlong *)(param_1 + 0x10);
  lVar3 = 0;
  do {
    *(short *)(lVar1 + 100 + lVar3 * 2) = (short)(char)puVar2[lVar3];
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0xb);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::moneypunct(std::__moneypunct_cache<wchar_t, true>*,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::moneypunct(unsigned long long)

void __thiscall std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::moneypunct(std::__moneypunct_cache<wchar_t, true>*,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::moneypunct(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct<>::moneypunct
          (moneypunct<> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::moneypunct(unsigned long long)

void __thiscall std::__cxx11::moneypunct<>::moneypunct(moneypunct<> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  _M_initialize_moneypunct((longlong)this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct<wchar_t, true>::~moneypunct()

void __thiscall std::__cxx11::moneypunct<>::~moneypunct(moneypunct<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  return;
}



// std::__cxx11::string::_M_destroy(unsigned long long)

void std::__cxx11::string::_M_destroy(undefined8 *param_1)

{
  operator_delete((void *)*param_1);
  return;
}



// std::__cxx11::string::_M_dispose()

void __thiscall std::__cxx11::string::_M_dispose(string *this)

{
  if (*(string **)this != this + 0x10) {
    operator_delete(*(string **)this);
    return;
  }
  return;
}



// std::__cxx11::string::_M_replace(unsigned long long, unsigned long long, char const*, unsigned
// long long)

string * __thiscall
std::__cxx11::string::_M_replace
          (string *this,size_t param_1,ulonglong param_2,string *param_3,ulonglong param_4)

{
  string *_Dst;
  longlong lVar1;
  string *psVar2;
  ulonglong uVar3;
  size_t _Size;
  ulonglong uVar4;
  
  lVar1 = *(longlong *)(this + 8);
  if (param_4 <= (param_2 + 0x3fffffffffffffff) - lVar1) {
    psVar2 = *(string **)this;
    uVar3 = (param_4 - param_2) + lVar1;
    if (psVar2 == this + 0x10) {
      uVar4 = 0xf;
    }
    else {
      uVar4 = *(ulonglong *)(this + 0x10);
    }
    if (uVar4 < uVar3) {
      _M_mutate(this,param_1,param_2,param_3,param_4);
    }
    else {
      _Dst = psVar2 + param_1;
      _Size = lVar1 - (param_1 + param_2);
      if ((param_3 < psVar2) || (psVar2 + lVar1 < param_3)) {
        if ((_Size != 0) && (param_2 != param_4)) {
          if (_Size == 1) {
            _Dst[param_4] = _Dst[param_2];
          }
          else {
            memmove(_Dst + param_4,_Dst + param_2,_Size);
          }
        }
        if (param_4 != 0) {
          if (param_4 == 1) {
            *_Dst = *param_3;
          }
          else {
            memcpy(_Dst,param_3,param_4);
          }
        }
      }
      else {
        _M_replace_cold(this,_Dst,param_2,param_3,param_4,_Size);
      }
    }
    *(ulonglong *)(this + 8) = uVar3;
    *(undefined1 *)(*(longlong *)this + uVar3) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_M_replace");
}



// std::__cxx11::string::_S_compare(unsigned long long, unsigned long long)

ulonglong std::__cxx11::string::_S_compare(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = 0x7fffffff;
  uVar2 = param_1 - param_2;
  if (((longlong)uVar2 < 0x80000000) && (uVar1 = 0x80000000, -0x80000001 < (longlong)uVar2)) {
    uVar1 = uVar2 & 0xffffffff;
  }
  return uVar1;
}



// std::__cxx11::string::_M_capacity(unsigned long long)

void __thiscall std::__cxx11::string::_M_capacity(string *this,undefined8 param_1)

{
  *(undefined8 *)(this + 0x10) = param_1;
  return;
}



// std::__cxx11::string::_S_allocate(std::allocator<char>&, unsigned long long)

void std::__cxx11::string::_S_allocate(undefined8 param_1,size_t *param_2)

{
  size_t *psVar1;
  
  if (-1 < (longlong)param_2) {
    operator_new((size_t)param_2);
    return;
  }
  psVar1 = param_2;
  __throw_bad_alloc();
  *param_2 = (size_t)psVar1;
  return;
}



// std::__cxx11::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char>&&)

void __thiscall
std::__cxx11::string::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)

void __thiscall
std::__cxx11::string::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char>&&)

void __thiscall
std::__cxx11::string::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::string::_Alloc_hider::_Alloc_hider(char*, std::allocator<char> const&)

void __thiscall
std::__cxx11::string::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::string::_M_construct(unsigned long long, char)

void __thiscall std::__cxx11::string::_M_construct(string *this,ulonglong param_1,char param_2)

{
  char *_Dst;
  
  if (param_1 < 0x10) {
    if (param_1 == 0) goto LAB_14009bfc7;
    _Dst = *(char **)this;
    if (param_1 == 1) {
      *_Dst = param_2;
      goto LAB_14009bfc7;
    }
  }
  else {
    if (param_1 >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(param_1 + 1);
    *(ulonglong *)(this + 0x10) = param_1;
    *(char **)this = _Dst;
  }
  memset(_Dst,(int)param_2,param_1);
LAB_14009bfc7:
  *(ulonglong *)(this + 8) = param_1;
  *(undefined1 *)(*(longlong *)this + param_1) = 0;
  return;
}



// void std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,
// std::__cxx11::string > >(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, std::forward_iterator_tag)

void std::__cxx11::string::_M_construct<>(longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    param_1[2] = _Size;
    *param_1 = (longlong)_Dst;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = _Size;
  *(undefined1 *)(*param_1 + _Size) = 0;
  return;
}



// void std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char*, std::__cxx11::string
// > >(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, std::forward_iterator_tag)

void std::__cxx11::string::_M_construct<>(longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    param_1[2] = _Size;
    *param_1 = (longlong)_Dst;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = _Size;
  *(undefined1 *)(*param_1 + _Size) = 0;
  return;
}



// void std::__cxx11::string::_M_construct<char const*>(char const*, char const*,
// std::forward_iterator_tag)

void std::__cxx11::string::_M_construct<>(longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    param_1[2] = _Size;
    *param_1 = (longlong)_Dst;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = _Size;
  *(undefined1 *)(*param_1 + _Size) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



// void std::__cxx11::string::_M_construct<char*>(char*, char*, std::forward_iterator_tag)

void std::__cxx11::string::_M_construct<char*>
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    param_1[2] = _Size;
    *param_1 = (longlong)_Dst;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = _Size;
  *(undefined1 *)(*param_1 + _Size) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag_isra_0
               (longlong *param_1,undefined1 *param_2,longlong param_3)

{
  undefined1 *_Dst;
  ulonglong _Size;
  ulonglong local_20;
  
  _Size = param_3 - (longlong)param_2;
  local_20 = _Size;
  if (_Size < 0x10) {
    _Dst = (undefined1 *)*param_1;
    if (_Size == 1) {
      *_Dst = *param_2;
      param_1[1] = 1;
      *(undefined1 *)(*param_1 + 1) = 0;
      return;
    }
    if (_Size == 0) {
      param_1[1] = 0;
      *_Dst = 0;
      return;
    }
  }
  else {
    _Dst = (undefined1 *)std::__cxx11::string::_M_create(param_1,&local_20,0);
    *param_1 = (longlong)_Dst;
    param_1[2] = local_20;
  }
  memcpy(_Dst,param_2,_Size);
  param_1[1] = local_20;
  *(undefined1 *)(*param_1 + local_20) = 0;
  return;
}



// std::__cxx11::string::_M_local_data()

string * __thiscall std::__cxx11::string::_M_local_data(string *this)

{
  return this + 0x10;
}



// std::__cxx11::string::_M_set_length(unsigned long long)

void __thiscall std::__cxx11::string::_M_set_length(string *this,longlong param_1)

{
  *(longlong *)(this + 8) = param_1;
  *(undefined1 *)(*(longlong *)this + param_1) = 0;
  return;
}



// std::__cxx11::string::_S_copy_chars(char*, __gnu_cxx::__normal_iterator<char const*,
// std::__cxx11::string >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >)

void std::__cxx11::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::__cxx11::string::_S_copy_chars(char*, __gnu_cxx::__normal_iterator<char*,
// std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >)

void std::__cxx11::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::__cxx11::string::_S_copy_chars(char*, char const*, char const*)

void std::__cxx11::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::__cxx11::string::_S_copy_chars(char*, char*, char*)

void std::__cxx11::string::_S_copy_chars(undefined1 *param_1,undefined1 *param_2,longlong param_3)

{
  size_t _Size;
  
  _Size = param_3 - (longlong)param_2;
  if (_Size == 1) {
    *param_1 = *param_2;
    return;
  }
  if (_Size == 0) {
    return;
  }
  memcpy(param_1,param_2,_Size);
  return;
}



// std::__cxx11::string::shrink_to_fit()

void __thiscall std::__cxx11::string::shrink_to_fit(string *this)

{
  reserve(this);
  return;
}



// std::__cxx11::string::_M_replace_aux(unsigned long long, unsigned long long, unsigned long long,
// char)

string * __thiscall
std::__cxx11::string::_M_replace_aux
          (string *this,size_t param_2,ulonglong param_3,ulonglong param_4,string param_5)

{
  longlong lVar1;
  ulonglong uVar2;
  string *psVar3;
  size_t _Size;
  ulonglong uVar4;
  
  lVar1 = *(longlong *)(this + 8);
  if (param_4 <= (param_3 + 0x3fffffffffffffff) - lVar1) {
    psVar3 = *(string **)this;
    uVar4 = (param_4 - param_3) + lVar1;
    if (psVar3 == this + 0x10) {
      uVar2 = 0xf;
    }
    else {
      uVar2 = *(ulonglong *)(this + 0x10);
    }
    if (uVar2 < uVar4) {
      _M_mutate(this,param_2,param_3,(undefined1 *)0x0,param_4);
      psVar3 = *(string **)this;
    }
    else {
      _Size = lVar1 - (param_3 + param_2);
      if ((_Size != 0) && (param_3 != param_4)) {
        if (_Size == 1) {
          psVar3[param_4 + param_2] = psVar3[param_3 + param_2];
          psVar3 = *(string **)this;
        }
        else {
          memmove(psVar3 + param_4 + param_2,psVar3 + param_3 + param_2,_Size);
          psVar3 = *(string **)this;
        }
      }
    }
    if (param_4 != 0) {
      if (param_4 == 1) {
        psVar3[param_2] = param_5;
        psVar3 = *(string **)this;
      }
      else {
        memset(psVar3 + param_2,(int)(char)param_5,param_4);
        psVar3 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar4;
    psVar3[uVar4] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_M_replace_aux");
}



// std::__cxx11::string::_M_replace_cold(char*, unsigned long long, char const*, unsigned long long,
// unsigned long long)

void __thiscall
std::__cxx11::string::_M_replace_cold
          (undefined8 param_1_00,undefined1 *param_2,ulonglong param_3,undefined1 *param_4,
          size_t param_5,size_t param_6)

{
  longlong lVar1;
  undefined1 *puVar2;
  size_t _Size;
  
  if (param_5 - 1 < param_3) {
    if (param_5 == 1) {
      *param_2 = *param_4;
    }
    else {
      memmove(param_2,param_4,param_5);
    }
  }
  if ((param_6 != 0) && (param_5 != param_3)) {
    if (param_6 == 1) {
      param_2[param_5] = param_2[param_3];
    }
    else {
      memmove(param_2 + param_5,param_2 + param_3,param_6);
    }
  }
  if (param_3 < param_5) {
    puVar2 = param_2 + param_3;
    if (puVar2 < param_4 + param_5) {
      if (param_4 < puVar2) {
        _Size = (longlong)puVar2 - (longlong)param_4;
        if (_Size == 1) {
          *param_2 = *param_4;
        }
        else {
          memmove(param_2,param_4,_Size);
        }
        puVar2 = param_2 + param_5;
        param_2 = param_2 + _Size;
        lVar1 = param_5 - _Size;
        if (lVar1 != 1) {
          if (lVar1 == 0) {
            return;
          }
          for (; lVar1 != 0; lVar1 = lVar1 + -1) {
            *param_2 = *puVar2;
            puVar2 = puVar2 + 1;
            param_2 = param_2 + 1;
          }
          return;
        }
      }
      else {
        puVar2 = param_4 + (param_5 - param_3);
        if (param_5 != 1) {
          for (; param_5 != 0; param_5 = param_5 - 1) {
            *param_2 = *puVar2;
            puVar2 = puVar2 + 1;
            param_2 = param_2 + 1;
          }
          return;
        }
      }
      *param_2 = *puVar2;
    }
    else {
      if (param_5 != 1) {
        memmove(param_2,param_4,param_5);
        return;
      }
      *param_2 = *param_4;
    }
  }
  return;
}



// std::__cxx11::string::_M_get_allocator()

string * __thiscall std::__cxx11::string::_M_get_allocator(string *this)

{
  return this;
}



// std::__cxx11::string::_M_use_local_data()

string * __thiscall std::__cxx11::string::_M_use_local_data(string *this)

{
  return this + 0x10;
}



// std::__cxx11::string::_M_construct_aux_2(unsigned long long, char)

void __thiscall
std::__cxx11::string::_M_construct_aux_2(string *this,ulonglong param_1,char param_2)

{
  char *_Dst;
  
  if (param_1 < 0x10) {
    if (param_1 == 0) goto LAB_14009ca77;
    _Dst = *(char **)this;
    if (param_1 == 1) {
      *_Dst = param_2;
      goto LAB_14009ca77;
    }
  }
  else {
    if (param_1 >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(param_1 + 1);
    *(ulonglong *)(this + 0x10) = param_1;
    *(char **)this = _Dst;
  }
  memset(_Dst,(int)param_2,param_1);
LAB_14009ca77:
  *(ulonglong *)(this + 8) = param_1;
  *(undefined1 *)(*(longlong *)this + param_1) = 0;
  return;
}



// std::__cxx11::string::at(unsigned long long)

longlong __thiscall
std::__cxx11::string::at(string *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  if (param_1 < *(ulonglong *)(this + 8)) {
    return *(longlong *)this + param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,
             *(ulonglong *)(this + 8),param_3);
}



// std::__cxx11::string::end()

longlong __thiscall std::__cxx11::string::end(string *this)

{
  return *(longlong *)this + *(longlong *)(this + 8);
}



// std::__cxx11::string::back()

longlong __thiscall std::__cxx11::string::back(string *this)

{
  return *(longlong *)this + -1 + *(longlong *)(this + 8);
}



// std::__cxx11::string::rend()

undefined8 * std::__cxx11::string::rend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::__cxx11::string::swap(std::__cxx11::string&)

void __thiscall std::__cxx11::string::swap(string *this,string *param_1)

{
  string *psVar1;
  string *psVar2;
  undefined8 uVar3;
  uint uVar4;
  string *psVar5;
  uint uVar6;
  longlong lVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  undefined8 *puVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  string *psVar14;
  uint uVar15;
  undefined8 uStack_40;
  undefined8 local_38;
  
  puVar11 = &local_38;
  if (this == param_1) {
    return;
  }
  psVar14 = *(string **)this;
  psVar1 = this + 0x10;
  psVar5 = *(string **)param_1;
  if (psVar14 == psVar1) {
    psVar2 = param_1 + 0x10;
    lVar7 = *(longlong *)(this + 8);
    if (psVar2 == psVar5) {
      lVar8 = *(longlong *)(param_1 + 8);
      if (lVar7 == 0) {
        if (lVar8 == 0) {
          lVar7 = 0;
          lVar8 = 0;
          goto LAB_14009cb7d;
        }
        uVar10 = lVar8 + 1;
        uVar15 = (uint)uVar10;
        if (uVar15 < 8) {
          if ((uVar10 & 4) != 0) {
            *(undefined4 *)psVar14 = *(undefined4 *)(param_1 + 0x10);
            *(undefined4 *)(psVar14 + ((uVar10 & 0xffffffff) - 4)) =
                 *(undefined4 *)(psVar5 + ((uVar10 & 0xffffffff) - 4));
            psVar5 = *(string **)param_1;
            lVar8 = *(longlong *)(param_1 + 8);
            goto LAB_14009cdaf;
          }
          if (uVar15 == 0) goto LAB_14009cdaf;
          *psVar14 = param_1[0x10];
          if ((uVar10 & 2) != 0) {
            *(undefined2 *)(psVar14 + ((uVar10 & 0xffffffff) - 2)) =
                 *(undefined2 *)(psVar5 + ((uVar10 & 0xffffffff) - 2));
            psVar5 = *(string **)param_1;
            lVar8 = *(longlong *)(param_1 + 8);
            goto LAB_14009cdaf;
          }
        }
        else {
          *(undefined8 *)psVar14 = *(undefined8 *)(param_1 + 0x10);
          *(undefined8 *)(psVar14 + ((uVar10 & 0xffffffff) - 8)) =
               *(undefined8 *)(param_1 + (uVar10 & 0xffffffff) + 8);
          lVar7 = (longlong)psVar14 - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
          uVar15 = uVar15 + (int)lVar7 & 0xfffffff8;
          if (7 < uVar15) {
            uVar6 = 0;
            do {
              uVar10 = (ulonglong)uVar6;
              uVar6 = uVar6 + 8;
              *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar10) =
                   *(undefined8 *)(psVar2 + (uVar10 - lVar7));
            } while (uVar6 < uVar15);
          }
        }
        psVar5 = *(string **)param_1;
        lVar8 = *(longlong *)(param_1 + 8);
LAB_14009cdaf:
        *(longlong *)(this + 8) = lVar8;
        *(undefined8 *)(param_1 + 8) = 0;
        *psVar5 = (string)0x0;
        return;
      }
      uVar10 = lVar7 + 1;
      uVar15 = (uint)uVar10;
      if (lVar8 == 0) {
        if (uVar15 < 8) {
          if ((uVar10 & 4) != 0) {
            *(undefined4 *)(param_1 + 0x10) = *(undefined4 *)psVar14;
            *(undefined4 *)(param_1 + (uVar10 & 0xffffffff) + 0xc) =
                 *(undefined4 *)(psVar14 + ((uVar10 & 0xffffffff) - 4));
            psVar14 = *(string **)this;
            lVar7 = *(longlong *)(this + 8);
            goto LAB_14009cd5a;
          }
          if (uVar15 == 0) goto LAB_14009cd5a;
          param_1[0x10] = *psVar14;
          if ((uVar10 & 2) != 0) {
            *(undefined2 *)(param_1 + (uVar10 & 0xffffffff) + 0xe) =
                 *(undefined2 *)(psVar14 + ((uVar10 & 0xffffffff) - 2));
            psVar14 = *(string **)this;
            lVar7 = *(longlong *)(this + 8);
            goto LAB_14009cd5a;
          }
        }
        else {
          *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)psVar14;
          *(undefined8 *)(param_1 + (uVar10 & 0xffffffff) + 8) =
               *(undefined8 *)(psVar14 + ((uVar10 & 0xffffffff) - 8));
          lVar7 = (longlong)psVar2 - ((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8);
          uVar15 = uVar15 + (int)lVar7 & 0xfffffff8;
          if (7 < uVar15) {
            uVar6 = 0;
            do {
              uVar10 = (ulonglong)uVar6;
              uVar6 = uVar6 + 8;
              *(undefined8 *)(((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8) + uVar10) =
                   *(undefined8 *)(psVar14 + (uVar10 - lVar7));
            } while (uVar6 < uVar15);
          }
        }
        psVar14 = *(string **)this;
        lVar7 = *(longlong *)(this + 8);
LAB_14009cd5a:
        *(longlong *)(param_1 + 8) = lVar7;
        *(undefined8 *)(this + 8) = 0;
        *psVar14 = (string)0x0;
        return;
      }
      uVar9 = lVar8 + 1;
      uVar6 = (uint)uVar9;
      psVar14 = psVar5;
      if (7 < uVar6) {
        uVar12 = 0;
        do {
          uVar4 = (int)uVar12 + 8;
          uVar13 = (ulonglong)uVar4;
          *(undefined8 *)((longlong)&local_38 + uVar12) = *(undefined8 *)(psVar5 + uVar12);
          uVar12 = uVar13;
        } while (uVar4 < (uVar6 & 0xfffffff8));
        puVar11 = (undefined8 *)((longlong)&local_38 + uVar13);
        psVar14 = psVar5 + uVar13;
      }
      lVar7 = 0;
      if ((uVar9 & 4) != 0) {
        *(undefined4 *)puVar11 = *(undefined4 *)psVar14;
        lVar7 = 4;
      }
      if ((uVar9 & 2) != 0) {
        *(undefined2 *)((longlong)puVar11 + lVar7) = *(undefined2 *)(psVar14 + lVar7);
        lVar7 = lVar7 + 2;
      }
      if ((uVar9 & 1) != 0) {
        *(string *)((longlong)puVar11 + lVar7) = psVar14[lVar7];
      }
      if (uVar15 < 8) {
        if ((uVar10 & 4) == 0) {
          if ((uVar15 != 0) && (*psVar5 = this[0x10], (uVar10 & 2) != 0)) {
            *(undefined2 *)(psVar5 + ((uVar10 & 0xffffffff) - 2)) =
                 *(undefined2 *)(this + (uVar10 & 0xffffffff) + 0xe);
          }
        }
        else {
          *(undefined4 *)psVar5 = *(undefined4 *)(this + 0x10);
          *(undefined4 *)(psVar5 + ((uVar10 & 0xffffffff) - 4)) =
               *(undefined4 *)(this + (uVar10 & 0xffffffff) + 0xc);
        }
      }
      else {
        *(undefined8 *)psVar5 = *(undefined8 *)(this + 0x10);
        *(undefined8 *)(psVar5 + ((uVar10 & 0xffffffff) - 8)) =
             *(undefined8 *)(this + (uVar10 & 0xffffffff) + 8);
        lVar7 = (longlong)psVar5 - ((ulonglong)(psVar5 + 8) & 0xfffffffffffffff8);
        uVar15 = (int)lVar7 + uVar15 & 0xfffffff8;
        if (7 < uVar15) {
          uVar4 = 0;
          do {
            uVar10 = (ulonglong)uVar4;
            uVar4 = uVar4 + 8;
            *(undefined8 *)(((ulonglong)(psVar5 + 8) & 0xfffffffffffffff8) + uVar10) =
                 *(undefined8 *)(psVar1 + (uVar10 - lVar7));
          } while (uVar4 < uVar15);
        }
      }
      if (uVar6 < 8) {
        if ((uVar9 & 4) == 0) {
          if (uVar6 != 0) {
            this[0x10] = local_38._0_1_;
            if ((uVar9 & 2) != 0) {
              *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0xe) =
                   *(undefined2 *)((longlong)&uStack_40 + (uVar9 & 0xffffffff) + 6);
            }
          }
        }
        else {
          *(undefined4 *)(this + 0x10) = (undefined4)local_38;
          *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0xc) =
               *(undefined4 *)((longlong)&uStack_40 + (uVar9 & 0xffffffff) + 4);
        }
      }
      else {
        *(ulonglong *)(this + 0x10) = CONCAT44(local_38._4_4_,(undefined4)local_38);
        *(undefined8 *)(this + (uVar9 & 0xffffffff) + 8) =
             *(undefined8 *)((longlong)&uStack_40 + (uVar9 & 0xffffffff));
        lVar7 = (longlong)psVar1 - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
        uVar15 = uVar6 + (int)lVar7 & 0xfffffff8;
        if (7 < uVar15) {
          uVar6 = 0;
          do {
            uVar10 = (ulonglong)uVar6;
            uVar6 = uVar6 + 8;
            *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar10) =
                 *(undefined8 *)((longlong)&local_38 + (uVar10 - lVar7));
          } while (uVar6 < uVar15);
        }
      }
      lVar8 = *(longlong *)(param_1 + 8);
      lVar7 = *(longlong *)(this + 8);
      goto LAB_14009cb7d;
    }
    uVar10 = lVar7 + 1;
    uVar3 = *(undefined8 *)(param_1 + 0x10);
    uVar15 = (uint)uVar10;
    if (uVar15 < 8) {
      if ((uVar10 & 4) == 0) {
        if (uVar15 != 0) {
          param_1[0x10] = *psVar14;
          if ((uVar10 & 2) == 0) goto LAB_14009ccfd;
          *(undefined2 *)(param_1 + (uVar10 & 0xffffffff) + 0xe) =
               *(undefined2 *)(psVar14 + ((uVar10 & 0xffffffff) - 2));
          lVar7 = *(longlong *)(this + 8);
        }
      }
      else {
        *(undefined4 *)(param_1 + 0x10) = *(undefined4 *)psVar14;
        *(undefined4 *)(param_1 + (uVar10 & 0xffffffff) + 0xc) =
             *(undefined4 *)(psVar14 + ((uVar10 & 0xffffffff) - 4));
        lVar7 = *(longlong *)(this + 8);
      }
    }
    else {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)psVar14;
      *(undefined8 *)(param_1 + (uVar10 & 0xffffffff) + 8) =
           *(undefined8 *)(psVar14 + ((uVar10 & 0xffffffff) - 8));
      lVar7 = (longlong)psVar2 - ((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8);
      uVar15 = uVar15 + (int)lVar7 & 0xfffffff8;
      if (7 < uVar15) {
        uVar6 = 0;
        do {
          uVar10 = (ulonglong)uVar6;
          uVar6 = uVar6 + 8;
          *(undefined8 *)(((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8) + uVar10) =
               *(undefined8 *)(psVar14 + (uVar10 - lVar7));
        } while (uVar6 < uVar15);
      }
LAB_14009ccfd:
      lVar7 = *(longlong *)(this + 8);
    }
    *(string **)this = psVar5;
    *(string **)param_1 = psVar2;
    *(undefined8 *)(this + 0x10) = uVar3;
    lVar8 = *(longlong *)(param_1 + 8);
    goto LAB_14009cb7d;
  }
  uVar3 = *(undefined8 *)(this + 0x10);
  if (psVar5 == param_1 + 0x10) {
    lVar8 = *(longlong *)(param_1 + 8);
    uVar10 = lVar8 + 1;
    uVar15 = (uint)uVar10;
    if (uVar15 < 8) {
      if ((uVar10 & 4) == 0) {
        if (uVar15 != 0) {
          this[0x10] = *psVar5;
          if ((uVar10 & 2) == 0) goto LAB_14009ccaa;
          *(undefined2 *)(this + (uVar10 & 0xffffffff) + 0xe) =
               *(undefined2 *)(psVar5 + ((uVar10 & 0xffffffff) - 2));
          lVar8 = *(longlong *)(param_1 + 8);
        }
      }
      else {
        *(undefined4 *)(this + 0x10) = *(undefined4 *)psVar5;
        *(undefined4 *)(this + (uVar10 & 0xffffffff) + 0xc) =
             *(undefined4 *)(psVar5 + ((uVar10 & 0xffffffff) - 4));
        lVar8 = *(longlong *)(param_1 + 8);
      }
    }
    else {
      *(undefined8 *)(this + 0x10) = *(undefined8 *)psVar5;
      *(undefined8 *)(this + (uVar10 & 0xffffffff) + 8) =
           *(undefined8 *)(psVar5 + ((uVar10 & 0xffffffff) - 8));
      lVar7 = (longlong)psVar1 - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
      uVar15 = uVar15 + (int)lVar7 & 0xfffffff8;
      if (7 < uVar15) {
        uVar6 = 0;
        do {
          uVar10 = (ulonglong)uVar6;
          uVar6 = uVar6 + 8;
          *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar10) =
               *(undefined8 *)(psVar5 + (uVar10 - lVar7));
        } while (uVar6 < uVar15);
      }
LAB_14009ccaa:
      lVar8 = *(longlong *)(param_1 + 8);
    }
    *(string **)param_1 = psVar14;
    *(string **)this = psVar1;
  }
  else {
    *(string **)this = psVar5;
    *(string **)param_1 = psVar14;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
    lVar8 = *(longlong *)(param_1 + 8);
  }
  *(undefined8 *)(param_1 + 0x10) = uVar3;
  lVar7 = *(longlong *)(this + 8);
LAB_14009cb7d:
  *(longlong *)(this + 8) = lVar8;
  *(longlong *)(param_1 + 8) = lVar7;
  return;
}



// std::__cxx11::string::begin()

undefined8 __thiscall std::__cxx11::string::begin(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::clear()

void __thiscall std::__cxx11::string::clear(string *this)

{
  *(undefined8 *)(this + 8) = 0;
  **(undefined1 **)this = 0;
  return;
}



// std::__cxx11::string::erase(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >)

longlong __thiscall std::__cxx11::string::erase(string *this,undefined1 *param_1)

{
  undefined1 *_Src;
  longlong lVar1;
  longlong lVar2;
  size_t _Size;
  longlong lVar3;
  
  lVar1 = *(longlong *)this;
  lVar3 = *(longlong *)(this + 8) + -1;
  lVar2 = (longlong)param_1 - lVar1;
  _Size = lVar3 - lVar2;
  if (_Size != 0) {
    _Src = (undefined1 *)(lVar1 + 1 + lVar2);
    if (_Size == 1) {
      *param_1 = *_Src;
      lVar3 = *(longlong *)(this + 8) + -1;
      lVar1 = *(longlong *)this;
    }
    else {
      memmove(param_1,_Src,_Size);
      lVar3 = *(longlong *)(this + 8) + -1;
      lVar1 = *(longlong *)this;
    }
  }
  *(longlong *)(this + 8) = lVar3;
  *(undefined1 *)(lVar1 + lVar3) = 0;
  return *(longlong *)this + lVar2;
}



// std::__cxx11::string::erase(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >)

longlong __thiscall std::__cxx11::string::erase(string *this,undefined1 *param_1,longlong param_2)

{
  longlong lVar1;
  
  lVar1 = (longlong)param_1 - *(longlong *)this;
  if (param_2 != *(longlong *)this + *(longlong *)(this + 8)) {
    _M_erase(this,lVar1,param_2 - (longlong)param_1);
    return *(longlong *)this + lVar1;
  }
  *(longlong *)(this + 8) = lVar1;
  *param_1 = 0;
  return *(longlong *)this + lVar1;
}



// std::__cxx11::string::erase(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >)

longlong __thiscall std::__cxx11::string::erase(string *this,longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_erase(this,param_1 - lVar1,1);
  return *(longlong *)this + (param_1 - lVar1);
}



// std::__cxx11::string::erase(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >)

longlong __thiscall std::__cxx11::string::erase(string *this,undefined1 *param_1,longlong param_2)

{
  longlong lVar1;
  
  lVar1 = (longlong)param_1 - *(longlong *)this;
  if (param_2 != *(longlong *)this + *(longlong *)(this + 8)) {
    _M_erase(this,lVar1,param_2 - (longlong)param_1);
    return *(longlong *)this + lVar1;
  }
  *(longlong *)(this + 8) = lVar1;
  *param_1 = 0;
  return *(longlong *)this + lVar1;
}



// std::__cxx11::string::erase(unsigned long long, unsigned long long)

string * __thiscall std::__cxx11::string::erase(string *this,ulonglong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f59,param_1,uVar1);
  }
  if (param_2 != 0xffffffffffffffff) {
    if (param_2 == 0) {
      return this;
    }
    if (uVar1 - param_1 <= param_2) {
      param_2 = uVar1 - param_1;
    }
    _M_erase(this,param_1,param_2);
    return this;
  }
  *(ulonglong *)(this + 8) = param_1;
  *(undefined1 *)(*(longlong *)this + param_1) = 0;
  return this;
}



// std::__cxx11::string::front()

undefined8 __thiscall std::__cxx11::string::front(string *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::string::append(char const*)

string * __thiscall std::__cxx11::string::append(string *this,string *param_1)

{
  ulonglong uVar1;
  size_t sVar2;
  size_t _Size;
  ulonglong uVar3;
  string *psVar4;
  
  _Size = strlen((char *)param_1);
  sVar2 = *(size_t *)(this + 8);
  if (_Size <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = sVar2 + _Size;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,param_1,_Size);
      psVar4 = *(string **)this;
    }
    else if (_Size != 0) {
      if (_Size == 1) {
        psVar4[sVar2] = *param_1;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,param_1,_Size);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::append(char const*, unsigned long long)

string * __thiscall std::__cxx11::string::append(string *this,string *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  string *psVar4;
  
  sVar2 = *(size_t *)(this + 8);
  if (param_2 <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = param_2 + sVar2;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,param_1,param_2);
      psVar4 = *(string **)this;
    }
    else if (param_2 != 0) {
      if (param_2 == 1) {
        psVar4[sVar2] = *param_1;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,param_1,param_2);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::append(std::__cxx11::string const&)

string * __thiscall std::__cxx11::string::append(string *this,undefined8 *param_1)

{
  ulonglong uVar1;
  ulonglong _Size;
  string *_Src;
  size_t sVar2;
  ulonglong uVar3;
  string *psVar4;
  
  _Size = param_1[1];
  _Src = (string *)*param_1;
  sVar2 = *(size_t *)(this + 8);
  if (_Size <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = _Size + sVar2;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,_Src,_Size);
      psVar4 = *(string **)this;
    }
    else if (_Size != 0) {
      if (_Size == 1) {
        psVar4[sVar2] = *_Src;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,_Src,_Size);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::append(std::__cxx11::string const&, unsigned long long, unsigned long long)

string * __thiscall
std::__cxx11::string::append(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong _Size;
  string *psVar3;
  ulonglong uVar4;
  string *_Src;
  
  uVar1 = param_1[1];
  _Size = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    _Size = param_3;
  }
  if (param_2 <= uVar1) {
    sVar2 = *(size_t *)(this + 8);
    _Src = (string *)(*param_1 + param_2);
    if (_Size <= 0x3fffffffffffffff - sVar2) {
      psVar3 = *(string **)this;
      uVar1 = _Size + sVar2;
      if (psVar3 == this + 0x10) {
        uVar4 = 0xf;
      }
      else {
        uVar4 = *(ulonglong *)(this + 0x10);
      }
      if (uVar4 < uVar1) {
        _M_mutate(this,sVar2,0,_Src,_Size);
        psVar3 = *(string **)this;
      }
      else if (_Size != 0) {
        if (_Size == 1) {
          psVar3[sVar2] = *_Src;
          psVar3 = *(string **)this;
        }
        else {
          memcpy(psVar3 + sVar2,_Src,_Size);
          psVar3 = *(string **)this;
        }
      }
      *(ulonglong *)(this + 8) = uVar1;
      psVar3[uVar1] = (string)0x0;
      return this;
    }
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f44,param_2,uVar1);
}



// std::__cxx11::string::append(std::initializer_list<char>)

string * __thiscall std::__cxx11::string::append(string *this,undefined8 *param_1)

{
  ulonglong uVar1;
  string *_Src;
  ulonglong _Size;
  size_t sVar2;
  ulonglong uVar3;
  string *psVar4;
  
  _Src = (string *)*param_1;
  _Size = param_1[1];
  sVar2 = *(size_t *)(this + 8);
  if (_Size <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = _Size + sVar2;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,_Src,_Size);
      psVar4 = *(string **)this;
    }
    else if (_Size != 0) {
      if (_Size == 1) {
        psVar4[sVar2] = *_Src;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,_Src,_Size);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::append(unsigned long long, char)

void __thiscall std::__cxx11::string::append(string *this,ulonglong param_2,string param_3)

{
  _M_replace_aux(this,*(size_t *)(this + 8),0,param_2,param_3);
  return;
}



// std::__cxx11::string::assign(std::__cxx11::string&&)

string * __thiscall std::__cxx11::string::assign(string *this,string *param_1)

{
  string *psVar1;
  size_t _Size;
  undefined8 uVar2;
  string *_Src;
  string *_Dst;
  longlong lVar3;
  
  _Size = *(size_t *)(param_1 + 8);
  _Dst = *(string **)this;
  _Src = *(string **)param_1;
  psVar1 = param_1 + 0x10;
  if (_Dst == this + 0x10) {
    if (psVar1 == _Src) goto LAB_14009d760;
    *(string **)this = _Src;
    *(size_t *)(this + 8) = _Size;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  }
  else {
    if (psVar1 == _Src) {
LAB_14009d760:
      if (this != param_1) {
        lVar3 = 0;
        if (_Size != 0) {
          if (_Size == 1) {
            *_Dst = *_Src;
            lVar3 = *(longlong *)(param_1 + 8);
            _Dst = *(string **)this;
          }
          else {
            memcpy(_Dst,_Src,_Size);
            lVar3 = *(longlong *)(param_1 + 8);
            _Dst = *(string **)this;
          }
        }
        *(longlong *)(this + 8) = lVar3;
        _Dst[lVar3] = (string)0x0;
        _Src = *(string **)param_1;
      }
      goto LAB_14009d727;
    }
    *(string **)this = _Src;
    uVar2 = *(undefined8 *)(this + 0x10);
    *(size_t *)(this + 8) = _Size;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
    if (_Dst != (string *)0x0) {
      *(string **)param_1 = _Dst;
      *(undefined8 *)(param_1 + 0x10) = uVar2;
      _Src = _Dst;
      goto LAB_14009d727;
    }
  }
  *(string **)param_1 = psVar1;
  _Src = psVar1;
LAB_14009d727:
  *(undefined8 *)(param_1 + 8) = 0;
  *_Src = (string)0x0;
  return this;
}



// std::__cxx11::string::assign(char const*)

void __thiscall std::__cxx11::string::assign(string *this,string *param_1)

{
  size_t sVar1;
  
  sVar1 = strlen((char *)param_1);
  _M_replace(this,0,*(ulonglong *)(this + 8),param_1,sVar1);
  return;
}



// std::__cxx11::string::assign(char const*, unsigned long long)

void __thiscall std::__cxx11::string::assign(string *this,string *param_1,ulonglong param_2)

{
  _M_replace(this,0,*(ulonglong *)(this + 8),param_1,param_2);
  return;
}



// std::__cxx11::string::assign(std::__cxx11::string const&)

string * __thiscall std::__cxx11::string::assign(string *this,string *param_1)

{
  _M_assign(this,param_1);
  return this;
}



// std::__cxx11::string::assign(std::__cxx11::string const&, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::string::assign(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_1[1];
  uVar2 = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    uVar2 = param_3;
  }
  if (param_2 <= uVar1) {
    _M_replace(this,0,*(ulonglong *)(this + 8),(string *)(*param_1 + param_2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5fce,param_2,uVar1);
}



// std::__cxx11::string::assign(std::initializer_list<char>)

void __thiscall std::__cxx11::string::assign(string *this,undefined8 *param_1)

{
  _M_replace(this,0,*(ulonglong *)(this + 8),(string *)*param_1,param_1[1]);
  return;
}



// std::__cxx11::string::assign(unsigned long long, char)

void __thiscall std::__cxx11::string::assign(string *this,ulonglong param_2,string param_3)

{
  _M_replace_aux(this,0,*(ulonglong *)(this + 8),param_2,param_3);
  return;
}



// std::__cxx11::string::insert(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// std::initializer_list<char>)

longlong __thiscall std::__cxx11::string::insert(string *this,longlong param_1,undefined8 *param_2)

{
  ulonglong uVar1;
  
  uVar1 = param_1 - *(longlong *)this;
  if (uVar1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,uVar1,0,(string *)*param_2,param_2[1]);
    return *(longlong *)this + uVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::insert(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// char)

longlong __thiscall std::__cxx11::string::insert(string *this,longlong param_2,string param_3)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_replace_aux(this,param_2 - lVar1,0,1,param_3);
  return *(longlong *)this + (param_2 - lVar1);
}



// std::__cxx11::string::insert(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// unsigned long long, char)

longlong __thiscall
std::__cxx11::string::insert(string *this,longlong param_2,ulonglong param_3,string param_4)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_replace_aux(this,param_2 - lVar1,0,param_3,param_4);
  return *(longlong *)this + (param_2 - lVar1);
}



// std::__cxx11::string::insert(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// std::initializer_list<char>)

void __thiscall std::__cxx11::string::insert(string *this,longlong param_1,undefined8 *param_2)

{
  ulonglong uVar1;
  
  uVar1 = param_1 - *(longlong *)this;
  if (uVar1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,uVar1,0,(string *)*param_2,param_2[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::insert(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, char)

longlong __thiscall std::__cxx11::string::insert(string *this,longlong param_2,string param_3)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_replace_aux(this,param_2 - lVar1,0,1,param_3);
  return *(longlong *)this + (param_2 - lVar1);
}



// std::__cxx11::string::insert(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, unsigned
// long long, char)

void __thiscall
std::__cxx11::string::insert(string *this,longlong param_2,ulonglong param_3,string param_4)

{
  _M_replace_aux(this,param_2 - *(longlong *)this,0,param_3,param_4);
  return;
}



// std::__cxx11::string::insert(unsigned long long, char const*)

void __thiscall std::__cxx11::string::insert(string *this,ulonglong param_1,string *param_2)

{
  size_t sVar1;
  
  sVar1 = strlen((char *)param_2);
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,param_1,0,param_2,sVar1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::insert(unsigned long long, char const*, unsigned long long)

void __thiscall
std::__cxx11::string::insert(string *this,ulonglong param_1,string *param_2,ulonglong param_3)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,param_1,0,param_2,param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::insert(unsigned long long, std::__cxx11::string const&)

void __thiscall std::__cxx11::string::insert(string *this,ulonglong param_1,undefined8 *param_2)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,param_1,0,(string *)*param_2,param_2[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::insert(unsigned long long, std::__cxx11::string const&, unsigned long long,
// unsigned long long)

void __thiscall
std::__cxx11::string::insert
          (string *this,ulonglong param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_2[1];
  uVar2 = uVar1 - param_3;
  if (param_4 < uVar1 - param_3) {
    uVar2 = param_4;
  }
  if (param_3 <= uVar1) {
    if (param_1 <= *(ulonglong *)(this + 8)) {
      _M_replace(this,param_1,0,(string *)(*param_2 + param_3),uVar2);
      return;
    }
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,
               *(ulonglong *)(this + 8));
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f8a,param_3,uVar1);
}



// std::__cxx11::string::insert(unsigned long long, unsigned long long, char)

void __thiscall
std::__cxx11::string::insert(string *this,ulonglong param_2,ulonglong param_3,string param_4)

{
  if (param_2 <= *(ulonglong *)(this + 8)) {
    _M_replace_aux(this,param_2,0,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f8a,param_2,
             *(ulonglong *)(this + 8));
}



// void std::__cxx11::string::insert<__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >
// >(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*,
// std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >)

void __thiscall
std::__cxx11::string::insert<>(string *this,longlong param_1,string *param_2,longlong param_3)

{
  ulonglong uVar1;
  
  uVar1 = param_1 - *(longlong *)this;
  if (uVar1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,uVar1,0,param_2,param_3 - (longlong)param_2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::string::rbegin()

void std::__cxx11::string::rbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + param_2[1];
  return;
}



// std::__cxx11::string::resize(unsigned long long)

void __thiscall std::__cxx11::string::resize(string *this,ulonglong param_1)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (param_1 <= uVar1) {
    if (param_1 < uVar1) {
      *(ulonglong *)(this + 8) = param_1;
      *(undefined1 *)(*(longlong *)this + param_1) = 0;
    }
    return;
  }
  _M_replace_aux(this,uVar1,0,param_1 - uVar1,(string)0x0);
  return;
}



// std::__cxx11::string::resize(unsigned long long, char)

void __thiscall std::__cxx11::string::resize(string *this,ulonglong param_2,string param_3)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (param_2 <= uVar1) {
    if (param_2 < uVar1) {
      *(ulonglong *)(this + 8) = param_2;
      *(undefined1 *)(*(longlong *)this + param_2) = 0;
    }
    return;
  }
  _M_replace_aux(this,uVar1,0,param_2 - uVar1,param_3);
  return;
}



// std::__cxx11::string::_M_data(char*)

void __thiscall std::__cxx11::string::_M_data(string *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::string::_S_copy(char*, char const*, unsigned long long)

void std::__cxx11::string::_S_copy(undefined1 *param_1,undefined1 *param_2,size_t param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3);
  return;
}



// std::__cxx11::string::_S_move(char*, char const*, unsigned long long)

void std::__cxx11::string::_S_move(undefined1 *param_1,undefined1 *param_2,size_t param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memmove(param_1,param_2,param_3);
  return;
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*,
// std::__cxx11::string >)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, char*, char*)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, std::__cxx11::string const&)

void __thiscall
std::__cxx11::string::replace(string *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,(string *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, char const*)

void __thiscall
std::__cxx11::string::replace(string *this,longlong param_1,longlong param_2,string *param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  sVar2 = strlen((char *)param_3);
  uVar1 = *(ulonglong *)(this + 8);
  uVar3 = param_1 - *(longlong *)this;
  uVar4 = param_2 - param_1;
  if (uVar1 - uVar3 < (ulonglong)(param_2 - param_1)) {
    uVar4 = uVar1 - uVar3;
  }
  if (uVar3 <= uVar1) {
    _M_replace(this,uVar3,uVar4,param_3,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar3,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, char const*, char const*)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, char const*, unsigned long
// long)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, std::initializer_list<char>)

void __thiscall
std::__cxx11::string::replace(string *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,(string *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >, unsigned long long, char)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_2,longlong param_3,ulonglong param_4,string param_5)

{
  _M_replace_aux(this,param_2 - *(longlong *)this,param_3 - param_2,param_4,param_5);
  return;
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, __gnu_cxx::__normal_iterator<char
// const*, std::__cxx11::string >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, char const*)

void __thiscall
std::__cxx11::string::replace(string *this,longlong param_1,longlong param_2,string *param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  sVar2 = strlen((char *)param_3);
  uVar1 = *(ulonglong *)(this + 8);
  uVar3 = param_1 - *(longlong *)this;
  uVar4 = param_2 - param_1;
  if (uVar1 - uVar3 < (ulonglong)(param_2 - param_1)) {
    uVar4 = uVar1 - uVar3;
  }
  if (uVar3 <= uVar1) {
    _M_replace(this,uVar3,uVar4,param_3,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar3,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, char const*, char const*)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, char const*, unsigned long long)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, std::__cxx11::string const&)

void __thiscall
std::__cxx11::string::replace(string *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,(string *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, char*, char*)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*,
// std::__cxx11::string >, __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_1,longlong param_2,string *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this;
  uVar3 = param_2 - param_1;
  if (uVar1 - uVar2 < (ulonglong)(param_2 - param_1)) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::string::replace(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, unsigned long long, char)

void __thiscall
std::__cxx11::string::replace
          (string *this,longlong param_2,longlong param_3,ulonglong param_4,string param_5)

{
  _M_replace_aux(this,param_2 - *(longlong *)this,param_3 - param_2,param_4,param_5);
  return;
}



// std::__cxx11::string::replace(unsigned long long, unsigned long long, char const*)

void __thiscall
std::__cxx11::string::replace(string *this,ulonglong param_1,ulonglong param_2,string *param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  
  sVar2 = strlen((char *)param_3);
  uVar1 = *(ulonglong *)(this + 8);
  uVar3 = uVar1 - param_1;
  if (param_2 < uVar1 - param_1) {
    uVar3 = param_2;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,uVar3,param_3,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,uVar1);
}



// std::__cxx11::string::replace(unsigned long long, unsigned long long, char const*, unsigned long
// long)

void __thiscall
std::__cxx11::string::replace
          (string *this,ulonglong param_1,ulonglong param_2,string *param_3,ulonglong param_4)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,param_2,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,uVar1);
}



// std::__cxx11::string::replace(unsigned long long, unsigned long long, std::__cxx11::string
// const&)

void __thiscall
std::__cxx11::string::replace(string *this,ulonglong param_1,ulonglong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,param_2,(string *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,uVar1);
}



// std::__cxx11::string::replace(unsigned long long, unsigned long long, std::__cxx11::string
// const&, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::string::replace
          (string *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_5_00,
          ulonglong param_5)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_3[1];
  uVar2 = uVar1 - param_5_00;
  if (param_5 < uVar1 - param_5_00) {
    uVar2 = param_5;
  }
  if (uVar1 < param_5_00) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_5_00,uVar1
              );
  }
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,param_2,(string *)(*param_3 + param_5_00),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_1,uVar1);
}



// std::__cxx11::string::replace(unsigned long long, unsigned long long, unsigned long long, char)

void __thiscall
std::__cxx11::string::replace
          (string *this,ulonglong param_2,ulonglong param_3,ulonglong param_4,string param_5)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_2 <= param_3) {
    param_3 = uVar1 - param_2;
  }
  if (param_2 <= uVar1) {
    _M_replace_aux(this,param_2,param_3,param_4,param_5);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c5f9f,param_2,uVar1);
}



// std::__cxx11::string::reserve()

void __thiscall std::__cxx11::string::reserve(string *this)

{
  string *psVar1;
  ulonglong uVar2;
  uint uVar3;
  void *_Dst;
  string *psVar4;
  uint uVar5;
  longlong lVar6;
  ulonglong uVar7;
  size_t _Size;
  
  psVar4 = *(string **)this;
  psVar1 = this + 0x10;
  if (psVar4 == psVar1) {
    return;
  }
  uVar7 = *(ulonglong *)(this + 8);
  if (uVar7 < 0x10) {
    uVar2 = uVar7 + 1;
    uVar3 = (uint)uVar2;
    if (uVar7 == 0) {
      this[0x10] = *psVar4;
      operator_delete(psVar4);
      *(string **)this = psVar1;
      return;
    }
    if (7 < uVar3) {
      *(undefined8 *)(this + 0x10) = *(undefined8 *)psVar4;
      *(undefined8 *)(this + (uVar2 & 0xffffffff) + 8) =
           *(undefined8 *)(psVar4 + ((uVar2 & 0xffffffff) - 8));
      lVar6 = (longlong)psVar1 - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
      uVar3 = uVar3 + (int)lVar6 & 0xfffffff8;
      if (7 < uVar3) {
        uVar5 = 0;
        do {
          uVar7 = (ulonglong)uVar5;
          uVar5 = uVar5 + 8;
          *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar7) =
               *(undefined8 *)(psVar4 + (uVar7 - lVar6));
        } while (uVar5 < uVar3);
      }
      goto LAB_14009e5b7;
    }
    if ((uVar2 & 4) == 0) {
      if ((uVar3 != 0) && (this[0x10] = *psVar4, (uVar2 & 2) != 0)) {
        *(undefined2 *)(this + (uVar2 & 0xffffffff) + 0xe) =
             *(undefined2 *)(psVar4 + ((uVar2 & 0xffffffff) - 2));
      }
      goto LAB_14009e5b7;
    }
  }
  else {
    if (*(ulonglong *)(this + 0x10) <= uVar7) {
      return;
    }
    _Size = uVar7 + 1;
    if (-1 < (longlong)_Size) {
      _Dst = operator_new(_Size);
      psVar4 = *(string **)this;
      memcpy(_Dst,psVar4,_Size);
      if (psVar1 != psVar4) {
        operator_delete(psVar4);
      }
      *(void **)this = _Dst;
      *(ulonglong *)(this + 0x10) = uVar7;
      return;
    }
    uVar3 = __throw_bad_alloc();
  }
  *(undefined4 *)(this + 0x10) = *(undefined4 *)psVar4;
  *(undefined4 *)(this + (ulonglong)uVar3 + 0xc) = *(undefined4 *)(psVar4 + ((ulonglong)uVar3 - 4));
LAB_14009e5b7:
  operator_delete(psVar4);
  *(string **)this = psVar1;
  return;
}



// std::__cxx11::string::reserve(unsigned long long)

void __thiscall std::__cxx11::string::reserve(string *this,ulonglong param_1)

{
  size_t _Size;
  string *_Src;
  string *_Dst;
  ulonglong uVar1;
  ulonglong local_res10 [3];
  
  if (this + 0x10 == *(string **)this) {
    uVar1 = 0xf;
  }
  else {
    uVar1 = *(ulonglong *)(this + 0x10);
  }
  if (param_1 <= uVar1) {
    return;
  }
  local_res10[0] = param_1;
  _Dst = (string *)_M_create(this,local_res10,uVar1);
  _Src = *(string **)this;
  _Size = *(longlong *)(this + 8) + 1;
  if (*(longlong *)(this + 8) == 0) {
    *_Dst = *_Src;
  }
  else if (_Size != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  if (this + 0x10 != _Src) {
    operator_delete(_Src);
  }
  *(string **)this = _Dst;
  *(ulonglong *)(this + 0x10) = local_res10[0];
  return;
}



// std::__cxx11::string::_M_erase(unsigned long long, unsigned long long)

void __thiscall std::__cxx11::string::_M_erase(string *this,longlong param_1,longlong param_2)

{
  longlong lVar1;
  undefined1 *_Dst;
  size_t _Size;
  undefined1 *_Src;
  
  lVar1 = *(longlong *)(this + 8);
  _Size = lVar1 - (param_1 + param_2);
  if ((_Size != 0) && (param_2 != 0)) {
    _Src = (undefined1 *)(param_1 + param_2 + *(longlong *)this);
    _Dst = (undefined1 *)(*(longlong *)this + param_1);
    if (_Size == 1) {
      *_Dst = *_Src;
      lVar1 = *(longlong *)(this + 8);
    }
    else {
      memmove(_Dst,_Src,_Size);
      lVar1 = *(longlong *)(this + 8);
    }
  }
  *(longlong *)(this + 8) = lVar1 - param_2;
  *(undefined1 *)(*(longlong *)this + (lVar1 - param_2)) = 0;
  return;
}



// std::__cxx11::string::pop_back()

void __thiscall std::__cxx11::string::pop_back(string *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar1 + -1;
  *(undefined1 *)(*(longlong *)this + -1 + lVar1) = 0;
  return;
}



// std::__cxx11::string::_M_append(char const*, unsigned long long)

string * __thiscall std::__cxx11::string::_M_append(string *this,string *param_1,size_t param_2)

{
  ulonglong uVar1;
  size_t sVar2;
  string *psVar3;
  ulonglong uVar4;
  
  sVar2 = *(size_t *)(this + 8);
  psVar3 = *(string **)this;
  uVar1 = param_2 + sVar2;
  if (psVar3 == this + 0x10) {
    uVar4 = 0xf;
  }
  else {
    uVar4 = *(ulonglong *)(this + 0x10);
  }
  if (uVar4 < uVar1) {
    _M_mutate(this,sVar2,0,param_1,param_2);
    psVar3 = *(string **)this;
  }
  else if (param_2 != 0) {
    if (param_2 == 1) {
      psVar3[sVar2] = *param_1;
      psVar3 = *(string **)this;
    }
    else {
      memcpy(psVar3 + sVar2,param_1,param_2);
      psVar3 = *(string **)this;
    }
  }
  *(ulonglong *)(this + 8) = uVar1;
  psVar3[uVar1] = (string)0x0;
  return this;
}



// std::__cxx11::string::_M_assign(std::__cxx11::string const&)

void __thiscall std::__cxx11::string::_M_assign(string *this,string *param_1)

{
  ulonglong _Size;
  string *_Dst;
  ulonglong uVar1;
  ulonglong local_30;
  
  if (this == param_1) {
    return;
  }
  _Dst = *(string **)this;
  _Size = *(ulonglong *)(param_1 + 8);
  if (this + 0x10 == _Dst) {
    uVar1 = 0xf;
  }
  else {
    uVar1 = *(ulonglong *)(this + 0x10);
  }
  if (uVar1 < _Size) {
    local_30 = _Size;
    _Dst = (string *)_M_create(this,&local_30,uVar1);
    if (this + 0x10 != *(string **)this) {
      operator_delete(*(string **)this);
    }
    *(string **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_30;
  }
  else if (_Size == 0) goto LAB_14009e8c3;
  if (_Size == 1) {
    *_Dst = **(string **)param_1;
    _Dst = *(string **)this;
  }
  else {
    memcpy(_Dst,*(string **)param_1,_Size);
    _Dst = *(string **)this;
  }
LAB_14009e8c3:
  *(ulonglong *)(this + 8) = _Size;
  _Dst[_Size] = (string)0x0;
  return;
}



// std::__cxx11::string::_M_create(unsigned long long&, unsigned long long)

void __thiscall
std::__cxx11::string::_M_create(undefined8 param_1_00,ulonglong *param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  size_t sVar3;
  
  uVar1 = *param_2;
  if (0x3fffffffffffffff < uVar1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_create");
  }
  sVar3 = uVar1 + 1;
  if ((param_3 < uVar1) && (uVar2 = param_3 * 2, uVar1 < uVar2)) {
    if (uVar2 < 0x4000000000000000) {
      *param_2 = uVar2;
      operator_new(uVar2 + 1);
      return;
    }
    sVar3 = 0x4000000000000000;
    *param_2 = 0x3fffffffffffffff;
  }
  operator_new(sVar3);
  return;
}



// std::__cxx11::string::_M_length(unsigned long long)

void __thiscall std::__cxx11::string::_M_length(string *this,undefined8 param_1)

{
  *(undefined8 *)(this + 8) = param_1;
  return;
}



// std::__cxx11::string::_M_mutate(unsigned long long, unsigned long long, char const*, unsigned
// long long)

void __thiscall
std::__cxx11::string::_M_mutate
          (string *this,size_t param_1,longlong param_2,undefined1 *param_3,size_t param_4)

{
  string *psVar1;
  undefined1 *_Dst;
  ulonglong uVar2;
  size_t _Size;
  ulonglong local_50 [2];
  
  local_50[0] = (param_4 - param_2) + *(longlong *)(this + 8);
  _Size = *(longlong *)(this + 8) - (param_1 + param_2);
  if (this + 0x10 == *(string **)this) {
    uVar2 = 0xf;
  }
  else {
    uVar2 = *(ulonglong *)(this + 0x10);
  }
  _Dst = (undefined1 *)_M_create(this,local_50,uVar2);
  if (param_1 != 0) {
    if (param_1 == 1) {
      *_Dst = **(undefined1 **)this;
    }
    else {
      memcpy(_Dst,*(undefined1 **)this,param_1);
    }
  }
  if ((param_3 != (undefined1 *)0x0) && (param_4 != 0)) {
    if (param_4 == 1) {
      _Dst[param_1] = *param_3;
    }
    else {
      memcpy(_Dst + param_1,param_3,param_4);
    }
  }
  psVar1 = *(string **)this;
  if (_Size != 0) {
    if (_Size == 1) {
      *(string *)(_Dst + param_1 + param_4) = psVar1[param_1 + param_2];
    }
    else {
      memcpy((string *)(_Dst + param_1 + param_4),psVar1 + param_1 + param_2,_Size);
    }
  }
  if (this + 0x10 != psVar1) {
    operator_delete(psVar1);
  }
  *(undefined1 **)this = _Dst;
  *(ulonglong *)(this + 0x10) = local_50[0];
  return;
}



// std::__cxx11::string::_S_assign(char*, unsigned long long, char)

void std::__cxx11::string::_S_assign(char *param_1,size_t param_2,char param_3)

{
  if (param_2 == 1) {
    *param_1 = param_3;
    return;
  }
  if (param_2 == 0) {
    return;
  }
  memset(param_1,(int)param_3,param_2);
  return;
}



// std::__cxx11::string::push_back(char)

void __thiscall std::__cxx11::string::push_back(string *this,string param_2)

{
  size_t sVar1;
  string *psVar2;
  ulonglong uVar3;
  
  sVar1 = *(size_t *)(this + 8);
  psVar2 = *(string **)this;
  if (psVar2 == this + 0x10) {
    uVar3 = 0xf;
  }
  else {
    uVar3 = *(ulonglong *)(this + 0x10);
  }
  if (uVar3 < sVar1 + 1) {
    _M_mutate(this,sVar1,0,(undefined1 *)0x0,1);
    psVar2 = *(string **)this;
  }
  psVar2[sVar1] = param_2;
  *(size_t *)(this + 8) = sVar1 + 1;
  *(undefined1 *)(*(longlong *)this + 1 + sVar1) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string&&)

void __thiscall std::__cxx11::string::string(string *this,longlong *param_1)

{
  longlong *plVar1;
  uint uVar2;
  longlong lVar3;
  uint uVar4;
  ulonglong uVar5;
  
  *(string **)this = this + 0x10;
  plVar1 = param_1 + 2;
  lVar3 = param_1[1];
  if (plVar1 != (longlong *)*param_1) {
    *(longlong **)this = (longlong *)*param_1;
    *(longlong *)(this + 0x10) = param_1[2];
    goto LAB_14009ebda;
  }
  uVar5 = lVar3 + 1;
  uVar4 = (uint)uVar5;
  if (uVar4 < 8) {
    if ((uVar5 & 4) != 0) {
      *(int *)(this + 0x10) = (int)param_1[2];
      *(undefined4 *)(this + (uVar5 & 0xffffffff) + 0xc) =
           *(undefined4 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 0xc);
      lVar3 = param_1[1];
      goto LAB_14009ebda;
    }
    if (uVar4 == 0) goto LAB_14009ebda;
    this[0x10] = *(string *)(param_1 + 2);
    if ((uVar5 & 2) != 0) {
      *(undefined2 *)(this + (uVar5 & 0xffffffff) + 0xe) =
           *(undefined2 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 0xe);
      lVar3 = param_1[1];
      goto LAB_14009ebda;
    }
  }
  else {
    *(longlong *)(this + 0x10) = param_1[2];
    *(undefined8 *)(this + (uVar5 & 0xffffffff) + 8) =
         *(undefined8 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 8);
    lVar3 = (longlong)(this + 0x10) - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
    uVar4 = uVar4 + (int)lVar3 & 0xfffffff8;
    if (7 < uVar4) {
      uVar2 = 0;
      do {
        uVar5 = (ulonglong)uVar2;
        uVar2 = uVar2 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar5) =
             *(undefined8 *)((longlong)plVar1 + (uVar5 - lVar3));
      } while (uVar2 < uVar4);
    }
  }
  lVar3 = param_1[1];
LAB_14009ebda:
  *(longlong *)(this + 8) = lVar3;
  *param_1 = (longlong)plVar1;
  param_1[1] = 0;
  *(undefined1 *)(param_1 + 2) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string&&, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  uint uVar3;
  undefined8 *puVar4;
  longlong lVar5;
  ulonglong uVar6;
  uint uVar7;
  
  *(string **)this = this + 0x10;
  puVar4 = (undefined8 *)*param_1;
  puVar1 = param_1 + 2;
  lVar5 = param_1[1];
  if (puVar1 != puVar4) {
    uVar2 = param_1[2];
    *(undefined8 **)this = puVar4;
    *param_1 = puVar1;
    param_1[1] = 0;
    *(undefined1 *)(param_1 + 2) = 0;
    *(longlong *)(this + 8) = lVar5;
    *(undefined8 *)(this + 0x10) = uVar2;
    return;
  }
  uVar6 = lVar5 + 1;
  uVar7 = (uint)uVar6;
  if (uVar7 < 8) {
    if ((uVar6 & 4) != 0) {
      *(undefined4 *)(this + 0x10) = *(undefined4 *)(param_1 + 2);
      *(undefined4 *)(this + (uVar6 & 0xffffffff) + 0xc) =
           *(undefined4 *)((longlong)puVar4 + ((uVar6 & 0xffffffff) - 4));
      puVar4 = (undefined8 *)*param_1;
      lVar5 = param_1[1];
      goto LAB_14009ed23;
    }
    if (uVar7 == 0) goto LAB_14009ed23;
    this[0x10] = *(string *)(param_1 + 2);
    if ((uVar6 & 2) != 0) {
      *(undefined2 *)(this + (uVar6 & 0xffffffff) + 0xe) =
           *(undefined2 *)((longlong)puVar4 + ((uVar6 & 0xffffffff) - 2));
      puVar4 = (undefined8 *)*param_1;
      lVar5 = param_1[1];
      goto LAB_14009ed23;
    }
  }
  else {
    *(undefined8 *)(this + 0x10) = param_1[2];
    *(undefined8 *)(this + (uVar6 & 0xffffffff) + 8) =
         *(undefined8 *)((longlong)param_1 + (uVar6 & 0xffffffff) + 8);
    lVar5 = (longlong)(this + 0x10) - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
    uVar7 = uVar7 + (int)lVar5 & 0xfffffff8;
    if (7 < uVar7) {
      uVar3 = 0;
      do {
        uVar6 = (ulonglong)uVar3;
        uVar3 = uVar3 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar6) =
             *(undefined8 *)((longlong)puVar1 + (uVar6 - lVar5));
      } while (uVar3 < uVar7);
    }
  }
  puVar4 = (undefined8 *)*param_1;
  lVar5 = param_1[1];
LAB_14009ed23:
  param_1[1] = 0;
  *(longlong *)(this + 8) = lVar5;
  *(undefined1 *)puVar4 = 0;
  return;
}



// std::__cxx11::string::string(char const*, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,char *param_1)

{
  size_t sVar1;
  
  *(string **)this = this + 0x10;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    _M_construct<>((longlong *)this,param_1,(longlong)(param_1 + sVar1));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::string::string(char const*, unsigned long long, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined1 *param_1,longlong param_2)

{
  *(string **)this = this + 0x10;
  if ((param_1 == (undefined1 *)0x0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string: construction from null is not valid");
  }
  _M_construct<>((longlong *)this,param_1,(longlong)(param_1 + param_2));
  return;
}



// std::__cxx11::string::string(std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(string **)this = this + 0x10;
  this[0x10] = (string)0x0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  string sVar1;
  ulonglong _Size;
  string *_Src;
  string *_Dst;
  
  _Size = param_1[1];
  _Dst = this + 0x10;
  *(string **)this = _Dst;
  _Src = (string *)*param_1;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *_Src;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,_Src,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string const&, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  string sVar1;
  ulonglong _Size;
  string *_Src;
  string *_Dst;
  
  _Size = param_1[1];
  _Dst = this + 0x10;
  *(string **)this = _Dst;
  _Src = (string *)*param_1;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *_Src;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,_Src,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string const&, unsigned long long,
// std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,longlong *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  *(string **)this = this + 0x10;
  uVar1 = param_1[1];
  if (param_2 <= uVar1) {
    _M_construct<>((longlong *)this,(undefined1 *)(*param_1 + param_2),*param_1 + uVar1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c600c,param_2,uVar1);
}



// std::__cxx11::string::string(std::__cxx11::string const&, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  *(string **)this = this + 0x10;
  uVar1 = param_1[1];
  if (param_2 <= uVar1) {
    uVar2 = uVar1 - param_2;
    if (param_3 < uVar1 - param_2) {
      uVar2 = param_3;
    }
    _M_construct<>((longlong *)this,(undefined1 *)(*param_1 + param_2),
                   (longlong)((undefined1 *)(*param_1 + param_2) + uVar2));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c600c,param_2,uVar1);
}



// std::__cxx11::string::string(std::__cxx11::string const&, unsigned long long, unsigned long long,
// std::allocator<char> const&)

void __thiscall
std::__cxx11::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  *(string **)this = this + 0x10;
  uVar1 = param_1[1];
  if (param_2 <= uVar1) {
    uVar2 = uVar1 - param_2;
    if (param_3 < uVar1 - param_2) {
      uVar2 = param_3;
    }
    _M_construct<>((longlong *)this,(undefined1 *)(*param_1 + param_2),
                   (longlong)((undefined1 *)(*param_1 + param_2) + uVar2));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6027,param_2,uVar1);
}



// std::__cxx11::string::string(std::initializer_list<char>, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  undefined1 *puVar1;
  
  puVar1 = (undefined1 *)*param_1;
  *(string **)this = this + 0x10;
  _M_construct<>((longlong *)this,puVar1,(longlong)(puVar1 + param_1[1]));
  return;
}



// std::__cxx11::string::string()

void __thiscall std::__cxx11::string::string(string *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(string **)this = this + 0x10;
  this[0x10] = (string)0x0;
  return;
}



// std::__cxx11::string::string(unsigned long long, char, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,ulonglong param_2,string param_3)

{
  string *_Dst;
  
  _Dst = this + 0x10;
  *(string **)this = _Dst;
  if (param_2 < 0x10) {
    if (param_2 != 0) {
      if (param_2 != 1) goto LAB_14009f15c;
      this[0x10] = param_3;
    }
    *(ulonglong *)(this + 8) = param_2;
    _Dst[param_2] = (string)0x0;
    return;
  }
  if (param_2 >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_create");
  }
  _Dst = operator_new(param_2 + 1);
  *(ulonglong *)(this + 0x10) = param_2;
  *(string **)this = _Dst;
LAB_14009f15c:
  memset(_Dst,(int)(char)param_3,param_2);
  *(ulonglong *)(this + 8) = param_2;
  *(undefined1 *)(*(longlong *)this + param_2) = 0;
  return;
}



// std::__cxx11::string::string<__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// void>(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string<>(string *this,string *param_1,longlong param_2)

{
  string sVar1;
  string *_Dst;
  ulonglong _Size;
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(string **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *param_1;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,param_1,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string<char const*, void>(char const*, char const*, std::allocator<char>
// const&)

void __thiscall std::__cxx11::string::string<>(string *this,undefined1 *param_1,longlong param_2)

{
  *(undefined8 *)(this + 8) = 0;
  *(string **)this = this + 0x10;
  _M_construct<>((longlong *)this,param_1,param_2);
  return;
}



// std::__cxx11::string::string<char*, void>(char*, char*, std::allocator<char> const&)

void __thiscall
std::__cxx11::string::string<char*,void>(string *this,string *param_1,longlong param_2)

{
  string sVar1;
  string *_Dst;
  ulonglong _Size;
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(string **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *param_1;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,param_1,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string&&)

void __thiscall std::__cxx11::string::string(string *this,longlong *param_1)

{
  longlong *plVar1;
  uint uVar2;
  longlong lVar3;
  uint uVar4;
  ulonglong uVar5;
  
  *(string **)this = this + 0x10;
  plVar1 = param_1 + 2;
  lVar3 = param_1[1];
  if (plVar1 != (longlong *)*param_1) {
    *(longlong **)this = (longlong *)*param_1;
    *(longlong *)(this + 0x10) = param_1[2];
    goto LAB_14009f33a;
  }
  uVar5 = lVar3 + 1;
  uVar4 = (uint)uVar5;
  if (uVar4 < 8) {
    if ((uVar5 & 4) != 0) {
      *(int *)(this + 0x10) = (int)param_1[2];
      *(undefined4 *)(this + (uVar5 & 0xffffffff) + 0xc) =
           *(undefined4 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 0xc);
      lVar3 = param_1[1];
      goto LAB_14009f33a;
    }
    if (uVar4 == 0) goto LAB_14009f33a;
    this[0x10] = *(string *)(param_1 + 2);
    if ((uVar5 & 2) != 0) {
      *(undefined2 *)(this + (uVar5 & 0xffffffff) + 0xe) =
           *(undefined2 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 0xe);
      lVar3 = param_1[1];
      goto LAB_14009f33a;
    }
  }
  else {
    *(longlong *)(this + 0x10) = param_1[2];
    *(undefined8 *)(this + (uVar5 & 0xffffffff) + 8) =
         *(undefined8 *)((longlong)param_1 + (uVar5 & 0xffffffff) + 8);
    lVar3 = (longlong)(this + 0x10) - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
    uVar4 = uVar4 + (int)lVar3 & 0xfffffff8;
    if (7 < uVar4) {
      uVar2 = 0;
      do {
        uVar5 = (ulonglong)uVar2;
        uVar2 = uVar2 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar5) =
             *(undefined8 *)((longlong)plVar1 + (uVar5 - lVar3));
      } while (uVar2 < uVar4);
    }
  }
  lVar3 = param_1[1];
LAB_14009f33a:
  *(longlong *)(this + 8) = lVar3;
  *param_1 = (longlong)plVar1;
  param_1[1] = 0;
  *(undefined1 *)(param_1 + 2) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string&&, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  undefined8 *puVar1;
  undefined8 uVar2;
  uint uVar3;
  undefined8 *puVar4;
  longlong lVar5;
  ulonglong uVar6;
  uint uVar7;
  
  *(string **)this = this + 0x10;
  puVar4 = (undefined8 *)*param_1;
  puVar1 = param_1 + 2;
  lVar5 = param_1[1];
  if (puVar1 != puVar4) {
    uVar2 = param_1[2];
    *(undefined8 **)this = puVar4;
    *param_1 = puVar1;
    param_1[1] = 0;
    *(undefined1 *)(param_1 + 2) = 0;
    *(longlong *)(this + 8) = lVar5;
    *(undefined8 *)(this + 0x10) = uVar2;
    return;
  }
  uVar6 = lVar5 + 1;
  uVar7 = (uint)uVar6;
  if (uVar7 < 8) {
    if ((uVar6 & 4) != 0) {
      *(undefined4 *)(this + 0x10) = *(undefined4 *)(param_1 + 2);
      *(undefined4 *)(this + (uVar6 & 0xffffffff) + 0xc) =
           *(undefined4 *)((longlong)puVar4 + ((uVar6 & 0xffffffff) - 4));
      puVar4 = (undefined8 *)*param_1;
      lVar5 = param_1[1];
      goto LAB_14009f483;
    }
    if (uVar7 == 0) goto LAB_14009f483;
    this[0x10] = *(string *)(param_1 + 2);
    if ((uVar6 & 2) != 0) {
      *(undefined2 *)(this + (uVar6 & 0xffffffff) + 0xe) =
           *(undefined2 *)((longlong)puVar4 + ((uVar6 & 0xffffffff) - 2));
      puVar4 = (undefined8 *)*param_1;
      lVar5 = param_1[1];
      goto LAB_14009f483;
    }
  }
  else {
    *(undefined8 *)(this + 0x10) = param_1[2];
    *(undefined8 *)(this + (uVar6 & 0xffffffff) + 8) =
         *(undefined8 *)((longlong)param_1 + (uVar6 & 0xffffffff) + 8);
    lVar5 = (longlong)(this + 0x10) - ((ulonglong)(this + 0x18) & 0xfffffffffffffff8);
    uVar7 = uVar7 + (int)lVar5 & 0xfffffff8;
    if (7 < uVar7) {
      uVar3 = 0;
      do {
        uVar6 = (ulonglong)uVar3;
        uVar3 = uVar3 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x18) & 0xfffffffffffffff8) + uVar6) =
             *(undefined8 *)((longlong)puVar1 + (uVar6 - lVar5));
      } while (uVar3 < uVar7);
    }
  }
  puVar4 = (undefined8 *)*param_1;
  lVar5 = param_1[1];
LAB_14009f483:
  param_1[1] = 0;
  *(longlong *)(this + 8) = lVar5;
  *(undefined1 *)puVar4 = 0;
  return;
}



// std::__cxx11::string::string(char const*, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,char *param_1)

{
  size_t sVar1;
  
  *(string **)this = this + 0x10;
  if (param_1 != (char *)0x0) {
    sVar1 = strlen(param_1);
    _M_construct<>((longlong *)this,param_1,(longlong)(param_1 + sVar1));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3__part_0(void)

{
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::string::string(char const*, unsigned long long, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined1 *param_1,longlong param_2)

{
  *(string **)this = this + 0x10;
  if ((param_1 == (undefined1 *)0x0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string: construction from null is not valid");
  }
  _M_construct<>((longlong *)this,param_1,(longlong)(param_1 + param_2));
  return;
}



void _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0(void)

{
                    // WARNING: Subroutine does not return
  std::__throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::string::string(std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(string **)this = this + 0x10;
  this[0x10] = (string)0x0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  string sVar1;
  ulonglong _Size;
  string *_Src;
  string *_Dst;
  
  _Size = param_1[1];
  _Dst = this + 0x10;
  *(string **)this = _Dst;
  _Src = (string *)*param_1;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *_Src;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,_Src,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string const&, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  string sVar1;
  ulonglong _Size;
  string *_Src;
  string *_Dst;
  
  _Size = param_1[1];
  _Dst = this + 0x10;
  *(string **)this = _Dst;
  _Src = (string *)*param_1;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *_Src;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,_Src,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string(std::__cxx11::string const&, unsigned long long,
// std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,longlong *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  *(string **)this = this + 0x10;
  uVar1 = param_1[1];
  if (param_2 <= uVar1) {
    _M_construct<>((longlong *)this,(undefined1 *)(*param_1 + param_2),*param_1 + uVar1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c600c,param_2,uVar1);
}



// std::__cxx11::string::string(std::__cxx11::string const&, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  *(string **)this = this + 0x10;
  uVar1 = param_1[1];
  if (param_2 <= uVar1) {
    uVar2 = uVar1 - param_2;
    if (param_3 < uVar1 - param_2) {
      uVar2 = param_3;
    }
    _M_construct<>((longlong *)this,(undefined1 *)(*param_1 + param_2),
                   (longlong)((undefined1 *)(*param_1 + param_2) + uVar2));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c600c,param_2,uVar1);
}



// std::__cxx11::string::string(std::__cxx11::string const&, unsigned long long, unsigned long long,
// std::allocator<char> const&)

void __thiscall
std::__cxx11::string::string(string *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  *(string **)this = this + 0x10;
  uVar1 = param_1[1];
  if (param_2 <= uVar1) {
    uVar2 = uVar1 - param_2;
    if (param_3 < uVar1 - param_2) {
      uVar2 = param_3;
    }
    _M_construct<>((longlong *)this,(undefined1 *)(*param_1 + param_2),
                   (longlong)((undefined1 *)(*param_1 + param_2) + uVar2));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6027,param_2,uVar1);
}



// std::__cxx11::string::string(std::initializer_list<char>, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,undefined8 *param_1)

{
  undefined1 *puVar1;
  
  puVar1 = (undefined1 *)*param_1;
  *(string **)this = this + 0x10;
  _M_construct<>((longlong *)this,puVar1,(longlong)(puVar1 + param_1[1]));
  return;
}



// std::__cxx11::string::string()

void __thiscall std::__cxx11::string::string(string *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(string **)this = this + 0x10;
  this[0x10] = (string)0x0;
  return;
}



// std::__cxx11::string::string(unsigned long long, char, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string(string *this,ulonglong param_2,string param_3)

{
  string *_Dst;
  
  _Dst = this + 0x10;
  *(string **)this = _Dst;
  if (param_2 < 0x10) {
    if (param_2 != 0) {
      if (param_2 != 1) goto LAB_14009f8fc;
      this[0x10] = param_3;
    }
    *(ulonglong *)(this + 8) = param_2;
    _Dst[param_2] = (string)0x0;
    return;
  }
  if (param_2 >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_create");
  }
  _Dst = operator_new(param_2 + 1);
  *(ulonglong *)(this + 0x10) = param_2;
  *(string **)this = _Dst;
LAB_14009f8fc:
  memset(_Dst,(int)(char)param_3,param_2);
  *(ulonglong *)(this + 8) = param_2;
  *(undefined1 *)(*(longlong *)this + param_2) = 0;
  return;
}



// std::__cxx11::string::string<__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// void>(__gnu_cxx::__normal_iterator<char*, std::__cxx11::string >,
// __gnu_cxx::__normal_iterator<char*, std::__cxx11::string >, std::allocator<char> const&)

void __thiscall std::__cxx11::string::string<>(string *this,string *param_1,longlong param_2)

{
  string sVar1;
  string *_Dst;
  ulonglong _Size;
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(string **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *param_1;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,param_1,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::string<char const*, void>(char const*, char const*, std::allocator<char>
// const&)

void __thiscall std::__cxx11::string::string<>(string *this,undefined1 *param_1,longlong param_2)

{
  *(undefined8 *)(this + 8) = 0;
  *(string **)this = this + 0x10;
  _M_construct<>((longlong *)this,param_1,param_2);
  return;
}



// std::__cxx11::string::string<char*, void>(char*, char*, std::allocator<char> const&)

void __thiscall
std::__cxx11::string::string<char*,void>(string *this,string *param_1,longlong param_2)

{
  string sVar1;
  string *_Dst;
  ulonglong _Size;
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(string **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  if (_Size < 0x10) {
    if (_Size == 1) {
      sVar1 = *param_1;
      *(undefined8 *)(this + 8) = 1;
      this[0x10] = sVar1;
      this[0x11] = (string)0x0;
      return;
    }
    if (_Size == 0) {
      *(undefined8 *)(this + 8) = 0;
      *_Dst = (string)0x0;
      return;
    }
  }
  else {
    if (_Size >> 0x3e != 0) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::_M_create");
    }
    _Dst = operator_new(_Size + 1);
    *(ulonglong *)(this + 0x10) = _Size;
    *(string **)this = _Dst;
  }
  memcpy(_Dst,param_1,_Size);
  *(ulonglong *)(this + 8) = _Size;
  *(undefined1 *)(*(longlong *)this + _Size) = 0;
  return;
}



// std::__cxx11::string::~string()

void __thiscall std::__cxx11::string::~string(string *this)

{
  if (*(string **)this != this + 0x10) {
    operator_delete(*(string **)this);
    return;
  }
  return;
}



// std::__cxx11::string::~string()

void __thiscall std::__cxx11::string::~string(string *this)

{
  if (*(string **)this != this + 0x10) {
    operator_delete(*(string **)this);
    return;
  }
  return;
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::string&&)

string * __thiscall std::__cxx11::string::operator=(string *this,string *param_1)

{
  string *psVar1;
  size_t _Size;
  undefined8 uVar2;
  string *_Src;
  string *_Dst;
  longlong lVar3;
  
  _Size = *(size_t *)(param_1 + 8);
  _Dst = *(string **)this;
  _Src = *(string **)param_1;
  psVar1 = param_1 + 0x10;
  if (_Dst == this + 0x10) {
    if (psVar1 == _Src) goto LAB_14009fb70;
    *(string **)this = _Src;
    *(size_t *)(this + 8) = _Size;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  }
  else {
    if (psVar1 == _Src) {
LAB_14009fb70:
      if (this != param_1) {
        lVar3 = 0;
        if (_Size != 0) {
          if (_Size == 1) {
            *_Dst = *_Src;
            _Dst = *(string **)this;
            lVar3 = *(longlong *)(param_1 + 8);
          }
          else {
            memcpy(_Dst,_Src,_Size);
            _Dst = *(string **)this;
            lVar3 = *(longlong *)(param_1 + 8);
          }
        }
        *(longlong *)(this + 8) = lVar3;
        _Dst[lVar3] = (string)0x0;
        _Src = *(string **)param_1;
      }
      goto LAB_14009fb37;
    }
    *(string **)this = _Src;
    uVar2 = *(undefined8 *)(this + 0x10);
    *(size_t *)(this + 8) = _Size;
    *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
    if (_Dst != (string *)0x0) {
      *(string **)param_1 = _Dst;
      *(undefined8 *)(param_1 + 0x10) = uVar2;
      _Src = _Dst;
      goto LAB_14009fb37;
    }
  }
  *(string **)param_1 = psVar1;
  _Src = psVar1;
LAB_14009fb37:
  *(undefined8 *)(param_1 + 8) = 0;
  *_Src = (string)0x0;
  return this;
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(char const*)

void __thiscall std::__cxx11::string::operator=(string *this,string *param_1)

{
  size_t sVar1;
  
  sVar1 = strlen((char *)param_1);
  _M_replace(this,0,*(ulonglong *)(this + 8),param_1,sVar1);
  return;
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::string const&)

string * __thiscall std::__cxx11::string::operator=(string *this,string *param_1)

{
  _M_assign(this,param_1);
  return this;
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<char>)

string * __thiscall std::__cxx11::string::operator=(string *this,undefined8 *param_1)

{
  _M_replace(this,0,*(ulonglong *)(this + 8),(string *)*param_1,param_1[1]);
  return this;
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(char)

string * __thiscall std::__cxx11::string::operator=(string *this,string param_2)

{
  _M_replace_aux(this,0,*(ulonglong *)(this + 8),1,param_2);
  return this;
}



// std::__cxx11::string::operator[](unsigned long long)

longlong __thiscall std::__cxx11::string::operator[](string *this,longlong param_1)

{
  return *(longlong *)this + param_1;
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(char const*)

string * __thiscall std::__cxx11::string::operator+=(string *this,string *param_1)

{
  ulonglong uVar1;
  size_t sVar2;
  size_t _Size;
  ulonglong uVar3;
  string *psVar4;
  
  _Size = strlen((char *)param_1);
  sVar2 = *(size_t *)(this + 8);
  if (_Size <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = _Size + sVar2;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,param_1,_Size);
      psVar4 = *(string **)this;
    }
    else if (_Size != 0) {
      if (_Size == 1) {
        psVar4[sVar2] = *param_1;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,param_1,_Size);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::string const&)

string * __thiscall std::__cxx11::string::operator+=(string *this,undefined8 *param_1)

{
  ulonglong uVar1;
  ulonglong _Size;
  string *_Src;
  size_t sVar2;
  ulonglong uVar3;
  string *psVar4;
  
  _Size = param_1[1];
  _Src = (string *)*param_1;
  sVar2 = *(size_t *)(this + 8);
  if (_Size <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = _Size + sVar2;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,_Src,_Size);
      psVar4 = *(string **)this;
    }
    else if (_Size != 0) {
      if (_Size == 1) {
        psVar4[sVar2] = *_Src;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,_Src,_Size);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<char>)

string * __thiscall std::__cxx11::string::operator+=(string *this,undefined8 *param_1)

{
  ulonglong uVar1;
  string *_Src;
  ulonglong _Size;
  size_t sVar2;
  ulonglong uVar3;
  string *psVar4;
  
  _Src = (string *)*param_1;
  _Size = param_1[1];
  sVar2 = *(size_t *)(this + 8);
  if (_Size <= 0x3fffffffffffffff - sVar2) {
    psVar4 = *(string **)this;
    uVar1 = _Size + sVar2;
    if (psVar4 == this + 0x10) {
      uVar3 = 0xf;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x10);
    }
    if (uVar3 < uVar1) {
      _M_mutate(this,sVar2,0,_Src,_Size);
      psVar4 = *(string **)this;
    }
    else if (_Size != 0) {
      if (_Size == 1) {
        psVar4[sVar2] = *_Src;
        psVar4 = *(string **)this;
      }
      else {
        memcpy(psVar4 + sVar2,_Src,_Size);
        psVar4 = *(string **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    psVar4[uVar1] = (string)0x0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string::TEMPNAMEPLACEHOLDERVALUE(char)

string * __thiscall std::__cxx11::string::operator+=(string *this,string param_2)

{
  size_t sVar1;
  string *psVar2;
  ulonglong uVar3;
  
  sVar1 = *(size_t *)(this + 8);
  psVar2 = *(string **)this;
  if (psVar2 == this + 0x10) {
    uVar3 = 0xf;
  }
  else {
    uVar3 = *(ulonglong *)(this + 0x10);
  }
  if (uVar3 < sVar1 + 1) {
    _M_mutate(this,sVar1,0,(undefined1 *)0x0,1);
    psVar2 = *(string **)this;
  }
  psVar2[sVar1] = param_2;
  *(size_t *)(this + 8) = sVar1 + 1;
  *(undefined1 *)(*(longlong *)this + 1 + sVar1) = 0;
  return this;
}



// std::__cxx11::wstring::_M_destroy(unsigned long long)

void std::__cxx11::wstring::_M_destroy(undefined8 *param_1)

{
  operator_delete((void *)*param_1);
  return;
}



// std::__cxx11::wstring::_M_dispose()

void __thiscall std::__cxx11::wstring::_M_dispose(wstring *this)

{
  if (*(wstring **)this != this + 0x10) {
    operator_delete(*(wstring **)this);
    return;
  }
  return;
}



// std::__cxx11::wstring::_M_replace(unsigned long long, unsigned long long, wchar_t const*,
// unsigned long long)

wstring * __thiscall
std::__cxx11::wstring::_M_replace
          (wstring *this,longlong param_1,ulonglong param_2,wstring *param_3,ulonglong param_4)

{
  wstring *_Dst;
  longlong lVar1;
  wstring *pwVar2;
  ulonglong uVar3;
  longlong lVar4;
  ulonglong uVar5;
  
  lVar1 = *(longlong *)(this + 8);
  if (param_4 <= (param_2 + 0x1fffffffffffffff) - lVar1) {
    pwVar2 = *(wstring **)this;
    uVar3 = (param_4 - param_2) + lVar1;
    if (pwVar2 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar3) {
      _M_mutate(this,param_1,param_2,(undefined2 *)param_3,param_4);
    }
    else {
      _Dst = pwVar2 + param_1 * 2;
      lVar4 = lVar1 - (param_1 + param_2);
      if ((param_3 < pwVar2) || (pwVar2 + lVar1 * 2 < param_3)) {
        if ((lVar4 != 0) && (param_2 != param_4)) {
          if (lVar4 == 1) {
            *(undefined2 *)(_Dst + param_4 * 2) = *(undefined2 *)(_Dst + param_2 * 2);
          }
          else {
            memmove(_Dst + param_4 * 2,_Dst + param_2 * 2,lVar4 * 2);
          }
        }
        if (param_4 != 0) {
          if (param_4 == 1) {
            *(undefined2 *)_Dst = *(undefined2 *)param_3;
          }
          else {
            memcpy(_Dst,param_3,param_4 * 2);
          }
        }
      }
      else {
        _M_replace_cold(this,(undefined2 *)_Dst,param_2,(undefined2 *)param_3,param_4,lVar4);
      }
    }
    *(ulonglong *)(this + 8) = uVar3;
    *(undefined2 *)(*(longlong *)this + uVar3 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::_M_replace");
}



// std::__cxx11::wstring::_S_compare(unsigned long long, unsigned long long)

ulonglong std::__cxx11::wstring::_S_compare(longlong param_1,longlong param_2)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = 0x7fffffff;
  uVar2 = param_1 - param_2;
  if (((longlong)uVar2 < 0x80000000) && (uVar1 = 0x80000000, -0x80000001 < (longlong)uVar2)) {
    uVar1 = uVar2 & 0xffffffff;
  }
  return uVar1;
}



// std::__cxx11::wstring::_M_capacity(unsigned long long)

void __thiscall std::__cxx11::wstring::_M_capacity(wstring *this,undefined8 param_1)

{
  *(undefined8 *)(this + 0x10) = param_1;
  return;
}



// std::__cxx11::wstring::_S_allocate(std::allocator<wchar_t>&, unsigned long long)

void std::__cxx11::wstring::_S_allocate(ulonglong *param_1,ulonglong param_2)

{
  if (param_2 >> 0x3e == 0) {
    operator_new(param_2 * 2);
    return;
  }
  if (-1 < (longlong)param_2) {
    __throw_bad_alloc();
  }
  __throw_bad_array_new_length();
  *param_1 = param_2;
  return;
}



// std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(wchar_t*, std::allocator<wchar_t>&&)

void __thiscall
std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(wchar_t*, std::allocator<wchar_t> const&)

void __thiscall
std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(wchar_t*, std::allocator<wchar_t>&&)

void __thiscall
std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(wchar_t*, std::allocator<wchar_t> const&)

void __thiscall
std::__cxx11::wstring::_Alloc_hider::_Alloc_hider(_Alloc_hider *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::wstring::_M_construct(unsigned long long, wchar_t)

void __thiscall
std::__cxx11::wstring::_M_construct(wstring *this,ulonglong param_1,undefined2 param_2)

{
  undefined2 *puVar1;
  ulonglong uVar2;
  ulonglong local_res10 [3];
  
  local_res10[0] = param_1;
  if (param_1 < 8) {
    puVar1 = *(undefined2 **)this;
  }
  else {
    puVar1 = (undefined2 *)_M_create(this,local_res10,0);
    *(undefined2 **)this = puVar1;
    *(ulonglong *)(this + 0x10) = local_res10[0];
  }
  if (local_res10[0] != 0) {
    uVar2 = 0;
    if (local_res10[0] == 1) {
      *puVar1 = param_2;
    }
    else {
      if ((local_res10[0] & 1) != 0) {
        uVar2 = 1;
        *puVar1 = param_2;
        if (local_res10[0] == 1) goto LAB_1400a01b3;
      }
      do {
        puVar1[uVar2] = param_2;
        puVar1[uVar2 + 1] = param_2;
        uVar2 = uVar2 + 2;
      } while (uVar2 != local_res10[0]);
    }
  }
LAB_1400a01b3:
  *(ulonglong *)(this + 8) = local_res10[0];
  puVar1[local_res10[0]] = 0;
  return;
}



// void std::__cxx11::wstring::_M_construct<__gnu_cxx::__normal_iterator<wchar_t const*,
// std::__cxx11::wstring > >(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, std::forward_iterator_tag)

void std::__cxx11::wstring::_M_construct<>(undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *_Dst = *param_2;
      goto LAB_1400a0264;
    }
  }
  else {
    _Dst = (undefined2 *)_M_create(param_1,local_40,0);
    *param_1 = _Dst;
    param_1[2] = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
LAB_1400a0264:
  param_1[1] = uVar2;
  *(undefined2 *)((longlong)_Dst + uVar3) = 0;
  return;
}



// void std::__cxx11::wstring::_M_construct<__gnu_cxx::__normal_iterator<wchar_t*,
// std::__cxx11::wstring > >(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, std::forward_iterator_tag)

void std::__cxx11::wstring::_M_construct<>(undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *_Dst = *param_2;
      goto LAB_1400a0314;
    }
  }
  else {
    _Dst = (undefined2 *)_M_create(param_1,local_40,0);
    *param_1 = _Dst;
    param_1[2] = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
LAB_1400a0314:
  param_1[1] = uVar2;
  *(undefined2 *)((longlong)_Dst + uVar3) = 0;
  return;
}



// void std::__cxx11::wstring::_M_construct<wchar_t const*>(wchar_t const*, wchar_t const*,
// std::forward_iterator_tag)

void std::__cxx11::wstring::_M_construct<>(undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *_Dst = *param_2;
      goto LAB_1400a03c4;
    }
  }
  else {
    _Dst = (undefined2 *)_M_create(param_1,local_40,0);
    *param_1 = _Dst;
    param_1[2] = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
LAB_1400a03c4:
  param_1[1] = uVar2;
  *(undefined2 *)((longlong)_Dst + uVar3) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
               (undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  ulonglong _Size;
  ulonglong local_30 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    if (uVar2 == 1) {
      *_Dst = *param_2;
      lVar1 = 2;
      goto LAB_1400a049d;
    }
  }
  else {
    _Dst = (undefined2 *)std::__cxx11::wstring::_M_create(param_1,local_30,0);
    *param_1 = _Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_1400a049d:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
               (undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  ulonglong _Size;
  ulonglong local_30 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    if (uVar2 == 1) {
      *_Dst = *param_2;
      lVar1 = 2;
      goto LAB_1400a052d;
    }
  }
  else {
    _Dst = (undefined2 *)std::__cxx11::wstring::_M_create(param_1,local_30,0);
    *param_1 = _Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_1400a052d:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
               (undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  ulonglong _Size;
  ulonglong local_30 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    if (uVar2 == 1) {
      *_Dst = *param_2;
      lVar1 = 2;
      goto LAB_1400a05bd;
    }
  }
  else {
    _Dst = (undefined2 *)std::__cxx11::wstring::_M_create(param_1,local_30,0);
    *param_1 = _Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_1400a05bd:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return;
}



// void std::__cxx11::wstring::_M_construct<wchar_t*>(wchar_t*, wchar_t*, std::forward_iterator_tag)

void std::__cxx11::wstring::_M_construct<wchar_t*>
               (undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *_Dst = *param_2;
      goto LAB_1400a0624;
    }
  }
  else {
    _Dst = (undefined2 *)_M_create(param_1,local_40,0);
    *param_1 = _Dst;
    param_1[2] = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
LAB_1400a0624:
  param_1[1] = uVar2;
  *(undefined2 *)((longlong)_Dst + uVar3) = 0;
  return;
}



void _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPwEEvT_S7_St20forward_iterator_tag_isra_0
               (undefined8 *param_1,undefined2 *param_2,longlong param_3)

{
  undefined2 *_Dst;
  longlong lVar1;
  ulonglong uVar2;
  ulonglong _Size;
  ulonglong local_30 [2];
  
  _Size = param_3 - (longlong)param_2;
  uVar2 = (longlong)_Size >> 1;
  local_30[0] = uVar2;
  if (_Size < 0xf) {
    _Dst = (undefined2 *)*param_1;
    if (uVar2 == 1) {
      *_Dst = *param_2;
      lVar1 = 2;
      goto LAB_1400a06fd;
    }
  }
  else {
    _Dst = (undefined2 *)std::__cxx11::wstring::_M_create(param_1,local_30,0);
    *param_1 = _Dst;
    param_1[2] = local_30[0];
  }
  if (uVar2 != 0) {
    memcpy(_Dst,param_2,_Size);
  }
  _Dst = (undefined2 *)*param_1;
  lVar1 = local_30[0] * 2;
LAB_1400a06fd:
  param_1[1] = local_30[0];
  *(undefined2 *)((longlong)_Dst + lVar1) = 0;
  return;
}



// std::__cxx11::wstring::_M_local_data()

wstring * __thiscall std::__cxx11::wstring::_M_local_data(wstring *this)

{
  return this + 0x10;
}



// std::__cxx11::wstring::_M_set_length(unsigned long long)

void __thiscall std::__cxx11::wstring::_M_set_length(wstring *this,longlong param_1)

{
  *(longlong *)(this + 8) = param_1;
  *(undefined2 *)(*(longlong *)this + param_1 * 2) = 0;
  return;
}



// std::__cxx11::wstring::_S_copy_chars(wchar_t*, __gnu_cxx::__normal_iterator<wchar_t const*,
// std::__cxx11::wstring >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >)

void std::__cxx11::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::__cxx11::wstring::_S_copy_chars(wchar_t*, __gnu_cxx::__normal_iterator<wchar_t*,
// std::__cxx11::wstring >, __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >)

void std::__cxx11::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::__cxx11::wstring::_S_copy_chars(wchar_t*, wchar_t const*, wchar_t const*)

void std::__cxx11::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::__cxx11::wstring::_S_copy_chars(wchar_t*, wchar_t*, wchar_t*)

void std::__cxx11::wstring::_S_copy_chars(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  longlong lVar1;
  
  lVar1 = param_3 - (longlong)param_2 >> 1;
  if (lVar1 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (lVar1 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 - (longlong)param_2);
  return;
}



// std::__cxx11::wstring::shrink_to_fit()

void std::__cxx11::wstring::shrink_to_fit(undefined8 *param_1,longlong param_2)

{
  reserve(param_1,param_2);
  return;
}



// std::__cxx11::wstring::_M_replace_aux(unsigned long long, unsigned long long, unsigned long long,
// wchar_t)

wstring * __thiscall
std::__cxx11::wstring::_M_replace_aux
          (wstring *this,longlong param_1,ulonglong param_2,ulonglong param_3,undefined2 param_4)

{
  wstring *pwVar1;
  wstring *pwVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  
  lVar3 = *(longlong *)(this + 8);
  if ((param_2 + 0x1fffffffffffffff) - lVar3 < param_3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_replace_aux");
  }
  pwVar2 = *(wstring **)this;
  uVar5 = (param_3 - param_2) + lVar3;
  if (pwVar2 == this + 0x10) {
    uVar4 = 7;
  }
  else {
    uVar4 = *(ulonglong *)(this + 0x10);
  }
  if (uVar4 < uVar5) {
    _M_mutate(this,param_1,param_2,(undefined2 *)0x0,param_3);
    pwVar2 = *(wstring **)this;
  }
  else {
    lVar3 = lVar3 - (param_2 + param_1);
    if ((lVar3 != 0) && (param_2 != param_3)) {
      if (lVar3 == 1) {
        *(undefined2 *)(pwVar2 + param_3 * 2 + param_1 * 2) =
             *(undefined2 *)(pwVar2 + param_2 * 2 + param_1 * 2);
      }
      else {
        memmove(pwVar2 + param_3 * 2 + param_1 * 2,pwVar2 + param_2 * 2 + param_1 * 2,lVar3 * 2);
        pwVar2 = *(wstring **)this;
      }
    }
  }
  if (param_3 != 0) {
    pwVar1 = pwVar2 + param_1 * 2;
    uVar4 = 0;
    if (param_3 == 1) {
      *(undefined2 *)pwVar1 = param_4;
    }
    else {
      if ((param_3 & 1) != 0) {
        *(undefined2 *)pwVar1 = param_4;
        uVar4 = 1;
      }
      do {
        *(undefined2 *)(pwVar1 + uVar4 * 2) = param_4;
        *(undefined2 *)(pwVar1 + uVar4 * 2 + 2) = param_4;
        uVar4 = uVar4 + 2;
      } while (param_3 != uVar4);
    }
  }
  *(ulonglong *)(this + 8) = uVar5;
  *(undefined2 *)(pwVar2 + uVar5 * 2) = 0;
  return this;
}



// std::__cxx11::wstring::_M_replace_cold(wchar_t*, unsigned long long, wchar_t const*, unsigned
// long long, unsigned long long)

void __thiscall
std::__cxx11::wstring::_M_replace_cold
          (undefined8 param_1_00,undefined2 *param_2,ulonglong param_3,undefined2 *param_4,
          ulonglong param_5,longlong param_6)

{
  longlong lVar1;
  longlong lVar2;
  undefined2 *puVar3;
  
  if (param_5 - 1 < param_3) {
    if (param_5 == 1) {
      *param_2 = *param_4;
    }
    else {
      _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_S_moveEPwPKwy_part_0
                (param_2,param_4,param_5);
    }
  }
  if ((param_6 != 0) && (param_5 != param_3)) {
    if (param_6 == 1) {
      param_2[param_5] = param_2[param_3];
    }
    else {
      _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_S_moveEPwPKwy_part_0
                (param_2 + param_5,param_2 + param_3,param_6);
    }
  }
  if (param_3 < param_5) {
    lVar2 = param_5 * 2;
    puVar3 = param_2 + param_3;
    if (puVar3 < param_4 + param_5) {
      if (param_4 < puVar3) {
        lVar2 = (longlong)puVar3 - (longlong)param_4;
        if (lVar2 == 2) {
          *param_2 = *param_4;
        }
        else {
          _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_S_moveEPwPKwy_part_0
                    (param_2,param_4,lVar2 >> 1);
        }
        lVar1 = param_5 - (lVar2 >> 1);
        puVar3 = param_2 + param_5;
        param_2 = (undefined2 *)((longlong)param_2 + lVar2);
        if (lVar1 != 1) {
          if (lVar1 == 0) {
            return;
          }
          for (lVar1 = lVar1 * 2; lVar1 != 0; lVar1 = lVar1 + -1) {
            *(undefined1 *)param_2 = *(undefined1 *)puVar3;
            puVar3 = (undefined2 *)((longlong)puVar3 + 1);
            param_2 = (undefined2 *)((longlong)param_2 + 1);
          }
          return;
        }
      }
      else {
        puVar3 = param_2 + ((((longlong)param_4 - (longlong)param_2 >> 1) + param_5) - param_3);
        if (param_5 != 1) {
          for (; lVar2 != 0; lVar2 = lVar2 + -1) {
            *(undefined1 *)param_2 = *(undefined1 *)puVar3;
            puVar3 = (undefined2 *)((longlong)puVar3 + 1);
            param_2 = (undefined2 *)((longlong)param_2 + 1);
          }
          return;
        }
      }
      *param_2 = *puVar3;
    }
    else {
      if (param_5 != 1) {
        _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_S_moveEPwPKwy_part_0
                  (param_2,param_4,param_5);
        return;
      }
      *param_2 = *param_4;
    }
  }
  return;
}



// std::__cxx11::wstring::_M_get_allocator()

wstring * __thiscall std::__cxx11::wstring::_M_get_allocator(wstring *this)

{
  return this;
}



// std::__cxx11::wstring::_M_use_local_data()

wstring * __thiscall std::__cxx11::wstring::_M_use_local_data(wstring *this)

{
  return this + 0x10;
}



// std::__cxx11::wstring::_M_construct_aux_2(unsigned long long, wchar_t)

void __thiscall
std::__cxx11::wstring::_M_construct_aux_2(wstring *this,ulonglong param_1,undefined2 param_2)

{
  undefined2 *puVar1;
  ulonglong uVar2;
  ulonglong local_20;
  
  local_20 = param_1;
  if (param_1 < 8) {
    puVar1 = *(undefined2 **)this;
  }
  else {
    puVar1 = (undefined2 *)_M_create(this,&local_20,0);
    *(undefined2 **)this = puVar1;
    *(ulonglong *)(this + 0x10) = local_20;
  }
  if (local_20 != 0) {
    uVar2 = 0;
    if (local_20 == 1) {
      *puVar1 = param_2;
    }
    else {
      if ((local_20 & 1) != 0) {
        uVar2 = 1;
        *puVar1 = param_2;
        if (local_20 == 1) goto LAB_1400a0b03;
      }
      do {
        puVar1[uVar2] = param_2;
        puVar1[uVar2 + 1] = param_2;
        uVar2 = uVar2 + 2;
      } while (uVar2 != local_20);
    }
  }
LAB_1400a0b03:
  *(ulonglong *)(this + 8) = local_20;
  puVar1[local_20] = 0;
  return;
}



// std::__cxx11::wstring::at(unsigned long long)

longlong __thiscall
std::__cxx11::wstring::at(wstring *this,ulonglong param_1,undefined8 param_2,undefined8 param_3)

{
  if (param_1 < *(ulonglong *)(this + 8)) {
    return *(longlong *)this + param_1 * 2;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("basic_string::at: __n (which is %zu) >= this->size() (which is %zu)",param_1,
             *(ulonglong *)(this + 8),param_3);
}



// std::__cxx11::wstring::end()

longlong __thiscall std::__cxx11::wstring::end(wstring *this)

{
  return *(longlong *)this + *(longlong *)(this + 8) * 2;
}



// std::__cxx11::wstring::back()

longlong __thiscall std::__cxx11::wstring::back(wstring *this)

{
  return *(longlong *)this + -2 + *(longlong *)(this + 8) * 2;
}



// std::__cxx11::wstring::rend()

undefined8 * std::__cxx11::wstring::rend(undefined8 *param_1,undefined8 *param_2)

{
  *param_1 = *param_2;
  return param_1;
}



// std::__cxx11::wstring::swap(std::__cxx11::wstring&)

void __thiscall std::__cxx11::wstring::swap(wstring *this,wstring *param_1)

{
  wstring *_Dst;
  wstring *_Src;
  size_t _Size;
  wstring *_Src_00;
  undefined8 uVar1;
  longlong lVar2;
  uint uVar3;
  void *_Src_01;
  ulonglong uVar4;
  uint uVar5;
  undefined8 uVar6;
  wstring *_Dst_00;
  longlong lVar7;
  undefined1 local_48 [24];
  
  if (this == param_1) {
    return;
  }
  _Dst_00 = *(wstring **)this;
  _Dst = this + 0x10;
  _Src_00 = *(wstring **)param_1;
  if (_Dst_00 != _Dst) {
    lVar7 = *(longlong *)(param_1 + 8);
    uVar6 = *(undefined8 *)(this + 0x10);
    if (_Src_00 == param_1 + 0x10) {
      memcpy(_Dst,_Src_00,lVar7 * 2 + 2);
      *(wstring **)param_1 = _Dst_00;
      lVar7 = *(longlong *)(param_1 + 8);
      *(wstring **)this = _Dst;
    }
    else {
      uVar1 = *(undefined8 *)(param_1 + 0x10);
      *(wstring **)this = _Src_00;
      *(wstring **)param_1 = _Dst_00;
      *(undefined8 *)(this + 0x10) = uVar1;
    }
    *(undefined8 *)(param_1 + 0x10) = uVar6;
    uVar6 = *(undefined8 *)(this + 8);
LAB_1400a0c1d:
    *(longlong *)(this + 8) = lVar7;
    *(undefined8 *)(param_1 + 8) = uVar6;
    return;
  }
  _Src = param_1 + 0x10;
  lVar7 = *(longlong *)(this + 8);
  if (_Src != _Src_00) {
    uVar1 = *(undefined8 *)(param_1 + 0x10);
    memcpy(_Src,_Dst_00,lVar7 * 2 + 2);
    *(wstring **)this = _Src_00;
    lVar7 = *(longlong *)(param_1 + 8);
    *(wstring **)param_1 = _Src;
    uVar6 = *(undefined8 *)(this + 8);
    *(undefined8 *)(this + 0x10) = uVar1;
    goto LAB_1400a0c1d;
  }
  lVar2 = *(longlong *)(param_1 + 8);
  if (lVar7 == 0) {
    uVar6 = 0;
    lVar7 = 0;
    if (lVar2 != 0) {
      memcpy(_Dst_00,_Src,lVar2 * 2 + 2);
      *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
      *(undefined8 *)(param_1 + 8) = 0;
      **(undefined2 **)param_1 = 0;
      return;
    }
    goto LAB_1400a0c1d;
  }
  uVar4 = lVar7 * 2 + 2;
  uVar3 = (uint)uVar4;
  if (lVar2 != 0) {
    _Size = lVar2 * 2 + 2;
    _Src_01 = memcpy(local_48,_Src,_Size);
    if (uVar3 < 8) {
      if ((uVar4 & 4) == 0) {
        if ((uVar3 != 0) && (param_1[0x10] = this[0x10], (uVar4 & 2) != 0)) {
          *(undefined2 *)(param_1 + (uVar4 & 0xffffffff) + 0xe) =
               *(undefined2 *)(this + (uVar4 & 0xffffffff) + 0xe);
        }
      }
      else {
        *(undefined4 *)(param_1 + 0x10) = *(undefined4 *)(this + 0x10);
        *(undefined4 *)(param_1 + (uVar4 & 0xffffffff) + 0xc) =
             *(undefined4 *)(this + (uVar4 & 0xffffffff) + 0xc);
      }
    }
    else {
      *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)(this + 0x10);
      *(undefined8 *)(param_1 + (uVar4 & 0xffffffff) + 8) =
           *(undefined8 *)(this + (uVar4 & 0xffffffff) + 8);
      lVar7 = (longlong)_Src - ((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8);
      uVar3 = uVar3 + (int)lVar7 & 0xfffffff8;
      if (7 < uVar3) {
        uVar5 = 0;
        do {
          uVar4 = (ulonglong)uVar5;
          uVar5 = uVar5 + 8;
          *(undefined8 *)(((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8) + uVar4) =
               *(undefined8 *)(_Dst + (uVar4 - lVar7));
        } while (uVar5 < uVar3);
      }
    }
    memcpy(_Dst,_Src_01,_Size);
    lVar7 = *(longlong *)(param_1 + 8);
    uVar6 = *(undefined8 *)(this + 8);
    goto LAB_1400a0c1d;
  }
  if (uVar3 < 8) {
    if ((uVar4 & 4) != 0) {
      *(undefined4 *)(param_1 + 0x10) = *(undefined4 *)_Dst_00;
      *(undefined4 *)(param_1 + (uVar4 & 0xffffffff) + 0xc) =
           *(undefined4 *)(_Dst_00 + ((uVar4 & 0xffffffff) - 4));
      _Dst_00 = *(wstring **)this;
      lVar7 = *(longlong *)(this + 8);
      goto LAB_1400a0cd6;
    }
    if (uVar3 == 0) goto LAB_1400a0cd6;
    param_1[0x10] = *_Dst_00;
    if ((uVar4 & 2) != 0) {
      *(undefined2 *)(param_1 + (uVar4 & 0xffffffff) + 0xe) =
           *(undefined2 *)(_Dst_00 + ((uVar4 & 0xffffffff) - 2));
      _Dst_00 = *(wstring **)this;
      lVar7 = *(longlong *)(this + 8);
      goto LAB_1400a0cd6;
    }
  }
  else {
    *(undefined8 *)(param_1 + 0x10) = *(undefined8 *)_Dst_00;
    *(undefined8 *)(param_1 + (uVar4 & 0xffffffff) + 8) =
         *(undefined8 *)(_Dst_00 + ((uVar4 & 0xffffffff) - 8));
    lVar7 = (longlong)_Src - ((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8);
    uVar3 = uVar3 + (int)lVar7 & 0xfffffff8;
    if (7 < uVar3) {
      uVar4 = 0;
      do {
        uVar5 = (int)uVar4 + 8;
        *(undefined8 *)(((ulonglong)(param_1 + 0x18) & 0xfffffffffffffff8) + uVar4) =
             *(undefined8 *)(_Dst_00 + (uVar4 - lVar7));
        uVar4 = (ulonglong)uVar5;
      } while (uVar5 < uVar3);
    }
  }
  _Dst_00 = *(wstring **)this;
  lVar7 = *(longlong *)(this + 8);
LAB_1400a0cd6:
  *(longlong *)(param_1 + 8) = lVar7;
  *(undefined8 *)(this + 8) = 0;
  *(undefined2 *)_Dst_00 = 0;
  return;
}



// std::__cxx11::wstring::begin()

undefined8 __thiscall std::__cxx11::wstring::begin(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::clear()

void __thiscall std::__cxx11::wstring::clear(wstring *this)

{
  *(undefined8 *)(this + 8) = 0;
  **(undefined2 **)this = 0;
  return;
}



// std::__cxx11::wstring::erase(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >)

undefined2 * __thiscall std::__cxx11::wstring::erase(wstring *this,undefined2 *param_1)

{
  undefined2 *_Src;
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  
  lVar1 = *(longlong *)this;
  lVar2 = (longlong)param_1 - lVar1;
  lVar4 = *(longlong *)(this + 8) + -1;
  lVar3 = lVar4 - (lVar2 >> 1);
  if (lVar3 != 0) {
    _Src = (undefined2 *)(lVar1 + 2 + lVar2);
    if (lVar3 == 1) {
      *param_1 = *_Src;
    }
    else {
      memmove(param_1,_Src,lVar3 * 2);
      lVar1 = *(longlong *)this;
      param_1 = (undefined2 *)(lVar1 + lVar2);
      lVar4 = *(longlong *)(this + 8) + -1;
    }
  }
  *(longlong *)(this + 8) = lVar4;
  *(undefined2 *)(lVar1 + lVar4 * 2) = 0;
  return param_1;
}



// std::__cxx11::wstring::erase(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >)

undefined2 * __thiscall
std::__cxx11::wstring::erase(wstring *this,undefined2 *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = (longlong)param_1 - *(longlong *)this;
  lVar2 = lVar1 >> 1;
  if (param_2 != *(longlong *)this + *(longlong *)(this + 8) * 2) {
    _M_erase(this,lVar2,param_2 - (longlong)param_1 >> 1);
    return (undefined2 *)(*(longlong *)this + lVar1);
  }
  *(longlong *)(this + 8) = lVar2;
  *param_1 = 0;
  return param_1;
}



// std::__cxx11::wstring::erase(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >)

longlong __thiscall std::__cxx11::wstring::erase(wstring *this,longlong param_1)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_erase(this,param_1 - lVar1 >> 1,1);
  return *(longlong *)this + (param_1 - lVar1);
}



// std::__cxx11::wstring::erase(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >)

undefined2 * __thiscall
std::__cxx11::wstring::erase(wstring *this,undefined2 *param_1,longlong param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = (longlong)param_1 - *(longlong *)this;
  lVar2 = lVar1 >> 1;
  if (param_2 != *(longlong *)this + *(longlong *)(this + 8) * 2) {
    _M_erase(this,lVar2,param_2 - (longlong)param_1 >> 1);
    return (undefined2 *)(*(longlong *)this + lVar1);
  }
  *(longlong *)(this + 8) = lVar2;
  *param_1 = 0;
  return param_1;
}



// std::__cxx11::wstring::erase(unsigned long long, unsigned long long)

wstring * __thiscall std::__cxx11::wstring::erase(wstring *this,ulonglong param_1,ulonglong param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 < param_1) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c63e1,param_1,uVar1);
  }
  if (param_2 != 0xffffffffffffffff) {
    if (param_2 == 0) {
      return this;
    }
    if (uVar1 - param_1 <= param_2) {
      param_2 = uVar1 - param_1;
    }
    _M_erase(this,param_1,param_2);
    return this;
  }
  *(ulonglong *)(this + 8) = param_1;
  *(undefined2 *)(*(longlong *)this + param_1 * 2) = 0;
  return this;
}



// std::__cxx11::wstring::front()

undefined8 __thiscall std::__cxx11::wstring::front(wstring *this)

{
  return *(undefined8 *)this;
}



// std::__cxx11::wstring::append(wchar_t const*)

wstring * __thiscall std::__cxx11::wstring::append(wstring *this,wchar_t *param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  size_t sVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  sVar3 = wcslen(param_1);
  lVar2 = *(longlong *)(this + 8);
  if (sVar3 <= 0x1fffffffffffffffU - lVar2) {
    pwVar4 = *(wstring **)this;
    uVar1 = lVar2 + sVar3;
    if (pwVar4 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar1) {
      _M_mutate(this,lVar2,0,param_1,sVar3);
      pwVar4 = *(wstring **)this;
    }
    else if (sVar3 != 0) {
      if (sVar3 == 1) {
        *(wchar_t *)(pwVar4 + lVar2 * 2) = *param_1;
      }
      else {
        memcpy(pwVar4 + lVar2 * 2,param_1,sVar3 * 2);
        pwVar4 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::append(wchar_t const*, unsigned long long)

wstring * __thiscall
std::__cxx11::wstring::append(wstring *this,undefined2 *param_1,ulonglong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  wstring *pwVar3;
  ulonglong uVar4;
  
  lVar2 = *(longlong *)(this + 8);
  if (param_2 <= 0x1fffffffffffffffU - lVar2) {
    pwVar3 = *(wstring **)this;
    uVar1 = param_2 + lVar2;
    if (pwVar3 == this + 0x10) {
      uVar4 = 7;
    }
    else {
      uVar4 = *(ulonglong *)(this + 0x10);
    }
    if (uVar4 < uVar1) {
      _M_mutate(this,lVar2,0,param_1,param_2);
      pwVar3 = *(wstring **)this;
    }
    else if (param_2 != 0) {
      if (param_2 == 1) {
        *(undefined2 *)(pwVar3 + lVar2 * 2) = *param_1;
      }
      else {
        memcpy(pwVar3 + lVar2 * 2,param_1,param_2 * 2);
        pwVar3 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar3 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::append(std::__cxx11::wstring const&)

wstring * __thiscall std::__cxx11::wstring::append(wstring *this,undefined8 *param_1)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined2 *_Src;
  longlong lVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  uVar2 = param_1[1];
  _Src = (undefined2 *)*param_1;
  lVar3 = *(longlong *)(this + 8);
  if (uVar2 <= 0x1fffffffffffffffU - lVar3) {
    pwVar4 = *(wstring **)this;
    uVar1 = uVar2 + lVar3;
    if (pwVar4 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar1) {
      _M_mutate(this,lVar3,0,_Src,uVar2);
      pwVar4 = *(wstring **)this;
    }
    else if (uVar2 != 0) {
      if (uVar2 == 1) {
        *(undefined2 *)(pwVar4 + lVar3 * 2) = *_Src;
      }
      else {
        memcpy(pwVar4 + lVar3 * 2,_Src,uVar2 * 2);
        pwVar4 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::append(std::__cxx11::wstring const&, unsigned long long, unsigned long
// long)

wstring * __thiscall
std::__cxx11::wstring::append(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  ulonglong uVar1;
  longlong lVar2;
  ulonglong uVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  uVar1 = param_1[1];
  uVar3 = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    uVar3 = param_3;
  }
  if (param_2 <= uVar1) {
    _Src = (undefined2 *)(*param_1 + param_2 * 2);
    lVar2 = *(longlong *)(this + 8);
    if (uVar3 <= 0x1fffffffffffffffU - lVar2) {
      pwVar4 = *(wstring **)this;
      uVar1 = uVar3 + lVar2;
      if (pwVar4 == this + 0x10) {
        uVar5 = 7;
      }
      else {
        uVar5 = *(ulonglong *)(this + 0x10);
      }
      if (uVar5 < uVar1) {
        _M_mutate(this,lVar2,0,_Src,uVar3);
        pwVar4 = *(wstring **)this;
      }
      else if (uVar3 != 0) {
        if (uVar3 == 1) {
          *(undefined2 *)(pwVar4 + lVar2 * 2) = *_Src;
        }
        else {
          memcpy(pwVar4 + lVar2 * 2,_Src,uVar3 * 2);
          pwVar4 = *(wstring **)this;
        }
      }
      *(ulonglong *)(this + 8) = uVar1;
      *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
      return this;
    }
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c63cc,param_2,uVar1);
}



// std::__cxx11::wstring::append(std::initializer_list<wchar_t>)

wstring * __thiscall std::__cxx11::wstring::append(wstring *this,undefined8 *param_1)

{
  ulonglong uVar1;
  undefined2 *_Src;
  ulonglong uVar2;
  longlong lVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  _Src = (undefined2 *)*param_1;
  uVar2 = param_1[1];
  lVar3 = *(longlong *)(this + 8);
  if (uVar2 <= 0x1fffffffffffffffU - lVar3) {
    pwVar4 = *(wstring **)this;
    uVar1 = uVar2 + lVar3;
    if (pwVar4 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar1) {
      _M_mutate(this,lVar3,0,_Src,uVar2);
      pwVar4 = *(wstring **)this;
    }
    else if (uVar2 != 0) {
      if (uVar2 == 1) {
        *(undefined2 *)(pwVar4 + lVar3 * 2) = *_Src;
      }
      else {
        memcpy(pwVar4 + lVar3 * 2,_Src,uVar2 * 2);
        pwVar4 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::append(unsigned long long, wchar_t)

void __thiscall std::__cxx11::wstring::append(wstring *this,ulonglong param_1,undefined2 param_2)

{
  _M_replace_aux(this,*(longlong *)(this + 8),0,param_1,param_2);
  return;
}



// std::__cxx11::wstring::assign(std::__cxx11::wstring&&)

wstring * __thiscall std::__cxx11::wstring::assign(wstring *this,wstring *param_1)

{
  wstring *pwVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  wstring *_Src;
  wstring *_Dst;
  longlong lVar4;
  
  lVar4 = *(longlong *)(param_1 + 8);
  _Dst = *(wstring **)this;
  _Src = *(wstring **)param_1;
  pwVar1 = param_1 + 0x10;
  if (_Dst == this + 0x10) {
    if (pwVar1 == _Src) goto LAB_1400a1520;
    *(wstring **)this = _Src;
    uVar2 = *(undefined8 *)(param_1 + 0x10);
    *(longlong *)(this + 8) = lVar4;
    *(undefined8 *)(this + 0x10) = uVar2;
  }
  else {
    if (pwVar1 == _Src) {
LAB_1400a1520:
      if (this != param_1) {
        if (lVar4 != 0) {
          if (lVar4 == 1) {
            *(undefined2 *)_Dst = *(undefined2 *)_Src;
          }
          else {
            memcpy(_Dst,_Src,lVar4 * 2);
            lVar4 = *(longlong *)(param_1 + 8);
            _Dst = *(wstring **)this;
            _Src = *(wstring **)param_1;
          }
        }
        *(longlong *)(this + 8) = lVar4;
        *(undefined2 *)(_Dst + lVar4 * 2) = 0;
      }
      goto LAB_1400a14e8;
    }
    uVar3 = *(undefined8 *)(this + 0x10);
    *(wstring **)this = _Src;
    uVar2 = *(undefined8 *)(param_1 + 0x10);
    *(longlong *)(this + 8) = lVar4;
    *(undefined8 *)(this + 0x10) = uVar2;
    if (_Dst != (wstring *)0x0) {
      *(wstring **)param_1 = _Dst;
      *(undefined8 *)(param_1 + 0x10) = uVar3;
      _Src = _Dst;
      goto LAB_1400a14e8;
    }
  }
  *(wstring **)param_1 = pwVar1;
  _Src = pwVar1;
LAB_1400a14e8:
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined2 *)_Src = 0;
  return this;
}



// std::__cxx11::wstring::assign(wchar_t const*)

void __thiscall std::__cxx11::wstring::assign(wstring *this,wstring *param_1)

{
  size_t sVar1;
  
  sVar1 = wcslen((wchar_t *)param_1);
  _M_replace(this,0,*(ulonglong *)(this + 8),param_1,sVar1);
  return;
}



// std::__cxx11::wstring::assign(wchar_t const*, unsigned long long)

void __thiscall std::__cxx11::wstring::assign(wstring *this,wstring *param_1,ulonglong param_2)

{
  _M_replace(this,0,*(ulonglong *)(this + 8),param_1,param_2);
  return;
}



// std::__cxx11::wstring::assign(std::__cxx11::wstring const&)

wstring * __thiscall std::__cxx11::wstring::assign(wstring *this,wstring *param_1)

{
  _M_assign(this,param_1);
  return this;
}



// std::__cxx11::wstring::assign(std::__cxx11::wstring const&, unsigned long long, unsigned long
// long)

void __thiscall
std::__cxx11::wstring::assign(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_1[1];
  uVar2 = uVar1 - param_2;
  if (param_3 < uVar1 - param_2) {
    uVar2 = param_3;
  }
  if (param_2 <= uVar1) {
    _M_replace(this,0,*(ulonglong *)(this + 8),(wstring *)(*param_1 + param_2 * 2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6456,param_2,uVar1);
}



// std::__cxx11::wstring::assign(std::initializer_list<wchar_t>)

void __thiscall std::__cxx11::wstring::assign(wstring *this,undefined8 *param_1)

{
  _M_replace(this,0,*(ulonglong *)(this + 8),(wstring *)*param_1,param_1[1]);
  return;
}



// std::__cxx11::wstring::assign(unsigned long long, wchar_t)

void __thiscall std::__cxx11::wstring::assign(wstring *this,ulonglong param_1,undefined2 param_2)

{
  _M_replace_aux(this,0,*(ulonglong *)(this + 8),param_1,param_2);
  return;
}



// std::__cxx11::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, std::initializer_list<wchar_t>)

longlong __thiscall
std::__cxx11::wstring::insert(wstring *this,longlong param_1,undefined8 *param_2)

{
  longlong lVar1;
  ulonglong uVar2;
  
  lVar1 = *(longlong *)this;
  uVar2 = param_1 - lVar1 >> 1;
  if (uVar2 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,uVar2,0,(wstring *)*param_2,param_2[1] * 2 >> 1);
    return *(longlong *)this + (param_1 - lVar1);
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, wchar_t)

longlong __thiscall std::__cxx11::wstring::insert(wstring *this,longlong param_1,undefined2 param_2)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_replace_aux(this,param_1 - lVar1 >> 1,0,1,param_2);
  return *(longlong *)this + (param_1 - lVar1);
}



// std::__cxx11::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, unsigned long long, wchar_t)

longlong __thiscall
std::__cxx11::wstring::insert(wstring *this,longlong param_1,ulonglong param_2,undefined2 param_3)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_replace_aux(this,param_1 - lVar1 >> 1,0,param_2,param_3);
  return *(longlong *)this + (param_1 - lVar1);
}



// std::__cxx11::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// std::initializer_list<wchar_t>)

void __thiscall std::__cxx11::wstring::insert(wstring *this,longlong param_1,undefined8 *param_2)

{
  ulonglong uVar1;
  
  uVar1 = param_1 - *(longlong *)this >> 1;
  if (uVar1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,uVar1,0,(wstring *)*param_2,param_2[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// wchar_t)

longlong __thiscall std::__cxx11::wstring::insert(wstring *this,longlong param_1,undefined2 param_2)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)this;
  _M_replace_aux(this,param_1 - lVar1 >> 1,0,1,param_2);
  return *(longlong *)this + (param_1 - lVar1);
}



// std::__cxx11::wstring::insert(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// unsigned long long, wchar_t)

void __thiscall
std::__cxx11::wstring::insert(wstring *this,longlong param_1,ulonglong param_2,undefined2 param_3)

{
  _M_replace_aux(this,param_1 - *(longlong *)this >> 1,0,param_2,param_3);
  return;
}



// std::__cxx11::wstring::insert(unsigned long long, wchar_t const*)

void __thiscall std::__cxx11::wstring::insert(wstring *this,ulonglong param_1,wstring *param_2)

{
  size_t sVar1;
  
  sVar1 = wcslen((wchar_t *)param_2);
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,param_1,0,param_2,sVar1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::insert(unsigned long long, wchar_t const*, unsigned long long)

void __thiscall
std::__cxx11::wstring::insert(wstring *this,ulonglong param_1,wstring *param_2,ulonglong param_3)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,param_1,0,param_2,param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::insert(unsigned long long, std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wstring::insert(wstring *this,ulonglong param_1,undefined8 *param_2)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,param_1,0,(wstring *)*param_2,param_2[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::insert(unsigned long long, std::__cxx11::wstring const&, unsigned long
// long, unsigned long long)

void __thiscall
std::__cxx11::wstring::insert
          (wstring *this,ulonglong param_1,longlong *param_2,ulonglong param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_2[1];
  uVar2 = uVar1 - param_3;
  if (param_4 < uVar1 - param_3) {
    uVar2 = param_4;
  }
  if (param_3 <= uVar1) {
    if (param_1 <= *(ulonglong *)(this + 8)) {
      _M_replace(this,param_1,0,(wstring *)(*param_2 + param_3 * 2),uVar2);
      return;
    }
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,
               *(ulonglong *)(this + 8));
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6412,param_3,uVar1);
}



// std::__cxx11::wstring::insert(unsigned long long, unsigned long long, wchar_t)

void __thiscall
std::__cxx11::wstring::insert(wstring *this,ulonglong param_1,ulonglong param_2,undefined2 param_3)

{
  if (param_1 <= *(ulonglong *)(this + 8)) {
    _M_replace_aux(this,param_1,0,param_2,param_3);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6412,param_1,
             *(ulonglong *)(this + 8));
}



// void std::__cxx11::wstring::insert<__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >
// >(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >)

void __thiscall
std::__cxx11::wstring::insert<>(wstring *this,longlong param_1,wstring *param_2,longlong param_3)

{
  ulonglong uVar1;
  
  uVar1 = param_1 - *(longlong *)this >> 1;
  if (uVar1 <= *(ulonglong *)(this + 8)) {
    _M_replace(this,uVar1,0,param_2,param_3 - (longlong)param_2 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar1,
             *(ulonglong *)(this + 8));
}



// std::__cxx11::wstring::rbegin()

void std::__cxx11::wstring::rbegin(longlong *param_1,longlong *param_2)

{
  *param_1 = *param_2 + param_2[1] * 2;
  return;
}



// std::__cxx11::wstring::resize(unsigned long long)

void __thiscall std::__cxx11::wstring::resize(wstring *this,ulonglong param_1)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (param_1 <= uVar1) {
    if (param_1 < uVar1) {
      *(ulonglong *)(this + 8) = param_1;
      *(undefined2 *)(*(longlong *)this + param_1 * 2) = 0;
    }
    return;
  }
  _M_replace_aux(this,uVar1,0,param_1 - uVar1,0);
  return;
}



// std::__cxx11::wstring::resize(unsigned long long, wchar_t)

void __thiscall std::__cxx11::wstring::resize(wstring *this,ulonglong param_1,undefined2 param_2)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (param_1 <= uVar1) {
    if (param_1 < uVar1) {
      *(ulonglong *)(this + 8) = param_1;
      *(undefined2 *)(*(longlong *)this + param_1 * 2) = 0;
    }
    return;
  }
  _M_replace_aux(this,uVar1,0,param_1 - uVar1,param_2);
  return;
}



// std::__cxx11::wstring::_M_data(wchar_t*)

void __thiscall std::__cxx11::wstring::_M_data(wstring *this,undefined8 param_1)

{
  *(undefined8 *)this = param_1;
  return;
}



// std::__cxx11::wstring::_S_copy(wchar_t*, wchar_t const*, unsigned long long)

void std::__cxx11::wstring::_S_copy(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memcpy(param_1,param_2,param_3 * 2);
  return;
}



// std::__cxx11::wstring::_S_move(wchar_t*, wchar_t const*, unsigned long long)

void std::__cxx11::wstring::_S_move(undefined2 *param_1,undefined2 *param_2,longlong param_3)

{
  if (param_3 == 1) {
    *param_1 = *param_2;
    return;
  }
  if (param_3 == 0) {
    return;
  }
  memmove(param_1,param_2,param_3 * 2);
  return;
}



void _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE7_S_moveEPwPKwy_part_0
               (void *param_1,void *param_2,longlong param_3)

{
  if (param_3 == 0) {
    return;
  }
  memmove(param_1,param_2,param_3 * 2);
  return;
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, wchar_t*, wchar_t*)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, std::__cxx11::wstring
// const&)

void __thiscall
std::__cxx11::wstring::replace(wstring *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,(wstring *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, wchar_t const*)

void __thiscall
std::__cxx11::wstring::replace(wstring *this,longlong param_1,longlong param_2,wstring *param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  sVar2 = wcslen((wchar_t *)param_3);
  uVar1 = *(ulonglong *)(this + 8);
  uVar3 = param_1 - *(longlong *)this >> 1;
  uVar4 = param_2 - param_1 >> 1;
  if (uVar1 - uVar3 < uVar4) {
    uVar4 = uVar1 - uVar3;
  }
  if (uVar3 <= uVar1) {
    _M_replace(this,uVar3,uVar4,param_3,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar3,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, wchar_t const*, wchar_t
// const*)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, wchar_t const*, unsigned
// long long)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >,
// std::initializer_list<wchar_t>)

void __thiscall
std::__cxx11::wstring::replace(wstring *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,(wstring *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring
// >, __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >, unsigned long long,
// wchar_t)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,ulonglong param_3,undefined2 param_4)

{
  _M_replace_aux(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,param_4);
  return;
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t const*, std::__cxx11::wstring >)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, wchar_t const*)

void __thiscall
std::__cxx11::wstring::replace(wstring *this,longlong param_1,longlong param_2,wstring *param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  
  sVar2 = wcslen((wchar_t *)param_3);
  uVar1 = *(ulonglong *)(this + 8);
  uVar3 = param_1 - *(longlong *)this >> 1;
  uVar4 = param_2 - param_1 >> 1;
  if (uVar1 - uVar3 < uVar4) {
    uVar4 = uVar1 - uVar3;
  }
  if (uVar3 <= uVar1) {
    _M_replace(this,uVar3,uVar4,param_3,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar3,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, wchar_t const*, wchar_t const*)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, wchar_t const*, unsigned long
// long)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,ulonglong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, std::__cxx11::wstring const&)

void __thiscall
std::__cxx11::wstring::replace(wstring *this,longlong param_1,longlong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,(wstring *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, wchar_t*, wchar_t*)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,wstring *param_3,longlong param_4)

{
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  
  uVar1 = *(ulonglong *)(this + 8);
  uVar2 = param_1 - *(longlong *)this >> 1;
  uVar3 = param_2 - param_1 >> 1;
  if (uVar1 - uVar2 < uVar3) {
    uVar3 = uVar1 - uVar2;
  }
  if (uVar2 <= uVar1) {
    _M_replace(this,uVar2,uVar3,param_3,param_4 - (longlong)param_3 >> 1);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c8320,uVar2,uVar1);
}



// std::__cxx11::wstring::replace(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, unsigned long long, wchar_t)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,longlong param_1,longlong param_2,ulonglong param_3,undefined2 param_4)

{
  _M_replace_aux(this,param_1 - *(longlong *)this >> 1,param_2 - param_1 >> 1,param_3,param_4);
  return;
}



// std::__cxx11::wstring::replace(unsigned long long, unsigned long long, wchar_t const*)

void __thiscall
std::__cxx11::wstring::replace(wstring *this,ulonglong param_1,ulonglong param_2,wstring *param_3)

{
  ulonglong uVar1;
  size_t sVar2;
  ulonglong uVar3;
  
  sVar2 = wcslen((wchar_t *)param_3);
  uVar1 = *(ulonglong *)(this + 8);
  uVar3 = uVar1 - param_1;
  if (param_2 < uVar1 - param_1) {
    uVar3 = param_2;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,uVar3,param_3,sVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,uVar1);
}



// std::__cxx11::wstring::replace(unsigned long long, unsigned long long, wchar_t const*, unsigned
// long long)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,wstring *param_3,ulonglong param_4)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,param_2,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,uVar1);
}



// std::__cxx11::wstring::replace(unsigned long long, unsigned long long, std::__cxx11::wstring
// const&)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,param_2,(wstring *)*param_3,param_3[1]);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,uVar1);
}



// std::__cxx11::wstring::replace(unsigned long long, unsigned long long, std::__cxx11::wstring
// const&, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,longlong *param_3,ulonglong param_5_00,
          ulonglong param_5)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = param_3[1];
  uVar2 = uVar1 - param_5_00;
  if (param_5 < uVar1 - param_5_00) {
    uVar2 = param_5;
  }
  if (uVar1 < param_5_00) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_5_00,uVar1
              );
  }
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace(this,param_1,param_2,(wstring *)(*param_3 + param_5_00 * 2),uVar2);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,uVar1);
}



// std::__cxx11::wstring::replace(unsigned long long, unsigned long long, unsigned long long,
// wchar_t)

void __thiscall
std::__cxx11::wstring::replace
          (wstring *this,ulonglong param_1,ulonglong param_2,ulonglong param_3,undefined2 param_4)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 8);
  if (uVar1 - param_1 <= param_2) {
    param_2 = uVar1 - param_1;
  }
  if (param_1 <= uVar1) {
    _M_replace_aux(this,param_1,param_2,param_3,param_4);
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c6427,param_1,uVar1);
}



// std::__cxx11::wstring::reserve()

void std::__cxx11::wstring::reserve(undefined8 *param_1,longlong param_2)

{
  undefined8 *_Dst;
  ulonglong uVar1;
  undefined8 *puVar2;
  ulonglong uVar3;
  void *_Dst_00;
  longlong *plVar4;
  
  puVar2 = (undefined8 *)*param_1;
  _Dst = param_1 + 2;
  if (puVar2 != _Dst) {
    uVar3 = param_1[1];
    if (uVar3 < 8) {
      if (uVar3 == 0) {
        *(undefined2 *)(param_1 + 2) = *(undefined2 *)puVar2;
      }
      else {
        memcpy(_Dst,puVar2,(uVar3 + 1) * 2);
      }
      operator_delete(puVar2);
      *param_1 = _Dst;
    }
    else if (uVar3 < (ulonglong)param_1[2]) {
      uVar1 = uVar3 + 1;
      if (uVar1 >> 0x3e == 0) {
        _Dst_00 = operator_new(uVar1 * 2);
        puVar2 = (undefined8 *)*param_1;
        memcpy(_Dst_00,puVar2,uVar1 * 2);
        if (_Dst != puVar2) {
          operator_delete(puVar2);
        }
        *param_1 = _Dst_00;
        param_1[2] = uVar3;
        return;
      }
      if (-1 < (longlong)uVar1) {
        __throw_bad_alloc();
      }
      plVar4 = (longlong *)__throw_bad_array_new_length();
      if (param_2 == 1) {
        __cxa_begin_catch(plVar4);
                    // WARNING: Subroutine does not return
        __cxa_rethrow();
      }
      __cxa_begin_catch(plVar4);
      __cxa_end_catch();
      return;
    }
  }
  return;
}



// std::__cxx11::wstring::reserve(unsigned long long)

void __thiscall std::__cxx11::wstring::reserve(wstring *this,ulonglong param_1)

{
  longlong lVar1;
  wstring *_Src;
  undefined2 *_Dst;
  ulonglong uVar2;
  ulonglong local_res10 [3];
  
  if (this + 0x10 == *(wstring **)this) {
    uVar2 = 7;
  }
  else {
    uVar2 = *(ulonglong *)(this + 0x10);
  }
  if (param_1 <= uVar2) {
    return;
  }
  local_res10[0] = param_1;
  _Dst = (undefined2 *)_M_create(this,local_res10,uVar2);
  _Src = *(wstring **)this;
  lVar1 = *(longlong *)(this + 8) + 1;
  if (*(longlong *)(this + 8) == 0) {
    *_Dst = *(undefined2 *)_Src;
  }
  else if (lVar1 != 0) {
    memcpy(_Dst,_Src,lVar1 * 2);
  }
  if (this + 0x10 != _Src) {
    operator_delete(_Src);
  }
  *(undefined2 **)this = _Dst;
  *(ulonglong *)(this + 0x10) = local_res10[0];
  return;
}



// std::__cxx11::wstring::_M_erase(unsigned long long, unsigned long long)

void __thiscall std::__cxx11::wstring::_M_erase(wstring *this,longlong param_1,longlong param_2)

{
  undefined2 *_Src;
  undefined2 *_Dst;
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  
  lVar1 = *(longlong *)(this + 8);
  lVar3 = *(longlong *)this;
  lVar2 = lVar1 - (param_1 + param_2);
  if ((lVar2 != 0) && (param_2 != 0)) {
    _Src = (undefined2 *)(lVar3 + (param_1 + param_2) * 2);
    _Dst = (undefined2 *)(lVar3 + param_1 * 2);
    if (lVar2 == 1) {
      *_Dst = *_Src;
    }
    else {
      memmove(_Dst,_Src,lVar2 * 2);
      lVar1 = *(longlong *)(this + 8);
      lVar3 = *(longlong *)this;
    }
  }
  *(longlong *)(this + 8) = lVar1 - param_2;
  *(undefined2 *)(lVar3 + (lVar1 - param_2) * 2) = 0;
  return;
}



// std::__cxx11::wstring::pop_back()

void __thiscall std::__cxx11::wstring::pop_back(wstring *this)

{
  longlong lVar1;
  
  lVar1 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar1 + -1;
  *(undefined2 *)(*(longlong *)this + (lVar1 + -1) * 2) = 0;
  return;
}



// std::__cxx11::wstring::_M_append(wchar_t const*, unsigned long long)

wstring * __thiscall
std::__cxx11::wstring::_M_append(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong uVar1;
  longlong lVar2;
  wstring *pwVar3;
  ulonglong uVar4;
  
  lVar2 = *(longlong *)(this + 8);
  pwVar3 = *(wstring **)this;
  uVar1 = param_2 + lVar2;
  if (pwVar3 == this + 0x10) {
    uVar4 = 7;
  }
  else {
    uVar4 = *(ulonglong *)(this + 0x10);
  }
  if (uVar4 < uVar1) {
    _M_mutate(this,lVar2,0,param_1,param_2);
    pwVar3 = *(wstring **)this;
  }
  else if (param_2 != 0) {
    if (param_2 == 1) {
      *(undefined2 *)(pwVar3 + lVar2 * 2) = *param_1;
    }
    else {
      memcpy(pwVar3 + lVar2 * 2,param_1,param_2 * 2);
      pwVar3 = *(wstring **)this;
    }
  }
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(pwVar3 + uVar1 * 2) = 0;
  return this;
}



// std::__cxx11::wstring::_M_assign(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wstring::_M_assign(wstring *this,wstring *param_1)

{
  ulonglong uVar1;
  wstring *_Dst;
  ulonglong uVar2;
  ulonglong local_40 [2];
  
  if (this == param_1) {
    return;
  }
  _Dst = *(wstring **)this;
  uVar1 = *(ulonglong *)(param_1 + 8);
  if (this + 0x10 == _Dst) {
    uVar2 = 7;
  }
  else {
    uVar2 = *(ulonglong *)(this + 0x10);
  }
  if (uVar2 < uVar1) {
    local_40[0] = uVar1;
    _Dst = (wstring *)_M_create(this,local_40,uVar2);
    if (this + 0x10 != *(wstring **)this) {
      operator_delete(*(wstring **)this);
    }
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
  }
  else if (uVar1 == 0) goto LAB_1400a26b9;
  if (uVar1 == 1) {
    *(undefined2 *)_Dst = **(undefined2 **)param_1;
  }
  else {
    memcpy(_Dst,*(undefined2 **)param_1,uVar1 * 2);
    _Dst = *(wstring **)this;
  }
LAB_1400a26b9:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar1 * 2) = 0;
  return;
}



// std::__cxx11::wstring::_M_create(unsigned long long&, unsigned long long)

void __thiscall
std::__cxx11::wstring::_M_create(undefined8 param_1_00,ulonglong *param_2,ulonglong param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  
  uVar1 = *param_2;
  if (0x1fffffffffffffff < uVar1) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::_M_create");
  }
  if ((param_3 < uVar1) && (uVar2 = param_3 * 2, uVar1 < uVar2)) {
    if (0x1fffffffffffffff < uVar2) {
      *param_2 = 0x1fffffffffffffff;
      operator_new(0x4000000000000000);
      return;
    }
    *param_2 = uVar2;
    uVar1 = uVar2;
  }
  operator_new((uVar1 + 1) * 2);
  return;
}



// std::__cxx11::wstring::_M_length(unsigned long long)

void __thiscall std::__cxx11::wstring::_M_length(wstring *this,undefined8 param_1)

{
  *(undefined8 *)(this + 8) = param_1;
  return;
}



// std::__cxx11::wstring::_M_mutate(unsigned long long, unsigned long long, wchar_t const*, unsigned
// long long)

void __thiscall
std::__cxx11::wstring::_M_mutate
          (wstring *this,longlong param_1,longlong param_2,undefined2 *param_3,longlong param_4)

{
  wstring *pwVar1;
  undefined2 *_Dst;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong local_50 [2];
  
  local_50[0] = (param_4 - param_2) + *(longlong *)(this + 8);
  lVar3 = *(longlong *)(this + 8) - (param_1 + param_2);
  if (this + 0x10 == *(wstring **)this) {
    uVar2 = 7;
  }
  else {
    uVar2 = *(ulonglong *)(this + 0x10);
  }
  _Dst = (undefined2 *)_M_create(this,local_50,uVar2);
  if (param_1 != 0) {
    if (param_1 == 1) {
      *_Dst = **(undefined2 **)this;
    }
    else {
      memcpy(_Dst,*(undefined2 **)this,param_1 * 2);
    }
  }
  if ((param_3 != (undefined2 *)0x0) && (param_4 != 0)) {
    if (param_4 == 1) {
      _Dst[param_1] = *param_3;
    }
    else {
      memcpy(_Dst + param_1,param_3,param_4 * 2);
    }
  }
  pwVar1 = *(wstring **)this;
  if (lVar3 != 0) {
    if (lVar3 == 1) {
      _Dst[param_1 + param_4] = *(undefined2 *)(pwVar1 + (param_1 + param_2) * 2);
    }
    else {
      memcpy(_Dst + param_1 + param_4,pwVar1 + (param_1 + param_2) * 2,lVar3 * 2);
    }
  }
  if (this + 0x10 != pwVar1) {
    operator_delete(pwVar1);
  }
  *(undefined2 **)this = _Dst;
  *(ulonglong *)(this + 0x10) = local_50[0];
  return;
}



// std::__cxx11::wstring::_S_assign(wchar_t*, unsigned long long, wchar_t)

void std::__cxx11::wstring::_S_assign(undefined2 *param_1,ulonglong param_2,undefined2 param_3)

{
  ulonglong uVar1;
  
  if (param_2 == 1) {
    *param_1 = param_3;
    return;
  }
  if (param_2 != 0) {
    uVar1 = 0;
    if ((param_2 & 1) != 0) {
      *param_1 = param_3;
      uVar1 = 1;
      if (param_2 == 1) {
        return;
      }
    }
    do {
      param_1[uVar1] = param_3;
      param_1[uVar1 + 1] = param_3;
      uVar1 = uVar1 + 2;
    } while (param_2 != uVar1);
  }
  return;
}



// std::__cxx11::wstring::push_back(wchar_t)

void __thiscall std::__cxx11::wstring::push_back(wstring *this,undefined2 param_1)

{
  longlong lVar1;
  wstring *pwVar2;
  ulonglong uVar3;
  
  lVar1 = *(longlong *)(this + 8);
  pwVar2 = *(wstring **)this;
  if (pwVar2 == this + 0x10) {
    uVar3 = 7;
  }
  else {
    uVar3 = *(ulonglong *)(this + 0x10);
  }
  if (uVar3 < lVar1 + 1U) {
    _M_mutate(this,lVar1,0,(undefined2 *)0x0,1);
    pwVar2 = *(wstring **)this;
  }
  *(undefined2 *)(pwVar2 + lVar1 * 2) = param_1;
  *(ulonglong *)(this + 8) = lVar1 + 1U;
  *(undefined2 *)(pwVar2 + lVar1 * 2 + 2) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring&&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined8 *_Src;
  longlong lVar1;
  
  _Src = param_1 + 2;
  *(wstring **)this = this + 0x10;
  lVar1 = param_1[1];
  if (_Src == (undefined8 *)*param_1) {
    memcpy(this + 0x10,_Src,lVar1 * 2 + 2);
    lVar1 = param_1[1];
  }
  else {
    *(undefined8 **)this = (undefined8 *)*param_1;
    *(undefined8 *)(this + 0x10) = param_1[2];
  }
  *(longlong *)(this + 8) = lVar1;
  *param_1 = _Src;
  param_1[1] = 0;
  *(undefined2 *)(param_1 + 2) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring&&, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined8 *_Src;
  longlong lVar1;
  undefined8 uVar2;
  
  *(wstring **)this = this + 0x10;
  _Src = param_1 + 2;
  lVar1 = param_1[1];
  if (_Src != (undefined8 *)*param_1) {
    uVar2 = param_1[2];
    *(undefined8 **)this = (undefined8 *)*param_1;
    *param_1 = _Src;
    param_1[1] = 0;
    *(undefined2 *)(param_1 + 2) = 0;
    *(longlong *)(this + 8) = lVar1;
    *(undefined8 *)(this + 0x10) = uVar2;
    return;
  }
  memcpy(this + 0x10,_Src,lVar1 * 2 + 2);
  uVar2 = param_1[1];
  param_1[1] = 0;
  *(undefined8 *)(this + 8) = uVar2;
  *(undefined2 *)*param_1 = 0;
  return;
}



// std::__cxx11::wstring::wstring(wchar_t const*, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  
  *(wstring **)this = this + 0x10;
  if (param_1 != (wchar_t *)0x0) {
    sVar1 = wcslen(param_1);
    _M_construct<>((undefined8 *)this,param_1,(longlong)(param_1 + sVar1));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::wstring::wstring(wchar_t const*, unsigned long long, std::allocator<wchar_t>
// const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if ((param_1 == (undefined2 *)0x0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string: construction from null is not valid");
  }
  _Size = param_2 * 2;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a2b55;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a2b55:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(wstring **)this = this + 0x10;
  *(undefined2 *)(this + 0x10) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_1[1] * 2;
  uVar2 = (longlong)_Size >> 1;
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  _Src = (undefined2 *)*param_1;
  local_40[0] = uVar2;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar2 == 1) {
      uVar1 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a2c3b;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar1 = local_40[0];
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a2c3b:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_1[1] * 2;
  uVar2 = (longlong)_Size >> 1;
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  _Src = (undefined2 *)*param_1;
  local_40[0] = uVar2;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar2 == 1) {
      uVar1 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a2ceb;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar1 = local_40[0];
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a2ceb:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, unsigned long long,
// std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2)

{
  undefined2 *_Src;
  ulonglong uVar1;
  wstring *_Dst;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar1 = param_1[1];
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if (uVar1 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c631f,param_2,uVar1);
  }
  _Src = (undefined2 *)(*param_1 + param_2 * 2);
  uVar1 = (uVar1 - param_2) * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a2dab;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = *(wstring **)this;
LAB_1400a2dab:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar4) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, unsigned long long, unsigned long
// long)

void __thiscall
std::__cxx11::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar3 = param_1[1];
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if (uVar3 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c631f,param_2,uVar3);
  }
  _Src = (undefined2 *)(*param_1 + param_2 * 2);
  uVar1 = uVar3 - param_2;
  if (param_3 < uVar3 - param_2) {
    uVar1 = param_3;
  }
  uVar1 = uVar1 * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a2e92;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = *(wstring **)this;
LAB_1400a2e92:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar4) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, unsigned long long, unsigned long
// long, std::allocator<wchar_t> const&)

void __thiscall
std::__cxx11::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar3 = param_1[1];
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if (uVar3 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c633a,param_2,uVar3);
  }
  _Src = (undefined2 *)(*param_1 + param_2 * 2);
  uVar1 = uVar3 - param_2;
  if (param_3 < uVar3 - param_2) {
    uVar1 = param_3;
  }
  uVar1 = uVar1 * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a2f72;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = *(wstring **)this;
LAB_1400a2f72:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar4) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::initializer_list<wchar_t>, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Src = (undefined2 *)*param_1;
  _Size = param_1[1] * 2;
  uVar2 = (longlong)_Size >> 1;
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  local_40[0] = uVar2;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar2 == 1) {
      uVar1 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a303b;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar1 = local_40[0];
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a303b:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring()

void __thiscall std::__cxx11::wstring::wstring(wstring *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(wstring **)this = this + 0x10;
  *(undefined2 *)(this + 0x10) = 0;
  return;
}



// std::__cxx11::wstring::wstring(unsigned long long, wchar_t, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,ulonglong param_1,undefined2 param_2)

{
  wstring *pwVar1;
  ulonglong uVar2;
  ulonglong local_20;
  
  pwVar1 = this + 0x10;
  *(wstring **)this = pwVar1;
  local_20 = param_1;
  if (7 < param_1) {
    pwVar1 = (wstring *)_M_create(this,&local_20,0);
    *(wstring **)this = pwVar1;
    *(ulonglong *)(this + 0x10) = local_20;
  }
  if (local_20 != 0) {
    uVar2 = 0;
    if (local_20 == 1) {
      *(undefined2 *)pwVar1 = param_2;
    }
    else {
      if ((local_20 & 1) != 0) {
        uVar2 = 1;
        *(undefined2 *)pwVar1 = param_2;
        if (local_20 == 1) goto LAB_1400a30e7;
      }
      do {
        *(undefined2 *)(pwVar1 + uVar2 * 2) = param_2;
        *(undefined2 *)(pwVar1 + uVar2 * 2 + 2) = param_2;
        uVar2 = uVar2 + 2;
      } while (uVar2 != local_20);
    }
  }
LAB_1400a30e7:
  *(ulonglong *)(this + 8) = local_20;
  *(undefined2 *)(pwVar1 + local_20 * 2) = 0;
  return;
}



// std::__cxx11::wstring::wstring<__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// void>(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(wstring **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a31b1;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a31b1:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring<wchar_t const*, void>(wchar_t const*, wchar_t const*,
// std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(wstring **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a3271;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3271:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring<wchar_t*, void>(wchar_t*, wchar_t*, std::allocator<wchar_t>
// const&)

void __thiscall std::__cxx11::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(wstring **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a3331;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3331:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring&&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined8 *_Src;
  longlong lVar1;
  
  _Src = param_1 + 2;
  *(wstring **)this = this + 0x10;
  lVar1 = param_1[1];
  if (_Src == (undefined8 *)*param_1) {
    memcpy(this + 0x10,_Src,lVar1 * 2 + 2);
    lVar1 = param_1[1];
  }
  else {
    *(undefined8 **)this = (undefined8 *)*param_1;
    *(undefined8 *)(this + 0x10) = param_1[2];
  }
  *(longlong *)(this + 8) = lVar1;
  *param_1 = _Src;
  param_1[1] = 0;
  *(undefined2 *)(param_1 + 2) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring&&, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined8 *_Src;
  longlong lVar1;
  undefined8 uVar2;
  
  *(wstring **)this = this + 0x10;
  _Src = param_1 + 2;
  lVar1 = param_1[1];
  if (_Src != (undefined8 *)*param_1) {
    uVar2 = param_1[2];
    *(undefined8 **)this = (undefined8 *)*param_1;
    *param_1 = _Src;
    param_1[1] = 0;
    *(undefined2 *)(param_1 + 2) = 0;
    *(longlong *)(this + 8) = lVar1;
    *(undefined8 *)(this + 0x10) = uVar2;
    return;
  }
  memcpy(this + 0x10,_Src,lVar1 * 2 + 2);
  uVar2 = param_1[1];
  param_1[1] = 0;
  *(undefined8 *)(this + 8) = uVar2;
  *(undefined2 *)*param_1 = 0;
  return;
}



// std::__cxx11::wstring::wstring(wchar_t const*, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,wchar_t *param_1)

{
  size_t sVar1;
  
  *(wstring **)this = this + 0x10;
  if (param_1 != (wchar_t *)0x0) {
    sVar1 = wcslen(param_1);
    _M_construct<>((undefined8 *)this,param_1,(longlong)(param_1 + sVar1));
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_logic_error("basic_string: construction from null is not valid");
}



// std::__cxx11::wstring::wstring(wchar_t const*, unsigned long long, std::allocator<wchar_t>
// const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined2 *param_1,longlong param_2)

{
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if ((param_1 == (undefined2 *)0x0) && (param_2 != 0)) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string: construction from null is not valid");
  }
  _Size = param_2 * 2;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a3535;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3535:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(wstring **)this = this + 0x10;
  *(undefined2 *)(this + 0x10) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_1[1] * 2;
  uVar2 = (longlong)_Size >> 1;
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  _Src = (undefined2 *)*param_1;
  local_40[0] = uVar2;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar2 == 1) {
      uVar1 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a361b;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar1 = local_40[0];
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a361b:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Size = param_1[1] * 2;
  uVar2 = (longlong)_Size >> 1;
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  _Src = (undefined2 *)*param_1;
  local_40[0] = uVar2;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar2 == 1) {
      uVar1 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a36cb;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar1 = local_40[0];
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a36cb:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, unsigned long long,
// std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2)

{
  undefined2 *_Src;
  ulonglong uVar1;
  wstring *_Dst;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar1 = param_1[1];
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if (uVar1 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c631f,param_2,uVar1);
  }
  _Src = (undefined2 *)(*param_1 + param_2 * 2);
  uVar1 = (uVar1 - param_2) * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a378b;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = *(wstring **)this;
LAB_1400a378b:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar4) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, unsigned long long, unsigned long
// long)

void __thiscall
std::__cxx11::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar3 = param_1[1];
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if (uVar3 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c631f,param_2,uVar3);
  }
  _Src = (undefined2 *)(*param_1 + param_2 * 2);
  uVar1 = uVar3 - param_2;
  if (param_3 < uVar3 - param_2) {
    uVar1 = param_3;
  }
  uVar1 = uVar1 * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a3872;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = *(wstring **)this;
LAB_1400a3872:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar4) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::__cxx11::wstring const&, unsigned long long, unsigned long
// long, std::allocator<wchar_t> const&)

void __thiscall
std::__cxx11::wstring::wstring(wstring *this,longlong *param_1,ulonglong param_2,ulonglong param_3)

{
  undefined2 *_Src;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong local_40 [2];
  
  uVar3 = param_1[1];
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  if (uVar3 < param_2) {
                    // WARNING: Subroutine does not return
    __throw_out_of_range_fmt
              ("%s: __pos (which is %zu) > this->size() (which is %zu)",0x1400c633a,param_2,uVar3);
  }
  _Src = (undefined2 *)(*param_1 + param_2 * 2);
  uVar1 = uVar3 - param_2;
  if (param_3 < uVar3 - param_2) {
    uVar1 = param_3;
  }
  uVar1 = uVar1 * 2;
  uVar3 = (longlong)uVar1 >> 1;
  local_40[0] = uVar3;
  if (uVar1 < 0xf) {
    uVar4 = uVar1;
    if (uVar3 == 1) {
      uVar2 = 1;
      uVar4 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a3952;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar4 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar3 != 0) {
    memcpy(_Dst,_Src,uVar1);
  }
  _Dst = *(wstring **)this;
LAB_1400a3952:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar4) = 0;
  return;
}



// std::__cxx11::wstring::wstring(std::initializer_list<wchar_t>, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,undefined8 *param_1)

{
  undefined2 *_Src;
  ulonglong _Size;
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Src = (undefined2 *)*param_1;
  _Size = param_1[1] * 2;
  uVar2 = (longlong)_Size >> 1;
  _Dst = this + 0x10;
  *(wstring **)this = _Dst;
  local_40[0] = uVar2;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar2 == 1) {
      uVar1 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *_Src;
      goto LAB_1400a3a1b;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar1 = local_40[0];
  if (uVar2 != 0) {
    memcpy(_Dst,_Src,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3a1b:
  *(ulonglong *)(this + 8) = uVar1;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring()

void __thiscall std::__cxx11::wstring::wstring(wstring *this)

{
  *(undefined8 *)(this + 8) = 0;
  *(wstring **)this = this + 0x10;
  *(undefined2 *)(this + 0x10) = 0;
  return;
}



// std::__cxx11::wstring::wstring(unsigned long long, wchar_t, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring(wstring *this,ulonglong param_1,undefined2 param_2)

{
  wstring *pwVar1;
  ulonglong uVar2;
  ulonglong local_20;
  
  pwVar1 = this + 0x10;
  *(wstring **)this = pwVar1;
  local_20 = param_1;
  if (7 < param_1) {
    pwVar1 = (wstring *)_M_create(this,&local_20,0);
    *(wstring **)this = pwVar1;
    *(ulonglong *)(this + 0x10) = local_20;
  }
  if (local_20 != 0) {
    uVar2 = 0;
    if (local_20 == 1) {
      *(undefined2 *)pwVar1 = param_2;
    }
    else {
      if ((local_20 & 1) != 0) {
        uVar2 = 1;
        *(undefined2 *)pwVar1 = param_2;
        if (local_20 == 1) goto LAB_1400a3ac7;
      }
      do {
        *(undefined2 *)(pwVar1 + uVar2 * 2) = param_2;
        *(undefined2 *)(pwVar1 + uVar2 * 2 + 2) = param_2;
        uVar2 = uVar2 + 2;
      } while (uVar2 != local_20);
    }
  }
LAB_1400a3ac7:
  *(ulonglong *)(this + 8) = local_20;
  *(undefined2 *)(pwVar1 + local_20 * 2) = 0;
  return;
}



// std::__cxx11::wstring::wstring<__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// void>(__gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >,
// __gnu_cxx::__normal_iterator<wchar_t*, std::__cxx11::wstring >, std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(wstring **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a3b91;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3b91:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring<wchar_t const*, void>(wchar_t const*, wchar_t const*,
// std::allocator<wchar_t> const&)

void __thiscall std::__cxx11::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(wstring **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a3c51;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3c51:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::wstring<wchar_t*, void>(wchar_t*, wchar_t*, std::allocator<wchar_t>
// const&)

void __thiscall std::__cxx11::wstring::wstring<>(wstring *this,undefined2 *param_1,longlong param_2)

{
  wstring *_Dst;
  ulonglong uVar1;
  ulonglong _Size;
  ulonglong uVar2;
  ulonglong uVar3;
  ulonglong local_40 [2];
  
  _Dst = this + 0x10;
  _Size = param_2 - (longlong)param_1;
  *(wstring **)this = _Dst;
  *(undefined8 *)(this + 8) = 0;
  uVar1 = (longlong)_Size >> 1;
  local_40[0] = uVar1;
  if (_Size < 0xf) {
    uVar3 = _Size;
    if (uVar1 == 1) {
      uVar2 = 1;
      uVar3 = 2;
      *(undefined2 *)(this + 0x10) = *param_1;
      goto LAB_1400a3d11;
    }
  }
  else {
    _Dst = (wstring *)_M_create(this,local_40,0);
    *(wstring **)this = _Dst;
    *(ulonglong *)(this + 0x10) = local_40[0];
    uVar3 = local_40[0] * 2;
  }
  uVar2 = local_40[0];
  if (uVar1 != 0) {
    memcpy(_Dst,param_1,_Size);
  }
  _Dst = *(wstring **)this;
LAB_1400a3d11:
  *(ulonglong *)(this + 8) = uVar2;
  *(undefined2 *)(_Dst + uVar3) = 0;
  return;
}



// std::__cxx11::wstring::~wstring()

void __thiscall std::__cxx11::wstring::~wstring(wstring *this)

{
  if (*(wstring **)this != this + 0x10) {
    operator_delete(*(wstring **)this);
    return;
  }
  return;
}



// std::__cxx11::wstring::~wstring()

void __thiscall std::__cxx11::wstring::~wstring(wstring *this)

{
  if (*(wstring **)this != this + 0x10) {
    operator_delete(*(wstring **)this);
    return;
  }
  return;
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstring&&)

wstring * __thiscall std::__cxx11::wstring::operator=(wstring *this,wstring *param_1)

{
  wstring *pwVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  wstring *_Src;
  wstring *_Dst;
  longlong lVar4;
  
  lVar4 = *(longlong *)(param_1 + 8);
  _Dst = *(wstring **)this;
  _Src = *(wstring **)param_1;
  pwVar1 = param_1 + 0x10;
  if (_Dst == this + 0x10) {
    if (pwVar1 == _Src) goto LAB_1400a3e40;
    *(wstring **)this = _Src;
    uVar2 = *(undefined8 *)(param_1 + 0x10);
    *(longlong *)(this + 8) = lVar4;
    *(undefined8 *)(this + 0x10) = uVar2;
  }
  else {
    if (pwVar1 == _Src) {
LAB_1400a3e40:
      if (this != param_1) {
        if (lVar4 != 0) {
          if (lVar4 == 1) {
            *(undefined2 *)_Dst = *(undefined2 *)_Src;
          }
          else {
            memcpy(_Dst,_Src,lVar4 * 2);
            _Dst = *(wstring **)this;
            lVar4 = *(longlong *)(param_1 + 8);
            _Src = *(wstring **)param_1;
          }
        }
        *(longlong *)(this + 8) = lVar4;
        *(undefined2 *)(_Dst + lVar4 * 2) = 0;
      }
      goto LAB_1400a3e08;
    }
    uVar3 = *(undefined8 *)(this + 0x10);
    *(wstring **)this = _Src;
    uVar2 = *(undefined8 *)(param_1 + 0x10);
    *(longlong *)(this + 8) = lVar4;
    *(undefined8 *)(this + 0x10) = uVar2;
    if (_Dst != (wstring *)0x0) {
      *(wstring **)param_1 = _Dst;
      *(undefined8 *)(param_1 + 0x10) = uVar3;
      _Src = _Dst;
      goto LAB_1400a3e08;
    }
  }
  *(wstring **)param_1 = pwVar1;
  _Src = pwVar1;
LAB_1400a3e08:
  *(undefined8 *)(param_1 + 8) = 0;
  *(undefined2 *)_Src = 0;
  return this;
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*)

void __thiscall std::__cxx11::wstring::operator=(wstring *this,wstring *param_1)

{
  size_t sVar1;
  
  sVar1 = wcslen((wchar_t *)param_1);
  _M_replace(this,0,*(ulonglong *)(this + 8),param_1,sVar1);
  return;
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstring const&)

wstring * __thiscall std::__cxx11::wstring::operator=(wstring *this,wstring *param_1)

{
  _M_assign(this,param_1);
  return this;
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>)

wstring * __thiscall std::__cxx11::wstring::operator=(wstring *this,undefined8 *param_1)

{
  _M_replace(this,0,*(ulonglong *)(this + 8),(wstring *)*param_1,param_1[1]);
  return this;
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t)

wstring * __thiscall std::__cxx11::wstring::operator=(wstring *this,undefined2 param_1)

{
  _M_replace_aux(this,0,*(ulonglong *)(this + 8),1,param_1);
  return this;
}



// std::__cxx11::wstring::operator[](unsigned long long)

longlong __thiscall std::__cxx11::wstring::operator[](wstring *this,longlong param_1)

{
  return *(longlong *)this + param_1 * 2;
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*)

wstring * __thiscall std::__cxx11::wstring::operator+=(wstring *this,wchar_t *param_1)

{
  ulonglong uVar1;
  longlong lVar2;
  size_t sVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  sVar3 = wcslen(param_1);
  lVar2 = *(longlong *)(this + 8);
  if (sVar3 <= 0x1fffffffffffffffU - lVar2) {
    pwVar4 = *(wstring **)this;
    uVar1 = sVar3 + lVar2;
    if (pwVar4 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar1) {
      _M_mutate(this,lVar2,0,param_1,sVar3);
      pwVar4 = *(wstring **)this;
    }
    else if (sVar3 != 0) {
      if (sVar3 == 1) {
        *(wchar_t *)(pwVar4 + lVar2 * 2) = *param_1;
      }
      else {
        memcpy(pwVar4 + lVar2 * 2,param_1,sVar3 * 2);
        pwVar4 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstring const&)

wstring * __thiscall std::__cxx11::wstring::operator+=(wstring *this,undefined8 *param_1)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined2 *_Src;
  longlong lVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  uVar2 = param_1[1];
  _Src = (undefined2 *)*param_1;
  lVar3 = *(longlong *)(this + 8);
  if (uVar2 <= 0x1fffffffffffffffU - lVar3) {
    pwVar4 = *(wstring **)this;
    uVar1 = uVar2 + lVar3;
    if (pwVar4 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar1) {
      _M_mutate(this,lVar3,0,_Src,uVar2);
      pwVar4 = *(wstring **)this;
    }
    else if (uVar2 != 0) {
      if (uVar2 == 1) {
        *(undefined2 *)(pwVar4 + lVar3 * 2) = *_Src;
      }
      else {
        memcpy(pwVar4 + lVar3 * 2,_Src,uVar2 * 2);
        pwVar4 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(std::initializer_list<wchar_t>)

wstring * __thiscall std::__cxx11::wstring::operator+=(wstring *this,undefined8 *param_1)

{
  ulonglong uVar1;
  undefined2 *_Src;
  ulonglong uVar2;
  longlong lVar3;
  wstring *pwVar4;
  ulonglong uVar5;
  
  _Src = (undefined2 *)*param_1;
  uVar2 = param_1[1];
  lVar3 = *(longlong *)(this + 8);
  if (uVar2 <= 0x1fffffffffffffffU - lVar3) {
    pwVar4 = *(wstring **)this;
    uVar1 = uVar2 + lVar3;
    if (pwVar4 == this + 0x10) {
      uVar5 = 7;
    }
    else {
      uVar5 = *(ulonglong *)(this + 0x10);
    }
    if (uVar5 < uVar1) {
      _M_mutate(this,lVar3,0,_Src,uVar2);
      pwVar4 = *(wstring **)this;
    }
    else if (uVar2 != 0) {
      if (uVar2 == 1) {
        *(undefined2 *)(pwVar4 + lVar3 * 2) = *_Src;
      }
      else {
        memcpy(pwVar4 + lVar3 * 2,_Src,uVar2 * 2);
        pwVar4 = *(wstring **)this;
      }
    }
    *(ulonglong *)(this + 8) = uVar1;
    *(undefined2 *)(pwVar4 + uVar1 * 2) = 0;
    return this;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t)

wstring * __thiscall std::__cxx11::wstring::operator+=(wstring *this,undefined2 param_1)

{
  longlong lVar1;
  wstring *pwVar2;
  ulonglong uVar3;
  
  lVar1 = *(longlong *)(this + 8);
  pwVar2 = *(wstring **)this;
  if (pwVar2 == this + 0x10) {
    uVar3 = 7;
  }
  else {
    uVar3 = *(ulonglong *)(this + 0x10);
  }
  if (uVar3 < lVar1 + 1U) {
    _M_mutate(this,lVar1,0,(undefined2 *)0x0,1);
    pwVar2 = *(wstring **)this;
  }
  *(undefined2 *)(pwVar2 + lVar1 * 2) = param_1;
  *(ulonglong *)(this + 8) = lVar1 + 1U;
  *(undefined2 *)(pwVar2 + lVar1 * 2 + 2) = 0;
  return this;
}



// std::__cxx11::collate_byname<char>::collate_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::collate_byname<char>::collate_byname
          (collate_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc4c0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<char>::collate_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::collate_byname<char>::collate_byname
          (collate_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc4c0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<char>::collate_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::collate_byname<char>::collate_byname
          (collate_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc4c0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<char>::collate_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::collate_byname<char>::collate_byname
          (collate_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc4c0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<char>::~collate_byname()

void __thiscall std::__cxx11::collate_byname<char>::~collate_byname(collate_byname<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc20;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::collate_byname<char>::~collate_byname()

void __thiscall std::__cxx11::collate_byname<char>::~collate_byname(collate_byname<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc20;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::collate_byname<char>::~collate_byname()

void __thiscall std::__cxx11::collate_byname<char>::~collate_byname(collate_byname<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc20;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::collate_byname<wchar_t>::collate_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc500;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<wchar_t>::collate_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc500;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<wchar_t>::collate_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc500;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<wchar_t>::collate_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::collate_byname<wchar_t>::collate_byname
          (collate_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  longlong lVar2;
  
  _Str1 = (char *)*param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__collate_byname_1400dc500;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),_Str1);
      return;
    }
  }
  return;
}



// std::__cxx11::collate_byname<wchar_t>::~collate_byname()

void __thiscall
std::__cxx11::collate_byname<wchar_t>::~collate_byname(collate_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc60;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::collate_byname<wchar_t>::~collate_byname()

void __thiscall
std::__cxx11::collate_byname<wchar_t>::~collate_byname(collate_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc60;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::collate_byname<wchar_t>::~collate_byname()

void __thiscall
std::__cxx11::collate_byname<wchar_t>::~collate_byname(collate_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc60;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::stringbuf::__xfer_bufptrs::__xfer_bufptrs(std::__cxx11::stringbuf const&,
// std::__cxx11::stringbuf*)

void __thiscall
std::__cxx11::stringbuf::__xfer_bufptrs::__xfer_bufptrs
          (__xfer_bufptrs *this,longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  
  lVar3 = *(longlong *)(param_1 + 8);
  *(undefined8 *)this = param_2;
  lVar4 = *(longlong *)(param_1 + 0x48);
  *(undefined4 *)(this + 8) = 0xffffffff;
  *(undefined4 *)(this + 0xc) = 0xffffffff;
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  *(undefined4 *)(this + 0x14) = 0xffffffff;
  *(undefined4 *)(this + 0x18) = 0xffffffff;
  *(undefined4 *)(this + 0x1c) = 0xffffffff;
  *(undefined4 *)(this + 0x20) = 0xffffffff;
  *(undefined4 *)(this + 0x24) = 0xffffffff;
  *(undefined4 *)(this + 0x28) = 0xffffffff;
  *(undefined4 *)(this + 0x2c) = 0xffffffff;
  *(undefined4 *)(this + 0x30) = 0xffffffff;
  *(undefined4 *)(this + 0x34) = 0xffffffff;
  lVar1 = *(longlong *)(param_1 + 0x20);
  if (lVar3 == 0) {
    if (lVar1 == 0) {
      return;
    }
    uVar7 = *(ulonglong *)(param_1 + 0x28);
    *(longlong *)(this + 0x30) = *(longlong *)(param_1 + 0x30) - lVar4;
    *(longlong *)(this + 0x20) = lVar1 - lVar4;
    *(ulonglong *)(this + 0x28) = uVar7 - lVar1;
  }
  else {
    uVar5 = *(ulonglong *)(param_1 + 0x18);
    lVar2 = *(longlong *)(param_1 + 0x10);
    *(longlong *)(this + 8) = lVar3 - lVar4;
    *(longlong *)(this + 0x10) = lVar2 - lVar4;
    *(ulonglong *)(this + 0x18) = uVar5 - lVar4;
    uVar7 = uVar5;
    if (lVar1 != 0) {
      uVar6 = *(ulonglong *)(param_1 + 0x28);
      *(longlong *)(this + 0x30) = *(longlong *)(param_1 + 0x30) - lVar4;
      *(longlong *)(this + 0x20) = lVar1 - lVar4;
      *(ulonglong *)(this + 0x28) = uVar6 - lVar1;
      uVar7 = uVar6;
      if (uVar5 != 0) {
        uVar7 = uVar5;
        if (uVar5 < uVar6) {
          uVar7 = uVar6;
        }
        goto LAB_1400a494c;
      }
    }
  }
  if (uVar7 == 0) {
    return;
  }
LAB_1400a494c:
  *(ulonglong *)(param_1 + 0x50) = uVar7 - lVar4;
  return;
}



// std::__cxx11::stringbuf::__xfer_bufptrs::__xfer_bufptrs(std::__cxx11::stringbuf const&,
// std::__cxx11::stringbuf*)

void __thiscall
std::__cxx11::stringbuf::__xfer_bufptrs::__xfer_bufptrs
          (__xfer_bufptrs *this,longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  ulonglong uVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  
  lVar3 = *(longlong *)(param_1 + 8);
  *(undefined8 *)this = param_2;
  lVar4 = *(longlong *)(param_1 + 0x48);
  *(undefined4 *)(this + 8) = 0xffffffff;
  *(undefined4 *)(this + 0xc) = 0xffffffff;
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  *(undefined4 *)(this + 0x14) = 0xffffffff;
  *(undefined4 *)(this + 0x18) = 0xffffffff;
  *(undefined4 *)(this + 0x1c) = 0xffffffff;
  *(undefined4 *)(this + 0x20) = 0xffffffff;
  *(undefined4 *)(this + 0x24) = 0xffffffff;
  *(undefined4 *)(this + 0x28) = 0xffffffff;
  *(undefined4 *)(this + 0x2c) = 0xffffffff;
  *(undefined4 *)(this + 0x30) = 0xffffffff;
  *(undefined4 *)(this + 0x34) = 0xffffffff;
  lVar1 = *(longlong *)(param_1 + 0x20);
  if (lVar3 == 0) {
    if (lVar1 == 0) {
      return;
    }
    uVar7 = *(ulonglong *)(param_1 + 0x28);
    *(longlong *)(this + 0x30) = *(longlong *)(param_1 + 0x30) - lVar4;
    *(longlong *)(this + 0x20) = lVar1 - lVar4;
    *(ulonglong *)(this + 0x28) = uVar7 - lVar1;
  }
  else {
    uVar5 = *(ulonglong *)(param_1 + 0x18);
    lVar2 = *(longlong *)(param_1 + 0x10);
    *(longlong *)(this + 8) = lVar3 - lVar4;
    *(longlong *)(this + 0x10) = lVar2 - lVar4;
    *(ulonglong *)(this + 0x18) = uVar5 - lVar4;
    uVar7 = uVar5;
    if (lVar1 != 0) {
      uVar6 = *(ulonglong *)(param_1 + 0x28);
      *(longlong *)(this + 0x30) = *(longlong *)(param_1 + 0x30) - lVar4;
      *(longlong *)(this + 0x20) = lVar1 - lVar4;
      *(ulonglong *)(this + 0x28) = uVar6 - lVar1;
      uVar7 = uVar6;
      if (uVar5 != 0) {
        uVar7 = uVar5;
        if (uVar5 < uVar6) {
          uVar7 = uVar6;
        }
        goto LAB_1400a4a1c;
      }
    }
  }
  if (uVar7 == 0) {
    return;
  }
LAB_1400a4a1c:
  *(ulonglong *)(param_1 + 0x50) = uVar7 - lVar4;
  return;
}



// std::__cxx11::stringbuf::__xfer_bufptrs::~__xfer_bufptrs()

void __thiscall std::__cxx11::stringbuf::__xfer_bufptrs::~__xfer_bufptrs(__xfer_bufptrs *this)

{
  longlong lVar1;
  longlong lVar2;
  undefined1 auVar3 [16];
  longlong lVar4;
  int iVar5;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar6;
  
  lVar2 = *(longlong *)this;
  lVar7 = *(longlong *)(this + 8);
  lVar6 = *(longlong *)(lVar2 + 0x48);
  if (lVar7 != -1) {
    lVar1 = *(longlong *)(this + 0x10);
    *(longlong *)(lVar2 + 0x18) = *(longlong *)(this + 0x18) + lVar6;
    *(longlong *)(lVar2 + 8) = lVar7 + lVar6;
    *(longlong *)(lVar2 + 0x10) = lVar1 + lVar6;
  }
  if (*(longlong *)(this + 0x20) != -1) {
    lVar1 = *(longlong *)(this + 0x28);
    lVar7 = lVar6 + *(longlong *)(this + 0x20);
    *(longlong *)(lVar2 + 0x30) = *(longlong *)(this + 0x30) + lVar6;
    *(longlong *)(lVar2 + 0x20) = lVar7;
    *(longlong *)(lVar2 + 0x28) = lVar7;
    if (lVar1 < 0x80000000) {
      iVar5 = (int)lVar1;
    }
    else {
      auVar3._8_8_ = 0;
      auVar3._0_8_ = lVar1 - 0x80000000U;
      lVar8 = SUB168(ZEXT816(0x200000005) * auVar3,8);
      lVar6 = lVar1 + -0x7fffffff;
      lVar9 = lVar1;
      if (0x7fffffff < lVar6) {
        lVar9 = lVar6;
        lVar4 = lVar1;
        if ((lVar8 + ((lVar1 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a4b20;
        while (lVar6 = lVar4 + -0xfffffffe, 0x7fffffff < lVar6) {
LAB_1400a4b20:
          lVar9 = lVar6 + -0x7fffffff;
          lVar4 = lVar6;
        }
      }
      iVar5 = (int)lVar6;
      lVar7 = (lVar7 + 0x7fffffff + lVar1) - lVar9;
    }
    *(longlong *)(lVar2 + 0x28) = iVar5 + lVar7;
  }
  return;
}



// std::__cxx11::stringbuf::__xfer_bufptrs::~__xfer_bufptrs()

void __thiscall std::__cxx11::stringbuf::__xfer_bufptrs::~__xfer_bufptrs(__xfer_bufptrs *this)

{
  longlong lVar1;
  longlong lVar2;
  undefined1 auVar3 [16];
  longlong lVar4;
  int iVar5;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar6;
  
  lVar2 = *(longlong *)this;
  lVar7 = *(longlong *)(this + 8);
  lVar6 = *(longlong *)(lVar2 + 0x48);
  if (lVar7 != -1) {
    lVar1 = *(longlong *)(this + 0x10);
    *(longlong *)(lVar2 + 0x18) = *(longlong *)(this + 0x18) + lVar6;
    *(longlong *)(lVar2 + 8) = lVar7 + lVar6;
    *(longlong *)(lVar2 + 0x10) = lVar1 + lVar6;
  }
  if (*(longlong *)(this + 0x20) != -1) {
    lVar1 = *(longlong *)(this + 0x28);
    lVar7 = lVar6 + *(longlong *)(this + 0x20);
    *(longlong *)(lVar2 + 0x30) = *(longlong *)(this + 0x30) + lVar6;
    *(longlong *)(lVar2 + 0x20) = lVar7;
    *(longlong *)(lVar2 + 0x28) = lVar7;
    if (lVar1 < 0x80000000) {
      iVar5 = (int)lVar1;
    }
    else {
      auVar3._8_8_ = 0;
      auVar3._0_8_ = lVar1 - 0x80000000U;
      lVar8 = SUB168(ZEXT816(0x200000005) * auVar3,8);
      lVar6 = lVar1 + -0x7fffffff;
      lVar9 = lVar1;
      if (0x7fffffff < lVar6) {
        lVar9 = lVar6;
        lVar4 = lVar1;
        if ((lVar8 + ((lVar1 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a4c20;
        while (lVar6 = lVar4 + -0xfffffffe, 0x7fffffff < lVar6) {
LAB_1400a4c20:
          lVar9 = lVar6 + -0x7fffffff;
          lVar4 = lVar6;
        }
      }
      iVar5 = (int)lVar6;
      lVar7 = (lVar7 + 0x7fffffff + lVar1) - lVar9;
    }
    *(longlong *)(lVar2 + 0x28) = iVar5 + lVar7;
  }
  return;
}



// std::__cxx11::stringbuf::_M_update_egptr()

void __thiscall std::__cxx11::stringbuf::_M_update_egptr(stringbuf *this)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 0x28);
  if ((uVar1 != 0) && ((*(ulonglong *)(this + 0x18) == 0 || (*(ulonglong *)(this + 0x18) < uVar1))))
  {
    if (((byte)this[0x40] & 8) == 0) {
      *(ulonglong *)(this + 0x18) = uVar1;
      *(ulonglong *)(this + 8) = uVar1;
      *(ulonglong *)(this + 0x10) = uVar1;
    }
    else {
      *(ulonglong *)(this + 0x18) = uVar1;
    }
    return;
  }
  return;
}



// std::__cxx11::stringbuf::_M_stringbuf_init(std::_Ios_Openmode)

void __thiscall std::__cxx11::stringbuf::_M_stringbuf_init(stringbuf *this,uint param_1)

{
  undefined1 auVar1 [16];
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  longlong lVar5;
  longlong lVar6;
  stringbuf *psVar7;
  longlong lVar8;
  stringbuf *psVar9;
  
  psVar7 = *(stringbuf **)(this + 0x48);
  *(uint *)(this + 0x40) = param_1;
  lVar8 = 0;
  if ((param_1 & 3) != 0) {
    lVar8 = *(longlong *)(this + 0x50);
  }
  psVar9 = psVar7 + *(longlong *)(this + 0x50);
  if (psVar7 == this + 0x58) {
    lVar6 = 0xf;
  }
  else {
    lVar6 = *(longlong *)(this + 0x58);
  }
  if ((param_1 & 8) != 0) {
    *(stringbuf **)(this + 0x18) = psVar9;
    *(stringbuf **)(this + 8) = psVar7;
    *(stringbuf **)(this + 0x10) = psVar7;
  }
  if ((param_1 & 0x10) != 0) {
    iVar3 = (int)lVar8;
    *(stringbuf **)(this + 0x20) = psVar7;
    *(stringbuf **)(this + 0x28) = psVar7;
    *(stringbuf **)(this + 0x30) = psVar7 + lVar6;
    if (0x7fffffff < lVar8) {
      auVar1._8_8_ = 0;
      auVar1._0_8_ = lVar8 - 0x80000000U;
      lVar4 = SUB168(ZEXT816(0x200000005) * auVar1,8);
      lVar6 = lVar8 + -0x7fffffff;
      lVar5 = lVar8;
      if (0x7fffffff < lVar6) {
        lVar5 = lVar6;
        lVar2 = lVar8;
        if ((lVar4 + ((lVar8 - 0x80000000U) - lVar4 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a4d68;
        while (lVar6 = lVar2 + -0xfffffffe, 0x7fffffff < lVar6) {
LAB_1400a4d68:
          lVar5 = lVar6 + -0x7fffffff;
          lVar2 = lVar6;
        }
      }
      iVar3 = (int)lVar6;
      psVar7 = psVar7 + ((lVar8 + 0x7fffffff) - lVar5);
    }
    *(stringbuf **)(this + 0x28) = psVar7 + iVar3;
    if ((param_1 & 8) == 0) {
      *(stringbuf **)(this + 0x18) = psVar9;
      *(stringbuf **)(this + 8) = psVar9;
      *(stringbuf **)(this + 0x10) = psVar9;
    }
  }
  return;
}



// std::__cxx11::stringbuf::str(std::__cxx11::string const&)

void __thiscall std::__cxx11::stringbuf::str(stringbuf *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::string::_M_replace
            ((string *)(this + 0x48),0,*(ulonglong *)(this + 0x50),(string *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x40] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(stringbuf **)(this + 0x48),0,lVar1);
  return;
}



// std::__cxx11::stringbuf::swap(std::__cxx11::stringbuf&)

void __thiscall std::__cxx11::stringbuf::swap(stringbuf *this,longlong *param_1)

{
  locale *this_00;
  locale *this_01;
  undefined4 uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  undefined1 auVar4 [16];
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  ulonglong uVar8;
  longlong lVar9;
  longlong lVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  longlong local_b8;
  longlong local_b0;
  longlong local_a8;
  longlong local_a0;
  longlong local_98;
  longlong local_90;
  longlong local_88;
  longlong local_80;
  longlong local_78;
  longlong local_70;
  locale local_60 [8];
  locale local_58 [8];
  locale local_50 [16];
  
  lVar9 = *(longlong *)(this + 0x48);
  lVar10 = *(longlong *)(this + 8);
  lVar12 = *(longlong *)(this + 0x20);
  if (lVar10 == 0) {
    if (lVar12 != 0) {
      local_98 = -1;
      local_90 = -1;
      local_a8 = lVar12 - lVar9;
      local_88 = *(longlong *)(this + 0x30) - lVar9;
      local_b0 = -1;
      lVar12 = *(ulonglong *)(this + 0x28) - lVar12;
      uVar8 = *(ulonglong *)(this + 0x28);
      goto LAB_1400a5241;
    }
    local_88 = -1;
    lVar12 = -1;
    local_a8 = -1;
    local_98 = -1;
    local_90 = -1;
    local_b0 = -1;
  }
  else {
    local_b0 = lVar10 - lVar9;
    local_90 = *(longlong *)(this + 0x10) - lVar9;
    uVar2 = *(ulonglong *)(this + 0x18);
    local_98 = uVar2 - lVar9;
    if (lVar12 == 0) {
      local_88 = -1;
      lVar12 = -1;
      local_a8 = -1;
      uVar8 = uVar2;
LAB_1400a5241:
      if (uVar8 == 0) goto LAB_1400a4ea5;
    }
    else {
      uVar3 = *(ulonglong *)(this + 0x28);
      local_a8 = lVar12 - lVar9;
      lVar12 = uVar3 - lVar12;
      local_88 = *(longlong *)(this + 0x30) - lVar9;
      uVar8 = uVar3;
      if (uVar2 == 0) goto LAB_1400a5241;
      uVar8 = uVar2;
      if (uVar2 < uVar3) {
        uVar8 = uVar3;
      }
    }
    *(ulonglong *)(this + 0x50) = uVar8 - lVar9;
  }
LAB_1400a4ea5:
  lVar9 = param_1[1];
  lVar11 = param_1[9];
  lVar13 = param_1[4];
  if (lVar9 == 0) {
    if (lVar13 == 0) {
      local_70 = -1;
      lVar13 = -1;
      local_a0 = -1;
      local_78 = -1;
      local_80 = -1;
      local_b8 = -1;
      goto LAB_1400a4f21;
    }
    local_78 = -1;
    local_80 = -1;
    local_a0 = lVar13 - lVar11;
    local_70 = param_1[6] - lVar11;
    local_b8 = -1;
    lVar13 = param_1[5] - lVar13;
    uVar8 = param_1[5];
LAB_1400a52e5:
    if (uVar8 == 0) goto LAB_1400a4f21;
  }
  else {
    local_b8 = lVar9 - lVar11;
    local_80 = param_1[2] - lVar11;
    uVar2 = param_1[3];
    local_78 = uVar2 - lVar11;
    if (lVar13 == 0) {
      local_70 = -1;
      lVar13 = -1;
      local_a0 = -1;
      uVar8 = uVar2;
      goto LAB_1400a52e5;
    }
    uVar3 = param_1[5];
    local_a0 = lVar13 - lVar11;
    lVar13 = uVar3 - lVar13;
    local_70 = param_1[6] - lVar11;
    uVar8 = uVar3;
    if (uVar2 == 0) goto LAB_1400a52e5;
    uVar8 = uVar2;
    if (uVar2 < uVar3) {
      uVar8 = uVar3;
    }
  }
  param_1[10] = uVar8 - lVar11;
LAB_1400a4f21:
  *(longlong *)(this + 8) = lVar9;
  this_00 = (locale *)(this + 0x38);
  this_01 = (locale *)(param_1 + 7);
  param_1[1] = lVar10;
  lVar9 = *(longlong *)(this + 0x10);
  *(longlong *)(this + 0x10) = param_1[2];
  param_1[2] = lVar9;
  lVar9 = *(longlong *)(this + 0x18);
  *(longlong *)(this + 0x18) = param_1[3];
  param_1[3] = lVar9;
  lVar9 = *(longlong *)(this + 0x20);
  *(longlong *)(this + 0x20) = param_1[4];
  param_1[4] = lVar9;
  lVar9 = *(longlong *)(this + 0x28);
  *(longlong *)(this + 0x28) = param_1[5];
  param_1[5] = lVar9;
  lVar9 = *(longlong *)(this + 0x30);
  *(longlong *)(this + 0x30) = param_1[6];
  param_1[6] = lVar9;
  locale::locale(local_50,(undefined8 *)this_00);
  locale::operator=(this_00,(undefined8 *)this_01);
  locale::operator=(this_01,(undefined8 *)local_50);
  locale::~locale(local_50);
  locale::locale(local_60,(undefined8 *)this_01);
  locale::locale(local_58,(undefined8 *)this_00);
  (**(code **)(*(longlong *)this + 0x10))(this,local_60);
  locale::operator=(this_00,(undefined8 *)local_60);
  locale::locale(local_50,(undefined8 *)this_01);
  (**(code **)(*param_1 + 0x10))(param_1,local_58);
  locale::operator=(this_01,(undefined8 *)local_58);
  locale::~locale(local_50);
  locale::~locale(local_58);
  locale::~locale(local_60);
  uVar1 = *(undefined4 *)(this + 0x40);
  *(int *)(this + 0x40) = (int)param_1[8];
  *(undefined4 *)(param_1 + 8) = uVar1;
  __cxx11::string::swap((string *)(this + 0x48),(string *)(param_1 + 9));
  lVar9 = *(longlong *)(this + 0x48);
  if (local_b8 != -1) {
    *(longlong *)(this + 8) = local_b8 + lVar9;
    *(longlong *)(this + 0x10) = local_80 + lVar9;
    *(longlong *)(this + 0x18) = local_78 + lVar9;
  }
  if (local_a0 != -1) {
    local_a0 = local_a0 + lVar9;
    *(longlong *)(this + 0x30) = lVar9 + local_70;
    *(longlong *)(this + 0x20) = local_a0;
    *(longlong *)(this + 0x28) = local_a0;
    if (lVar13 < 0x80000000) {
      iVar7 = (int)lVar13;
    }
    else {
      auVar4._8_8_ = 0;
      auVar4._0_8_ = lVar13 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar4,8);
      lVar9 = lVar13 + -0x7fffffff;
      lVar10 = lVar13;
      if (0x7fffffff < lVar9) {
        lVar10 = lVar9;
        lVar6 = lVar13;
        if ((lVar11 + ((lVar13 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a5108;
        while (lVar9 = lVar6 + -0xfffffffe, 0x7fffffff < lVar9) {
LAB_1400a5108:
          lVar10 = lVar9 + -0x7fffffff;
          lVar6 = lVar9;
        }
      }
      iVar7 = (int)lVar9;
      local_a0 = (local_a0 + 0x7fffffff + lVar13) - lVar10;
    }
    *(longlong *)(this + 0x28) = iVar7 + local_a0;
  }
  lVar9 = param_1[9];
  if (local_b0 != -1) {
    param_1[1] = local_b0 + lVar9;
    param_1[2] = local_90 + lVar9;
    param_1[3] = local_98 + lVar9;
  }
  if (local_a8 != -1) {
    local_a8 = local_a8 + lVar9;
    param_1[6] = lVar9 + local_88;
    param_1[4] = local_a8;
    param_1[5] = local_a8;
    if (lVar12 < 0x80000000) {
      iVar7 = (int)lVar12;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = lVar12 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar9 = lVar12 + -0x7fffffff;
      lVar10 = lVar12;
      if (0x7fffffff < lVar9) {
        lVar10 = lVar9;
        lVar13 = lVar12;
        if ((lVar11 + ((lVar12 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a51e8;
        while (lVar9 = lVar13 + -0xfffffffe, 0x7fffffff < lVar9) {
LAB_1400a51e8:
          lVar10 = lVar9 + -0x7fffffff;
          lVar13 = lVar9;
        }
      }
      iVar7 = (int)lVar9;
      local_a8 = (local_a8 + 0x7fffffff + lVar12) - lVar10;
    }
    param_1[5] = iVar7 + local_a8;
  }
  return;
}



// std::__cxx11::stringbuf::setbuf(char*, long long)

stringbuf * __thiscall
std::__cxx11::stringbuf::setbuf(stringbuf *this,stringbuf *param_1,longlong param_2)

{
  if ((param_1 != (stringbuf *)0x0) && (-1 < param_2)) {
    *(undefined8 *)(this + 0x50) = 0;
    **(undefined1 **)(this + 0x48) = 0;
    _M_sync(this,param_1,param_2,0);
    return this;
  }
  return this;
}



// std::__cxx11::stringbuf::_M_sync(char*, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::stringbuf::_M_sync
          (stringbuf *this,stringbuf *param_1,longlong param_2,longlong param_3)

{
  undefined1 auVar1 [16];
  longlong lVar2;
  int iVar3;
  longlong lVar4;
  stringbuf *psVar5;
  stringbuf *psVar6;
  longlong lVar7;
  longlong lVar8;
  uint uVar9;
  
  uVar9 = *(uint *)(this + 0x40) & 8;
  psVar5 = param_1 + *(longlong *)(this + 0x50);
  if (*(stringbuf **)(this + 0x48) == this + 0x58) {
    lVar7 = 0xf;
  }
  else {
    lVar7 = *(longlong *)(this + 0x58);
  }
  if (param_1 == *(stringbuf **)(this + 0x48)) {
    psVar6 = param_1 + lVar7;
  }
  else {
    psVar6 = psVar5 + param_2;
    param_2 = 0;
    psVar5 = psVar6;
  }
  if (uVar9 != 0) {
    *(stringbuf **)(this + 8) = param_1;
    *(stringbuf **)(this + 0x10) = param_1 + param_2;
    *(stringbuf **)(this + 0x18) = psVar5;
  }
  if ((*(uint *)(this + 0x40) & 0x10) != 0) {
    *(stringbuf **)(this + 0x30) = psVar6;
    iVar3 = (int)param_3;
    *(stringbuf **)(this + 0x20) = param_1;
    *(stringbuf **)(this + 0x28) = param_1;
    if (0x7fffffff < param_3) {
      auVar1._8_8_ = 0;
      auVar1._0_8_ = param_3 - 0x80000000U;
      lVar4 = SUB168(ZEXT816(0x200000005) * auVar1,8);
      lVar7 = param_3 + -0x7fffffff;
      lVar8 = param_3;
      if (0x7fffffff < lVar7) {
        lVar8 = lVar7;
        lVar2 = param_3;
        if ((lVar4 + ((param_3 - 0x80000000U) - lVar4 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a54d0;
        while (lVar7 = lVar2 + -0xfffffffe, 0x7fffffff < lVar7) {
LAB_1400a54d0:
          lVar8 = lVar7 + -0x7fffffff;
          lVar2 = lVar7;
        }
      }
      iVar3 = (int)lVar7;
      param_1 = param_1 + ((param_3 + 0x7fffffff) - lVar8);
    }
    *(stringbuf **)(this + 0x28) = param_1 + iVar3;
    if (uVar9 == 0) {
      *(stringbuf **)(this + 0x18) = psVar5;
      *(stringbuf **)(this + 8) = psVar5;
      *(stringbuf **)(this + 0x10) = psVar5;
    }
  }
  return;
}



// std::__cxx11::stringbuf::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

longlong *
std::__cxx11::stringbuf::seekoff
          (longlong *param_1,longlong param_2,longlong param_3,int param_4,uint param_5)

{
  uint uVar1;
  ulonglong uVar2;
  undefined1 auVar3 [16];
  longlong lVar4;
  byte bVar5;
  longlong lVar6;
  byte bVar7;
  longlong lVar8;
  longlong lVar9;
  byte bVar10;
  uint uVar11;
  longlong lVar12;
  longlong lVar13;
  bool bVar14;
  
  uVar1 = *(uint *)(param_2 + 0x40);
  *param_1 = -1;
  *(undefined4 *)(param_1 + 1) = 0;
  uVar11 = uVar1 & 8;
  bVar14 = (param_5 & uVar11) != 0;
  bVar5 = (byte)((uVar1 & param_5) >> 4);
  bVar10 = bVar14 & bVar5 & param_4 != 1;
  bVar5 = ((byte)(param_5 >> 3) ^ 1) & 1 & bVar5;
  bVar7 = ((byte)(param_5 >> 4) ^ 1) & bVar14;
  if (bVar7 == 0) {
    lVar6 = *(longlong *)(param_2 + 0x20);
    if ((lVar6 == 0) && (param_3 != 0)) {
      return param_1;
    }
    if (bVar5 == 0 && bVar10 == 0) {
      return param_1;
    }
  }
  else {
    lVar6 = *(longlong *)(param_2 + 8);
    if ((lVar6 == 0) && (param_3 != 0)) {
      return param_1;
    }
  }
  uVar2 = *(ulonglong *)(param_2 + 0x28);
  if ((uVar2 != 0) &&
     ((*(ulonglong *)(param_2 + 0x18) == 0 || (*(ulonglong *)(param_2 + 0x18) < uVar2)))) {
    if (uVar11 == 0) {
      *(ulonglong *)(param_2 + 8) = uVar2;
      *(ulonglong *)(param_2 + 0x10) = uVar2;
    }
    *(ulonglong *)(param_2 + 0x18) = uVar2;
  }
  if (param_4 == 1) {
    lVar12 = (uVar2 - lVar6) + param_3;
    param_3 = param_3 + (*(longlong *)(param_2 + 0x10) - lVar6);
  }
  else {
    lVar12 = param_3;
    if (param_4 == 2) {
      lVar12 = param_3 + (*(longlong *)(param_2 + 0x18) - lVar6);
      param_3 = lVar12;
    }
  }
  if (((bVar7 != 0 || bVar10 != 0) && (-1 < param_3)) &&
     (param_3 <= *(longlong *)(param_2 + 0x18) - lVar6)) {
    lVar13 = *(longlong *)(param_2 + 8);
    *param_1 = param_3;
    *(undefined4 *)(param_1 + 1) = 0;
    *(longlong *)(param_2 + 0x10) = lVar13 + param_3;
  }
  if (((-1 < lVar12) && (bVar5 != 0 || bVar10 != 0)) &&
     (lVar12 <= *(longlong *)(param_2 + 0x18) - lVar6)) {
    lVar13 = *(longlong *)(param_2 + 0x20);
    lVar6 = lVar12;
    if (0x7fffffff < lVar12) {
      auVar3._8_8_ = 0;
      auVar3._0_8_ = lVar12 - 0x80000000U;
      lVar9 = SUB168(ZEXT816(0x200000005) * auVar3,8);
      lVar6 = lVar12 + -0x7fffffff;
      lVar8 = lVar12;
      if (0x7fffffff < lVar6) {
        lVar8 = lVar6;
        lVar4 = lVar12;
        if ((lVar9 + ((lVar12 - 0x80000000U) - lVar9 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a5670;
        while (lVar6 = lVar4 + -0xfffffffe, 0x7fffffff < lVar6) {
LAB_1400a5670:
          lVar8 = lVar6 + -0x7fffffff;
          lVar4 = lVar6;
        }
      }
      lVar13 = (lVar13 + 0x7fffffff + lVar12) - lVar8;
    }
    *param_1 = lVar12;
    *(longlong *)(param_2 + 0x28) = lVar6 + lVar13;
    *(undefined4 *)(param_1 + 1) = 0;
  }
  return param_1;
}



// std::__cxx11::stringbuf::seekpos(std::fpos<int>, std::_Ios_Openmode)

longlong *
std::__cxx11::stringbuf::seekpos(longlong *param_1,longlong param_2,longlong *param_3,uint param_4)

{
  longlong lVar1;
  longlong lVar2;
  undefined1 auVar3 [16];
  longlong lVar4;
  uint uVar5;
  longlong lVar6;
  uint uVar7;
  longlong lVar8;
  longlong lVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  longlong lVar12;
  
  uVar7 = *(uint *)(param_2 + 0x40);
  lVar1 = *param_3;
  lVar2 = param_3[1];
  *param_1 = -1;
  uVar5 = uVar7 & param_4;
  uVar7 = uVar7 & 8;
  *(undefined4 *)(param_1 + 1) = 0;
  if ((param_4 & uVar7) == 0) {
    lVar6 = *(longlong *)(param_2 + 0x20);
    if (lVar6 != 0) goto LAB_1400a5778;
LAB_1400a5799:
    if (lVar1 != 0) {
      return param_1;
    }
    if ((uVar5 & 0x18) == 0) {
      return param_1;
    }
    uVar10 = *(ulonglong *)(param_2 + 0x28);
    uVar11 = *(ulonglong *)(param_2 + 0x18);
    if ((uVar10 != 0) && ((uVar11 == 0 || (uVar11 < uVar10)))) {
      if (uVar7 == 0) {
        *(ulonglong *)(param_2 + 0x18) = uVar10;
        *(ulonglong *)(param_2 + 8) = uVar10;
        *(ulonglong *)(param_2 + 0x10) = uVar10;
LAB_1400a58cf:
        if ((longlong)(uVar10 - lVar6) < lVar1) {
          return param_1;
        }
        goto LAB_1400a5814;
      }
      *(ulonglong *)(param_2 + 0x18) = uVar10;
      goto LAB_1400a57f4;
    }
  }
  else {
    lVar6 = *(longlong *)(param_2 + 8);
    if (lVar6 == 0) goto LAB_1400a5799;
LAB_1400a5778:
    if ((uVar5 & 0x18) == 0) {
      return param_1;
    }
    uVar10 = *(ulonglong *)(param_2 + 0x28);
    if ((uVar10 != 0) &&
       ((*(ulonglong *)(param_2 + 0x18) == 0 || (*(ulonglong *)(param_2 + 0x18) < uVar10)))) {
      if (uVar7 != 0) {
        *(ulonglong *)(param_2 + 0x18) = uVar10;
        goto LAB_1400a57ef;
      }
      *(ulonglong *)(param_2 + 0x18) = uVar10;
      *(ulonglong *)(param_2 + 8) = uVar10;
      *(ulonglong *)(param_2 + 0x10) = uVar10;
      if (lVar1 < 0) {
        return param_1;
      }
      goto LAB_1400a58cf;
    }
LAB_1400a57ef:
    if (lVar1 < 0) {
      return param_1;
    }
LAB_1400a57f4:
    uVar11 = *(ulonglong *)(param_2 + 0x18);
  }
  if ((longlong)(uVar11 - lVar6) < lVar1) {
    return param_1;
  }
  if ((param_4 & uVar7) != 0) {
    *(longlong *)(param_2 + 0x10) = *(longlong *)(param_2 + 8) + lVar1;
  }
LAB_1400a5814:
  if ((uVar5 & 0x10) != 0) {
    lVar9 = *(longlong *)(param_2 + 0x20);
    lVar6 = lVar1;
    if (0x7fffffff < lVar1) {
      auVar3._8_8_ = 0;
      auVar3._0_8_ = lVar1 - 0x80000000U;
      lVar8 = SUB168(ZEXT816(0x200000005) * auVar3,8);
      lVar6 = lVar1 + -0x7fffffff;
      lVar12 = lVar1;
      if (0x7fffffff < lVar6) {
        lVar12 = lVar6;
        lVar4 = lVar1;
        if ((lVar8 + ((lVar1 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a5878;
        while (lVar6 = lVar4 + -0xfffffffe, 0x7fffffff < lVar6) {
LAB_1400a5878:
          lVar12 = lVar6 + -0x7fffffff;
          lVar4 = lVar6;
        }
      }
      lVar9 = (lVar9 + 0x7fffffff + lVar1) - lVar12;
    }
    *(longlong *)(param_2 + 0x28) = lVar6 + lVar9;
  }
  *param_1 = lVar1;
  *(int *)(param_1 + 1) = (int)lVar2;
  return param_1;
}



// std::__cxx11::stringbuf::_M_pbump(char*, char*, long long)

void __thiscall
std::__cxx11::stringbuf::_M_pbump
          (stringbuf *this,longlong param_1,undefined8 param_2,longlong param_3)

{
  undefined1 auVar1 [16];
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  longlong lVar5;
  
  *(undefined8 *)(this + 0x30) = param_2;
  *(longlong *)(this + 0x20) = param_1;
  *(longlong *)(this + 0x28) = param_1;
  if (0x7fffffff < param_3) {
    auVar1._8_8_ = 0;
    auVar1._0_8_ = param_3 - 0x80000000U;
    lVar5 = SUB168(ZEXT816(0x200000005) * auVar1,8);
    lVar3 = param_3 + -0x7fffffff;
    lVar4 = param_3;
    if (0x7fffffff < lVar3) {
      lVar4 = lVar3;
      lVar2 = param_3;
      if ((lVar5 + ((param_3 - 0x80000000U) - lVar5 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a5980;
      while (lVar3 = lVar2 + -0xfffffffe, 0x7fffffff < lVar3) {
LAB_1400a5980:
        lVar4 = lVar3 + -0x7fffffff;
        lVar2 = lVar3;
      }
    }
    *(longlong *)(this + 0x28) = (longlong)(int)lVar3 + ((param_1 + 0x7fffffff + param_3) - lVar4);
    return;
  }
  *(longlong *)(this + 0x28) = (int)param_3 + param_1;
  return;
}



// std::__cxx11::stringbuf::overflow(int)

int __thiscall std::__cxx11::stringbuf::overflow(stringbuf *this,int param_1)

{
  stringbuf *psVar1;
  string *psVar2;
  undefined1 auVar3 [16];
  longlong lVar4;
  ulonglong uVar5;
  int iVar6;
  longlong lVar8;
  longlong lVar9;
  stringbuf *psVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  stringbuf sVar13;
  longlong lVar14;
  undefined1 *local_58;
  ulonglong local_50;
  undefined1 local_48;
  undefined7 uStack_47;
  longlong lVar7;
  
  if ((*(uint *)(this + 0x40) & 0x10) == 0) {
    return -1;
  }
  if (param_1 == -1) {
    param_1 = 0;
  }
  else {
    psVar1 = *(stringbuf **)(this + 0x48);
    if (psVar1 == this + 0x58) {
      uVar11 = 0xf;
    }
    else {
      uVar11 = *(ulonglong *)(this + 0x58);
    }
    psVar10 = *(stringbuf **)(this + 0x28);
    sVar13 = SUB41(param_1,0);
    if ((ulonglong)((longlong)*(stringbuf **)(this + 0x30) - *(longlong *)(this + 0x20)) < uVar11) {
      lVar8 = (longlong)psVar10 - *(longlong *)(this + 0x20);
      *(stringbuf **)(this + 0x30) = psVar1 + uVar11;
      *(stringbuf **)(this + 0x20) = psVar1;
      *(stringbuf **)(this + 0x28) = psVar1;
      if (lVar8 < 0x80000000) {
        iVar6 = (int)lVar8;
        psVar10 = psVar1;
      }
      else {
        auVar3._8_8_ = 0;
        auVar3._0_8_ = lVar8 - 0x80000000U;
        lVar9 = SUB168(ZEXT816(0x200000005) * auVar3,8);
        lVar7 = lVar8 + -0x7fffffff;
        lVar14 = lVar8;
        if (0x7fffffff < lVar7) {
          lVar14 = lVar7;
          lVar4 = lVar8;
          if ((lVar9 + ((lVar8 - 0x80000000U) - lVar9 >> 1) >> 0x1e & 1) == 0) goto LAB_1400a5ab0;
          while (lVar7 = lVar4 + -0xfffffffe, 0x7fffffff < lVar7) {
LAB_1400a5ab0:
            lVar14 = lVar7 + -0x7fffffff;
            lVar4 = lVar7;
          }
        }
        iVar6 = (int)lVar7;
        psVar10 = psVar1 + ((lVar8 + 0x7fffffff) - lVar14);
      }
      *(stringbuf **)(this + 0x28) = psVar10 + iVar6;
      if ((*(uint *)(this + 0x40) & 8) != 0) {
        lVar8 = *(longlong *)(this + 8);
        *(stringbuf **)(this + 0x18) = psVar1 + (*(longlong *)(this + 0x18) - lVar8) + 1;
        *(stringbuf **)(this + 8) = psVar1;
        *(stringbuf **)(this + 0x10) = psVar1 + (*(longlong *)(this + 0x10) - lVar8);
      }
      psVar10[iVar6] = sVar13;
      lVar8 = *(longlong *)(this + 0x28);
    }
    else {
      if (psVar10 < *(stringbuf **)(this + 0x30)) {
        *psVar10 = sVar13;
      }
      else {
        if (uVar11 == 0x3fffffffffffffff) {
          return -1;
        }
        uVar11 = uVar11 * 2;
        local_50 = 0;
        if (0x3fffffffffffffff < uVar11) {
          uVar11 = 0x3fffffffffffffff;
        }
        local_48 = 0;
        if (uVar11 < 0x200) {
          uVar11 = 0x200;
        }
        local_58 = &local_48;
        __cxx11::string::reserve((string *)&local_58,uVar11);
        psVar2 = *(string **)(this + 0x20);
        if (psVar2 != (string *)0x0) {
          __cxx11::string::_M_replace
                    ((string *)&local_58,0,local_50,psVar2,
                     *(longlong *)(this + 0x30) - (longlong)psVar2);
        }
        uVar5 = local_50;
        uVar11 = local_50 + 1;
        if (local_58 == &local_48) {
          uVar12 = 0xf;
        }
        else {
          uVar12 = CONCAT71(uStack_47,local_48);
        }
        if (uVar12 < uVar11) {
          __cxx11::string::_M_mutate((string *)&local_58,local_50,0,(undefined1 *)0x0,1);
        }
        *(stringbuf *)(local_58 + uVar5) = sVar13;
        local_58[uVar5 + 1] = 0;
        local_50 = uVar11;
        __cxx11::string::swap((string *)(this + 0x48),(string *)&local_58);
        _M_sync(this,*(stringbuf **)(this + 0x48),
                *(longlong *)(this + 0x10) - *(longlong *)(this + 8),
                *(longlong *)(this + 0x28) - *(longlong *)(this + 0x20));
        if (local_58 != &local_48) {
          operator_delete(local_58);
        }
      }
      lVar8 = *(longlong *)(this + 0x28);
    }
    *(longlong *)(this + 0x28) = lVar8 + 1;
  }
  return param_1;
}



// std::__cxx11::stringbuf::pbackfail(int)

int __thiscall std::__cxx11::stringbuf::pbackfail(stringbuf *this,int param_1)

{
  char cVar1;
  ulonglong uVar2;
  char cVar3;
  
  uVar2 = *(ulonglong *)(this + 0x10);
  if (*(ulonglong *)(this + 8) < uVar2) {
    if (param_1 == -1) {
      *(ulonglong *)(this + 0x10) = uVar2 - 1;
      return 0;
    }
    cVar1 = *(char *)(uVar2 - 1);
    cVar3 = (char)param_1;
    if ((((byte)this[0x40] & 0x10) != 0) || (cVar1 == cVar3)) {
      *(ulonglong *)(this + 0x10) = uVar2 - 1;
      if (cVar1 != cVar3) {
        *(char *)(uVar2 - 1) = cVar3;
      }
      return param_1;
    }
  }
  return -1;
}



// std::__cxx11::stringbuf::showmanyc()

longlong __thiscall std::__cxx11::stringbuf::showmanyc(stringbuf *this)

{
  ulonglong uVar1;
  ulonglong uVar2;
  longlong lVar3;
  
  if (((byte)this[0x40] & 8) != 0) {
    uVar1 = *(ulonglong *)(this + 0x28);
    uVar2 = *(ulonglong *)(this + 0x18);
    if ((uVar1 == 0) || ((uVar2 != 0 && (uVar1 <= uVar2)))) {
      lVar3 = uVar2 - *(longlong *)(this + 0x10);
    }
    else {
      *(ulonglong *)(this + 0x18) = uVar1;
      lVar3 = uVar1 - *(longlong *)(this + 0x10);
    }
    return lVar3;
  }
  return -1;
}



// std::__cxx11::stringbuf::underflow()

ulonglong __thiscall std::__cxx11::stringbuf::underflow(stringbuf *this)

{
  byte *pbVar1;
  byte *pbVar2;
  
  if (((byte)this[0x40] & 8) != 0) {
    pbVar1 = *(byte **)(this + 0x28);
    pbVar2 = *(byte **)(this + 0x18);
    if ((pbVar1 != (byte *)0x0) && ((pbVar2 == (byte *)0x0 || (pbVar2 < pbVar1)))) {
      *(byte **)(this + 0x18) = pbVar1;
      pbVar2 = pbVar1;
    }
    if (*(byte **)(this + 0x10) < pbVar2) {
      return (ulonglong)**(byte **)(this + 0x10);
    }
  }
  return 0xffffffff;
}



// std::__cxx11::stringbuf::stringbuf(std::__cxx11::stringbuf&&)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,stringbuf *param_1)

{
  stringbuf *psVar1;
  undefined4 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  longlong local_30;
  longlong lStack_28;
  
  lVar12 = *(longlong *)(param_1 + 0x48);
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  local_30 = -1;
  lStack_28 = -1;
  if (*(longlong *)(param_1 + 8) == 0) {
    lVar13 = *(longlong *)(param_1 + 0x20);
    if (lVar13 != 0) {
      lStack_38 = lVar13 - lVar12;
      local_30 = *(ulonglong *)(param_1 + 0x28) - lVar13;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar12;
      uVar9 = *(ulonglong *)(param_1 + 0x28);
      goto LAB_1400a5fb3;
    }
  }
  else {
    uVar3 = *(ulonglong *)(param_1 + 0x18);
    local_50 = *(longlong *)(param_1 + 8) - lVar12;
    lStack_48 = *(longlong *)(param_1 + 0x10) - lVar12;
    local_40 = uVar3 - lVar12;
    lVar13 = *(longlong *)(param_1 + 0x20);
    uVar9 = uVar3;
    if (lVar13 == 0) {
LAB_1400a5fb3:
      if (uVar9 == 0) goto LAB_1400a5e29;
    }
    else {
      lStack_38 = lVar13 - lVar12;
      uVar4 = *(ulonglong *)(param_1 + 0x28);
      local_30 = uVar4 - lVar13;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar12;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400a5fb3;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    *(ulonglong *)(param_1 + 0x50) = uVar9 - lVar12;
  }
LAB_1400a5e29:
  streambuf::streambuf((streambuf *)this,(longlong)param_1);
  lVar12 = *(longlong *)(param_1 + 0x50);
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  uVar2 = *(undefined4 *)(param_1 + 0x40);
  psVar1 = param_1 + 0x58;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  *(undefined4 *)(this + 0x40) = uVar2;
  if (*(stringbuf **)(param_1 + 0x48) != psVar1) {
    *(stringbuf **)(this + 0x48) = *(stringbuf **)(param_1 + 0x48);
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
    goto LAB_1400a5e6d;
  }
  uVar9 = lVar12 + 1;
  uVar8 = (uint)uVar9;
  if (uVar8 < 8) {
    if ((uVar9 & 4) != 0) {
      *(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 0x58);
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0x54) =
           *(undefined4 *)(param_1 + (uVar9 & 0xffffffff) + 0x54);
      lVar12 = *(longlong *)(param_1 + 0x50);
      goto LAB_1400a5e6d;
    }
    if (uVar8 == 0) goto LAB_1400a5e6d;
    this[0x58] = param_1[0x58];
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x56) =
           *(undefined2 *)(param_1 + (uVar9 & 0xffffffff) + 0x56);
      lVar12 = *(longlong *)(param_1 + 0x50);
      goto LAB_1400a5e6d;
    }
  }
  else {
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x50) =
         *(undefined8 *)(param_1 + (uVar9 & 0xffffffff) + 0x50);
    lVar12 = (longlong)(this + 0x58) - ((ulonglong)(this + 0x60) & 0xfffffffffffffff8);
    uVar8 = uVar8 + (int)lVar12 & 0xfffffff8;
    if (7 < uVar8) {
      uVar9 = 0;
      do {
        uVar10 = (int)uVar9 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x60) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)(psVar1 + (uVar9 - lVar12));
        uVar9 = (ulonglong)uVar10;
      } while (uVar10 < uVar8);
    }
  }
  lVar12 = *(longlong *)(param_1 + 0x50);
LAB_1400a5e6d:
  *(longlong *)(this + 0x50) = lVar12;
  *(stringbuf **)(param_1 + 0x48) = psVar1;
  lVar12 = *(longlong *)(this + 0x48);
  *(undefined8 *)(param_1 + 0x50) = 0;
  param_1[0x58] = (stringbuf)0x0;
  if (local_50 != -1) {
    *(longlong *)(this + 0x18) = local_40 + lVar12;
    *(longlong *)(this + 8) = local_50 + lVar12;
    *(longlong *)(this + 0x10) = lStack_48 + lVar12;
  }
  if (lStack_38 != -1) {
    lStack_38 = lVar12 + lStack_38;
    *(longlong *)(this + 0x30) = lStack_28 + lVar12;
    *(longlong *)(this + 0x20) = lStack_38;
    *(longlong *)(this + 0x28) = lStack_38;
    if (local_30 < 0x80000000) {
      iVar7 = (int)local_30;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = local_30 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar12 = local_30 + -0x7fffffff;
      lVar13 = local_30;
      if (0x7fffffff < lVar12) {
        lVar13 = lVar12;
        lVar6 = local_30;
        if ((lVar11 + ((local_30 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400a5f40;
        while (lVar12 = lVar6 + -0xfffffffe, 0x7fffffff < lVar12) {
LAB_1400a5f40:
          lVar13 = lVar12 + -0x7fffffff;
          lVar6 = lVar12;
        }
      }
      iVar7 = (int)lVar12;
      lStack_38 = (lStack_38 + 0x7fffffff + local_30) - lVar13;
    }
    *(longlong *)(this + 0x28) = iVar7 + lStack_38;
  }
  _M_sync(param_1,psVar1,0,0);
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::__cxx11::stringbuf&&,
// std::__cxx11::stringbuf::__xfer_bufptrs&&)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,longlong param_1)

{
  longlong lVar1;
  undefined4 uVar2;
  longlong lVar3;
  uint uVar4;
  ulonglong uVar5;
  uint uVar6;
  
  streambuf::streambuf((streambuf *)this,param_1);
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  uVar2 = *(undefined4 *)(param_1 + 0x40);
  *(stringbuf **)(this + 0x48) = this + 0x58;
  lVar3 = *(longlong *)(param_1 + 0x48);
  *(undefined4 *)(this + 0x40) = uVar2;
  lVar1 = param_1 + 0x58;
  if (lVar3 == lVar1) {
    lVar3 = *(longlong *)(param_1 + 0x50);
    uVar5 = lVar3 + 1;
    uVar6 = (uint)uVar5;
    if (uVar6 < 8) {
      if ((uVar5 & 4) != 0) {
        *(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 0x58);
        *(undefined4 *)(this + (uVar5 & 0xffffffff) + 0x54) =
             *(undefined4 *)(param_1 + 0x54 + (uVar5 & 0xffffffff));
        lVar3 = *(longlong *)(param_1 + 0x50);
        goto LAB_1400a60e6;
      }
      if (uVar6 == 0) goto LAB_1400a60e6;
      this[0x58] = *(stringbuf *)(param_1 + 0x58);
      if ((uVar5 & 2) != 0) {
        *(undefined2 *)(this + (uVar5 & 0xffffffff) + 0x56) =
             *(undefined2 *)(param_1 + 0x56 + (uVar5 & 0xffffffff));
        lVar3 = *(longlong *)(param_1 + 0x50);
        goto LAB_1400a60e6;
      }
    }
    else {
      *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
      *(undefined8 *)(this + (uVar5 & 0xffffffff) + 0x50) =
           *(undefined8 *)(param_1 + 0x50 + (uVar5 & 0xffffffff));
      lVar3 = (longlong)(this + 0x58) - ((ulonglong)(this + 0x60) & 0xfffffffffffffff8);
      uVar6 = uVar6 + (int)lVar3 & 0xfffffff8;
      if (7 < uVar6) {
        uVar5 = 0;
        do {
          uVar4 = (int)uVar5 + 8;
          *(undefined8 *)(((ulonglong)(this + 0x60) & 0xfffffffffffffff8) + uVar5) =
               *(undefined8 *)((lVar1 - lVar3) + uVar5);
          uVar5 = (ulonglong)uVar4;
        } while (uVar4 < uVar6);
      }
    }
  }
  else {
    *(longlong *)(this + 0x48) = lVar3;
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  lVar3 = *(longlong *)(param_1 + 0x50);
LAB_1400a60e6:
  *(longlong *)(this + 0x50) = lVar3;
  *(longlong *)(param_1 + 0x48) = lVar1;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined1 *)(param_1 + 0x58) = 0;
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,undefined8 *param_1,uint param_2)

{
  undefined1 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  puVar1 = (undefined1 *)*param_1;
  lVar3 = param_1[1];
  *(undefined4 *)(this + 0x40) = 0;
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  if ((puVar1 == (undefined1 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)this = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x38));
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x48),puVar1,(longlong)(puVar1 + lVar3));
  *(uint *)(this + 0x40) = param_2;
  lVar3 = 0;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(stringbuf **)(this + 0x48),0,lVar3);
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::_Ios_Openmode)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,undefined4 param_1)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = param_1;
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  this[0x58] = (stringbuf)0x0;
  return;
}



// std::__cxx11::stringbuf::stringbuf()

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = 0x18;
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  this[0x58] = (stringbuf)0x0;
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::__cxx11::stringbuf&&)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,stringbuf *param_1)

{
  stringbuf *psVar1;
  undefined4 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  longlong local_30;
  longlong lStack_28;
  
  lVar12 = *(longlong *)(param_1 + 0x48);
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  local_30 = -1;
  lStack_28 = -1;
  if (*(longlong *)(param_1 + 8) == 0) {
    lVar13 = *(longlong *)(param_1 + 0x20);
    if (lVar13 != 0) {
      lStack_38 = lVar13 - lVar12;
      local_30 = *(ulonglong *)(param_1 + 0x28) - lVar13;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar12;
      uVar9 = *(ulonglong *)(param_1 + 0x28);
      goto LAB_1400a65d3;
    }
  }
  else {
    uVar3 = *(ulonglong *)(param_1 + 0x18);
    local_50 = *(longlong *)(param_1 + 8) - lVar12;
    lStack_48 = *(longlong *)(param_1 + 0x10) - lVar12;
    local_40 = uVar3 - lVar12;
    lVar13 = *(longlong *)(param_1 + 0x20);
    uVar9 = uVar3;
    if (lVar13 == 0) {
LAB_1400a65d3:
      if (uVar9 == 0) goto LAB_1400a6449;
    }
    else {
      lStack_38 = lVar13 - lVar12;
      uVar4 = *(ulonglong *)(param_1 + 0x28);
      local_30 = uVar4 - lVar13;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar12;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400a65d3;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    *(ulonglong *)(param_1 + 0x50) = uVar9 - lVar12;
  }
LAB_1400a6449:
  streambuf::streambuf((streambuf *)this,(longlong)param_1);
  lVar12 = *(longlong *)(param_1 + 0x50);
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  uVar2 = *(undefined4 *)(param_1 + 0x40);
  psVar1 = param_1 + 0x58;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  *(undefined4 *)(this + 0x40) = uVar2;
  if (*(stringbuf **)(param_1 + 0x48) != psVar1) {
    *(stringbuf **)(this + 0x48) = *(stringbuf **)(param_1 + 0x48);
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
    goto LAB_1400a648d;
  }
  uVar9 = lVar12 + 1;
  uVar8 = (uint)uVar9;
  if (uVar8 < 8) {
    if ((uVar9 & 4) != 0) {
      *(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 0x58);
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0x54) =
           *(undefined4 *)(param_1 + (uVar9 & 0xffffffff) + 0x54);
      lVar12 = *(longlong *)(param_1 + 0x50);
      goto LAB_1400a648d;
    }
    if (uVar8 == 0) goto LAB_1400a648d;
    this[0x58] = param_1[0x58];
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x56) =
           *(undefined2 *)(param_1 + (uVar9 & 0xffffffff) + 0x56);
      lVar12 = *(longlong *)(param_1 + 0x50);
      goto LAB_1400a648d;
    }
  }
  else {
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x50) =
         *(undefined8 *)(param_1 + (uVar9 & 0xffffffff) + 0x50);
    lVar12 = (longlong)(this + 0x58) - ((ulonglong)(this + 0x60) & 0xfffffffffffffff8);
    uVar8 = uVar8 + (int)lVar12 & 0xfffffff8;
    if (7 < uVar8) {
      uVar9 = 0;
      do {
        uVar10 = (int)uVar9 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x60) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)(psVar1 + (uVar9 - lVar12));
        uVar9 = (ulonglong)uVar10;
      } while (uVar10 < uVar8);
    }
  }
  lVar12 = *(longlong *)(param_1 + 0x50);
LAB_1400a648d:
  *(longlong *)(this + 0x50) = lVar12;
  *(stringbuf **)(param_1 + 0x48) = psVar1;
  lVar12 = *(longlong *)(this + 0x48);
  *(undefined8 *)(param_1 + 0x50) = 0;
  param_1[0x58] = (stringbuf)0x0;
  if (local_50 != -1) {
    *(longlong *)(this + 0x18) = local_40 + lVar12;
    *(longlong *)(this + 8) = local_50 + lVar12;
    *(longlong *)(this + 0x10) = lStack_48 + lVar12;
  }
  if (lStack_38 != -1) {
    lStack_38 = lVar12 + lStack_38;
    *(longlong *)(this + 0x30) = lStack_28 + lVar12;
    *(longlong *)(this + 0x20) = lStack_38;
    *(longlong *)(this + 0x28) = lStack_38;
    if (local_30 < 0x80000000) {
      iVar7 = (int)local_30;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = local_30 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar12 = local_30 + -0x7fffffff;
      lVar13 = local_30;
      if (0x7fffffff < lVar12) {
        lVar13 = lVar12;
        lVar6 = local_30;
        if ((lVar11 + ((local_30 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400a6560;
        while (lVar12 = lVar6 + -0xfffffffe, 0x7fffffff < lVar12) {
LAB_1400a6560:
          lVar13 = lVar12 + -0x7fffffff;
          lVar6 = lVar12;
        }
      }
      iVar7 = (int)lVar12;
      lStack_38 = (lStack_38 + 0x7fffffff + local_30) - lVar13;
    }
    *(longlong *)(this + 0x28) = iVar7 + lStack_38;
  }
  _M_sync(param_1,psVar1,0,0);
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::__cxx11::stringbuf&&,
// std::__cxx11::stringbuf::__xfer_bufptrs&&)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,longlong param_1)

{
  longlong lVar1;
  undefined4 uVar2;
  longlong lVar3;
  uint uVar4;
  ulonglong uVar5;
  uint uVar6;
  
  streambuf::streambuf((streambuf *)this,param_1);
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  uVar2 = *(undefined4 *)(param_1 + 0x40);
  *(stringbuf **)(this + 0x48) = this + 0x58;
  lVar3 = *(longlong *)(param_1 + 0x48);
  *(undefined4 *)(this + 0x40) = uVar2;
  lVar1 = param_1 + 0x58;
  if (lVar3 == lVar1) {
    lVar3 = *(longlong *)(param_1 + 0x50);
    uVar5 = lVar3 + 1;
    uVar6 = (uint)uVar5;
    if (uVar6 < 8) {
      if ((uVar5 & 4) != 0) {
        *(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 0x58);
        *(undefined4 *)(this + (uVar5 & 0xffffffff) + 0x54) =
             *(undefined4 *)(param_1 + 0x54 + (uVar5 & 0xffffffff));
        lVar3 = *(longlong *)(param_1 + 0x50);
        goto LAB_1400a6706;
      }
      if (uVar6 == 0) goto LAB_1400a6706;
      this[0x58] = *(stringbuf *)(param_1 + 0x58);
      if ((uVar5 & 2) != 0) {
        *(undefined2 *)(this + (uVar5 & 0xffffffff) + 0x56) =
             *(undefined2 *)(param_1 + 0x56 + (uVar5 & 0xffffffff));
        lVar3 = *(longlong *)(param_1 + 0x50);
        goto LAB_1400a6706;
      }
    }
    else {
      *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
      *(undefined8 *)(this + (uVar5 & 0xffffffff) + 0x50) =
           *(undefined8 *)(param_1 + 0x50 + (uVar5 & 0xffffffff));
      lVar3 = (longlong)(this + 0x58) - ((ulonglong)(this + 0x60) & 0xfffffffffffffff8);
      uVar6 = uVar6 + (int)lVar3 & 0xfffffff8;
      if (7 < uVar6) {
        uVar5 = 0;
        do {
          uVar4 = (int)uVar5 + 8;
          *(undefined8 *)(((ulonglong)(this + 0x60) & 0xfffffffffffffff8) + uVar5) =
               *(undefined8 *)((lVar1 - lVar3) + uVar5);
          uVar5 = (ulonglong)uVar4;
        } while (uVar4 < uVar6);
      }
    }
  }
  else {
    *(longlong *)(this + 0x48) = lVar3;
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  lVar3 = *(longlong *)(param_1 + 0x50);
LAB_1400a6706:
  *(longlong *)(this + 0x50) = lVar3;
  *(longlong *)(param_1 + 0x48) = lVar1;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined1 *)(param_1 + 0x58) = 0;
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,undefined8 *param_1,uint param_2)

{
  undefined1 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  puVar1 = (undefined1 *)*param_1;
  lVar3 = param_1[1];
  *(undefined4 *)(this + 0x40) = 0;
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  if ((puVar1 == (undefined1 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)this = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x38));
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x48),puVar1,(longlong)(puVar1 + lVar3));
  *(uint *)(this + 0x40) = param_2;
  lVar3 = 0;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(stringbuf **)(this + 0x48),0,lVar3);
  return;
}



// std::__cxx11::stringbuf::stringbuf(std::_Ios_Openmode)

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this,undefined4 param_1)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = param_1;
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  this[0x58] = (stringbuf)0x0;
  return;
}



// std::__cxx11::stringbuf::stringbuf()

void __thiscall std::__cxx11::stringbuf::stringbuf(stringbuf *this)

{
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = 0x18;
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  *(stringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  this[0x58] = (stringbuf)0x0;
  return;
}



// std::__cxx11::stringbuf::~stringbuf()

void __thiscall std::__cxx11::stringbuf::~stringbuf(stringbuf *this)

{
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  if (*(stringbuf **)(this + 0x48) != this + 0x58) {
    operator_delete(*(stringbuf **)(this + 0x48));
  }
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x38));
  operator_delete(this);
  return;
}



// std::__cxx11::stringbuf::~stringbuf()

void __thiscall std::__cxx11::stringbuf::~stringbuf(stringbuf *this)

{
  *(undefined ***)this = &PTR__stringbuf_1400dc540;
  if (*(stringbuf **)(this + 0x48) != this + 0x58) {
    operator_delete(*(stringbuf **)(this + 0x48));
  }
  *(undefined ***)this = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x38));
  return;
}



// std::__cxx11::stringbuf::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::stringbuf&&)

stringbuf * __thiscall std::__cxx11::stringbuf::operator=(stringbuf *this,stringbuf *param_1)

{
  ulonglong uVar1;
  undefined8 uVar2;
  undefined8 uVar3;
  undefined1 auVar4 [16];
  longlong lVar5;
  int iVar6;
  uint uVar7;
  ulonglong uVar8;
  stringbuf *psVar9;
  ulonglong uVar10;
  stringbuf *psVar11;
  longlong lVar12;
  stringbuf *psVar13;
  uint uVar14;
  longlong lVar15;
  longlong lVar16;
  locale local_78 [8];
  locale local_70 [8];
  stringbuf *local_68;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar16 = *(longlong *)(param_1 + 0x48);
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  lVar12 = *(longlong *)(param_1 + 0x20);
  if (*(longlong *)(param_1 + 8) == 0) {
    if (lVar12 != 0) {
      lStack_38 = *(longlong *)(param_1 + 0x30) - lVar16;
      lStack_48 = lVar12 - lVar16;
      local_40 = *(ulonglong *)(param_1 + 0x28) - lVar12;
      uVar8 = *(ulonglong *)(param_1 + 0x28);
      goto LAB_1400a6cf8;
    }
  }
  else {
    uVar10 = *(ulonglong *)(param_1 + 0x18);
    local_60 = *(longlong *)(param_1 + 8) - lVar16;
    lStack_58 = *(longlong *)(param_1 + 0x10) - lVar16;
    local_50 = uVar10 - lVar16;
    uVar8 = uVar10;
    if (lVar12 == 0) {
LAB_1400a6cf8:
      if (uVar8 == 0) goto LAB_1400a6b08;
    }
    else {
      uVar1 = *(ulonglong *)(param_1 + 0x28);
      lStack_38 = *(longlong *)(param_1 + 0x30) - lVar16;
      lStack_48 = lVar12 - lVar16;
      local_40 = uVar1 - lVar12;
      uVar8 = uVar1;
      if (uVar10 == 0) goto LAB_1400a6cf8;
      uVar8 = uVar10;
      if (uVar10 < uVar1) {
        uVar8 = uVar1;
      }
    }
    *(ulonglong *)(param_1 + 0x50) = uVar8 - lVar16;
  }
LAB_1400a6b08:
  local_68 = this;
  streambuf::operator=((streambuf *)this,(longlong)param_1);
  locale::locale(local_78,(undefined8 *)(param_1 + 0x38));
  locale::locale(local_70,(undefined8 *)(this + 0x38));
  (**(code **)(*(longlong *)this + 0x10))(this,local_78);
  locale::operator=((locale *)(this + 0x38),(undefined8 *)local_78);
  locale::~locale(local_70);
  locale::~locale(local_78);
  *(undefined4 *)(this + 0x40) = *(undefined4 *)(param_1 + 0x40);
  psVar11 = *(stringbuf **)(this + 0x48);
  if (psVar11 == this + 0x58) {
    psVar9 = *(stringbuf **)(param_1 + 0x48);
    if (psVar9 == param_1 + 0x58) goto LAB_1400a6d40;
    uVar2 = *(undefined8 *)(param_1 + 0x50);
    *(stringbuf **)(this + 0x48) = psVar9;
    *(undefined8 *)(this + 0x50) = uVar2;
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  else {
    psVar9 = *(stringbuf **)(param_1 + 0x48);
    if (psVar9 == param_1 + 0x58) {
LAB_1400a6d40:
      psVar13 = param_1 + 0x58;
      uVar8 = *(ulonglong *)(param_1 + 0x50);
      if (param_1 + 0x48 == this + 0x48) goto LAB_1400a6bb3;
      if (uVar8 != 0) {
        if (uVar8 == 1) {
          *psVar11 = *psVar13;
          uVar8 = *(ulonglong *)(param_1 + 0x50);
          psVar11 = *(stringbuf **)(this + 0x48);
        }
        else {
          uVar7 = (uint)uVar8;
          uVar10 = uVar8 & 0xffffffff;
          if (uVar7 < 8) {
            if ((uVar8 & 4) == 0) {
              if (uVar7 != 0) {
                *psVar11 = *psVar13;
                if ((uVar8 & 2) == 0) goto LAB_1400a6d8c;
                *(undefined2 *)(psVar11 + (uVar10 - 2)) = *(undefined2 *)(param_1 + uVar10 + 0x56);
                psVar11 = *(stringbuf **)(this + 0x48);
                uVar8 = *(ulonglong *)(param_1 + 0x50);
              }
            }
            else {
              *(undefined4 *)psVar11 = *(undefined4 *)psVar13;
              *(undefined4 *)(psVar11 + (uVar10 - 4)) = *(undefined4 *)(param_1 + uVar10 + 0x54);
              psVar11 = *(stringbuf **)(this + 0x48);
              uVar8 = *(ulonglong *)(param_1 + 0x50);
            }
          }
          else {
            *(undefined8 *)psVar11 = *(undefined8 *)psVar13;
            *(undefined8 *)(psVar11 + ((uVar8 & 0xffffffff) - 8)) =
                 *(undefined8 *)(param_1 + (uVar8 & 0xffffffff) + 0x50);
            lVar12 = (longlong)psVar11 - ((ulonglong)(psVar11 + 8) & 0xfffffffffffffff8);
            uVar7 = (int)lVar12 + uVar7 & 0xfffffff8;
            if (7 < uVar7) {
              uVar14 = 0;
              do {
                uVar8 = (ulonglong)uVar14;
                uVar14 = uVar14 + 8;
                *(undefined8 *)(((ulonglong)(psVar11 + 8) & 0xfffffffffffffff8) + uVar8) =
                     *(undefined8 *)(psVar13 + (uVar8 - lVar12));
              } while (uVar14 < uVar7);
            }
LAB_1400a6d8c:
            psVar11 = *(stringbuf **)(this + 0x48);
            uVar8 = *(ulonglong *)(param_1 + 0x50);
          }
        }
      }
      *(ulonglong *)(this + 0x50) = uVar8;
      psVar11[uVar8] = (stringbuf)0x0;
      psVar9 = *(stringbuf **)(param_1 + 0x48);
      goto LAB_1400a6bb3;
    }
    uVar2 = *(undefined8 *)(param_1 + 0x50);
    uVar3 = *(undefined8 *)(this + 0x58);
    *(stringbuf **)(this + 0x48) = psVar9;
    *(undefined8 *)(this + 0x50) = uVar2;
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
    if (psVar11 != (stringbuf *)0x0) {
      *(stringbuf **)(param_1 + 0x48) = psVar11;
      *(undefined8 *)(param_1 + 0x58) = uVar3;
      psVar9 = psVar11;
      goto LAB_1400a6bb3;
    }
  }
  psVar9 = param_1 + 0x58;
  *(stringbuf **)(param_1 + 0x48) = psVar9;
LAB_1400a6bb3:
  *(undefined8 *)(param_1 + 0x50) = 0;
  *psVar9 = (stringbuf)0x0;
  _M_sync(param_1,*(stringbuf **)(param_1 + 0x48),0,0);
  lVar12 = *(longlong *)(this + 0x48);
  if (local_60 != -1) {
    *(longlong *)(this + 0x18) = local_50 + lVar12;
    *(longlong *)(this + 8) = local_60 + lVar12;
    *(longlong *)(this + 0x10) = lStack_58 + lVar12;
  }
  if (lStack_48 != -1) {
    lStack_48 = lVar12 + lStack_48;
    *(longlong *)(this + 0x30) = lStack_38 + lVar12;
    *(longlong *)(this + 0x20) = lStack_48;
    *(longlong *)(this + 0x28) = lStack_48;
    if (local_40 < 0x80000000) {
      iVar6 = (int)local_40;
    }
    else {
      auVar4._8_8_ = 0;
      auVar4._0_8_ = local_40 - 0x80000000U;
      lVar15 = SUB168(ZEXT816(0x200000005) * auVar4,8);
      lVar12 = local_40 + -0x7fffffff;
      lVar16 = local_40;
      if (0x7fffffff < lVar12) {
        lVar16 = lVar12;
        lVar5 = local_40;
        if ((lVar15 + ((local_40 - 0x80000000U) - lVar15 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400a6c90;
        while (lVar12 = lVar5 + -0xfffffffe, 0x7fffffff < lVar12) {
LAB_1400a6c90:
          lVar16 = lVar12 + -0x7fffffff;
          lVar5 = lVar12;
        }
      }
      iVar6 = (int)lVar12;
      lStack_48 = (lStack_48 + 0x7fffffff + local_40) - lVar16;
    }
    *(longlong *)(this + 0x28) = iVar6 + lStack_48;
  }
  return this;
}



// std::__cxx11::wstringbuf::__xfer_bufptrs::__xfer_bufptrs(std::__cxx11::wstringbuf const&,
// std::__cxx11::wstringbuf*)

void __thiscall
std::__cxx11::wstringbuf::__xfer_bufptrs::__xfer_bufptrs
          (__xfer_bufptrs *this,longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  longlong lVar5;
  ulonglong uVar6;
  
  lVar1 = *(longlong *)(param_1 + 0x48);
  *(undefined8 *)this = param_2;
  lVar2 = *(longlong *)(param_1 + 0x20);
  *(undefined4 *)(this + 8) = 0xffffffff;
  *(undefined4 *)(this + 0xc) = 0xffffffff;
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  *(undefined4 *)(this + 0x14) = 0xffffffff;
  *(undefined4 *)(this + 0x18) = 0xffffffff;
  *(undefined4 *)(this + 0x1c) = 0xffffffff;
  *(undefined4 *)(this + 0x20) = 0xffffffff;
  *(undefined4 *)(this + 0x24) = 0xffffffff;
  *(undefined4 *)(this + 0x28) = 0xffffffff;
  *(undefined4 *)(this + 0x2c) = 0xffffffff;
  *(undefined4 *)(this + 0x30) = 0xffffffff;
  *(undefined4 *)(this + 0x34) = 0xffffffff;
  if (*(longlong *)(param_1 + 8) == 0) {
    if (lVar2 == 0) {
      return;
    }
    *(longlong *)(this + 0x20) = lVar2 - lVar1 >> 1;
    uVar6 = *(ulonglong *)(param_1 + 0x28);
    lVar5 = *(longlong *)(param_1 + 0x30);
    *(longlong *)(this + 0x28) = (longlong)(uVar6 - lVar2) >> 1;
    *(longlong *)(this + 0x30) = lVar5 - lVar1 >> 1;
  }
  else {
    *(longlong *)(this + 8) = *(longlong *)(param_1 + 8) - lVar1 >> 1;
    *(longlong *)(this + 0x10) = *(longlong *)(param_1 + 0x10) - lVar1 >> 1;
    uVar3 = *(ulonglong *)(param_1 + 0x18);
    *(longlong *)(this + 0x18) = (longlong)(uVar3 - lVar1) >> 1;
    uVar6 = uVar3;
    if (lVar2 != 0) {
      *(longlong *)(this + 0x20) = lVar2 - lVar1 >> 1;
      uVar4 = *(ulonglong *)(param_1 + 0x28);
      lVar5 = *(longlong *)(param_1 + 0x30);
      *(longlong *)(this + 0x28) = (longlong)(uVar4 - lVar2) >> 1;
      *(longlong *)(this + 0x30) = lVar5 - lVar1 >> 1;
      uVar6 = uVar4;
      if (uVar3 != 0) {
        uVar6 = uVar3;
        if (uVar3 < uVar4) {
          uVar6 = uVar4;
        }
        goto LAB_1400a6f2d;
      }
    }
  }
  if (uVar6 == 0) {
    return;
  }
LAB_1400a6f2d:
  *(longlong *)(param_1 + 0x50) = (longlong)(uVar6 - lVar1) >> 1;
  return;
}



// std::__cxx11::wstringbuf::__xfer_bufptrs::__xfer_bufptrs(std::__cxx11::wstringbuf const&,
// std::__cxx11::wstringbuf*)

void __thiscall
std::__cxx11::wstringbuf::__xfer_bufptrs::__xfer_bufptrs
          (__xfer_bufptrs *this,longlong param_1,undefined8 param_2)

{
  longlong lVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  longlong lVar5;
  ulonglong uVar6;
  
  lVar1 = *(longlong *)(param_1 + 0x48);
  *(undefined8 *)this = param_2;
  lVar2 = *(longlong *)(param_1 + 0x20);
  *(undefined4 *)(this + 8) = 0xffffffff;
  *(undefined4 *)(this + 0xc) = 0xffffffff;
  *(undefined4 *)(this + 0x10) = 0xffffffff;
  *(undefined4 *)(this + 0x14) = 0xffffffff;
  *(undefined4 *)(this + 0x18) = 0xffffffff;
  *(undefined4 *)(this + 0x1c) = 0xffffffff;
  *(undefined4 *)(this + 0x20) = 0xffffffff;
  *(undefined4 *)(this + 0x24) = 0xffffffff;
  *(undefined4 *)(this + 0x28) = 0xffffffff;
  *(undefined4 *)(this + 0x2c) = 0xffffffff;
  *(undefined4 *)(this + 0x30) = 0xffffffff;
  *(undefined4 *)(this + 0x34) = 0xffffffff;
  if (*(longlong *)(param_1 + 8) == 0) {
    if (lVar2 == 0) {
      return;
    }
    *(longlong *)(this + 0x20) = lVar2 - lVar1 >> 1;
    uVar6 = *(ulonglong *)(param_1 + 0x28);
    lVar5 = *(longlong *)(param_1 + 0x30);
    *(longlong *)(this + 0x28) = (longlong)(uVar6 - lVar2) >> 1;
    *(longlong *)(this + 0x30) = lVar5 - lVar1 >> 1;
  }
  else {
    *(longlong *)(this + 8) = *(longlong *)(param_1 + 8) - lVar1 >> 1;
    *(longlong *)(this + 0x10) = *(longlong *)(param_1 + 0x10) - lVar1 >> 1;
    uVar3 = *(ulonglong *)(param_1 + 0x18);
    *(longlong *)(this + 0x18) = (longlong)(uVar3 - lVar1) >> 1;
    uVar6 = uVar3;
    if (lVar2 != 0) {
      *(longlong *)(this + 0x20) = lVar2 - lVar1 >> 1;
      uVar4 = *(ulonglong *)(param_1 + 0x28);
      lVar5 = *(longlong *)(param_1 + 0x30);
      *(longlong *)(this + 0x28) = (longlong)(uVar4 - lVar2) >> 1;
      *(longlong *)(this + 0x30) = lVar5 - lVar1 >> 1;
      uVar6 = uVar4;
      if (uVar3 != 0) {
        uVar6 = uVar3;
        if (uVar3 < uVar4) {
          uVar6 = uVar4;
        }
        goto LAB_1400a700d;
      }
    }
  }
  if (uVar6 == 0) {
    return;
  }
LAB_1400a700d:
  *(longlong *)(param_1 + 0x50) = (longlong)(uVar6 - lVar1) >> 1;
  return;
}



// std::__cxx11::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs()

void __thiscall std::__cxx11::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs(__xfer_bufptrs *this)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 auVar4 [16];
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  
  lVar1 = *(longlong *)this;
  lVar5 = *(longlong *)(lVar1 + 0x48);
  if (*(longlong *)(this + 8) != -1) {
    lVar2 = *(longlong *)(this + 0x18);
    lVar3 = *(longlong *)(this + 0x10);
    *(longlong *)(lVar1 + 8) = lVar5 + *(longlong *)(this + 8) * 2;
    *(longlong *)(lVar1 + 0x10) = lVar5 + lVar3 * 2;
    *(longlong *)(lVar1 + 0x18) = lVar5 + lVar2 * 2;
  }
  if (*(longlong *)(this + 0x20) == -1) {
    return;
  }
  lVar3 = *(longlong *)(this + 0x28);
  lVar2 = lVar5 + *(longlong *)(this + 0x20) * 2;
  *(longlong *)(lVar1 + 0x30) = lVar5 + *(longlong *)(this + 0x30) * 2;
  *(longlong *)(lVar1 + 0x20) = lVar2;
  *(longlong *)(lVar1 + 0x28) = lVar2;
  lVar5 = lVar2;
  lVar7 = lVar3;
  if (0x7fffffff < lVar3) {
    lVar7 = lVar3 + -0x7fffffff;
    auVar4._8_8_ = 0;
    auVar4._0_8_ = lVar3 - 0x80000000U;
    lVar6 = SUB168(ZEXT816(0x200000005) * auVar4,8);
    lVar5 = lVar2 + 0xfffffffe;
    if (0x7fffffff < lVar7) {
      if ((lVar6 + ((lVar3 - 0x80000000U) - lVar6 >> 1) >> 0x1e & 1) != 0) {
        lVar7 = lVar3 + -0xfffffffe;
        lVar5 = lVar2 + 0x1fffffffc;
        if (lVar7 < 0x80000000) goto LAB_1400a713e;
      }
      do {
        lVar7 = lVar7 + -0xfffffffe;
        lVar5 = lVar5 + 0x1fffffffc;
      } while (0x7fffffff < lVar7);
    }
  }
LAB_1400a713e:
  *(longlong *)(lVar1 + 0x28) = lVar5 + (longlong)(int)lVar7 * 2;
  return;
}



// std::__cxx11::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs()

void __thiscall std::__cxx11::wstringbuf::__xfer_bufptrs::~__xfer_bufptrs(__xfer_bufptrs *this)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 auVar4 [16];
  longlong lVar5;
  longlong lVar6;
  longlong lVar7;
  
  lVar1 = *(longlong *)this;
  lVar5 = *(longlong *)(lVar1 + 0x48);
  if (*(longlong *)(this + 8) != -1) {
    lVar2 = *(longlong *)(this + 0x18);
    lVar3 = *(longlong *)(this + 0x10);
    *(longlong *)(lVar1 + 8) = lVar5 + *(longlong *)(this + 8) * 2;
    *(longlong *)(lVar1 + 0x10) = lVar5 + lVar3 * 2;
    *(longlong *)(lVar1 + 0x18) = lVar5 + lVar2 * 2;
  }
  if (*(longlong *)(this + 0x20) == -1) {
    return;
  }
  lVar3 = *(longlong *)(this + 0x28);
  lVar2 = lVar5 + *(longlong *)(this + 0x20) * 2;
  *(longlong *)(lVar1 + 0x30) = lVar5 + *(longlong *)(this + 0x30) * 2;
  *(longlong *)(lVar1 + 0x20) = lVar2;
  *(longlong *)(lVar1 + 0x28) = lVar2;
  lVar5 = lVar2;
  lVar7 = lVar3;
  if (0x7fffffff < lVar3) {
    lVar7 = lVar3 + -0x7fffffff;
    auVar4._8_8_ = 0;
    auVar4._0_8_ = lVar3 - 0x80000000U;
    lVar6 = SUB168(ZEXT816(0x200000005) * auVar4,8);
    lVar5 = lVar2 + 0xfffffffe;
    if (0x7fffffff < lVar7) {
      if ((lVar6 + ((lVar3 - 0x80000000U) - lVar6 >> 1) >> 0x1e & 1) != 0) {
        lVar7 = lVar3 + -0xfffffffe;
        lVar5 = lVar2 + 0x1fffffffc;
        if (lVar7 < 0x80000000) goto LAB_1400a722e;
      }
      do {
        lVar7 = lVar7 + -0xfffffffe;
        lVar5 = lVar5 + 0x1fffffffc;
      } while (0x7fffffff < lVar7);
    }
  }
LAB_1400a722e:
  *(longlong *)(lVar1 + 0x28) = lVar5 + (longlong)(int)lVar7 * 2;
  return;
}



// std::__cxx11::wstringbuf::_M_update_egptr()

void __thiscall std::__cxx11::wstringbuf::_M_update_egptr(wstringbuf *this)

{
  ulonglong uVar1;
  
  uVar1 = *(ulonglong *)(this + 0x28);
  if ((uVar1 != 0) && ((*(ulonglong *)(this + 0x18) == 0 || (*(ulonglong *)(this + 0x18) < uVar1))))
  {
    if (((byte)this[0x40] & 8) == 0) {
      *(ulonglong *)(this + 0x18) = uVar1;
      *(ulonglong *)(this + 8) = uVar1;
      *(ulonglong *)(this + 0x10) = uVar1;
    }
    else {
      *(ulonglong *)(this + 0x18) = uVar1;
    }
    return;
  }
  return;
}



// std::__cxx11::wstringbuf::_M_stringbuf_init(std::_Ios_Openmode)

void __thiscall std::__cxx11::wstringbuf::_M_stringbuf_init(wstringbuf *this,uint param_1)

{
  longlong lVar1;
  
  lVar1 = 0;
  *(uint *)(this + 0x40) = param_1;
  if ((param_1 & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(wstringbuf **)(this + 0x48),0,lVar1);
  return;
}



// std::__cxx11::wstringbuf::str(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wstringbuf::str(wstringbuf *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::wstring::_M_replace
            ((wstring *)(this + 0x48),0,*(ulonglong *)(this + 0x50),(wstring *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x40] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(wstringbuf **)(this + 0x48),0,lVar1);
  return;
}



// std::__cxx11::wstringbuf::swap(std::__cxx11::wstringbuf&)

void __thiscall std::__cxx11::wstringbuf::swap(wstringbuf *this,longlong *param_1)

{
  locale *this_00;
  locale *this_01;
  undefined4 uVar1;
  longlong lVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  undefined1 auVar6 [16];
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong lVar11;
  longlong lVar12;
  longlong local_b8;
  longlong local_b0;
  longlong local_a8;
  longlong local_a0;
  longlong local_98;
  longlong local_90;
  longlong local_88;
  longlong local_80;
  longlong local_78;
  longlong local_70;
  locale local_60 [8];
  locale local_58 [8];
  locale local_50 [16];
  
  lVar8 = *(longlong *)(this + 0x48);
  lVar2 = *(longlong *)(this + 8);
  lVar12 = *(longlong *)(this + 0x20);
  if (lVar2 == 0) {
    if (lVar12 != 0) {
      local_98 = -1;
      local_90 = -1;
      local_b0 = -1;
      local_a8 = lVar12 - lVar8 >> 1;
      lVar12 = (longlong)(*(ulonglong *)(this + 0x28) - lVar12) >> 1;
      local_88 = *(longlong *)(this + 0x30) - lVar8 >> 1;
      uVar7 = *(ulonglong *)(this + 0x28);
      goto LAB_1400a7769;
    }
    local_88 = -1;
    lVar12 = -1;
    local_a8 = -1;
    local_98 = -1;
    local_90 = -1;
    local_b0 = -1;
  }
  else {
    local_b0 = lVar2 - lVar8 >> 1;
    local_90 = *(longlong *)(this + 0x10) - lVar8 >> 1;
    uVar3 = *(ulonglong *)(this + 0x18);
    local_98 = (longlong)(uVar3 - lVar8) >> 1;
    if (lVar12 == 0) {
      local_88 = -1;
      lVar12 = -1;
      local_a8 = -1;
      uVar7 = uVar3;
LAB_1400a7769:
      if (uVar7 == 0) goto LAB_1400a73aa;
    }
    else {
      local_a8 = lVar12 - lVar8 >> 1;
      uVar4 = *(ulonglong *)(this + 0x28);
      lVar12 = (longlong)(uVar4 - lVar12) >> 1;
      local_88 = *(longlong *)(this + 0x30) - lVar8 >> 1;
      uVar7 = uVar4;
      if (uVar3 == 0) goto LAB_1400a7769;
      uVar7 = uVar3;
      if (uVar3 < uVar4) {
        uVar7 = uVar4;
      }
    }
    *(longlong *)(this + 0x50) = (longlong)(uVar7 - lVar8) >> 1;
  }
LAB_1400a73aa:
  lVar8 = param_1[1];
  lVar11 = param_1[9];
  lVar10 = param_1[4];
  if (lVar8 == 0) {
    if (lVar10 != 0) {
      local_78 = -1;
      local_80 = -1;
      local_b8 = -1;
      local_a0 = lVar10 - lVar11 >> 1;
      lVar10 = param_1[5] - lVar10 >> 1;
      local_70 = param_1[6] - lVar11 >> 1;
      uVar7 = param_1[5];
      goto LAB_1400a781e;
    }
    local_70 = -1;
    lVar10 = -1;
    local_a0 = -1;
    local_78 = -1;
    local_80 = -1;
    local_b8 = -1;
  }
  else {
    local_b8 = lVar8 - lVar11 >> 1;
    local_80 = param_1[2] - lVar11 >> 1;
    uVar3 = param_1[3];
    local_78 = (longlong)(uVar3 - lVar11) >> 1;
    if (lVar10 == 0) {
      local_70 = -1;
      lVar10 = -1;
      local_a0 = -1;
      uVar7 = uVar3;
LAB_1400a781e:
      if (uVar7 == 0) goto LAB_1400a743b;
    }
    else {
      local_a0 = lVar10 - lVar11 >> 1;
      uVar4 = param_1[5];
      lVar10 = (longlong)(uVar4 - lVar10) >> 1;
      local_70 = param_1[6] - lVar11 >> 1;
      uVar7 = uVar4;
      if (uVar3 == 0) goto LAB_1400a781e;
      uVar7 = uVar3;
      if (uVar3 < uVar4) {
        uVar7 = uVar4;
      }
    }
    param_1[10] = (longlong)(uVar7 - lVar11) >> 1;
  }
LAB_1400a743b:
  *(longlong *)(this + 8) = lVar8;
  this_00 = (locale *)(this + 0x38);
  this_01 = (locale *)(param_1 + 7);
  param_1[1] = lVar2;
  lVar8 = *(longlong *)(this + 0x10);
  *(longlong *)(this + 0x10) = param_1[2];
  param_1[2] = lVar8;
  lVar8 = *(longlong *)(this + 0x18);
  *(longlong *)(this + 0x18) = param_1[3];
  param_1[3] = lVar8;
  lVar8 = *(longlong *)(this + 0x20);
  *(longlong *)(this + 0x20) = param_1[4];
  param_1[4] = lVar8;
  lVar8 = *(longlong *)(this + 0x28);
  *(longlong *)(this + 0x28) = param_1[5];
  param_1[5] = lVar8;
  lVar8 = *(longlong *)(this + 0x30);
  *(longlong *)(this + 0x30) = param_1[6];
  param_1[6] = lVar8;
  locale::locale(local_50,(undefined8 *)this_00);
  locale::operator=(this_00,(undefined8 *)this_01);
  locale::operator=(this_01,(undefined8 *)local_50);
  locale::~locale(local_50);
  locale::locale(local_60,(undefined8 *)this_01);
  locale::locale(local_58,(undefined8 *)this_00);
  (**(code **)(*(longlong *)this + 0x10))(this,local_60);
  locale::operator=(this_00,(undefined8 *)local_60);
  locale::locale(local_50,(undefined8 *)this_01);
  (**(code **)(*param_1 + 0x10))(param_1,local_58);
  locale::operator=(this_01,(undefined8 *)local_58);
  locale::~locale(local_50);
  locale::~locale(local_58);
  locale::~locale(local_60);
  uVar1 = *(undefined4 *)(this + 0x40);
  *(int *)(this + 0x40) = (int)param_1[8];
  *(undefined4 *)(param_1 + 8) = uVar1;
  __cxx11::wstring::swap((wstring *)(this + 0x48),(wstring *)(param_1 + 9));
  lVar8 = *(longlong *)(this + 0x48);
  if (local_b8 != -1) {
    *(longlong *)(this + 8) = lVar8 + local_b8 * 2;
    *(longlong *)(this + 0x10) = lVar8 + local_80 * 2;
    *(longlong *)(this + 0x18) = lVar8 + local_78 * 2;
  }
  if (local_a0 != -1) {
    lVar2 = lVar8 + local_a0 * 2;
    *(longlong *)(this + 0x30) = lVar8 + local_70 * 2;
    *(longlong *)(this + 0x20) = lVar2;
    *(longlong *)(this + 0x28) = lVar2;
    lVar8 = lVar2;
    lVar11 = lVar10;
    if (0x7fffffff < lVar10) {
      lVar11 = lVar10 + -0x7fffffff;
      auVar5._8_8_ = 0;
      auVar5._0_8_ = lVar10 - 0x80000000U;
      lVar9 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar8 = lVar2 + 0xfffffffe;
      if (0x7fffffff < lVar11) {
        if ((lVar9 + ((lVar10 - 0x80000000U) - lVar9 >> 1) >> 0x1e & 1) != 0) {
          lVar11 = lVar10 + -0xfffffffe;
          lVar8 = lVar2 + 0x1fffffffc;
          if (lVar11 < 0x80000000) goto LAB_1400a7646;
        }
        do {
          lVar11 = lVar11 + -0xfffffffe;
          lVar8 = lVar8 + 0x1fffffffc;
        } while (0x7fffffff < lVar11);
      }
    }
LAB_1400a7646:
    *(longlong *)(this + 0x28) = lVar8 + (longlong)(int)lVar11 * 2;
  }
  lVar8 = param_1[9];
  if (local_b0 != -1) {
    param_1[1] = lVar8 + local_b0 * 2;
    param_1[2] = lVar8 + local_90 * 2;
    param_1[3] = lVar8 + local_98 * 2;
  }
  if (local_a8 == -1) {
    return;
  }
  lVar2 = lVar8 + local_a8 * 2;
  param_1[6] = lVar8 + local_88 * 2;
  param_1[4] = lVar2;
  param_1[5] = lVar2;
  lVar8 = lVar2;
  lVar11 = lVar12;
  if (0x7fffffff < lVar12) {
    lVar11 = lVar12 + -0x7fffffff;
    auVar6._8_8_ = 0;
    auVar6._0_8_ = lVar12 - 0x80000000U;
    lVar10 = SUB168(ZEXT816(0x200000005) * auVar6,8);
    lVar8 = lVar2 + 0xfffffffe;
    if (0x7fffffff < lVar11) {
      if ((lVar10 + ((lVar12 - 0x80000000U) - lVar10 >> 1) >> 0x1e & 1) != 0) {
        lVar11 = lVar12 + -0xfffffffe;
        lVar8 = lVar2 + 0x1fffffffc;
        if (lVar11 < 0x80000000) goto LAB_1400a772e;
      }
      do {
        lVar11 = lVar11 + -0xfffffffe;
        lVar8 = lVar8 + 0x1fffffffc;
      } while (0x7fffffff < lVar11);
    }
  }
LAB_1400a772e:
  param_1[5] = lVar8 + (longlong)(int)lVar11 * 2;
  return;
}



// std::__cxx11::wstringbuf::setbuf(wchar_t*, long long)

wstringbuf * __thiscall
std::__cxx11::wstringbuf::setbuf(wstringbuf *this,wstringbuf *param_1,longlong param_2)

{
  if ((param_1 != (wstringbuf *)0x0) && (-1 < param_2)) {
    *(undefined8 *)(this + 0x50) = 0;
    **(undefined2 **)(this + 0x48) = 0;
    _M_sync(this,param_1,param_2,0);
    return this;
  }
  return this;
}



// std::__cxx11::wstringbuf::_M_sync(wchar_t*, unsigned long long, unsigned long long)

void __thiscall
std::__cxx11::wstringbuf::_M_sync
          (wstringbuf *this,wstringbuf *param_1,longlong param_2,longlong param_3)

{
  undefined1 auVar1 [16];
  wstringbuf *pwVar2;
  longlong lVar3;
  wstringbuf *pwVar4;
  longlong lVar5;
  uint uVar6;
  
  uVar6 = *(uint *)(this + 0x40) & 8;
  if (*(wstringbuf **)(this + 0x48) == this + 0x58) {
    lVar5 = 0xe;
  }
  else {
    lVar5 = *(longlong *)(this + 0x58) * 2;
  }
  pwVar2 = param_1 + lVar5;
  pwVar4 = param_1 + *(longlong *)(this + 0x50) * 2;
  if (param_1 != *(wstringbuf **)(this + 0x48)) {
    pwVar2 = param_1 + *(longlong *)(this + 0x50) * 2 + param_2 * 2;
    param_2 = 0;
    pwVar4 = pwVar2;
  }
  if (uVar6 != 0) {
    *(wstringbuf **)(this + 8) = param_1;
    *(wstringbuf **)(this + 0x10) = param_1 + param_2 * 2;
    *(wstringbuf **)(this + 0x18) = pwVar4;
  }
  if ((*(uint *)(this + 0x40) & 0x10) == 0) {
    return;
  }
  *(wstringbuf **)(this + 0x30) = pwVar2;
  *(wstringbuf **)(this + 0x20) = param_1;
  *(wstringbuf **)(this + 0x28) = param_1;
  pwVar2 = param_1;
  lVar5 = param_3;
  if (0x7fffffff < param_3) {
    lVar5 = param_3 + -0x7fffffff;
    auVar1._8_8_ = 0;
    auVar1._0_8_ = param_3 - 0x80000000U;
    lVar3 = SUB168(ZEXT816(0x200000005) * auVar1,8);
    pwVar2 = param_1 + 0xfffffffe;
    if (0x7fffffff < lVar5) {
      if ((lVar3 + ((param_3 - 0x80000000U) - lVar3 >> 1) >> 0x1e & 1) != 0) {
        lVar5 = param_3 + -0xfffffffe;
        pwVar2 = param_1 + 0x1fffffffc;
        if (lVar5 < 0x80000000) goto LAB_1400a7a2e;
      }
      do {
        lVar5 = lVar5 + -0xfffffffe;
        pwVar2 = pwVar2 + 0x1fffffffc;
      } while (0x7fffffff < lVar5);
    }
  }
LAB_1400a7a2e:
  *(wstringbuf **)(this + 0x28) = pwVar2 + (longlong)(int)lVar5 * 2;
  if (uVar6 == 0) {
    *(wstringbuf **)(this + 0x18) = pwVar4;
    *(wstringbuf **)(this + 8) = pwVar4;
    *(wstringbuf **)(this + 0x10) = pwVar4;
  }
  return;
}



// std::__cxx11::wstringbuf::seekoff(long long, std::_Ios_Seekdir, std::_Ios_Openmode)

longlong *
std::__cxx11::wstringbuf::seekoff
          (longlong *param_1,longlong param_2,longlong param_3,int param_4,uint param_5)

{
  uint uVar1;
  ulonglong uVar2;
  longlong lVar3;
  undefined1 auVar4 [16];
  byte bVar5;
  longlong lVar6;
  byte bVar7;
  longlong lVar8;
  longlong lVar9;
  byte bVar10;
  uint uVar11;
  longlong lVar12;
  bool bVar13;
  
  uVar1 = *(uint *)(param_2 + 0x40);
  *param_1 = -1;
  *(undefined4 *)(param_1 + 1) = 0;
  uVar11 = uVar1 & 8;
  bVar13 = (param_5 & uVar11) != 0;
  bVar5 = (byte)((uVar1 & param_5) >> 4);
  bVar10 = bVar13 & bVar5 & param_4 != 1;
  bVar5 = ((byte)(param_5 >> 3) ^ 1) & 1 & bVar5;
  bVar7 = ((byte)(param_5 >> 4) ^ 1) & bVar13;
  if (bVar7 == 0) {
    lVar6 = *(longlong *)(param_2 + 0x20);
    if ((lVar6 == 0) && (param_3 != 0)) {
      return param_1;
    }
    if (bVar5 == 0 && bVar10 == 0) {
      return param_1;
    }
  }
  else {
    lVar6 = *(longlong *)(param_2 + 8);
    if ((lVar6 == 0) && (param_3 != 0)) {
      return param_1;
    }
  }
  uVar2 = *(ulonglong *)(param_2 + 0x28);
  if ((uVar2 != 0) &&
     ((*(ulonglong *)(param_2 + 0x18) == 0 || (*(ulonglong *)(param_2 + 0x18) < uVar2)))) {
    if (uVar11 == 0) {
      *(ulonglong *)(param_2 + 8) = uVar2;
      *(ulonglong *)(param_2 + 0x10) = uVar2;
    }
    *(ulonglong *)(param_2 + 0x18) = uVar2;
  }
  if (param_4 == 1) {
    lVar12 = ((longlong)(uVar2 - lVar6) >> 1) + param_3;
    param_3 = param_3 + (*(longlong *)(param_2 + 0x10) - lVar6 >> 1);
  }
  else {
    lVar12 = param_3;
    if (param_4 == 2) {
      lVar12 = param_3 + (*(longlong *)(param_2 + 0x18) - lVar6 >> 1);
      param_3 = lVar12;
    }
  }
  if (((bVar7 != 0 || bVar10 != 0) && (-1 < param_3)) &&
     (param_3 <= *(longlong *)(param_2 + 0x18) - lVar6 >> 1)) {
    lVar3 = *(longlong *)(param_2 + 8);
    *param_1 = param_3;
    *(undefined4 *)(param_1 + 1) = 0;
    *(longlong *)(param_2 + 0x10) = lVar3 + param_3 * 2;
  }
  if (lVar12 < 0) {
    return param_1;
  }
  if (bVar5 == 0 && bVar10 == 0) {
    return param_1;
  }
  if (*(longlong *)(param_2 + 0x18) - lVar6 >> 1 < lVar12) {
    return param_1;
  }
  lVar3 = *(longlong *)(param_2 + 0x20);
  lVar6 = lVar12;
  lVar8 = lVar3;
  if (0x7fffffff < lVar12) {
    auVar4._8_8_ = 0;
    auVar4._0_8_ = lVar12 - 0x80000000U;
    lVar9 = SUB168(ZEXT816(0x200000005) * auVar4,8);
    lVar6 = lVar12 + -0x7fffffff;
    lVar8 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar6) {
      if ((lVar9 + ((lVar12 - 0x80000000U) - lVar9 >> 1) >> 0x1e & 1) != 0) {
        lVar6 = lVar12 + -0xfffffffe;
        lVar8 = lVar3 + 0x1fffffffc;
        if (lVar6 < 0x80000000) goto LAB_1400a7bd4;
      }
      do {
        lVar6 = lVar6 + -0xfffffffe;
        lVar8 = lVar8 + 0x1fffffffc;
      } while (0x7fffffff < lVar6);
    }
  }
LAB_1400a7bd4:
  *param_1 = lVar12;
  *(longlong *)(param_2 + 0x28) = lVar8 + lVar6 * 2;
  *(undefined4 *)(param_1 + 1) = 0;
  return param_1;
}



// std::__cxx11::wstringbuf::seekpos(std::fpos<int>, std::_Ios_Openmode)

longlong *
std::__cxx11::wstringbuf::seekpos(longlong *param_1,longlong param_2,longlong *param_3,uint param_4)

{
  longlong lVar1;
  longlong lVar2;
  longlong lVar3;
  undefined1 auVar4 [16];
  uint uVar5;
  uint uVar6;
  longlong lVar7;
  longlong lVar8;
  ulonglong uVar9;
  ulonglong uVar10;
  longlong lVar11;
  
  lVar1 = *param_3;
  lVar2 = param_3[1];
  uVar5 = *(uint *)(param_2 + 0x40);
  *param_1 = -1;
  *(undefined4 *)(param_1 + 1) = 0;
  uVar6 = uVar5 & param_4;
  uVar5 = uVar5 & 8;
  if ((param_4 & uVar5) == 0) {
    lVar8 = *(longlong *)(param_2 + 0x20);
    if (lVar8 == 0) goto LAB_1400a7ce9;
LAB_1400a7ccc:
    if ((uVar6 & 0x18) == 0) {
      return param_1;
    }
    uVar10 = *(ulonglong *)(param_2 + 0x28);
    if ((uVar10 == 0) ||
       ((*(ulonglong *)(param_2 + 0x18) != 0 && (uVar10 <= *(ulonglong *)(param_2 + 0x18))))) {
LAB_1400a7d3f:
      if (lVar1 < 0) {
        return param_1;
      }
LAB_1400a7d44:
      uVar9 = *(ulonglong *)(param_2 + 0x18);
      goto LAB_1400a7d48;
    }
    if (uVar5 != 0) {
      *(ulonglong *)(param_2 + 0x18) = uVar10;
      goto LAB_1400a7d3f;
    }
    *(ulonglong *)(param_2 + 0x18) = uVar10;
    *(ulonglong *)(param_2 + 8) = uVar10;
    *(ulonglong *)(param_2 + 0x10) = uVar10;
    if (lVar1 < 0) {
      return param_1;
    }
LAB_1400a7e27:
    if ((longlong)(uVar10 - lVar8) >> 1 < lVar1) {
      return param_1;
    }
  }
  else {
    lVar8 = *(longlong *)(param_2 + 8);
    if (lVar8 != 0) goto LAB_1400a7ccc;
LAB_1400a7ce9:
    if (lVar1 != 0) {
      return param_1;
    }
    if ((uVar6 & 0x18) == 0) {
      return param_1;
    }
    uVar10 = *(ulonglong *)(param_2 + 0x28);
    uVar9 = *(ulonglong *)(param_2 + 0x18);
    if ((uVar10 != 0) && ((uVar9 == 0 || (uVar9 < uVar10)))) {
      if (uVar5 == 0) {
        *(ulonglong *)(param_2 + 0x18) = uVar10;
        *(ulonglong *)(param_2 + 8) = uVar10;
        *(ulonglong *)(param_2 + 0x10) = uVar10;
        goto LAB_1400a7e27;
      }
      *(ulonglong *)(param_2 + 0x18) = uVar10;
      goto LAB_1400a7d44;
    }
LAB_1400a7d48:
    if ((longlong)(uVar9 - lVar8) >> 1 < lVar1) {
      return param_1;
    }
    if ((param_4 & uVar5) != 0) {
      *(longlong *)(param_2 + 0x10) = *(longlong *)(param_2 + 8) + lVar1 * 2;
    }
  }
  if ((uVar6 & 0x10) == 0) goto LAB_1400a7df6;
  lVar3 = *(longlong *)(param_2 + 0x20);
  lVar8 = lVar1;
  lVar11 = lVar3;
  if (0x7fffffff < lVar1) {
    auVar4._8_8_ = 0;
    auVar4._0_8_ = lVar1 - 0x80000000U;
    lVar7 = SUB168(ZEXT816(0x200000005) * auVar4,8);
    lVar11 = lVar3 + 0xfffffffe;
    lVar8 = lVar1 + -0x7fffffff;
    if (0x7fffffff < lVar8) {
      if ((lVar7 + ((lVar1 - 0x80000000U) - lVar7 >> 1) >> 0x1e & 1) != 0) {
        lVar8 = lVar1 + -0xfffffffe;
        lVar11 = lVar3 + 0x1fffffffc;
        if (lVar8 < 0x80000000) goto LAB_1400a7dee;
      }
      do {
        lVar8 = lVar8 + -0xfffffffe;
        lVar11 = lVar11 + 0x1fffffffc;
      } while (0x7fffffff < lVar8);
    }
  }
LAB_1400a7dee:
  *(longlong *)(param_2 + 0x28) = lVar11 + lVar8 * 2;
LAB_1400a7df6:
  *param_1 = lVar1;
  *(int *)(param_1 + 1) = (int)lVar2;
  return param_1;
}



// std::__cxx11::wstringbuf::_M_pbump(wchar_t*, wchar_t*, long long)

void __thiscall
std::__cxx11::wstringbuf::_M_pbump
          (wstringbuf *this,longlong param_1,undefined8 param_2,longlong param_3)

{
  undefined1 auVar1 [16];
  longlong lVar2;
  longlong lVar3;
  longlong lVar4;
  
  *(undefined8 *)(this + 0x30) = param_2;
  *(longlong *)(this + 0x20) = param_1;
  *(longlong *)(this + 0x28) = param_1;
  lVar2 = param_1;
  lVar4 = param_3;
  if (0x7fffffff < param_3) {
    lVar4 = param_3 + -0x7fffffff;
    auVar1._8_8_ = 0;
    auVar1._0_8_ = param_3 - 0x80000000U;
    lVar3 = SUB168(ZEXT816(0x200000005) * auVar1,8);
    lVar2 = param_1 + 0xfffffffe;
    if (0x7fffffff < lVar4) {
      if ((lVar3 + ((param_3 - 0x80000000U) - lVar3 >> 1) >> 0x1e & 1) != 0) {
        lVar4 = param_3 + -0xfffffffe;
        lVar2 = param_1 + 0x1fffffffc;
        if (lVar4 < 0x80000000) goto LAB_1400a7ef6;
      }
      do {
        lVar4 = lVar4 + -0xfffffffe;
        lVar2 = lVar2 + 0x1fffffffc;
      } while (0x7fffffff < lVar4);
    }
  }
LAB_1400a7ef6:
  *(longlong *)(this + 0x28) = lVar2 + (longlong)(int)lVar4 * 2;
  return;
}



// std::__cxx11::wstringbuf::overflow(unsigned short)

undefined4 __thiscall std::__cxx11::wstringbuf::overflow(wstringbuf *this,undefined4 param_1)

{
  wstringbuf *pwVar1;
  wstring *pwVar2;
  undefined1 auVar3 [16];
  ulonglong uVar4;
  longlong lVar5;
  wstringbuf *pwVar6;
  longlong lVar7;
  longlong lVar8;
  short sVar9;
  ulonglong uVar10;
  ulonglong uVar11;
  undefined2 *local_58;
  ulonglong local_50;
  undefined2 local_48;
  undefined6 uStack_46;
  
  if ((*(uint *)(this + 0x40) & 0x10) == 0) {
    return 0xffffffff;
  }
  sVar9 = (short)param_1;
  if (sVar9 == -1) {
    return 0;
  }
  pwVar1 = *(wstringbuf **)(this + 0x48);
  if (pwVar1 == this + 0x58) {
    uVar10 = 7;
  }
  else {
    uVar10 = *(ulonglong *)(this + 0x58);
  }
  pwVar6 = *(wstringbuf **)(this + 0x28);
  if ((ulonglong)((longlong)*(wstringbuf **)(this + 0x30) - *(longlong *)(this + 0x20) >> 1) <
      uVar10) {
    lVar5 = (longlong)pwVar6 - *(longlong *)(this + 0x20);
    *(wstringbuf **)(this + 0x30) = pwVar1 + uVar10 * 2;
    lVar7 = lVar5 >> 1;
    *(wstringbuf **)(this + 0x20) = pwVar1;
    *(wstringbuf **)(this + 0x28) = pwVar1;
    pwVar6 = pwVar1;
    lVar8 = lVar7;
    if (0xfffffffe < lVar5) {
      lVar8 = lVar7 + -0x7fffffff;
      auVar3._8_8_ = 0;
      auVar3._0_8_ = lVar7 - 0x80000000U;
      lVar5 = SUB168(ZEXT816(0x200000005) * auVar3,8);
      pwVar6 = pwVar1 + 0xfffffffe;
      if (0x7fffffff < lVar8) {
        if ((lVar5 + ((lVar7 - 0x80000000U) - lVar5 >> 1) >> 0x1e & 1) != 0) {
          lVar8 = lVar7 + -0xfffffffe;
          pwVar6 = pwVar1 + 0x1fffffffc;
          if (lVar8 < 0x80000000) goto LAB_1400a802e;
        }
        do {
          lVar8 = lVar8 + -0xfffffffe;
          pwVar6 = pwVar6 + 0x1fffffffc;
        } while (0x7fffffff < lVar8);
      }
    }
LAB_1400a802e:
    pwVar6 = pwVar6 + (longlong)(int)lVar8 * 2;
    *(wstringbuf **)(this + 0x28) = pwVar6;
    if ((*(uint *)(this + 0x40) & 8) != 0) {
      lVar8 = *(longlong *)(this + 8);
      *(wstringbuf **)(this + 0x18) = pwVar1 + (*(longlong *)(this + 0x18) - lVar8) + 2;
      *(wstringbuf **)(this + 8) = pwVar1;
      *(wstringbuf **)(this + 0x10) = pwVar1 + (*(longlong *)(this + 0x10) - lVar8);
    }
  }
  else if (*(wstringbuf **)(this + 0x30) <= pwVar6) {
    if (uVar10 == 0x1fffffffffffffff) {
      return 0xffffffff;
    }
    uVar10 = uVar10 * 2;
    local_48 = 0;
    if (0x1fffffffffffffff < uVar10) {
      uVar10 = 0x1fffffffffffffff;
    }
    local_50 = 0;
    if (uVar10 < 0x200) {
      uVar10 = 0x200;
    }
    local_58 = &local_48;
    __cxx11::wstring::reserve((wstring *)&local_58,uVar10);
    pwVar2 = *(wstring **)(this + 0x20);
    if (pwVar2 != (wstring *)0x0) {
      __cxx11::wstring::_M_replace
                ((wstring *)&local_58,0,local_50,pwVar2,
                 *(longlong *)(this + 0x30) - (longlong)pwVar2 >> 1);
    }
    uVar4 = local_50;
    uVar10 = local_50 + 1;
    if (local_58 == &local_48) {
      uVar11 = 7;
    }
    else {
      uVar11 = CONCAT62(uStack_46,local_48);
    }
    if (uVar11 < uVar10) {
      __cxx11::wstring::_M_mutate((wstring *)&local_58,local_50,0,(undefined2 *)0x0,1);
    }
    local_58[uVar4] = sVar9;
    local_58[uVar4 + 1] = 0;
    local_50 = uVar10;
    __cxx11::wstring::swap((wstring *)(this + 0x48),(wstring *)&local_58);
    _M_sync(this,*(wstringbuf **)(this + 0x48),
            *(longlong *)(this + 0x10) - *(longlong *)(this + 8) >> 1,
            *(longlong *)(this + 0x28) - *(longlong *)(this + 0x20) >> 1);
    if (local_58 != &local_48) {
      operator_delete(local_58);
    }
    pwVar6 = *(wstringbuf **)(this + 0x28);
    goto LAB_1400a7f74;
  }
  *(short *)pwVar6 = sVar9;
LAB_1400a7f74:
  *(wstringbuf **)(this + 0x28) = pwVar6 + 2;
  return param_1;
}



// std::__cxx11::wstringbuf::pbackfail(unsigned short)

undefined4 __thiscall std::__cxx11::wstringbuf::pbackfail(wstringbuf *this,undefined4 param_1)

{
  short sVar1;
  ulonglong uVar2;
  short sVar3;
  
  uVar2 = *(ulonglong *)(this + 0x10);
  if (*(ulonglong *)(this + 8) < uVar2) {
    sVar3 = (short)param_1;
    if (sVar3 == -1) {
      *(ulonglong *)(this + 0x10) = uVar2 - 2;
      return 0;
    }
    sVar1 = *(short *)(uVar2 - 2);
    if ((((byte)this[0x40] & 0x10) != 0) || (sVar1 == sVar3)) {
      *(ulonglong *)(this + 0x10) = uVar2 - 2;
      if (sVar1 != sVar3) {
        *(short *)(uVar2 - 2) = sVar3;
      }
      return param_1;
    }
  }
  return 0xffffffff;
}



// std::__cxx11::wstringbuf::showmanyc()

longlong __thiscall std::__cxx11::wstringbuf::showmanyc(wstringbuf *this)

{
  ulonglong uVar1;
  ulonglong uVar2;
  longlong lVar3;
  
  if (((byte)this[0x40] & 8) != 0) {
    uVar1 = *(ulonglong *)(this + 0x28);
    uVar2 = *(ulonglong *)(this + 0x18);
    if ((uVar1 == 0) || ((uVar2 != 0 && (uVar1 <= uVar2)))) {
      lVar3 = uVar2 - *(longlong *)(this + 0x10);
    }
    else {
      lVar3 = uVar1 - *(longlong *)(this + 0x10);
      *(ulonglong *)(this + 0x18) = uVar1;
    }
    return lVar3 >> 1;
  }
  return -1;
}



// std::__cxx11::wstringbuf::underflow()

ulonglong __thiscall std::__cxx11::wstringbuf::underflow(wstringbuf *this)

{
  ushort *puVar1;
  ushort *puVar2;
  
  if (((byte)this[0x40] & 8) != 0) {
    puVar1 = *(ushort **)(this + 0x28);
    puVar2 = *(ushort **)(this + 0x18);
    if ((puVar1 != (ushort *)0x0) && ((puVar2 == (ushort *)0x0 || (puVar2 < puVar1)))) {
      *(ushort **)(this + 0x18) = puVar1;
      puVar2 = puVar1;
    }
    if (*(ushort **)(this + 0x10) < puVar2) {
      return (ulonglong)**(ushort **)(this + 0x10);
    }
  }
  return 0xffffffff;
}



// std::__cxx11::wstringbuf::wstringbuf(std::__cxx11::wstringbuf&&)

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,wstringbuf *param_1)

{
  wstringbuf *_Src;
  undefined4 uVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  ulonglong uVar6;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  longlong local_30;
  longlong lStack_28;
  
  lVar7 = *(longlong *)(param_1 + 0x48);
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  local_30 = -1;
  lStack_28 = -1;
  if (*(longlong *)(param_1 + 8) == 0) {
    lVar3 = *(longlong *)(param_1 + 0x20);
    if (lVar3 != 0) {
      lStack_38 = lVar3 - lVar7 >> 1;
      local_30 = (longlong)(*(ulonglong *)(param_1 + 0x28) - lVar3) >> 1;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar7 >> 1;
      uVar6 = *(ulonglong *)(param_1 + 0x28);
      goto LAB_1400a8567;
    }
  }
  else {
    local_50 = *(longlong *)(param_1 + 8) - lVar7 >> 1;
    lStack_48 = *(longlong *)(param_1 + 0x10) - lVar7 >> 1;
    uVar2 = *(ulonglong *)(param_1 + 0x18);
    local_40 = (longlong)(uVar2 - lVar7) >> 1;
    lVar3 = *(longlong *)(param_1 + 0x20);
    uVar6 = uVar2;
    if (lVar3 == 0) {
LAB_1400a8567:
      if (uVar6 == 0) goto LAB_1400a83cb;
    }
    else {
      lStack_38 = lVar3 - lVar7 >> 1;
      uVar4 = *(ulonglong *)(param_1 + 0x28);
      local_30 = (longlong)(uVar4 - lVar3) >> 1;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar7 >> 1;
      uVar6 = uVar4;
      if (uVar2 == 0) goto LAB_1400a8567;
      uVar6 = uVar2;
      if (uVar2 < uVar4) {
        uVar6 = uVar4;
      }
    }
    *(longlong *)(param_1 + 0x50) = (longlong)(uVar6 - lVar7) >> 1;
  }
LAB_1400a83cb:
  wstreambuf::wstreambuf((wstreambuf *)this,(longlong)param_1);
  lVar7 = *(longlong *)(param_1 + 0x50);
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  uVar1 = *(undefined4 *)(param_1 + 0x40);
  _Src = param_1 + 0x58;
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined4 *)(this + 0x40) = uVar1;
  if (*(wstringbuf **)(param_1 + 0x48) == _Src) {
    memcpy(this + 0x58,_Src,lVar7 * 2 + 2);
    lVar7 = *(longlong *)(param_1 + 0x50);
  }
  else {
    *(wstringbuf **)(this + 0x48) = *(wstringbuf **)(param_1 + 0x48);
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  *(longlong *)(this + 0x50) = lVar7;
  *(wstringbuf **)(param_1 + 0x48) = _Src;
  *(undefined2 *)(param_1 + 0x58) = 0;
  lVar7 = *(longlong *)(this + 0x48);
  *(undefined8 *)(param_1 + 0x50) = 0;
  if (local_50 != -1) {
    *(longlong *)(this + 8) = lVar7 + local_50 * 2;
    *(longlong *)(this + 0x10) = lVar7 + lStack_48 * 2;
    *(longlong *)(this + 0x18) = lVar7 + local_40 * 2;
  }
  if (lStack_38 == -1) goto LAB_1400a8509;
  lVar3 = lVar7 + lStack_38 * 2;
  *(longlong *)(this + 0x30) = lVar7 + lStack_28 * 2;
  *(longlong *)(this + 0x20) = lVar3;
  *(longlong *)(this + 0x28) = lVar3;
  lVar7 = local_30;
  lVar9 = lVar3;
  if (0x7fffffff < local_30) {
    lVar7 = local_30 + -0x7fffffff;
    auVar5._8_8_ = 0;
    auVar5._0_8_ = local_30 - 0x80000000U;
    lVar8 = SUB168(ZEXT816(0x200000005) * auVar5,8);
    lVar9 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar7) {
      if ((lVar8 + ((local_30 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) != 0) {
        lVar7 = local_30 + -0xfffffffe;
        lVar9 = lVar3 + 0x1fffffffc;
        if (lVar7 < 0x80000000) goto LAB_1400a84fe;
      }
      do {
        lVar7 = lVar7 + -0xfffffffe;
        lVar9 = lVar9 + 0x1fffffffc;
      } while (0x7fffffff < lVar7);
    }
  }
LAB_1400a84fe:
  *(longlong *)(this + 0x28) = lVar9 + (longlong)(int)lVar7 * 2;
LAB_1400a8509:
  _M_sync(param_1,_Src,0,0);
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::__cxx11::wstringbuf&&,
// std::__cxx11::wstringbuf::__xfer_bufptrs&&)

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,longlong param_1)

{
  void *_Src;
  undefined4 uVar1;
  undefined8 uVar2;
  
  wstreambuf::wstreambuf((wstreambuf *)this,param_1);
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  uVar1 = *(undefined4 *)(param_1 + 0x40);
  _Src = (void *)(param_1 + 0x58);
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined4 *)(this + 0x40) = uVar1;
  if (*(void **)(param_1 + 0x48) == _Src) {
    memcpy(this + 0x58,_Src,*(longlong *)(param_1 + 0x50) * 2 + 2);
  }
  else {
    *(void **)(this + 0x48) = *(void **)(param_1 + 0x48);
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  uVar2 = *(undefined8 *)(param_1 + 0x50);
  *(void **)(param_1 + 0x48) = _Src;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(this + 0x50) = uVar2;
  *(undefined2 *)(param_1 + 0x58) = 0;
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,undefined8 *param_1,uint param_2)

{
  undefined2 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  puVar1 = (undefined2 *)*param_1;
  *(undefined4 *)(this + 0x40) = 0;
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[1];
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  if ((puVar1 == (undefined2 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)this = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x38));
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x48),puVar1,(longlong)(puVar1 + lVar3));
  *(uint *)(this + 0x40) = param_2;
  lVar3 = 0;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(wstringbuf **)(this + 0x48),0,lVar3);
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::_Ios_Openmode)

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,undefined4 param_1)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = param_1;
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined2 *)(this + 0x58) = 0;
  return;
}



// std::__cxx11::wstringbuf::wstringbuf()

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = 0x18;
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined2 *)(this + 0x58) = 0;
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::__cxx11::wstringbuf&&)

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,wstringbuf *param_1)

{
  wstringbuf *_Src;
  undefined4 uVar1;
  ulonglong uVar2;
  longlong lVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  ulonglong uVar6;
  longlong lVar7;
  longlong lVar8;
  longlong lVar9;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  longlong local_30;
  longlong lStack_28;
  
  lVar7 = *(longlong *)(param_1 + 0x48);
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  local_30 = -1;
  lStack_28 = -1;
  if (*(longlong *)(param_1 + 8) == 0) {
    lVar3 = *(longlong *)(param_1 + 0x20);
    if (lVar3 != 0) {
      lStack_38 = lVar3 - lVar7 >> 1;
      local_30 = (longlong)(*(ulonglong *)(param_1 + 0x28) - lVar3) >> 1;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar7 >> 1;
      uVar6 = *(ulonglong *)(param_1 + 0x28);
      goto LAB_1400a8a77;
    }
  }
  else {
    local_50 = *(longlong *)(param_1 + 8) - lVar7 >> 1;
    lStack_48 = *(longlong *)(param_1 + 0x10) - lVar7 >> 1;
    uVar2 = *(ulonglong *)(param_1 + 0x18);
    local_40 = (longlong)(uVar2 - lVar7) >> 1;
    lVar3 = *(longlong *)(param_1 + 0x20);
    uVar6 = uVar2;
    if (lVar3 == 0) {
LAB_1400a8a77:
      if (uVar6 == 0) goto LAB_1400a88db;
    }
    else {
      lStack_38 = lVar3 - lVar7 >> 1;
      uVar4 = *(ulonglong *)(param_1 + 0x28);
      local_30 = (longlong)(uVar4 - lVar3) >> 1;
      lStack_28 = *(longlong *)(param_1 + 0x30) - lVar7 >> 1;
      uVar6 = uVar4;
      if (uVar2 == 0) goto LAB_1400a8a77;
      uVar6 = uVar2;
      if (uVar2 < uVar4) {
        uVar6 = uVar4;
      }
    }
    *(longlong *)(param_1 + 0x50) = (longlong)(uVar6 - lVar7) >> 1;
  }
LAB_1400a88db:
  wstreambuf::wstreambuf((wstreambuf *)this,(longlong)param_1);
  lVar7 = *(longlong *)(param_1 + 0x50);
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  uVar1 = *(undefined4 *)(param_1 + 0x40);
  _Src = param_1 + 0x58;
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined4 *)(this + 0x40) = uVar1;
  if (*(wstringbuf **)(param_1 + 0x48) == _Src) {
    memcpy(this + 0x58,_Src,lVar7 * 2 + 2);
    lVar7 = *(longlong *)(param_1 + 0x50);
  }
  else {
    *(wstringbuf **)(this + 0x48) = *(wstringbuf **)(param_1 + 0x48);
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  *(longlong *)(this + 0x50) = lVar7;
  *(wstringbuf **)(param_1 + 0x48) = _Src;
  *(undefined2 *)(param_1 + 0x58) = 0;
  lVar7 = *(longlong *)(this + 0x48);
  *(undefined8 *)(param_1 + 0x50) = 0;
  if (local_50 != -1) {
    *(longlong *)(this + 8) = lVar7 + local_50 * 2;
    *(longlong *)(this + 0x10) = lVar7 + lStack_48 * 2;
    *(longlong *)(this + 0x18) = lVar7 + local_40 * 2;
  }
  if (lStack_38 == -1) goto LAB_1400a8a19;
  lVar3 = lVar7 + lStack_38 * 2;
  *(longlong *)(this + 0x30) = lVar7 + lStack_28 * 2;
  *(longlong *)(this + 0x20) = lVar3;
  *(longlong *)(this + 0x28) = lVar3;
  lVar7 = local_30;
  lVar9 = lVar3;
  if (0x7fffffff < local_30) {
    lVar7 = local_30 + -0x7fffffff;
    auVar5._8_8_ = 0;
    auVar5._0_8_ = local_30 - 0x80000000U;
    lVar8 = SUB168(ZEXT816(0x200000005) * auVar5,8);
    lVar9 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar7) {
      if ((lVar8 + ((local_30 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) != 0) {
        lVar7 = local_30 + -0xfffffffe;
        lVar9 = lVar3 + 0x1fffffffc;
        if (lVar7 < 0x80000000) goto LAB_1400a8a0e;
      }
      do {
        lVar7 = lVar7 + -0xfffffffe;
        lVar9 = lVar9 + 0x1fffffffc;
      } while (0x7fffffff < lVar7);
    }
  }
LAB_1400a8a0e:
  *(longlong *)(this + 0x28) = lVar9 + (longlong)(int)lVar7 * 2;
LAB_1400a8a19:
  _M_sync(param_1,_Src,0,0);
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::__cxx11::wstringbuf&&,
// std::__cxx11::wstringbuf::__xfer_bufptrs&&)

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,longlong param_1)

{
  void *_Src;
  undefined4 uVar1;
  undefined8 uVar2;
  
  wstreambuf::wstreambuf((wstreambuf *)this,param_1);
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  uVar1 = *(undefined4 *)(param_1 + 0x40);
  _Src = (void *)(param_1 + 0x58);
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined4 *)(this + 0x40) = uVar1;
  if (*(void **)(param_1 + 0x48) == _Src) {
    memcpy(this + 0x58,_Src,*(longlong *)(param_1 + 0x50) * 2 + 2);
  }
  else {
    *(void **)(this + 0x48) = *(void **)(param_1 + 0x48);
    *(undefined8 *)(this + 0x58) = *(undefined8 *)(param_1 + 0x58);
  }
  uVar2 = *(undefined8 *)(param_1 + 0x50);
  *(void **)(param_1 + 0x48) = _Src;
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined8 *)(this + 0x50) = uVar2;
  *(undefined2 *)(param_1 + 0x58) = 0;
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,undefined8 *param_1,uint param_2)

{
  undefined2 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  puVar1 = (undefined2 *)*param_1;
  *(undefined4 *)(this + 0x40) = 0;
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[1];
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  if ((puVar1 == (undefined2 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)this = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x38));
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x48),puVar1,(longlong)(puVar1 + lVar3));
  *(uint *)(this + 0x40) = param_2;
  lVar3 = 0;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x50);
  }
  _M_sync(this,*(wstringbuf **)(this + 0x48),0,lVar3);
  return;
}



// std::__cxx11::wstringbuf::wstringbuf(std::_Ios_Openmode)

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this,undefined4 param_1)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = param_1;
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined2 *)(this + 0x58) = 0;
  return;
}



// std::__cxx11::wstringbuf::wstringbuf()

void __thiscall std::__cxx11::wstringbuf::wstringbuf(wstringbuf *this)

{
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 8) = 0;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  locale::locale((locale *)(this + 0x38));
  *(undefined4 *)(this + 0x40) = 0x18;
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  *(wstringbuf **)(this + 0x48) = this + 0x58;
  *(undefined8 *)(this + 0x50) = 0;
  *(undefined2 *)(this + 0x58) = 0;
  return;
}



// std::__cxx11::wstringbuf::~wstringbuf()

void __thiscall std::__cxx11::wstringbuf::~wstringbuf(wstringbuf *this)

{
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringbuf **)(this + 0x48) != this + 0x58) {
    operator_delete(*(wstringbuf **)(this + 0x48));
  }
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x38));
  operator_delete(this);
  return;
}



// std::__cxx11::wstringbuf::~wstringbuf()

void __thiscall std::__cxx11::wstringbuf::~wstringbuf(wstringbuf *this)

{
  *(undefined ***)this = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringbuf **)(this + 0x48) != this + 0x58) {
    operator_delete(*(wstringbuf **)(this + 0x48));
  }
  *(undefined ***)this = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x38));
  return;
}



// std::__cxx11::wstringbuf::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstringbuf&&)

wstringbuf * __thiscall std::__cxx11::wstringbuf::operator=(wstringbuf *this,wstringbuf *param_1)

{
  longlong lVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  undefined8 uVar4;
  undefined1 auVar5 [16];
  undefined8 uVar6;
  undefined8 uVar7;
  uint uVar8;
  ulonglong uVar9;
  wstringbuf *pwVar10;
  longlong lVar11;
  wstringbuf *pwVar12;
  longlong lVar13;
  longlong lVar14;
  wstringbuf *pwVar15;
  uint uVar16;
  locale local_78 [8];
  locale local_70 [8];
  wstringbuf *local_68;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar11 = *(longlong *)(param_1 + 0x48);
  local_60 = -1;
  lStack_58 = -1;
  lVar1 = *(longlong *)(param_1 + 0x20);
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  if (*(longlong *)(param_1 + 8) == 0) {
    if (lVar1 != 0) {
      lStack_48 = lVar1 - lVar11 >> 1;
      local_40 = (longlong)(*(ulonglong *)(param_1 + 0x28) - lVar1) >> 1;
      lStack_38 = *(longlong *)(param_1 + 0x30) - lVar11 >> 1;
      uVar9 = *(ulonglong *)(param_1 + 0x28);
      goto LAB_1400a907b;
    }
  }
  else {
    local_60 = *(longlong *)(param_1 + 8) - lVar11 >> 1;
    lStack_58 = *(longlong *)(param_1 + 0x10) - lVar11 >> 1;
    uVar2 = *(ulonglong *)(param_1 + 0x18);
    local_50 = (longlong)(uVar2 - lVar11) >> 1;
    uVar9 = uVar2;
    if (lVar1 == 0) {
LAB_1400a907b:
      if (uVar9 == 0) goto LAB_1400a8e7e;
    }
    else {
      lStack_48 = lVar1 - lVar11 >> 1;
      uVar3 = *(ulonglong *)(param_1 + 0x28);
      local_40 = (longlong)(uVar3 - lVar1) >> 1;
      lStack_38 = *(longlong *)(param_1 + 0x30) - lVar11 >> 1;
      uVar9 = uVar3;
      if (uVar2 == 0) goto LAB_1400a907b;
      uVar9 = uVar2;
      if (uVar2 < uVar3) {
        uVar9 = uVar3;
      }
    }
    *(longlong *)(param_1 + 0x50) = (longlong)(uVar9 - lVar11) >> 1;
  }
LAB_1400a8e7e:
  local_68 = this;
  wstreambuf::operator=((wstreambuf *)this,(longlong)param_1);
  locale::locale(local_78,(undefined8 *)(param_1 + 0x38));
  locale::locale(local_70,(undefined8 *)(this + 0x38));
  (**(code **)(*(longlong *)this + 0x10))(this,local_78);
  locale::operator=((locale *)(this + 0x38),(undefined8 *)local_78);
  locale::~locale(local_70);
  locale::~locale(local_78);
  pwVar15 = *(wstringbuf **)(this + 0x48);
  *(undefined4 *)(this + 0x40) = *(undefined4 *)(param_1 + 0x40);
  if (pwVar15 == this + 0x58) {
    pwVar10 = *(wstringbuf **)(param_1 + 0x48);
    pwVar12 = pwVar10;
    if (param_1 + 0x58 == pwVar10) goto LAB_1400a90c0;
    uVar4 = *(undefined8 *)(param_1 + 0x50);
    uVar6 = *(undefined8 *)(param_1 + 0x58);
    *(wstringbuf **)(this + 0x48) = pwVar10;
    *(undefined8 *)(this + 0x50) = uVar4;
    *(undefined8 *)(this + 0x58) = uVar6;
LAB_1400a90ad:
    pwVar10 = param_1 + 0x58;
    *(wstringbuf **)(param_1 + 0x48) = pwVar10;
  }
  else {
    pwVar10 = *(wstringbuf **)(param_1 + 0x48);
    pwVar12 = param_1 + 0x58;
    if (pwVar10 == param_1 + 0x58) {
LAB_1400a90c0:
      lVar11 = *(longlong *)(param_1 + 0x50);
      if (param_1 + 0x48 != this + 0x48) {
        if (lVar11 != 0) {
          if (lVar11 == 1) {
            *(undefined2 *)pwVar15 = *(undefined2 *)pwVar12;
          }
          else {
            uVar9 = lVar11 * 2;
            uVar16 = (uint)uVar9;
            if (uVar16 < 8) {
              if ((uVar9 & 4) == 0) {
                if (uVar16 != 0) {
                  *pwVar15 = *pwVar12;
                  if ((uVar9 & 2) == 0) goto LAB_1400a9109;
                  *(undefined2 *)(pwVar15 + ((uVar9 & 0xffffffff) - 2)) =
                       *(undefined2 *)(pwVar12 + ((uVar9 & 0xffffffff) - 2));
                  pwVar15 = *(wstringbuf **)(this + 0x48);
                  pwVar10 = *(wstringbuf **)(param_1 + 0x48);
                  lVar11 = *(longlong *)(param_1 + 0x50);
                }
              }
              else {
                *(undefined4 *)pwVar15 = *(undefined4 *)pwVar12;
                *(undefined4 *)(pwVar15 + ((uVar9 & 0xffffffff) - 4)) =
                     *(undefined4 *)(pwVar12 + ((uVar9 & 0xffffffff) - 4));
                pwVar15 = *(wstringbuf **)(this + 0x48);
                pwVar10 = *(wstringbuf **)(param_1 + 0x48);
                lVar11 = *(longlong *)(param_1 + 0x50);
              }
            }
            else {
              *(undefined8 *)pwVar15 = *(undefined8 *)pwVar12;
              *(undefined8 *)(pwVar15 + ((uVar9 & 0xffffffff) - 8)) =
                   *(undefined8 *)(pwVar12 + ((uVar9 & 0xffffffff) - 8));
              lVar11 = (longlong)pwVar15 - ((ulonglong)(pwVar15 + 8) & 0xfffffffffffffff8);
              uVar16 = uVar16 + (int)lVar11 & 0xfffffff8;
              if (7 < uVar16) {
                uVar8 = 0;
                do {
                  uVar9 = (ulonglong)uVar8;
                  uVar8 = uVar8 + 8;
                  *(undefined8 *)(((ulonglong)(pwVar15 + 8) & 0xfffffffffffffff8) + uVar9) =
                       *(undefined8 *)(pwVar12 + (uVar9 - lVar11));
                } while (uVar8 < uVar16);
              }
LAB_1400a9109:
              pwVar15 = *(wstringbuf **)(this + 0x48);
              pwVar10 = *(wstringbuf **)(param_1 + 0x48);
              lVar11 = *(longlong *)(param_1 + 0x50);
            }
          }
        }
        *(longlong *)(this + 0x50) = lVar11;
        *(undefined2 *)(pwVar15 + lVar11 * 2) = 0;
      }
    }
    else {
      uVar6 = *(undefined8 *)(param_1 + 0x50);
      uVar7 = *(undefined8 *)(param_1 + 0x58);
      uVar4 = *(undefined8 *)(this + 0x58);
      *(wstringbuf **)(this + 0x48) = pwVar10;
      *(undefined8 *)(this + 0x50) = uVar6;
      *(undefined8 *)(this + 0x58) = uVar7;
      if (pwVar15 == (wstringbuf *)0x0) goto LAB_1400a90ad;
      *(wstringbuf **)(param_1 + 0x48) = pwVar15;
      *(undefined8 *)(param_1 + 0x58) = uVar4;
      pwVar10 = pwVar15;
    }
  }
  *(undefined8 *)(param_1 + 0x50) = 0;
  *(undefined2 *)pwVar10 = 0;
  _M_sync(param_1,pwVar10,0,0);
  lVar11 = *(longlong *)(this + 0x48);
  if (local_60 != -1) {
    *(longlong *)(this + 8) = lVar11 + local_60 * 2;
    *(longlong *)(this + 0x10) = lVar11 + lStack_58 * 2;
    *(longlong *)(this + 0x18) = lVar11 + local_50 * 2;
  }
  if (lStack_48 == -1) {
    return this;
  }
  lVar1 = lVar11 + lStack_48 * 2;
  *(longlong *)(this + 0x30) = lVar11 + lStack_38 * 2;
  *(longlong *)(this + 0x20) = lVar1;
  *(longlong *)(this + 0x28) = lVar1;
  lVar11 = local_40;
  lVar14 = lVar1;
  if (0x7fffffff < local_40) {
    lVar11 = local_40 + -0x7fffffff;
    auVar5._8_8_ = 0;
    auVar5._0_8_ = local_40 - 0x80000000U;
    lVar13 = SUB168(ZEXT816(0x200000005) * auVar5,8);
    lVar14 = lVar1 + 0xfffffffe;
    if (0x7fffffff < lVar11) {
      if ((lVar13 + ((local_40 - 0x80000000U) - lVar13 >> 1) >> 0x1e & 1) != 0) {
        lVar11 = local_40 + -0xfffffffe;
        lVar14 = lVar1 + 0x1fffffffc;
        if (lVar11 < 0x80000000) goto LAB_1400a901e;
      }
      do {
        lVar11 = lVar11 + -0xfffffffe;
        lVar14 = lVar14 + 0x1fffffffc;
      } while (0x7fffffff < lVar11);
    }
  }
LAB_1400a901e:
  *(longlong *)(this + 0x28) = lVar14 + (longlong)(int)lVar11 * 2;
  return this;
}



// std::__cxx11::messages_byname<char>::messages_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::messages_byname<char>::messages_byname
          (messages_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400dcca0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dc640;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::messages_byname<char>::messages_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::messages_byname<char>::messages_byname
          (messages_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::__cxx11::messages_byname<char>::messages_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::messages_byname<char>::messages_byname
          (messages_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400dcca0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dc640;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::messages_byname<char>::messages_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::messages_byname<char>::messages_byname
          (messages_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::__cxx11::messages_byname<char>::~messages_byname()

void __thiscall std::__cxx11::messages_byname<char>::~messages_byname(messages_byname<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcca0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::messages_byname<char>::~messages_byname()

void __thiscall std::__cxx11::messages_byname<char>::~messages_byname(messages_byname<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcca0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages_byname<char>::~messages_byname()

void __thiscall std::__cxx11::messages_byname<char>::~messages_byname(messages_byname<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcca0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages_byname<wchar_t>::messages_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400dcce0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dc680;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::messages_byname<wchar_t>::messages_byname(std::__cxx11::string const&, unsigned
// long long)

void __thiscall
std::__cxx11::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::__cxx11::messages_byname<wchar_t>::messages_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  longlong lVar2;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__messages_1400dcce0;
  lVar2 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar2;
  *(undefined ***)this = &PTR__messages_byname_1400dc680;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
      locale::facet::_S_create_c_locale((undefined8 *)(this + 0x10),param_1);
      return;
    }
  }
  return;
}



// std::__cxx11::messages_byname<wchar_t>::messages_byname(std::__cxx11::string const&, unsigned
// long long)

void __thiscall
std::__cxx11::messages_byname<wchar_t>::messages_byname
          (messages_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  messages_byname(this,(char *)*param_1,param_2);
  return;
}



// std::__cxx11::messages_byname<wchar_t>::~messages_byname()

void __thiscall
std::__cxx11::messages_byname<wchar_t>::~messages_byname(messages_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcce0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::messages_byname<wchar_t>::~messages_byname()

void __thiscall
std::__cxx11::messages_byname<wchar_t>::~messages_byname(messages_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcce0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages_byname<wchar_t>::~messages_byname()

void __thiscall
std::__cxx11::messages_byname<wchar_t>::~messages_byname(messages_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcce0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::numpunct_byname<char>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<char>::numpunct_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<char>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<char>::numpunct_byname(std::__cxx11::string const&, unsigned long
// long)

void __thiscall
std::__cxx11::numpunct_byname<char>::numpunct_byname
          (numpunct_byname<char> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  numpunct<char>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<char>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<char>::~numpunct_byname()

void __thiscall std::__cxx11::numpunct_byname<char>::~numpunct_byname(numpunct_byname<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  numpunct<char>::~numpunct((numpunct<char> *)this);
  operator_delete(this);
  return;
}



// std::__cxx11::numpunct_byname<char>::~numpunct_byname()

void __thiscall std::__cxx11::numpunct_byname<char>::~numpunct_byname(numpunct_byname<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  numpunct<char>::~numpunct((numpunct<char> *)this);
  return;
}



// std::__cxx11::numpunct_byname<char>::~numpunct_byname()

void __thiscall std::__cxx11::numpunct_byname<char>::~numpunct_byname(numpunct_byname<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dc6c0;
  numpunct<char>::~numpunct((numpunct<char> *)this);
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname(std::__cxx11::string const&, unsigned
// long long)

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname(std::__cxx11::string const&, unsigned
// long long)

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::numpunct_byname
          (numpunct_byname<wchar_t> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      numpunct<wchar_t>::_M_initialize_numpunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::~numpunct_byname()

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::~numpunct_byname(numpunct_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  numpunct<wchar_t>::~numpunct((numpunct<wchar_t> *)this);
  operator_delete(this);
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::~numpunct_byname()

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::~numpunct_byname(numpunct_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  numpunct<wchar_t>::~numpunct((numpunct<wchar_t> *)this);
  return;
}



// std::__cxx11::numpunct_byname<wchar_t>::~numpunct_byname()

void __thiscall
std::__cxx11::numpunct_byname<wchar_t>::~numpunct_byname(numpunct_byname<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_byname_1400dc710;
  numpunct<wchar_t>::~numpunct((numpunct<wchar_t> *)this);
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc760;
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc760;
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc760;
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc760;
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get_byname()

void __thiscall std::__cxx11::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get_byname()

void __thiscall std::__cxx11::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get_byname<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get_byname()

void __thiscall std::__cxx11::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc7c0;
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::time_get_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc7c0;
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::time_get_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc7c0;
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::time_get_byname(std::__cxx11::string const&, unsigned long long)

void __thiscall
std::__cxx11::time_get_byname<>::time_get_byname
          (time_get_byname<> *this,undefined8 param_2_00,longlong param_2)

{
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__time_get_byname_1400dc7c0;
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::~time_get_byname()

void __thiscall std::__cxx11::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dce20;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::~time_get_byname()

void __thiscall std::__cxx11::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dce20;
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get_byname<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > >::~time_get_byname()

void __thiscall std::__cxx11::time_get_byname<>::~time_get_byname(time_get_byname<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dce20;
  locale::facet::~facet();
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::moneypunct_byname
          (moneypunct_byname<char,false> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc300;
  moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,false>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::~moneypunct_byname()

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::~moneypunct_byname(moneypunct_byname<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::~moneypunct_byname()

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::~moneypunct_byname(moneypunct_byname<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<char, false>::~moneypunct_byname()

void __thiscall
std::__cxx11::moneypunct_byname<char,false>::~moneypunct_byname(moneypunct_byname<char,false> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc820;
  moneypunct<char,false>::~moneypunct((moneypunct<char,false> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::moneypunct_byname(char const*, unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::moneypunct_byname
          (moneypunct_byname<char,true> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc370;
  moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<char,true>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::~moneypunct_byname()

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::~moneypunct_byname(moneypunct_byname<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  moneypunct<char,true>::~moneypunct((moneypunct<char,true> *)this);
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::~moneypunct_byname()

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::~moneypunct_byname(moneypunct_byname<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  moneypunct<char,true>::~moneypunct((moneypunct<char,true> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<char, true>::~moneypunct_byname()

void __thiscall
std::__cxx11::moneypunct_byname<char,true>::~moneypunct_byname(moneypunct_byname<char,true> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc890;
  moneypunct<char,true>::~moneypunct((moneypunct<char,true> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::moneypunct_byname(char const*, unsigned long
// long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::moneypunct_byname(char const*, unsigned long
// long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc3e0;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::~moneypunct_byname()

void __thiscall std::__cxx11::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::~moneypunct_byname()

void __thiscall std::__cxx11::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, false>::~moneypunct_byname()

void __thiscall std::__cxx11::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc900;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::moneypunct_byname(char const*, unsigned long
// long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::moneypunct_byname(char const*, unsigned long
// long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,char *param_1,longlong param_2)

{
  int iVar1;
  undefined8 local_20;
  
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  if ((*param_1 != 'C') || (param_1[1] != '\0')) {
    iVar1 = strcmp(param_1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,param_1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::moneypunct_byname(std::__cxx11::string const&,
// unsigned long long)

void __thiscall
std::__cxx11::moneypunct_byname<>::moneypunct_byname
          (moneypunct_byname<> *this,undefined8 *param_1,longlong param_2)

{
  char *_Str1;
  int iVar1;
  undefined8 local_20;
  
  _Str1 = (char *)*param_1;
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__moneypunct_1400dc450;
  moneypunct<>::_M_initialize_moneypunct((longlong)this);
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  if ((*_Str1 != 'C') || (_Str1[1] != '\0')) {
    iVar1 = strcmp(_Str1,"POSIX");
    if (iVar1 != 0) {
      locale::facet::_S_create_c_locale(&local_20,_Str1);
      moneypunct<>::_M_initialize_moneypunct((longlong)this);
      locale::facet::_S_destroy_c_locale(&local_20);
      return;
    }
  }
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::~moneypunct_byname()

void __thiscall std::__cxx11::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  operator_delete(this);
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::~moneypunct_byname()

void __thiscall std::__cxx11::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::__cxx11::moneypunct_byname<wchar_t, true>::~moneypunct_byname()

void __thiscall std::__cxx11::moneypunct_byname<>::~moneypunct_byname(moneypunct_byname<> *this)

{
  *(undefined ***)this = &PTR__moneypunct_byname_1400dc970;
  moneypunct<>::~moneypunct((moneypunct<> *)this);
  return;
}



// std::__cxx11::stringstream::str(std::__cxx11::string const&)

void __thiscall std::__cxx11::stringstream::str(stringstream *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::string::_M_replace
            ((string *)(this + 0x60),0,*(ulonglong *)(this + 0x68),(string *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x58] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x68);
  }
  stringbuf::_M_sync((stringbuf *)(this + 0x18),*(stringbuf **)(this + 0x60),0,lVar1);
  return;
}



// std::__cxx11::stringstream::swap(std::__cxx11::stringstream&)

void __thiscall std::__cxx11::stringstream::swap(stringstream *this,longlong *param_1)

{
  ios_base iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios_base *this_00;
  ios *this_01;
  
  this_00 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_01 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_00,(ios_base *)this_01);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  ios::_M_cache_locale(this_01,(longlong *)(this_01 + 0xd0));
  uVar2 = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = uVar2;
  iVar1 = this_00[0xe0];
  this_00[0xe0] = *(ios_base *)(this_01 + 0xe0);
  *(ios_base *)(this_01 + 0xe0) = iVar1;
  iVar1 = this_00[0xe1];
  this_00[0xe1] = *(ios_base *)(this_01 + 0xe1);
  lVar3 = param_1[1];
  *(ios_base *)(this_01 + 0xe1) = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  stringbuf::swap((stringbuf *)(this + 0x18),param_1 + 3);
  return;
}



// std::__cxx11::stringstream::stringstream(std::__cxx11::stringstream&&)

void __thiscall std::__cxx11::stringstream::stringstream(stringstream *this,longlong *param_1)

{
  longlong *plVar1;
  ios_base *this_00;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined **)this = &DAT_1400d6b18;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x80) = &DAT_1400d6b40;
  lVar12 = param_1[1];
  *(undefined8 *)(this + 0x158) = 0;
  *(longlong *)(this + 8) = lVar12;
  lVar12 = *(longlong *)(*param_1 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar12);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this + 0x150));
  uVar2 = *(undefined8 *)(lVar12 + 0xd8);
  *(undefined8 *)(lVar12 + 0xd8) = 0;
  *(undefined8 *)(this + 0x168) = 0;
  *(undefined8 *)(this + 0x158) = uVar2;
  *(undefined2 *)(this + 0x160) = *(undefined2 *)(lVar12 + 0xe0);
  lVar12 = param_1[0xc];
  param_1[1] = 0;
  *(undefined ***)this = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined ***)(this + 0x10) = &PTR__stringstream_1400dca10;
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  if (param_1[4] == 0) {
    lVar13 = param_1[7];
    if (lVar13 != 0) {
      lStack_48 = lVar13 - lVar12;
      local_40 = param_1[8] - lVar13;
      lStack_38 = param_1[9] - lVar12;
      uVar9 = param_1[8];
      goto LAB_1400ab0d3;
    }
  }
  else {
    uVar3 = param_1[6];
    local_60 = param_1[4] - lVar12;
    lStack_58 = param_1[5] - lVar12;
    local_50 = uVar3 - lVar12;
    lVar13 = param_1[7];
    uVar9 = uVar3;
    if (lVar13 == 0) {
LAB_1400ab0d3:
      if (uVar9 == 0) goto LAB_1400aaf32;
    }
    else {
      lStack_48 = lVar13 - lVar12;
      uVar4 = param_1[8];
      local_40 = uVar4 - lVar13;
      lStack_38 = param_1[9] - lVar12;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400ab0d3;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    param_1[0xd] = uVar9 - lVar12;
  }
LAB_1400aaf32:
  streambuf::streambuf((streambuf *)(this + 0x18),(longlong)(param_1 + 3));
  lVar12 = param_1[0xd];
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  lVar13 = param_1[0xb];
  plVar1 = param_1 + 0xe;
  *(stringstream **)(this + 0x60) = this + 0x70;
  *(int *)(this + 0x58) = (int)lVar13;
  if ((longlong *)param_1[0xc] != plVar1) {
    *(longlong **)(this + 0x60) = (longlong *)param_1[0xc];
    *(longlong *)(this + 0x70) = param_1[0xe];
    goto LAB_1400aaf77;
  }
  uVar9 = lVar12 + 1;
  uVar8 = (uint)uVar9;
  if (uVar8 < 8) {
    if ((uVar9 & 4) != 0) {
      *(int *)(this + 0x70) = (int)param_1[0xe];
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0x6c) =
           *(undefined4 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x6c);
      lVar12 = param_1[0xd];
      goto LAB_1400aaf77;
    }
    if (uVar8 == 0) goto LAB_1400aaf77;
    this[0x70] = *(stringstream *)(param_1 + 0xe);
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x6e) =
           *(undefined2 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x6e);
      lVar12 = param_1[0xd];
      goto LAB_1400aaf77;
    }
  }
  else {
    *(longlong *)(this + 0x70) = param_1[0xe];
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x68) =
         *(undefined8 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x68);
    lVar12 = (longlong)(this + 0x70) - ((ulonglong)(this + 0x78) & 0xfffffffffffffff8);
    uVar8 = uVar8 + (int)lVar12 & 0xfffffff8;
    if (7 < uVar8) {
      uVar9 = 0;
      do {
        uVar10 = (int)uVar9 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x78) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)((longlong)plVar1 + (uVar9 - lVar12));
        uVar9 = (ulonglong)uVar10;
      } while (uVar10 < uVar8);
    }
  }
  lVar12 = param_1[0xd];
LAB_1400aaf77:
  *(longlong *)(this + 0x68) = lVar12;
  param_1[0xc] = (longlong)plVar1;
  lVar12 = *(longlong *)(this + 0x60);
  param_1[0xd] = 0;
  *(undefined1 *)(param_1 + 0xe) = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x30) = local_50 + lVar12;
    *(longlong *)(this + 0x20) = local_60 + lVar12;
    *(longlong *)(this + 0x28) = lStack_58 + lVar12;
  }
  if (lStack_48 != -1) {
    lStack_48 = lVar12 + lStack_48;
    *(longlong *)(this + 0x48) = lStack_38 + lVar12;
    *(longlong *)(this + 0x38) = lStack_48;
    *(longlong *)(this + 0x40) = lStack_48;
    if (local_40 < 0x80000000) {
      iVar7 = (int)local_40;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = local_40 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar12 = local_40 + -0x7fffffff;
      lVar13 = local_40;
      if (0x7fffffff < lVar12) {
        lVar13 = lVar12;
        lVar6 = local_40;
        if ((lVar11 + ((local_40 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400ab050;
        while (lVar12 = lVar6 + -0xfffffffe, 0x7fffffff < lVar12) {
LAB_1400ab050:
          lVar13 = lVar12 + -0x7fffffff;
          lVar6 = lVar12;
        }
      }
      iVar7 = (int)lVar12;
      lStack_48 = (lStack_48 + 0x7fffffff + local_40) - lVar13;
    }
    *(longlong *)(this + 0x40) = iVar7 + lStack_48;
  }
  stringbuf::_M_sync((stringbuf *)(param_1 + 3),(stringbuf *)param_1[0xc],0,0);
  *(streambuf **)(this + 0x168) = (streambuf *)(this + 0x18);
  return;
}



// std::__cxx11::stringstream::stringstream(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::stringstream::stringstream(stringstream *this,undefined8 *param_1,uint param_2)

{
  ios_base *this_00;
  undefined1 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6b18;
  *(undefined **)(this + 0x80) = &DAT_1400d6b40;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6b68;
  *(undefined **)(this + 0x80) = &DAT_1400d6b90;
  ios::init((ios *)this_00,0);
  *(undefined ***)(this + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x50));
  puVar1 = (undefined1 *)*param_1;
  lVar3 = param_1[1];
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  *(stringstream **)(this + 0x60) = this + 0x70;
  if ((puVar1 == (undefined1 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x50));
    iostream::~iostream((iostream *)this,(longlong *)&PTR_DAT_1400db3a8);
    *(undefined ***)(this + 0x80) = &PTR__ios_1400ded80;
    ios_base::~ios_base(this_00);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x60),puVar1,(longlong)(puVar1 + lVar3));
  *(uint *)(this + 0x58) = param_2;
  lVar3 = 0;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x68);
  }
  stringbuf::_M_sync((stringbuf *)(this + 0x18),*(stringbuf **)(this + 0x60),0,lVar3);
  ios::init((ios *)this_00,(longlong)(this + 0x18));
  return;
}



// std::__cxx11::stringstream::stringstream(std::_Ios_Openmode)

void __thiscall std::__cxx11::stringstream::stringstream(stringstream *this,undefined4 param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6b18;
  *(undefined **)(this + 0x80) = &DAT_1400d6b40;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6b68;
  *(undefined **)(this + 0x80) = &DAT_1400d6b90;
  ios::init((ios *)this_00,0);
  *(undefined ***)(this + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x50));
  *(undefined4 *)(this + 0x58) = param_1;
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  *(stringstream **)(this + 0x60) = this + 0x70;
  this[0x70] = (stringstream)0x0;
  ios::init((ios *)this_00,(longlong)(this + 0x18));
  return;
}



// std::__cxx11::stringstream::stringstream()

void __thiscall std::__cxx11::stringstream::stringstream(stringstream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6b18;
  *(undefined **)(this + 0x80) = &DAT_1400d6b40;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6b68;
  *(undefined **)(this + 0x80) = &DAT_1400d6b90;
  ios::init((ios *)this_00,0);
  *(undefined ***)(this + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x50));
  this[0x70] = (stringstream)0x0;
  *(undefined4 *)(this + 0x58) = 0x18;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  *(stringstream **)(this + 0x60) = this + 0x70;
  *(undefined8 *)(this + 0x68) = 0;
  ios::init((ios *)this_00,(longlong)(this + 0x18));
  return;
}



// std::__cxx11::stringstream::stringstream(std::__cxx11::stringstream&&)

void __thiscall
std::__cxx11::stringstream::stringstream(stringstream *this,longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  longlong lVar11;
  ios_base *this_00;
  longlong lVar12;
  longlong lVar13;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar13 = param_1[2];
  *(longlong *)this = lVar13;
  *(longlong *)(this + *(longlong *)(lVar13 + -0x18)) = param_1[3];
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar13 + -0x18));
  lVar13 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar13);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(lVar13 + 0xd8);
  *(undefined8 *)(lVar13 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  local_60 = -1;
  lStack_58 = -1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar13 + 0xe0);
  lVar13 = param_1[4];
  lVar12 = param_1[5];
  lVar11 = param_2[0xc];
  param_2[1] = 0;
  *(longlong *)(this + 0x10) = lVar13;
  local_50 = -1;
  lStack_48 = -1;
  *(longlong *)(this + *(longlong *)(lVar13 + -0x18) + 0x10) = lVar12;
  lVar13 = param_1[1];
  lVar12 = param_1[6];
  local_40 = -1;
  lStack_38 = -1;
  *(longlong *)this = lVar13;
  *(longlong *)(this + *(longlong *)(lVar13 + -0x18)) = lVar12;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar13 = *param_1;
  lVar12 = param_1[8];
  *(longlong *)this = lVar13;
  *(longlong *)(this + *(longlong *)(lVar13 + -0x18)) = lVar12;
  *(longlong *)(this + 0x10) = param_1[9];
  if (param_2[4] == 0) {
    lVar13 = param_2[7];
    if (lVar13 != 0) {
      lStack_48 = lVar13 - lVar11;
      local_40 = param_2[8] - lVar13;
      lStack_38 = param_2[9] - lVar11;
      uVar9 = param_2[8];
      goto LAB_1400ab9fb;
    }
  }
  else {
    uVar3 = param_2[6];
    local_60 = param_2[4] - lVar11;
    lStack_58 = param_2[5] - lVar11;
    local_50 = uVar3 - lVar11;
    lVar13 = param_2[7];
    uVar9 = uVar3;
    if (lVar13 == 0) {
LAB_1400ab9fb:
      if (uVar9 == 0) goto LAB_1400ab856;
    }
    else {
      lStack_48 = lVar13 - lVar11;
      uVar4 = param_2[8];
      local_40 = uVar4 - lVar13;
      lStack_38 = param_2[9] - lVar11;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400ab9fb;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    param_2[0xd] = uVar9 - lVar11;
  }
LAB_1400ab856:
  streambuf::streambuf((streambuf *)(this + 0x18),(longlong)(param_2 + 3));
  lVar13 = param_2[0xd];
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  lVar12 = param_2[0xb];
  plVar1 = param_2 + 0xe;
  *(stringstream **)(this + 0x60) = this + 0x70;
  *(int *)(this + 0x58) = (int)lVar12;
  if ((longlong *)param_2[0xc] != plVar1) {
    *(longlong **)(this + 0x60) = (longlong *)param_2[0xc];
    *(longlong *)(this + 0x70) = param_2[0xe];
    goto LAB_1400ab89b;
  }
  uVar9 = lVar13 + 1;
  uVar8 = (uint)uVar9;
  if (uVar8 < 8) {
    if ((uVar9 & 4) != 0) {
      *(int *)(this + 0x70) = (int)param_2[0xe];
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0x6c) =
           *(undefined4 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x6c);
      lVar13 = param_2[0xd];
      goto LAB_1400ab89b;
    }
    if (uVar8 == 0) goto LAB_1400ab89b;
    this[0x70] = *(stringstream *)(param_2 + 0xe);
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x6e) =
           *(undefined2 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x6e);
      lVar13 = param_2[0xd];
      goto LAB_1400ab89b;
    }
  }
  else {
    *(longlong *)(this + 0x70) = param_2[0xe];
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x68) =
         *(undefined8 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x68);
    lVar13 = (longlong)(this + 0x70) - ((ulonglong)(this + 0x78) & 0xfffffffffffffff8);
    uVar8 = uVar8 + (int)lVar13 & 0xfffffff8;
    if (7 < uVar8) {
      uVar9 = 0;
      do {
        uVar10 = (int)uVar9 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x78) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)((longlong)plVar1 + (uVar9 - lVar13));
        uVar9 = (ulonglong)uVar10;
      } while (uVar10 < uVar8);
    }
  }
  lVar13 = param_2[0xd];
LAB_1400ab89b:
  *(longlong *)(this + 0x68) = lVar13;
  param_2[0xc] = (longlong)plVar1;
  lVar13 = *(longlong *)(this + 0x60);
  param_2[0xd] = 0;
  *(undefined1 *)(param_2 + 0xe) = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x30) = local_50 + lVar13;
    *(longlong *)(this + 0x20) = local_60 + lVar13;
    *(longlong *)(this + 0x28) = lStack_58 + lVar13;
  }
  if (lStack_48 != -1) {
    lStack_48 = lVar13 + lStack_48;
    *(longlong *)(this + 0x48) = lStack_38 + lVar13;
    *(longlong *)(this + 0x38) = lStack_48;
    *(longlong *)(this + 0x40) = lStack_48;
    if (local_40 < 0x80000000) {
      iVar7 = (int)local_40;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = local_40 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar13 = local_40 + -0x7fffffff;
      lVar12 = local_40;
      if (0x7fffffff < lVar13) {
        lVar12 = lVar13;
        lVar6 = local_40;
        if ((lVar11 + ((local_40 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400ab970;
        while (lVar13 = lVar6 + -0xfffffffe, 0x7fffffff < lVar13) {
LAB_1400ab970:
          lVar12 = lVar13 + -0x7fffffff;
          lVar6 = lVar13;
        }
      }
      iVar7 = (int)lVar13;
      lStack_48 = (lStack_48 + 0x7fffffff + local_40) - lVar12;
    }
    *(longlong *)(this + 0x40) = iVar7 + lStack_48;
  }
  stringbuf::_M_sync((stringbuf *)(param_2 + 3),(stringbuf *)param_2[0xc],0,0);
  *(streambuf **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) =
       (streambuf *)(this + 0x18);
  return;
}



// std::__cxx11::stringstream::stringstream(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::stringstream::stringstream
          (stringstream *this,longlong *param_1,undefined8 *param_2,uint param_3)

{
  longlong lVar1;
  undefined1 *puVar2;
  PVOID pvVar3;
  longlong lVar4;
  
  lVar4 = param_1[2];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar4 + -0x18)),0);
  lVar4 = param_1[4];
  *(longlong *)(this + 0x10) = lVar4;
  lVar4 = *(longlong *)(lVar4 + -0x18);
  *(longlong *)(this + lVar4 + 0x10) = param_1[5];
  ios::init((ios *)(this + lVar4 + 0x10),0);
  lVar4 = param_1[1];
  lVar1 = param_1[6];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar4 = *param_1;
  lVar1 = param_1[8];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  lVar4 = param_1[9];
  *(undefined8 *)(this + 0x20) = 0;
  *(longlong *)(this + 0x10) = lVar4;
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  locale::locale((locale *)(this + 0x50));
  puVar2 = (undefined1 *)*param_2;
  lVar4 = param_2[1];
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  *(stringstream **)(this + 0x60) = this + 0x70;
  if ((puVar2 == (undefined1 *)0x0) && (lVar4 != 0)) {
    pvVar3 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x50));
    iostream::~iostream((iostream *)this,param_1 + 1);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar3);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x60),puVar2,(longlong)(puVar2 + lVar4));
  *(uint *)(this + 0x58) = param_3;
  lVar4 = 0;
  if ((param_3 & 3) != 0) {
    lVar4 = *(longlong *)(this + 0x68);
  }
  stringbuf::_M_sync((stringbuf *)(this + 0x18),*(stringbuf **)(this + 0x60),0,lVar4);
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x18));
  return;
}



// std::__cxx11::stringstream::stringstream(std::_Ios_Openmode)

void __thiscall
std::__cxx11::stringstream::stringstream(stringstream *this,longlong *param_1,undefined4 param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[2];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = param_1[4];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[5];
  ios::init((ios *)(this + lVar1 + 0x10),0);
  lVar1 = param_1[1];
  lVar2 = param_1[6];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar1 = *param_1;
  lVar2 = param_1[8];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  lVar1 = param_1[9];
  *(undefined8 *)(this + 0x20) = 0;
  *(longlong *)(this + 0x10) = lVar1;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  locale::locale((locale *)(this + 0x50));
  this[0x70] = (stringstream)0x0;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  *(stringstream **)(this + 0x60) = this + 0x70;
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined4 *)(this + 0x58) = param_2;
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x18));
  return;
}



// std::__cxx11::stringstream::stringstream()

void __thiscall std::__cxx11::stringstream::stringstream(stringstream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[2];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = param_1[4];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[5];
  ios::init((ios *)(this + lVar1 + 0x10),0);
  lVar1 = param_1[1];
  lVar2 = param_1[6];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar1 = *param_1;
  lVar2 = param_1[8];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  lVar1 = param_1[9];
  *(undefined8 *)(this + 0x20) = 0;
  *(longlong *)(this + 0x10) = lVar1;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  locale::locale((locale *)(this + 0x50));
  this[0x70] = (stringstream)0x0;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  *(stringstream **)(this + 0x60) = this + 0x70;
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined4 *)(this + 0x58) = 0x18;
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x18));
  return;
}



// std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this)

{
  *(undefined ***)this = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined ***)(this + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(this + 0x60) != this + 0x70) {
    operator_delete(*(stringstream **)(this + 0x60));
  }
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x50));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6b68;
  *(undefined **)this = &DAT_1400d6b18;
  *(undefined ***)(this + 0x80) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x80));
  operator_delete(this);
  return;
}



// std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this)

{
  *(undefined ***)this = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined ***)(this + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(this + 0x60) != this + 0x70) {
    operator_delete(*(stringstream **)(this + 0x60));
  }
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x50));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6b68;
  *(undefined **)this = &DAT_1400d6b18;
  *(undefined ***)(this + 0x80) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x80));
  return;
}



// std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[8];
  *(longlong *)(this + 0x10) = param_1[9];
  *(undefined ***)(this + 0x18) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(this + 0x60) != this + 0x70) {
    operator_delete(*(stringstream **)(this + 0x60));
  }
  *(undefined ***)(this + 0x18) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x50));
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[6];
  *(longlong *)(this + 0x10) = param_1[7];
  lVar1 = param_1[4];
  *(longlong *)(this + 0x10) = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18) + 0x10) = param_1[5];
  lVar1 = param_1[2];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::__cxx11::stringstream::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::stringstream&&)

stringstream * __thiscall
std::__cxx11::stringstream::operator=(stringstream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  lVar3 = param_1[1];
  this_00[0xe1] = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  stringbuf::operator=((stringbuf *)(this + 0x18),(stringbuf *)(param_1 + 3));
  return this;
}



// std::__cxx11::wstringstream::str(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wstringstream::str(wstringstream *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::wstring::_M_replace
            ((wstring *)(this + 0x60),0,*(ulonglong *)(this + 0x68),(wstring *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x58] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x68);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 0x18),*(wstringbuf **)(this + 0x60),0,lVar1);
  return;
}



// std::__cxx11::wstringstream::swap(std::__cxx11::wstringstream&)

void __thiscall std::__cxx11::wstringstream::swap(wstringstream *this,longlong *param_1)

{
  ios_base iVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  ios_base *this_00;
  wios *this_01;
  
  this_00 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_01 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_00,(ios_base *)this_01);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  wios::_M_cache_locale(this_01,(longlong *)(this_01 + 0xd0));
  uVar3 = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = uVar2;
  iVar1 = this_00[0xe2];
  this_00[0xe2] = *(ios_base *)(this_01 + 0xe2);
  lVar4 = param_1[1];
  *(ios_base *)(this_01 + 0xe2) = iVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  wstringbuf::swap((wstringbuf *)(this + 0x18),param_1 + 3);
  return;
}



// std::__cxx11::wstringstream::wstringstream(std::__cxx11::wstringstream&&)

void __thiscall std::__cxx11::wstringstream::wstringstream(wstringstream *this,longlong *param_1)

{
  wstringbuf *_Src;
  ios_base *this_00;
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 auVar6 [16];
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined **)this = &DAT_1400d6bb8;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x80) = &DAT_1400d6be0;
  lVar9 = param_1[1];
  *(undefined2 *)(this + 0x160) = 0;
  *(longlong *)(this + 8) = lVar9;
  lVar9 = *param_1;
  *(undefined8 *)(this + 0x158) = 0;
  lVar9 = *(longlong *)(lVar9 + -0x18);
  this[0x162] = (wstringstream)0x0;
  lVar9 = lVar9 + (longlong)param_1;
  ios_base::_M_move(this_00,lVar9);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this + 0x150));
  uVar2 = *(undefined8 *)(lVar9 + 0xd8);
  lVar3 = param_1[0xc];
  *(undefined8 *)(lVar9 + 0xd8) = 0;
  *(undefined8 *)(this + 0x158) = uVar2;
  uVar1 = *(undefined2 *)(lVar9 + 0xe0);
  *(undefined8 *)(this + 0x168) = 0;
  *(undefined2 *)(this + 0x160) = uVar1;
  this[0x162] = *(wstringstream *)(lVar9 + 0xe2);
  param_1[1] = 0;
  *(undefined ***)this = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)(this + 0x10) = &PTR__wstringstream_1400dca90;
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  if (param_1[4] == 0) {
    lVar9 = param_1[7];
    if (lVar9 != 0) {
      lStack_48 = lVar9 - lVar3 >> 1;
      local_40 = param_1[8] - lVar9 >> 1;
      lStack_38 = param_1[9] - lVar3 >> 1;
      uVar7 = param_1[8];
      goto LAB_1400ac6bf;
    }
  }
  else {
    local_60 = param_1[4] - lVar3 >> 1;
    lStack_58 = param_1[5] - lVar3 >> 1;
    uVar4 = param_1[6];
    local_50 = (longlong)(uVar4 - lVar3) >> 1;
    lVar9 = param_1[7];
    uVar7 = uVar4;
    if (lVar9 == 0) {
LAB_1400ac6bf:
      if (uVar7 == 0) goto LAB_1400ac517;
    }
    else {
      lStack_48 = lVar9 - lVar3 >> 1;
      uVar5 = param_1[8];
      local_40 = (longlong)(uVar5 - lVar9) >> 1;
      lStack_38 = param_1[9] - lVar3 >> 1;
      uVar7 = uVar5;
      if (uVar4 == 0) goto LAB_1400ac6bf;
      uVar7 = uVar4;
      if (uVar4 < uVar5) {
        uVar7 = uVar5;
      }
    }
    param_1[0xd] = (longlong)(uVar7 - lVar3) >> 1;
  }
LAB_1400ac517:
  wstreambuf::wstreambuf((wstreambuf *)(this + 0x18),(longlong)(param_1 + 3));
  lVar9 = param_1[0xd];
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[0xb];
  _Src = (wstringbuf *)(param_1 + 0xe);
  *(wstringstream **)(this + 0x60) = this + 0x70;
  *(int *)(this + 0x58) = (int)lVar3;
  if ((wstringbuf *)param_1[0xc] == _Src) {
    memcpy(this + 0x70,_Src,lVar9 * 2 + 2);
    lVar9 = param_1[0xd];
  }
  else {
    *(wstringbuf **)(this + 0x60) = (wstringbuf *)param_1[0xc];
    *(longlong *)(this + 0x70) = param_1[0xe];
  }
  *(longlong *)(this + 0x68) = lVar9;
  param_1[0xc] = (longlong)_Src;
  *(undefined2 *)(param_1 + 0xe) = 0;
  lVar9 = *(longlong *)(this + 0x60);
  param_1[0xd] = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x20) = lVar9 + local_60 * 2;
    *(longlong *)(this + 0x28) = lVar9 + lStack_58 * 2;
    *(longlong *)(this + 0x30) = lVar9 + local_50 * 2;
  }
  if (lStack_48 == -1) goto LAB_1400ac659;
  lVar3 = lVar9 + lStack_48 * 2;
  *(longlong *)(this + 0x48) = lVar9 + lStack_38 * 2;
  *(longlong *)(this + 0x38) = lVar3;
  *(longlong *)(this + 0x40) = lVar3;
  lVar9 = local_40;
  lVar10 = lVar3;
  if (0x7fffffff < local_40) {
    lVar9 = local_40 + -0x7fffffff;
    auVar6._8_8_ = 0;
    auVar6._0_8_ = local_40 - 0x80000000U;
    lVar8 = SUB168(ZEXT816(0x200000005) * auVar6,8);
    lVar10 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar9) {
      if ((lVar8 + ((local_40 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) != 0) {
        lVar9 = local_40 + -0xfffffffe;
        lVar10 = lVar3 + 0x1fffffffc;
        if (lVar9 < 0x80000000) goto LAB_1400ac64e;
      }
      do {
        lVar9 = lVar9 + -0xfffffffe;
        lVar10 = lVar10 + 0x1fffffffc;
      } while (0x7fffffff < lVar9);
    }
  }
LAB_1400ac64e:
  *(longlong *)(this + 0x40) = lVar10 + (longlong)(int)lVar9 * 2;
LAB_1400ac659:
  wstringbuf::_M_sync((wstringbuf *)(param_1 + 3),_Src,0,0);
  *(wstreambuf **)(this + 0x168) = (wstreambuf *)(this + 0x18);
  return;
}



// std::__cxx11::wstringstream::wstringstream(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wstringstream::wstringstream(wstringstream *this,undefined8 *param_1,uint param_2)

{
  ios_base *this_00;
  undefined2 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6bb8;
  this[0x162] = (wstringstream)0x0;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined **)(this + 0x80) = &DAT_1400d6be0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6c88;
  *(undefined **)(this + 0x80) = &DAT_1400d6cb0;
  wios::init((wios *)this_00,0);
  *(undefined ***)(this + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x50));
  puVar1 = (undefined2 *)*param_1;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[1];
  *(wstringstream **)(this + 0x60) = this + 0x70;
  if ((puVar1 == (undefined2 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x50));
    wiostream::~wiostream((wiostream *)this,(longlong *)&PTR_DAT_1400db3f8);
    *(undefined ***)(this + 0x80) = &PTR__wios_1400deda0;
    ios_base::~ios_base(this_00);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x60),puVar1,(longlong)(puVar1 + lVar3));
  *(uint *)(this + 0x58) = param_2;
  lVar3 = 0;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x68);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 0x18),*(wstringbuf **)(this + 0x60),0,lVar3);
  wios::init((wios *)this_00,(longlong)(this + 0x18));
  return;
}



// std::__cxx11::wstringstream::wstringstream(std::_Ios_Openmode)

void __thiscall std::__cxx11::wstringstream::wstringstream(wstringstream *this,undefined4 param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6bb8;
  this[0x162] = (wstringstream)0x0;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined **)(this + 0x80) = &DAT_1400d6be0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6c88;
  *(undefined **)(this + 0x80) = &DAT_1400d6cb0;
  wios::init((wios *)this_00,0);
  *(undefined ***)(this + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x50));
  *(undefined4 *)(this + 0x58) = param_1;
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  *(wstringstream **)(this + 0x60) = this + 0x70;
  *(undefined2 *)(this + 0x70) = 0;
  wios::init((wios *)this_00,(longlong)(this + 0x18));
  return;
}



// std::__cxx11::wstringstream::wstringstream()

void __thiscall std::__cxx11::wstringstream::wstringstream(wstringstream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x80);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6bb8;
  this[0x162] = (wstringstream)0x0;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x160) = 0;
  *(undefined **)(this + 0x80) = &DAT_1400d6be0;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x178) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined **)(this + 0x10) = &DAT_1400d6c88;
  *(undefined **)(this + 0x80) = &DAT_1400d6cb0;
  wios::init((wios *)this_00,0);
  *(undefined ***)(this + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)this = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x40) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x50));
  *(undefined4 *)(this + 0x58) = 0x18;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  *(wstringstream **)(this + 0x60) = this + 0x70;
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined2 *)(this + 0x70) = 0;
  wios::init((wios *)this_00,(longlong)(this + 0x18));
  return;
}



// std::__cxx11::wstringstream::wstringstream(std::__cxx11::wstringstream&&)

void __thiscall
std::__cxx11::wstringstream::wstringstream(wstringstream *this,longlong *param_1,longlong *param_2)

{
  wstringbuf *_Src;
  undefined8 uVar1;
  ulonglong uVar2;
  ulonglong uVar3;
  undefined1 auVar4 [16];
  ulonglong uVar5;
  longlong lVar6;
  longlong lVar7;
  ios_base *this_00;
  longlong lVar8;
  longlong lVar9;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar6 = param_1[2];
  *(longlong *)this = lVar6;
  *(longlong *)(this + *(longlong *)(lVar6 + -0x18)) = param_1[3];
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar6 + -0x18));
  lVar9 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar9);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar1 = *(undefined8 *)(lVar9 + 0xd8);
  *(undefined8 *)(lVar9 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined8 *)(this_00 + 0xd8) = uVar1;
  lVar6 = param_1[5];
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar9 + 0xe0);
  local_40 = -1;
  lStack_38 = -1;
  this_00[0xe2] = *(ios_base *)(lVar9 + 0xe2);
  lVar9 = param_1[4];
  param_2[1] = 0;
  *(longlong *)(this + 0x10) = lVar9;
  *(longlong *)(this + *(longlong *)(lVar9 + -0x18) + 0x10) = lVar6;
  lVar6 = param_1[1];
  lVar9 = param_1[6];
  *(longlong *)this = lVar6;
  *(longlong *)(this + *(longlong *)(lVar6 + -0x18)) = lVar9;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar6 = *param_1;
  lVar9 = param_1[8];
  *(longlong *)this = lVar6;
  *(longlong *)(this + *(longlong *)(lVar6 + -0x18)) = lVar9;
  *(longlong *)(this + 0x10) = param_1[9];
  lVar6 = param_2[0xc];
  if (param_2[4] == 0) {
    lVar9 = param_2[7];
    if (lVar9 != 0) {
      lStack_48 = lVar9 - lVar6 >> 1;
      local_40 = param_2[8] - lVar9 >> 1;
      lStack_38 = param_2[9] - lVar6 >> 1;
      uVar5 = param_2[8];
      goto LAB_1400acf67;
    }
  }
  else {
    local_60 = param_2[4] - lVar6 >> 1;
    lStack_58 = param_2[5] - lVar6 >> 1;
    uVar2 = param_2[6];
    local_50 = (longlong)(uVar2 - lVar6) >> 1;
    lVar9 = param_2[7];
    uVar5 = uVar2;
    if (lVar9 == 0) {
LAB_1400acf67:
      if (uVar5 == 0) goto LAB_1400acdb6;
    }
    else {
      lStack_48 = lVar9 - lVar6 >> 1;
      uVar3 = param_2[8];
      local_40 = (longlong)(uVar3 - lVar9) >> 1;
      lStack_38 = param_2[9] - lVar6 >> 1;
      uVar5 = uVar3;
      if (uVar2 == 0) goto LAB_1400acf67;
      uVar5 = uVar2;
      if (uVar2 < uVar3) {
        uVar5 = uVar3;
      }
    }
    param_2[0xd] = (longlong)(uVar5 - lVar6) >> 1;
  }
LAB_1400acdb6:
  wstreambuf::wstreambuf((wstreambuf *)(this + 0x18),(longlong)(param_2 + 3));
  lVar6 = param_2[0xd];
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  lVar9 = param_2[0xb];
  _Src = (wstringbuf *)(param_2 + 0xe);
  *(wstringstream **)(this + 0x60) = this + 0x70;
  *(int *)(this + 0x58) = (int)lVar9;
  if ((wstringbuf *)param_2[0xc] == _Src) {
    memcpy(this + 0x70,_Src,lVar6 * 2 + 2);
    lVar6 = param_2[0xd];
  }
  else {
    *(wstringbuf **)(this + 0x60) = (wstringbuf *)param_2[0xc];
    *(longlong *)(this + 0x70) = param_2[0xe];
  }
  *(longlong *)(this + 0x68) = lVar6;
  param_2[0xc] = (longlong)_Src;
  *(undefined2 *)(param_2 + 0xe) = 0;
  lVar6 = *(longlong *)(this + 0x60);
  param_2[0xd] = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x20) = lVar6 + local_60 * 2;
    *(longlong *)(this + 0x28) = lVar6 + lStack_58 * 2;
    *(longlong *)(this + 0x30) = lVar6 + local_50 * 2;
  }
  if (lStack_48 == -1) goto LAB_1400acef9;
  lVar9 = lVar6 + lStack_48 * 2;
  *(longlong *)(this + 0x48) = lVar6 + lStack_38 * 2;
  *(longlong *)(this + 0x38) = lVar9;
  *(longlong *)(this + 0x40) = lVar9;
  lVar6 = local_40;
  lVar8 = lVar9;
  if (0x7fffffff < local_40) {
    lVar6 = local_40 + -0x7fffffff;
    auVar4._8_8_ = 0;
    auVar4._0_8_ = local_40 - 0x80000000U;
    lVar7 = SUB168(ZEXT816(0x200000005) * auVar4,8);
    lVar8 = lVar9 + 0xfffffffe;
    if (0x7fffffff < lVar6) {
      if ((lVar7 + ((local_40 - 0x80000000U) - lVar7 >> 1) >> 0x1e & 1) != 0) {
        lVar6 = local_40 + -0xfffffffe;
        lVar8 = lVar9 + 0x1fffffffc;
        if (lVar6 < 0x80000000) goto LAB_1400aceee;
      }
      do {
        lVar6 = lVar6 + -0xfffffffe;
        lVar8 = lVar8 + 0x1fffffffc;
      } while (0x7fffffff < lVar6);
    }
  }
LAB_1400aceee:
  *(longlong *)(this + 0x40) = lVar8 + (longlong)(int)lVar6 * 2;
LAB_1400acef9:
  wstringbuf::_M_sync((wstringbuf *)(param_2 + 3),_Src,0,0);
  *(wstreambuf **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) =
       (wstreambuf *)(this + 0x18);
  return;
}



// std::__cxx11::wstringstream::wstringstream(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wstringstream::wstringstream
          (wstringstream *this,longlong *param_1,undefined8 *param_2,uint param_3)

{
  longlong lVar1;
  undefined2 *puVar2;
  PVOID pvVar3;
  longlong lVar4;
  
  lVar4 = param_1[2];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar4 + -0x18)),0);
  lVar4 = param_1[4];
  *(longlong *)(this + 0x10) = lVar4;
  lVar4 = *(longlong *)(lVar4 + -0x18);
  *(longlong *)(this + lVar4 + 0x10) = param_1[5];
  wios::init((wios *)(this + lVar4 + 0x10),0);
  lVar4 = param_1[1];
  lVar1 = param_1[6];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar4 = *param_1;
  lVar1 = param_1[8];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  lVar4 = param_1[9];
  *(undefined8 *)(this + 0x20) = 0;
  *(longlong *)(this + 0x10) = lVar4;
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  locale::locale((locale *)(this + 0x50));
  puVar2 = (undefined2 *)*param_2;
  *(undefined4 *)(this + 0x58) = 0;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  lVar4 = param_2[1];
  *(wstringstream **)(this + 0x60) = this + 0x70;
  if ((puVar2 == (undefined2 *)0x0) && (lVar4 != 0)) {
    pvVar3 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x50));
    wiostream::~wiostream((wiostream *)this,param_1 + 1);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar3);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x60),puVar2,(longlong)(puVar2 + lVar4));
  *(uint *)(this + 0x58) = param_3;
  lVar4 = 0;
  if ((param_3 & 3) != 0) {
    lVar4 = *(longlong *)(this + 0x68);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 0x18),*(wstringbuf **)(this + 0x60),0,lVar4);
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x18));
  return;
}



// std::__cxx11::wstringstream::wstringstream(std::_Ios_Openmode)

void __thiscall
std::__cxx11::wstringstream::wstringstream(wstringstream *this,longlong *param_1,undefined4 param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[2];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = param_1[4];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[5];
  wios::init((wios *)(this + lVar1 + 0x10),0);
  lVar1 = param_1[1];
  lVar2 = param_1[6];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar1 = *param_1;
  lVar2 = param_1[8];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  lVar1 = param_1[9];
  *(undefined8 *)(this + 0x20) = 0;
  *(longlong *)(this + 0x10) = lVar1;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  locale::locale((locale *)(this + 0x50));
  *(undefined4 *)(this + 0x58) = param_2;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  *(wstringstream **)(this + 0x60) = this + 0x70;
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined2 *)(this + 0x70) = 0;
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x18));
  return;
}



// std::__cxx11::wstringstream::wstringstream()

void __thiscall std::__cxx11::wstringstream::wstringstream(wstringstream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[2];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = param_1[4];
  *(longlong *)(this + 0x10) = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1 + 0x10) = param_1[5];
  wios::init((wios *)(this + lVar1 + 0x10),0);
  lVar1 = param_1[1];
  lVar2 = param_1[6];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(longlong *)(this + 0x10) = param_1[7];
  lVar1 = *param_1;
  lVar2 = param_1[8];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  lVar1 = param_1[9];
  *(undefined8 *)(this + 0x20) = 0;
  *(longlong *)(this + 0x10) = lVar1;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  *(undefined8 *)(this + 0x48) = 0;
  locale::locale((locale *)(this + 0x50));
  *(undefined8 *)(this + 0x68) = 0;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  *(wstringstream **)(this + 0x60) = this + 0x70;
  *(undefined2 *)(this + 0x70) = 0;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  *(undefined4 *)(this + 0x58) = 0x18;
  wios::init((wios *)(this + lVar1),(longlong)(this + 0x18));
  return;
}



// std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this)

{
  *(undefined ***)this = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)(this + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(this + 0x60) != this + 0x70) {
    operator_delete(*(wstringstream **)(this + 0x60));
  }
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x50));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6c88;
  *(undefined **)this = &DAT_1400d6bb8;
  *(undefined ***)(this + 0x80) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x80));
  operator_delete(this);
  return;
}



// std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this)

{
  *(undefined ***)this = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)(this + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(this + 0x60) != this + 0x70) {
    operator_delete(*(wstringstream **)(this + 0x60));
  }
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x50));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)(this + 0x10) = &DAT_1400d6c88;
  *(undefined **)this = &DAT_1400d6bb8;
  *(undefined ***)(this + 0x80) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x80));
  return;
}



// std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[8];
  *(longlong *)(this + 0x10) = param_1[9];
  *(undefined ***)(this + 0x18) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(this + 0x60) != this + 0x70) {
    operator_delete(*(wstringstream **)(this + 0x60));
  }
  *(undefined ***)(this + 0x18) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x50));
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[6];
  *(longlong *)(this + 0x10) = param_1[7];
  lVar1 = param_1[4];
  *(longlong *)(this + 0x10) = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18) + 0x10) = param_1[5];
  lVar1 = param_1[2];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::__cxx11::wstringstream::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstringstream&&)

wstringstream * __thiscall
std::__cxx11::wstringstream::operator=(wstringstream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  lVar4 = param_1[1];
  this_00[0xe2] = wVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  wstringbuf::operator=((wstringbuf *)(this + 0x18),(wstringbuf *)(param_1 + 3));
  return this;
}



// std::__cxx11::istringstream::str(std::__cxx11::string const&)

void __thiscall std::__cxx11::istringstream::str(istringstream *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::string::_M_replace
            ((string *)(this + 0x58),0,*(ulonglong *)(this + 0x60),(string *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x50] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x60);
  }
  stringbuf::_M_sync((stringbuf *)(this + 0x10),*(stringbuf **)(this + 0x58),0,lVar1);
  return;
}



// std::__cxx11::istringstream::swap(std::__cxx11::istringstream&)

void __thiscall std::__cxx11::istringstream::swap(istringstream *this,longlong *param_1)

{
  ios_base iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios_base *this_00;
  ios *this_01;
  
  this_00 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_01 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_00,(ios_base *)this_01);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  ios::_M_cache_locale(this_01,(longlong *)(this_01 + 0xd0));
  uVar2 = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = uVar2;
  iVar1 = this_00[0xe0];
  this_00[0xe0] = *(ios_base *)(this_01 + 0xe0);
  *(ios_base *)(this_01 + 0xe0) = iVar1;
  iVar1 = this_00[0xe1];
  this_00[0xe1] = *(ios_base *)(this_01 + 0xe1);
  lVar3 = param_1[1];
  *(ios_base *)(this_01 + 0xe1) = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  stringbuf::swap((stringbuf *)(this + 0x10),param_1 + 2);
  return;
}



// std::__cxx11::istringstream::istringstream(std::__cxx11::istringstream&&)

void __thiscall std::__cxx11::istringstream::istringstream(istringstream *this,longlong *param_1)

{
  ios_base *this_00;
  longlong *plVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  longlong *plVar5;
  undefined1 auVar6 [16];
  longlong lVar7;
  int iVar8;
  ulonglong uVar9;
  uint uVar10;
  uint uVar11;
  longlong lVar12;
  longlong lVar13;
  longlong lVar14;
  longlong local_70;
  longlong lStack_68;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d00;
  lVar13 = param_1[1];
  *(undefined8 *)(this + 0x150) = 0;
  *(longlong *)(this + 8) = lVar13;
  lVar13 = *param_1;
  *(undefined **)this = &DAT_1400d6cd8;
  lVar13 = *(longlong *)(lVar13 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar13);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this + 0x148));
  uVar2 = *(undefined8 *)(lVar13 + 0xd8);
  *(undefined8 *)(lVar13 + 0xd8) = 0;
  *(undefined8 *)(this + 0x160) = 0;
  *(undefined8 *)(this + 0x150) = uVar2;
  *(undefined2 *)(this + 0x158) = *(undefined2 *)(lVar13 + 0xe0);
  lVar13 = param_1[0xb];
  param_1[1] = 0;
  *(undefined ***)this = &PTR__istringstream_1400dcae8;
  *(undefined ***)(this + 0x78) = &PTR__istringstream_1400dcb10;
  local_70 = -1;
  lStack_68 = -1;
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  if (param_1[3] == 0) {
    lVar14 = param_1[6];
    if (lVar14 != 0) {
      lStack_58 = lVar14 - lVar13;
      local_50 = param_1[7] - lVar14;
      lStack_48 = param_1[8] - lVar13;
      uVar9 = param_1[7];
      goto LAB_1400adb43;
    }
  }
  else {
    uVar3 = param_1[5];
    local_70 = param_1[3] - lVar13;
    lStack_68 = param_1[4] - lVar13;
    local_60 = uVar3 - lVar13;
    lVar14 = param_1[6];
    uVar9 = uVar3;
    if (lVar14 == 0) {
LAB_1400adb43:
      if (uVar9 == 0) goto LAB_1400ad9a3;
    }
    else {
      lStack_58 = lVar14 - lVar13;
      uVar4 = param_1[7];
      local_50 = uVar4 - lVar14;
      lStack_48 = param_1[8] - lVar13;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400adb43;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    param_1[0xc] = uVar9 - lVar13;
  }
LAB_1400ad9a3:
  streambuf::streambuf((streambuf *)(this + 0x10),(longlong)(param_1 + 2));
  lVar13 = param_1[0xc];
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  lVar14 = param_1[10];
  *(istringstream **)(this + 0x58) = this + 0x68;
  plVar5 = (longlong *)param_1[0xb];
  *(int *)(this + 0x50) = (int)lVar14;
  plVar1 = param_1 + 0xd;
  if (plVar5 != plVar1) {
    *(longlong **)(this + 0x58) = plVar5;
    *(longlong *)(this + 0x68) = param_1[0xd];
    goto LAB_1400ad9e8;
  }
  uVar9 = lVar13 + 1;
  uVar11 = (uint)uVar9;
  if (uVar11 < 8) {
    if ((uVar9 & 4) != 0) {
      *(int *)(this + 0x68) = (int)param_1[0xd];
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 100) =
           *(undefined4 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 100);
      lVar13 = param_1[0xc];
      goto LAB_1400ad9e8;
    }
    if (uVar11 == 0) goto LAB_1400ad9e8;
    this[0x68] = *(istringstream *)(param_1 + 0xd);
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x66) =
           *(undefined2 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x66);
      lVar13 = param_1[0xc];
      goto LAB_1400ad9e8;
    }
  }
  else {
    *(longlong *)(this + 0x68) = param_1[0xd];
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x60) =
         *(undefined8 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x60);
    lVar13 = (longlong)(this + 0x68) - ((ulonglong)(this + 0x70) & 0xfffffffffffffff8);
    uVar11 = uVar11 + (int)lVar13 & 0xfffffff8;
    if (7 < uVar11) {
      uVar10 = 0;
      do {
        uVar9 = (ulonglong)uVar10;
        uVar10 = uVar10 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x70) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)((longlong)plVar1 + (uVar9 - lVar13));
      } while (uVar10 < uVar11);
    }
  }
  lVar13 = param_1[0xc];
LAB_1400ad9e8:
  param_1[0xb] = (longlong)plVar1;
  *(longlong *)(this + 0x60) = lVar13;
  lVar13 = *(longlong *)(this + 0x58);
  param_1[0xc] = 0;
  *(undefined1 *)(param_1 + 0xd) = 0;
  if (local_70 != -1) {
    *(longlong *)(this + 0x28) = local_60 + lVar13;
    *(longlong *)(this + 0x18) = local_70 + lVar13;
    *(longlong *)(this + 0x20) = lStack_68 + lVar13;
  }
  if (lStack_58 != -1) {
    lStack_58 = lVar13 + lStack_58;
    *(longlong *)(this + 0x40) = lStack_48 + lVar13;
    *(longlong *)(this + 0x30) = lStack_58;
    *(longlong *)(this + 0x38) = lStack_58;
    if (local_50 < 0x80000000) {
      iVar8 = (int)local_50;
    }
    else {
      auVar6._8_8_ = 0;
      auVar6._0_8_ = local_50 - 0x80000000U;
      lVar12 = SUB168(ZEXT816(0x200000005) * auVar6,8);
      lVar13 = local_50 + -0x7fffffff;
      lVar14 = local_50;
      if (0x7fffffff < lVar13) {
        lVar14 = lVar13;
        lVar7 = local_50;
        if ((lVar12 + ((local_50 - 0x80000000U) - lVar12 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400adac0;
        while (lVar13 = lVar7 + -0xfffffffe, 0x7fffffff < lVar13) {
LAB_1400adac0:
          lVar14 = lVar13 + -0x7fffffff;
          lVar7 = lVar13;
        }
      }
      iVar8 = (int)lVar13;
      lStack_58 = (lStack_58 + 0x7fffffff + local_50) - lVar14;
    }
    *(longlong *)(this + 0x38) = iVar8 + lStack_58;
  }
  stringbuf::_M_sync((stringbuf *)(param_1 + 2),(stringbuf *)param_1[0xb],0,0);
  *(streambuf **)(this + 0x160) = (streambuf *)(this + 0x10);
  return;
}



// std::__cxx11::istringstream::istringstream(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::istringstream::istringstream(istringstream *this,undefined8 *param_1,uint param_2)

{
  ios_base *this_00;
  undefined1 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6cd8;
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x150) = 0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d00;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)this = &PTR__istringstream_1400dcae8;
  *(undefined ***)(this + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  puVar1 = (undefined1 *)*param_1;
  lVar3 = param_1[1];
  *(undefined4 *)(this + 0x50) = 0;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  *(istringstream **)(this + 0x58) = this + 0x68;
  if ((puVar1 == (undefined1 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x48));
    *(undefined **)this = &DAT_1400d6cd8;
    *(undefined8 *)(this + 8) = 0;
    *(undefined ***)(this + 0x78) = &PTR__ios_1400ded80;
    ios_base::~ios_base(this_00);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x58),puVar1,(longlong)(puVar1 + lVar3));
  lVar3 = 0;
  *(uint *)(this + 0x50) = param_2 | 8;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x60);
  }
  stringbuf::_M_sync((stringbuf *)(this + 0x10),*(stringbuf **)(this + 0x58),0,lVar3);
  ios::init((ios *)this_00,(longlong)(this + 0x10));
  return;
}



// std::__cxx11::istringstream::istringstream(std::_Ios_Openmode)

void __thiscall std::__cxx11::istringstream::istringstream(istringstream *this,uint param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6cd8;
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x150) = 0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d00;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)this = &PTR__istringstream_1400dcae8;
  *(undefined ***)(this + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  *(uint *)(this + 0x50) = param_1 | 8;
  *(undefined8 *)(this + 0x60) = 0;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  *(istringstream **)(this + 0x58) = this + 0x68;
  this[0x68] = (istringstream)0x0;
  ios::init((ios *)this_00,(longlong)(this + 0x10));
  return;
}



// std::__cxx11::istringstream::istringstream()

void __thiscall std::__cxx11::istringstream::istringstream(istringstream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6cd8;
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x150) = 0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d00;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined ***)this = &PTR__istringstream_1400dcae8;
  *(undefined ***)(this + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  this[0x68] = (istringstream)0x0;
  *(undefined4 *)(this + 0x50) = 8;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  *(istringstream **)(this + 0x58) = this + 0x68;
  *(undefined8 *)(this + 0x60) = 0;
  ios::init((ios *)this_00,(longlong)(this + 0x10));
  return;
}



// std::__cxx11::istringstream::istringstream(std::__cxx11::istringstream&&)

void __thiscall
std::__cxx11::istringstream::istringstream(istringstream *this,longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  ios_base *this_00;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar12 = param_1[1];
  *(longlong *)this = lVar12;
  *(longlong *)(this + *(longlong *)(lVar12 + -0x18)) = param_1[2];
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar12 + -0x18));
  lVar13 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar13);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(lVar13 + 0xd8);
  *(undefined8 *)(lVar13 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xe8) = 0;
  lVar12 = param_1[3];
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  local_60 = -1;
  lStack_58 = -1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar13 + 0xe0);
  lVar13 = *param_1;
  param_2[1] = 0;
  lVar11 = param_2[0xb];
  *(longlong *)this = lVar13;
  *(longlong *)(this + *(longlong *)(lVar13 + -0x18)) = lVar12;
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  if (param_2[3] == 0) {
    lVar12 = param_2[6];
    if (lVar12 != 0) {
      lStack_48 = lVar12 - lVar11;
      local_40 = param_2[7] - lVar12;
      lStack_38 = param_2[8] - lVar11;
      uVar9 = param_2[7];
      goto LAB_1400ae383;
    }
  }
  else {
    uVar3 = param_2[5];
    local_60 = param_2[3] - lVar11;
    lStack_58 = param_2[4] - lVar11;
    local_50 = uVar3 - lVar11;
    lVar12 = param_2[6];
    uVar9 = uVar3;
    if (lVar12 == 0) {
LAB_1400ae383:
      if (uVar9 == 0) goto LAB_1400ae1dd;
    }
    else {
      lStack_48 = lVar12 - lVar11;
      uVar4 = param_2[7];
      local_40 = uVar4 - lVar12;
      lStack_38 = param_2[8] - lVar11;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400ae383;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    param_2[0xc] = uVar9 - lVar11;
  }
LAB_1400ae1dd:
  streambuf::streambuf((streambuf *)(this + 0x10),(longlong)(param_2 + 2));
  lVar12 = param_2[0xc];
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  lVar13 = param_2[10];
  plVar1 = param_2 + 0xd;
  *(istringstream **)(this + 0x58) = this + 0x68;
  *(int *)(this + 0x50) = (int)lVar13;
  if ((longlong *)param_2[0xb] != plVar1) {
    *(longlong **)(this + 0x58) = (longlong *)param_2[0xb];
    *(longlong *)(this + 0x68) = param_2[0xd];
    goto LAB_1400ae222;
  }
  uVar9 = lVar12 + 1;
  uVar8 = (uint)uVar9;
  if (uVar8 < 8) {
    if ((uVar9 & 4) != 0) {
      *(int *)(this + 0x68) = (int)param_2[0xd];
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 100) =
           *(undefined4 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 100);
      lVar12 = param_2[0xc];
      goto LAB_1400ae222;
    }
    if (uVar8 == 0) goto LAB_1400ae222;
    this[0x68] = *(istringstream *)(param_2 + 0xd);
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x66) =
           *(undefined2 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x66);
      lVar12 = param_2[0xc];
      goto LAB_1400ae222;
    }
  }
  else {
    *(longlong *)(this + 0x68) = param_2[0xd];
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x60) =
         *(undefined8 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x60);
    lVar12 = (longlong)(this + 0x68) - ((ulonglong)(this + 0x70) & 0xfffffffffffffff8);
    uVar8 = uVar8 + (int)lVar12 & 0xfffffff8;
    if (7 < uVar8) {
      uVar9 = 0;
      do {
        uVar10 = (int)uVar9 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x70) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)((longlong)plVar1 + (uVar9 - lVar12));
        uVar9 = (ulonglong)uVar10;
      } while (uVar10 < uVar8);
    }
  }
  lVar12 = param_2[0xc];
LAB_1400ae222:
  *(longlong *)(this + 0x60) = lVar12;
  param_2[0xb] = (longlong)plVar1;
  lVar12 = *(longlong *)(this + 0x58);
  param_2[0xc] = 0;
  *(undefined1 *)(param_2 + 0xd) = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x28) = local_50 + lVar12;
    *(longlong *)(this + 0x18) = local_60 + lVar12;
    *(longlong *)(this + 0x20) = lStack_58 + lVar12;
  }
  if (lStack_48 != -1) {
    lStack_48 = lVar12 + lStack_48;
    *(longlong *)(this + 0x40) = lStack_38 + lVar12;
    *(longlong *)(this + 0x30) = lStack_48;
    *(longlong *)(this + 0x38) = lStack_48;
    if (local_40 < 0x80000000) {
      iVar7 = (int)local_40;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = local_40 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar12 = local_40 + -0x7fffffff;
      lVar13 = local_40;
      if (0x7fffffff < lVar12) {
        lVar13 = lVar12;
        lVar6 = local_40;
        if ((lVar11 + ((local_40 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400ae2f8;
        while (lVar12 = lVar6 + -0xfffffffe, 0x7fffffff < lVar12) {
LAB_1400ae2f8:
          lVar13 = lVar12 + -0x7fffffff;
          lVar6 = lVar12;
        }
      }
      iVar7 = (int)lVar12;
      lStack_48 = (lStack_48 + 0x7fffffff + local_40) - lVar13;
    }
    *(longlong *)(this + 0x38) = iVar7 + lStack_48;
  }
  stringbuf::_M_sync((stringbuf *)(param_2 + 2),(stringbuf *)param_2[0xb],0,0);
  *(streambuf **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) =
       (streambuf *)(this + 0x10);
  return;
}



// std::__cxx11::istringstream::istringstream(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::istringstream::istringstream
          (istringstream *this,longlong *param_1,undefined8 *param_2,uint param_3)

{
  longlong lVar1;
  undefined1 *puVar2;
  PVOID pvVar3;
  longlong lVar4;
  
  lVar4 = param_1[1];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar4 + -0x18)),0);
  lVar4 = *param_1;
  lVar1 = param_1[3];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  puVar2 = (undefined1 *)*param_2;
  lVar4 = param_2[1];
  *(undefined4 *)(this + 0x50) = 0;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  *(istringstream **)(this + 0x58) = this + 0x68;
  if ((puVar2 == (undefined1 *)0x0) && (lVar4 != 0)) {
    pvVar3 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x48));
    lVar4 = param_1[1];
    lVar1 = param_1[2];
    *(longlong *)this = lVar4;
    *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
    *(undefined8 *)(this + 8) = 0;
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar3);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x58),puVar2,(longlong)(puVar2 + lVar4));
  lVar4 = 0;
  *(uint *)(this + 0x50) = param_3 | 8;
  if ((param_3 & 3) != 0) {
    lVar4 = *(longlong *)(this + 0x60);
  }
  stringbuf::_M_sync((stringbuf *)(this + 0x10),*(stringbuf **)(this + 0x58),0,lVar4);
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x10));
  return;
}



// std::__cxx11::istringstream::istringstream(std::_Ios_Openmode)

void __thiscall
std::__cxx11::istringstream::istringstream(istringstream *this,longlong *param_1,uint param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  this[0x68] = (istringstream)0x0;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  *(istringstream **)(this + 0x58) = this + 0x68;
  *(undefined8 *)(this + 0x60) = 0;
  *(uint *)(this + 0x50) = param_2 | 8;
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x10));
  return;
}



// std::__cxx11::istringstream::istringstream()

void __thiscall std::__cxx11::istringstream::istringstream(istringstream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  ios::init((ios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  this[0x68] = (istringstream)0x0;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  *(istringstream **)(this + 0x58) = this + 0x68;
  *(undefined8 *)(this + 0x60) = 0;
  *(undefined4 *)(this + 0x50) = 8;
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x10));
  return;
}



// std::__cxx11::istringstream::~istringstream()

void __thiscall std::__cxx11::istringstream::~istringstream(istringstream *this)

{
  *(undefined ***)this = &PTR__istringstream_1400dcae8;
  *(undefined ***)(this + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  if (*(istringstream **)(this + 0x58) != this + 0x68) {
    operator_delete(*(istringstream **)(this + 0x58));
  }
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x48));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)this = &DAT_1400d6cd8;
  *(undefined ***)(this + 0x78) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x78));
  operator_delete(this);
  return;
}



// std::__cxx11::istringstream::~istringstream()

void __thiscall std::__cxx11::istringstream::~istringstream(istringstream *this)

{
  *(undefined ***)this = &PTR__istringstream_1400dcae8;
  *(undefined ***)(this + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  if (*(istringstream **)(this + 0x58) != this + 0x68) {
    operator_delete(*(istringstream **)(this + 0x58));
  }
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x48));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)this = &DAT_1400d6cd8;
  *(undefined ***)(this + 0x78) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x78));
  return;
}



// std::__cxx11::istringstream::~istringstream()

void __thiscall std::__cxx11::istringstream::~istringstream(istringstream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined ***)(this + 0x10) = &PTR__stringbuf_1400dc540;
  if (*(istringstream **)(this + 0x58) != this + 0x68) {
    operator_delete(*(istringstream **)(this + 0x58));
  }
  *(undefined ***)(this + 0x10) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x48));
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::__cxx11::istringstream::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::istringstream&&)

istringstream * __thiscall
std::__cxx11::istringstream::operator=(istringstream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  longlong lVar3;
  longlong lVar4;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  lVar3 = param_1[1];
  this_00[0xe1] = iVar1;
  lVar4 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar3;
  param_1[1] = lVar4;
  stringbuf::operator=((stringbuf *)(this + 0x10),(stringbuf *)(param_1 + 2));
  return this;
}



// std::__cxx11::wistringstream::str(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wistringstream::str(wistringstream *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::wstring::_M_replace
            ((wstring *)(this + 0x58),0,*(ulonglong *)(this + 0x60),(wstring *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x50] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x60);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 0x10),*(wstringbuf **)(this + 0x58),0,lVar1);
  return;
}



// std::__cxx11::wistringstream::swap(std::__cxx11::wistringstream&)

void __thiscall std::__cxx11::wistringstream::swap(wistringstream *this,longlong *param_1)

{
  ios_base iVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  ios_base *this_00;
  wios *this_01;
  
  this_00 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_01 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_00,(ios_base *)this_01);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  wios::_M_cache_locale(this_01,(longlong *)(this_01 + 0xd0));
  uVar3 = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = uVar2;
  iVar1 = this_00[0xe2];
  this_00[0xe2] = *(ios_base *)(this_01 + 0xe2);
  lVar4 = param_1[1];
  *(ios_base *)(this_01 + 0xe2) = iVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  wstringbuf::swap((wstringbuf *)(this + 0x10),param_1 + 2);
  return;
}



// std::__cxx11::wistringstream::wistringstream(std::__cxx11::wistringstream&&)

void __thiscall std::__cxx11::wistringstream::wistringstream(wistringstream *this,longlong *param_1)

{
  ios_base *this_00;
  wstringbuf *_Src;
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 auVar6 [16];
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong local_70;
  longlong lStack_68;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d50;
  lVar9 = param_1[1];
  *(undefined2 *)(this + 0x158) = 0;
  *(longlong *)(this + 8) = lVar9;
  lVar9 = *param_1;
  *(undefined8 *)(this + 0x150) = 0;
  lVar9 = *(longlong *)(lVar9 + -0x18);
  this[0x15a] = (wistringstream)0x0;
  *(undefined **)this = &DAT_1400d6d28;
  lVar9 = lVar9 + (longlong)param_1;
  ios_base::_M_move(this_00,lVar9);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this + 0x148));
  uVar2 = *(undefined8 *)(lVar9 + 0xd8);
  lVar3 = param_1[0xb];
  *(undefined8 *)(lVar9 + 0xd8) = 0;
  *(undefined8 *)(this + 0x150) = uVar2;
  uVar1 = *(undefined2 *)(lVar9 + 0xe0);
  *(undefined8 *)(this + 0x160) = 0;
  *(undefined2 *)(this + 0x158) = uVar1;
  this[0x15a] = *(wistringstream *)(lVar9 + 0xe2);
  param_1[1] = 0;
  *(undefined ***)this = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(this + 0x78) = &PTR__wistringstream_1400dcb60;
  local_70 = -1;
  lStack_68 = -1;
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  if (param_1[3] == 0) {
    lVar9 = param_1[6];
    if (lVar9 != 0) {
      lStack_58 = lVar9 - lVar3 >> 1;
      local_50 = param_1[7] - lVar9 >> 1;
      lStack_48 = param_1[8] - lVar3 >> 1;
      uVar7 = param_1[7];
      goto LAB_1400aeeef;
    }
  }
  else {
    local_70 = param_1[3] - lVar3 >> 1;
    lStack_68 = param_1[4] - lVar3 >> 1;
    uVar4 = param_1[5];
    local_60 = (longlong)(uVar4 - lVar3) >> 1;
    lVar9 = param_1[6];
    uVar7 = uVar4;
    if (lVar9 == 0) {
LAB_1400aeeef:
      if (uVar7 == 0) goto LAB_1400aed48;
    }
    else {
      lStack_58 = lVar9 - lVar3 >> 1;
      uVar5 = param_1[7];
      local_50 = (longlong)(uVar5 - lVar9) >> 1;
      lStack_48 = param_1[8] - lVar3 >> 1;
      uVar7 = uVar5;
      if (uVar4 == 0) goto LAB_1400aeeef;
      uVar7 = uVar4;
      if (uVar4 < uVar5) {
        uVar7 = uVar5;
      }
    }
    param_1[0xc] = (longlong)(uVar7 - lVar3) >> 1;
  }
LAB_1400aed48:
  wstreambuf::wstreambuf((wstreambuf *)(this + 0x10),(longlong)(param_1 + 2));
  lVar9 = param_1[0xc];
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[10];
  _Src = (wstringbuf *)(param_1 + 0xd);
  *(wistringstream **)(this + 0x58) = this + 0x68;
  *(int *)(this + 0x50) = (int)lVar3;
  if ((wstringbuf *)param_1[0xb] == _Src) {
    memcpy(this + 0x68,_Src,lVar9 * 2 + 2);
    lVar9 = param_1[0xc];
  }
  else {
    *(wstringbuf **)(this + 0x58) = (wstringbuf *)param_1[0xb];
    *(longlong *)(this + 0x68) = param_1[0xd];
  }
  *(longlong *)(this + 0x60) = lVar9;
  *(undefined2 *)(param_1 + 0xd) = 0;
  param_1[0xb] = (longlong)_Src;
  lVar9 = *(longlong *)(this + 0x58);
  param_1[0xc] = 0;
  if (local_70 != -1) {
    *(longlong *)(this + 0x18) = lVar9 + local_70 * 2;
    *(longlong *)(this + 0x20) = lVar9 + lStack_68 * 2;
    *(longlong *)(this + 0x28) = lVar9 + local_60 * 2;
  }
  if (lStack_58 == -1) goto LAB_1400aee89;
  lVar3 = lVar9 + lStack_58 * 2;
  *(longlong *)(this + 0x40) = lVar9 + lStack_48 * 2;
  *(longlong *)(this + 0x30) = lVar3;
  *(longlong *)(this + 0x38) = lVar3;
  lVar9 = local_50;
  lVar10 = lVar3;
  if (0x7fffffff < local_50) {
    lVar9 = local_50 + -0x7fffffff;
    auVar6._8_8_ = 0;
    auVar6._0_8_ = local_50 - 0x80000000U;
    lVar8 = SUB168(ZEXT816(0x200000005) * auVar6,8);
    lVar10 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar9) {
      if ((lVar8 + ((local_50 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) != 0) {
        lVar9 = local_50 + -0xfffffffe;
        lVar10 = lVar3 + 0x1fffffffc;
        if (lVar9 < 0x80000000) goto LAB_1400aee7e;
      }
      do {
        lVar9 = lVar9 + -0xfffffffe;
        lVar10 = lVar10 + 0x1fffffffc;
      } while (0x7fffffff < lVar9);
    }
  }
LAB_1400aee7e:
  *(longlong *)(this + 0x38) = lVar10 + (longlong)(int)lVar9 * 2;
LAB_1400aee89:
  wstringbuf::_M_sync((wstringbuf *)(param_1 + 2),_Src,0,0);
  *(wstreambuf **)(this + 0x160) = (wstreambuf *)(this + 0x10);
  return;
}



// std::__cxx11::wistringstream::wistringstream(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wistringstream::wistringstream(wistringstream *this,undefined8 *param_1,uint param_2)

{
  ios_base *this_00;
  undefined2 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d28;
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x150) = 0;
  this[0x15a] = (wistringstream)0x0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d50;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)this = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(this + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  puVar1 = (undefined2 *)*param_1;
  *(undefined4 *)(this + 0x50) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[1];
  *(wistringstream **)(this + 0x58) = this + 0x68;
  if ((puVar1 == (undefined2 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x48));
    *(undefined **)this = &DAT_1400d6d28;
    *(undefined8 *)(this + 8) = 0;
    *(undefined ***)(this + 0x78) = &PTR__wios_1400deda0;
    ios_base::~ios_base(this_00);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x58),puVar1,(longlong)(puVar1 + lVar3));
  lVar3 = 0;
  *(uint *)(this + 0x50) = param_2 | 8;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x60);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 0x10),*(wstringbuf **)(this + 0x58),0,lVar3);
  wios::init((wios *)this_00,(longlong)(this + 0x10));
  return;
}



// std::__cxx11::wistringstream::wistringstream(std::_Ios_Openmode)

void __thiscall std::__cxx11::wistringstream::wistringstream(wistringstream *this,uint param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d28;
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x150) = 0;
  this[0x15a] = (wistringstream)0x0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d50;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)this = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(this + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  *(uint *)(this + 0x50) = param_1 | 8;
  *(undefined2 *)(this + 0x68) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  *(wistringstream **)(this + 0x58) = this + 0x68;
  *(undefined8 *)(this + 0x60) = 0;
  wios::init((wios *)this_00,(longlong)(this + 0x10));
  return;
}



// std::__cxx11::wistringstream::wistringstream()

void __thiscall std::__cxx11::wistringstream::wistringstream(wistringstream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x78);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d28;
  *(undefined2 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x150) = 0;
  this[0x15a] = (wistringstream)0x0;
  *(undefined **)(this + 0x78) = &DAT_1400d6d50;
  *(undefined8 *)(this + 8) = 0;
  *(undefined1 (*) [16])(this + 0x160) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x170) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined ***)this = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(this + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  *(undefined4 *)(this + 0x50) = 8;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  *(undefined2 *)(this + 0x68) = 0;
  *(wistringstream **)(this + 0x58) = this + 0x68;
  *(undefined8 *)(this + 0x60) = 0;
  wios::init((wios *)this_00,(longlong)(this + 0x10));
  return;
}



// std::__cxx11::wistringstream::wistringstream(std::__cxx11::wistringstream&&)

void __thiscall
std::__cxx11::wistringstream::wistringstream
          (wistringstream *this,longlong *param_1,longlong *param_2)

{
  wstringbuf *_Src;
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 auVar6 [16];
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  ios_base *this_00;
  longlong lVar10;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar8 = param_1[1];
  *(longlong *)this = lVar8;
  *(longlong *)(this + *(longlong *)(lVar8 + -0x18)) = param_1[2];
  *(longlong *)(this + 8) = param_2[1];
  this_00 = (ios_base *)(this + *(longlong *)(lVar8 + -0x18));
  lVar10 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar10);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  lVar8 = param_2[0xb];
  uVar2 = *(undefined8 *)(lVar10 + 0xd8);
  *(undefined8 *)(lVar10 + 0xd8) = 0;
  lVar3 = param_1[3];
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  uVar1 = *(undefined2 *)(lVar10 + 0xe0);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined2 *)(this_00 + 0xe0) = uVar1;
  local_60 = -1;
  lStack_58 = -1;
  this_00[0xe2] = *(ios_base *)(lVar10 + 0xe2);
  lVar10 = *param_1;
  param_2[1] = 0;
  *(longlong *)this = lVar10;
  *(longlong *)(this + *(longlong *)(lVar10 + -0x18)) = lVar3;
  local_50 = -1;
  lStack_48 = -1;
  local_40 = -1;
  lStack_38 = -1;
  if (param_2[3] == 0) {
    lVar3 = param_2[6];
    if (lVar3 != 0) {
      lStack_48 = lVar3 - lVar8 >> 1;
      local_40 = param_2[7] - lVar3 >> 1;
      lStack_38 = param_2[8] - lVar8 >> 1;
      uVar7 = param_2[7];
      goto LAB_1400af6bf;
    }
  }
  else {
    local_60 = param_2[3] - lVar8 >> 1;
    lStack_58 = param_2[4] - lVar8 >> 1;
    uVar4 = param_2[5];
    local_50 = (longlong)(uVar4 - lVar8) >> 1;
    lVar3 = param_2[6];
    uVar7 = uVar4;
    if (lVar3 == 0) {
LAB_1400af6bf:
      if (uVar7 == 0) goto LAB_1400af50f;
    }
    else {
      lStack_48 = lVar3 - lVar8 >> 1;
      uVar5 = param_2[7];
      local_40 = (longlong)(uVar5 - lVar3) >> 1;
      lStack_38 = param_2[8] - lVar8 >> 1;
      uVar7 = uVar5;
      if (uVar4 == 0) goto LAB_1400af6bf;
      uVar7 = uVar4;
      if (uVar4 < uVar5) {
        uVar7 = uVar5;
      }
    }
    param_2[0xc] = (longlong)(uVar7 - lVar8) >> 1;
  }
LAB_1400af50f:
  wstreambuf::wstreambuf((wstreambuf *)(this + 0x10),(longlong)(param_2 + 2));
  lVar8 = param_2[0xc];
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_2[10];
  _Src = (wstringbuf *)(param_2 + 0xd);
  *(wistringstream **)(this + 0x58) = this + 0x68;
  *(int *)(this + 0x50) = (int)lVar3;
  if ((wstringbuf *)param_2[0xb] == _Src) {
    memcpy(this + 0x68,_Src,lVar8 * 2 + 2);
    lVar8 = param_2[0xc];
  }
  else {
    *(wstringbuf **)(this + 0x58) = (wstringbuf *)param_2[0xb];
    *(longlong *)(this + 0x68) = param_2[0xd];
  }
  *(longlong *)(this + 0x60) = lVar8;
  *(undefined2 *)(param_2 + 0xd) = 0;
  param_2[0xb] = (longlong)_Src;
  lVar8 = *(longlong *)(this + 0x58);
  param_2[0xc] = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x18) = lVar8 + local_60 * 2;
    *(longlong *)(this + 0x20) = lVar8 + lStack_58 * 2;
    *(longlong *)(this + 0x28) = lVar8 + local_50 * 2;
  }
  if (lStack_48 == -1) goto LAB_1400af651;
  lVar3 = lVar8 + lStack_48 * 2;
  *(longlong *)(this + 0x40) = lVar8 + lStack_38 * 2;
  *(longlong *)(this + 0x30) = lVar3;
  *(longlong *)(this + 0x38) = lVar3;
  lVar8 = local_40;
  lVar10 = lVar3;
  if (0x7fffffff < local_40) {
    lVar8 = local_40 + -0x7fffffff;
    auVar6._8_8_ = 0;
    auVar6._0_8_ = local_40 - 0x80000000U;
    lVar9 = SUB168(ZEXT816(0x200000005) * auVar6,8);
    lVar10 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar8) {
      if ((lVar9 + ((local_40 - 0x80000000U) - lVar9 >> 1) >> 0x1e & 1) != 0) {
        lVar8 = local_40 + -0xfffffffe;
        lVar10 = lVar3 + 0x1fffffffc;
        if (lVar8 < 0x80000000) goto LAB_1400af646;
      }
      do {
        lVar8 = lVar8 + -0xfffffffe;
        lVar10 = lVar10 + 0x1fffffffc;
      } while (0x7fffffff < lVar8);
    }
  }
LAB_1400af646:
  *(longlong *)(this + 0x38) = lVar10 + (longlong)(int)lVar8 * 2;
LAB_1400af651:
  wstringbuf::_M_sync((wstringbuf *)(param_2 + 2),_Src,0,0);
  *(wstreambuf **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) =
       (wstreambuf *)(this + 0x10);
  return;
}



// std::__cxx11::wistringstream::wistringstream(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wistringstream::wistringstream
          (wistringstream *this,longlong *param_1,undefined8 *param_2,uint param_3)

{
  longlong lVar1;
  undefined2 *puVar2;
  PVOID pvVar3;
  longlong lVar4;
  
  lVar4 = param_1[1];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar4 + -0x18)),0);
  lVar4 = *param_1;
  lVar1 = param_1[3];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  puVar2 = (undefined2 *)*param_2;
  *(undefined4 *)(this + 0x50) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  lVar4 = param_2[1];
  *(wistringstream **)(this + 0x58) = this + 0x68;
  if ((puVar2 == (undefined2 *)0x0) && (lVar4 != 0)) {
    pvVar3 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x48));
    lVar4 = param_1[1];
    lVar1 = param_1[2];
    *(longlong *)this = lVar4;
    *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
    *(undefined8 *)(this + 8) = 0;
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar3);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x58),puVar2,(longlong)(puVar2 + lVar4));
  lVar4 = 0;
  *(uint *)(this + 0x50) = param_3 | 8;
  if ((param_3 & 3) != 0) {
    lVar4 = *(longlong *)(this + 0x60);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 0x10),*(wstringbuf **)(this + 0x58),0,lVar4);
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x10));
  return;
}



// std::__cxx11::wistringstream::wistringstream(std::_Ios_Openmode)

void __thiscall
std::__cxx11::wistringstream::wistringstream(wistringstream *this,longlong *param_1,uint param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  *(uint *)(this + 0x50) = param_2 | 8;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  *(wistringstream **)(this + 0x58) = this + 0x68;
  *(undefined8 *)(this + 0x60) = 0;
  *(undefined2 *)(this + 0x68) = 0;
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 0x10));
  return;
}



// std::__cxx11::wistringstream::wistringstream()

void __thiscall std::__cxx11::wistringstream::wistringstream(wistringstream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  wios::init((wios *)(this + *(longlong *)(lVar1 + -0x18)),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  *(undefined8 *)(this + 0x40) = 0;
  locale::locale((locale *)(this + 0x48));
  *(undefined8 *)(this + 0x60) = 0;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  *(wistringstream **)(this + 0x58) = this + 0x68;
  *(undefined2 *)(this + 0x68) = 0;
  lVar1 = *(longlong *)(*(longlong *)this + -0x18);
  *(undefined4 *)(this + 0x50) = 8;
  wios::init((wios *)(this + lVar1),(longlong)(this + 0x10));
  return;
}



// std::__cxx11::wistringstream::~wistringstream()

void __thiscall std::__cxx11::wistringstream::~wistringstream(wistringstream *this)

{
  *(undefined ***)this = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(this + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  if (*(wistringstream **)(this + 0x58) != this + 0x68) {
    operator_delete(*(wistringstream **)(this + 0x58));
  }
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x48));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)this = &DAT_1400d6d28;
  *(undefined ***)(this + 0x78) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x78));
  operator_delete(this);
  return;
}



// std::__cxx11::wistringstream::~wistringstream()

void __thiscall std::__cxx11::wistringstream::~wistringstream(wistringstream *this)

{
  *(undefined ***)this = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(this + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  if (*(wistringstream **)(this + 0x58) != this + 0x68) {
    operator_delete(*(wistringstream **)(this + 0x58));
  }
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x48));
  *(undefined8 *)(this + 8) = 0;
  *(undefined **)this = &DAT_1400d6d28;
  *(undefined ***)(this + 0x78) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x78));
  return;
}



// std::__cxx11::wistringstream::~wistringstream()

void __thiscall
std::__cxx11::wistringstream::~wistringstream(wistringstream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined ***)(this + 0x10) = &PTR__wstringbuf_1400dc5c0;
  if (*(wistringstream **)(this + 0x58) != this + 0x68) {
    operator_delete(*(wistringstream **)(this + 0x58));
  }
  *(undefined ***)(this + 0x10) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x48));
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  *(undefined8 *)(this + 8) = 0;
  return;
}



// std::__cxx11::wistringstream::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wistringstream&&)

wistringstream * __thiscall
std::__cxx11::wistringstream::operator=(wistringstream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  longlong lVar4;
  longlong lVar5;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  lVar4 = param_1[1];
  this_00[0xe2] = wVar1;
  lVar5 = *(longlong *)(this + 8);
  *(longlong *)(this + 8) = lVar4;
  param_1[1] = lVar5;
  wstringbuf::operator=((wstringbuf *)(this + 0x10),(wstringbuf *)(param_1 + 2));
  return this;
}



// std::__cxx11::ostringstream::str(std::__cxx11::string const&)

void __thiscall std::__cxx11::ostringstream::str(ostringstream *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::string::_M_replace
            ((string *)(this + 0x50),0,*(ulonglong *)(this + 0x58),(string *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x48] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x58);
  }
  stringbuf::_M_sync((stringbuf *)(this + 8),*(stringbuf **)(this + 0x50),0,lVar1);
  return;
}



// std::__cxx11::ostringstream::swap(std::__cxx11::ostringstream&)

void __thiscall std::__cxx11::ostringstream::swap(ostringstream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  this_00[0xe1] = iVar1;
  stringbuf::swap((stringbuf *)(this + 8),param_1 + 1);
  return;
}



// std::__cxx11::ostringstream::ostringstream(std::__cxx11::ostringstream&&)

void __thiscall std::__cxx11::ostringstream::ostringstream(ostringstream *this,longlong *param_1)

{
  ios_base *this_00;
  longlong *plVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  longlong *plVar5;
  undefined1 auVar6 [16];
  longlong lVar7;
  int iVar8;
  ulonglong uVar9;
  uint uVar10;
  uint uVar11;
  longlong lVar12;
  longlong lVar13;
  longlong lVar14;
  longlong local_70;
  longlong lStack_68;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d78;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x70) = &DAT_1400d6da0;
  lVar13 = *param_1;
  *(undefined8 *)(this + 0x148) = 0;
  lVar13 = *(longlong *)(lVar13 + -0x18) + (longlong)param_1;
  ios_base::_M_move(this_00,lVar13);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this + 0x140));
  uVar2 = *(undefined8 *)(lVar13 + 0xd8);
  *(undefined8 *)(lVar13 + 0xd8) = 0;
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined8 *)(this + 0x148) = uVar2;
  *(undefined2 *)(this + 0x150) = *(undefined2 *)(lVar13 + 0xe0);
  lVar13 = param_1[10];
  *(undefined ***)this = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(this + 0x70) = &PTR__ostringstream_1400dcbb0;
  local_70 = -1;
  lStack_68 = -1;
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  if (param_1[2] == 0) {
    lVar14 = param_1[5];
    if (lVar14 != 0) {
      lStack_58 = lVar14 - lVar13;
      local_50 = param_1[6] - lVar14;
      lStack_48 = param_1[7] - lVar13;
      uVar9 = param_1[6];
      goto LAB_1400b0123;
    }
  }
  else {
    uVar3 = param_1[4];
    local_70 = param_1[2] - lVar13;
    lStack_68 = param_1[3] - lVar13;
    local_60 = uVar3 - lVar13;
    lVar14 = param_1[5];
    uVar9 = uVar3;
    if (lVar14 == 0) {
LAB_1400b0123:
      if (uVar9 == 0) goto LAB_1400aff83;
    }
    else {
      lStack_58 = lVar14 - lVar13;
      uVar4 = param_1[6];
      local_50 = uVar4 - lVar14;
      lStack_48 = param_1[7] - lVar13;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400b0123;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    param_1[0xb] = uVar9 - lVar13;
  }
LAB_1400aff83:
  streambuf::streambuf((streambuf *)(this + 8),(longlong)(param_1 + 1));
  lVar13 = param_1[0xb];
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  lVar14 = param_1[9];
  *(ostringstream **)(this + 0x50) = this + 0x60;
  plVar5 = (longlong *)param_1[10];
  *(int *)(this + 0x48) = (int)lVar14;
  plVar1 = param_1 + 0xc;
  if (plVar5 != plVar1) {
    *(longlong **)(this + 0x50) = plVar5;
    *(longlong *)(this + 0x60) = param_1[0xc];
    goto LAB_1400affc8;
  }
  uVar9 = lVar13 + 1;
  uVar11 = (uint)uVar9;
  if (uVar11 < 8) {
    if ((uVar9 & 4) != 0) {
      *(int *)(this + 0x60) = (int)param_1[0xc];
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0x5c) =
           *(undefined4 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x5c);
      lVar13 = param_1[0xb];
      goto LAB_1400affc8;
    }
    if (uVar11 == 0) goto LAB_1400affc8;
    this[0x60] = *(ostringstream *)(param_1 + 0xc);
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x5e) =
           *(undefined2 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x5e);
      lVar13 = param_1[0xb];
      goto LAB_1400affc8;
    }
  }
  else {
    *(longlong *)(this + 0x60) = param_1[0xc];
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x58) =
         *(undefined8 *)((longlong)param_1 + (uVar9 & 0xffffffff) + 0x58);
    lVar13 = (longlong)(this + 0x60) - ((ulonglong)(this + 0x68) & 0xfffffffffffffff8);
    uVar11 = uVar11 + (int)lVar13 & 0xfffffff8;
    if (7 < uVar11) {
      uVar10 = 0;
      do {
        uVar9 = (ulonglong)uVar10;
        uVar10 = uVar10 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x68) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)((longlong)plVar1 + (uVar9 - lVar13));
      } while (uVar10 < uVar11);
    }
  }
  lVar13 = param_1[0xb];
LAB_1400affc8:
  param_1[10] = (longlong)plVar1;
  *(longlong *)(this + 0x58) = lVar13;
  lVar13 = *(longlong *)(this + 0x50);
  param_1[0xb] = 0;
  *(undefined1 *)(param_1 + 0xc) = 0;
  if (local_70 != -1) {
    *(longlong *)(this + 0x20) = local_60 + lVar13;
    *(longlong *)(this + 0x10) = local_70 + lVar13;
    *(longlong *)(this + 0x18) = lStack_68 + lVar13;
  }
  if (lStack_58 != -1) {
    lStack_58 = lVar13 + lStack_58;
    *(longlong *)(this + 0x38) = lStack_48 + lVar13;
    *(longlong *)(this + 0x28) = lStack_58;
    *(longlong *)(this + 0x30) = lStack_58;
    if (local_50 < 0x80000000) {
      iVar8 = (int)local_50;
    }
    else {
      auVar6._8_8_ = 0;
      auVar6._0_8_ = local_50 - 0x80000000U;
      lVar12 = SUB168(ZEXT816(0x200000005) * auVar6,8);
      lVar13 = local_50 + -0x7fffffff;
      lVar14 = local_50;
      if (0x7fffffff < lVar13) {
        lVar14 = lVar13;
        lVar7 = local_50;
        if ((lVar12 + ((local_50 - 0x80000000U) - lVar12 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400b00a0;
        while (lVar13 = lVar7 + -0xfffffffe, 0x7fffffff < lVar13) {
LAB_1400b00a0:
          lVar14 = lVar13 + -0x7fffffff;
          lVar7 = lVar13;
        }
      }
      iVar8 = (int)lVar13;
      lStack_58 = (lStack_58 + 0x7fffffff + local_50) - lVar14;
    }
    *(longlong *)(this + 0x30) = iVar8 + lStack_58;
  }
  stringbuf::_M_sync((stringbuf *)(param_1 + 1),(stringbuf *)param_1[10],0,0);
  *(streambuf **)(this + 0x158) = (streambuf *)(this + 8);
  return;
}



// std::__cxx11::ostringstream::ostringstream(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::ostringstream::ostringstream(ostringstream *this,undefined8 *param_1,uint param_2)

{
  ios_base *this_00;
  undefined1 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d78;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined8 *)(this + 0x148) = 0;
  *(undefined **)(this + 0x70) = &DAT_1400d6da0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined ***)this = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x40));
  puVar1 = (undefined1 *)*param_1;
  lVar3 = param_1[1];
  *(undefined4 *)(this + 0x48) = 0;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  if ((puVar1 == (undefined1 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x40));
    *(undefined **)this = &DAT_1400d6d78;
    *(undefined ***)(this + 0x70) = &PTR__ios_1400ded80;
    ios_base::~ios_base(this_00);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x50),puVar1,(longlong)(puVar1 + lVar3));
  lVar3 = 0;
  *(uint *)(this + 0x48) = param_2 | 0x10;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x58);
  }
  stringbuf::_M_sync((stringbuf *)(this + 8),*(stringbuf **)(this + 0x50),0,lVar3);
  ios::init((ios *)this_00,(longlong)(this + 8));
  return;
}



// std::__cxx11::ostringstream::ostringstream(std::_Ios_Openmode)

void __thiscall std::__cxx11::ostringstream::ostringstream(ostringstream *this,uint param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d78;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined8 *)(this + 0x148) = 0;
  *(undefined **)(this + 0x70) = &DAT_1400d6da0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined ***)this = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x40));
  *(uint *)(this + 0x48) = param_1 | 0x10;
  *(undefined8 *)(this + 0x58) = 0;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  this[0x60] = (ostringstream)0x0;
  ios::init((ios *)this_00,(longlong)(this + 8));
  return;
}



// std::__cxx11::ostringstream::ostringstream()

void __thiscall std::__cxx11::ostringstream::ostringstream(ostringstream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6d78;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined8 *)(this + 0x148) = 0;
  *(undefined **)(this + 0x70) = &DAT_1400d6da0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  ios::init((ios *)this_00,0);
  *(undefined ***)this = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x40));
  this[0x60] = (ostringstream)0x0;
  *(undefined4 *)(this + 0x48) = 0x10;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  *(undefined8 *)(this + 0x58) = 0;
  ios::init((ios *)this_00,(longlong)(this + 8));
  return;
}



// std::__cxx11::ostringstream::ostringstream(std::__cxx11::ostringstream&&)

void __thiscall
std::__cxx11::ostringstream::ostringstream(ostringstream *this,longlong *param_1,longlong *param_2)

{
  longlong *plVar1;
  undefined8 uVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined1 auVar5 [16];
  longlong lVar6;
  int iVar7;
  uint uVar8;
  ulonglong uVar9;
  uint uVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  ios_base *this_00;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar12 = *(longlong *)(param_1[1] + -0x18);
  *(longlong *)this = param_1[1];
  this_00 = (ios_base *)(this + lVar12);
  *(longlong *)this_00 = param_1[2];
  lVar13 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar13);
  ios::_M_cache_locale((ios *)this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(lVar13 + 0xd8);
  *(undefined8 *)(lVar13 + 0xd8) = 0;
  *(undefined8 *)(this_00 + 0xe8) = 0;
  lVar12 = param_1[3];
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  local_60 = -1;
  lStack_58 = -1;
  *(undefined2 *)(this_00 + 0xe0) = *(undefined2 *)(lVar13 + 0xe0);
  lVar13 = *param_1;
  lVar11 = param_2[10];
  *(longlong *)this = lVar13;
  local_50 = -1;
  lStack_48 = -1;
  *(longlong *)(this + *(longlong *)(lVar13 + -0x18)) = lVar12;
  local_40 = -1;
  lStack_38 = -1;
  if (param_2[2] == 0) {
    lVar12 = param_2[5];
    if (lVar12 != 0) {
      lStack_48 = lVar12 - lVar11;
      local_40 = param_2[6] - lVar12;
      lStack_38 = param_2[7] - lVar11;
      uVar9 = param_2[6];
      goto LAB_1400b08fb;
    }
  }
  else {
    uVar3 = param_2[4];
    local_60 = param_2[2] - lVar11;
    lStack_58 = param_2[3] - lVar11;
    local_50 = uVar3 - lVar11;
    lVar12 = param_2[5];
    uVar9 = uVar3;
    if (lVar12 == 0) {
LAB_1400b08fb:
      if (uVar9 == 0) goto LAB_1400b0757;
    }
    else {
      lStack_48 = lVar12 - lVar11;
      uVar4 = param_2[6];
      local_40 = uVar4 - lVar12;
      lStack_38 = param_2[7] - lVar11;
      uVar9 = uVar4;
      if (uVar3 == 0) goto LAB_1400b08fb;
      uVar9 = uVar3;
      if (uVar3 < uVar4) {
        uVar9 = uVar4;
      }
    }
    param_2[0xb] = uVar9 - lVar11;
  }
LAB_1400b0757:
  streambuf::streambuf((streambuf *)(this + 8),(longlong)(param_2 + 1));
  lVar12 = param_2[0xb];
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  lVar13 = param_2[9];
  plVar1 = param_2 + 0xc;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  *(int *)(this + 0x48) = (int)lVar13;
  if ((longlong *)param_2[10] != plVar1) {
    *(longlong **)(this + 0x50) = (longlong *)param_2[10];
    *(longlong *)(this + 0x60) = param_2[0xc];
    goto LAB_1400b079c;
  }
  uVar9 = lVar12 + 1;
  uVar8 = (uint)uVar9;
  if (uVar8 < 8) {
    if ((uVar9 & 4) != 0) {
      *(int *)(this + 0x60) = (int)param_2[0xc];
      *(undefined4 *)(this + (uVar9 & 0xffffffff) + 0x5c) =
           *(undefined4 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x5c);
      lVar12 = param_2[0xb];
      goto LAB_1400b079c;
    }
    if (uVar8 == 0) goto LAB_1400b079c;
    this[0x60] = *(ostringstream *)(param_2 + 0xc);
    if ((uVar9 & 2) != 0) {
      *(undefined2 *)(this + (uVar9 & 0xffffffff) + 0x5e) =
           *(undefined2 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x5e);
      lVar12 = param_2[0xb];
      goto LAB_1400b079c;
    }
  }
  else {
    *(longlong *)(this + 0x60) = param_2[0xc];
    *(undefined8 *)(this + (uVar9 & 0xffffffff) + 0x58) =
         *(undefined8 *)((longlong)param_2 + (uVar9 & 0xffffffff) + 0x58);
    lVar12 = (longlong)(this + 0x60) - ((ulonglong)(this + 0x68) & 0xfffffffffffffff8);
    uVar8 = uVar8 + (int)lVar12 & 0xfffffff8;
    if (7 < uVar8) {
      uVar9 = 0;
      do {
        uVar10 = (int)uVar9 + 8;
        *(undefined8 *)(((ulonglong)(this + 0x68) & 0xfffffffffffffff8) + uVar9) =
             *(undefined8 *)((longlong)plVar1 + (uVar9 - lVar12));
        uVar9 = (ulonglong)uVar10;
      } while (uVar10 < uVar8);
    }
  }
  lVar12 = param_2[0xb];
LAB_1400b079c:
  *(longlong *)(this + 0x58) = lVar12;
  param_2[10] = (longlong)plVar1;
  lVar12 = *(longlong *)(this + 0x50);
  param_2[0xb] = 0;
  *(undefined1 *)(param_2 + 0xc) = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x20) = local_50 + lVar12;
    *(longlong *)(this + 0x10) = local_60 + lVar12;
    *(longlong *)(this + 0x18) = lStack_58 + lVar12;
  }
  if (lStack_48 != -1) {
    lStack_48 = lVar12 + lStack_48;
    *(longlong *)(this + 0x38) = lStack_38 + lVar12;
    *(longlong *)(this + 0x28) = lStack_48;
    *(longlong *)(this + 0x30) = lStack_48;
    if (local_40 < 0x80000000) {
      iVar7 = (int)local_40;
    }
    else {
      auVar5._8_8_ = 0;
      auVar5._0_8_ = local_40 - 0x80000000U;
      lVar11 = SUB168(ZEXT816(0x200000005) * auVar5,8);
      lVar12 = local_40 + -0x7fffffff;
      lVar13 = local_40;
      if (0x7fffffff < lVar12) {
        lVar13 = lVar12;
        lVar6 = local_40;
        if ((lVar11 + ((local_40 - 0x80000000U) - lVar11 >> 1) >> 0x1e & 1) == 0)
        goto LAB_1400b0870;
        while (lVar12 = lVar6 + -0xfffffffe, 0x7fffffff < lVar12) {
LAB_1400b0870:
          lVar13 = lVar12 + -0x7fffffff;
          lVar6 = lVar12;
        }
      }
      iVar7 = (int)lVar12;
      lStack_48 = (lStack_48 + 0x7fffffff + local_40) - lVar13;
    }
    *(longlong *)(this + 0x30) = iVar7 + lStack_48;
  }
  stringbuf::_M_sync((stringbuf *)(param_2 + 1),(stringbuf *)param_2[10],0,0);
  *(streambuf **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) = (streambuf *)(this + 8);
  return;
}



// std::__cxx11::ostringstream::ostringstream(std::__cxx11::string const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::ostringstream::ostringstream
          (ostringstream *this,longlong *param_1,undefined8 *param_2,uint param_3)

{
  longlong lVar1;
  undefined1 *puVar2;
  PVOID pvVar3;
  longlong lVar4;
  
  lVar4 = param_1[1];
  *(longlong *)this = lVar4;
  lVar4 = *(longlong *)(lVar4 + -0x18);
  *(longlong *)(this + lVar4) = param_1[2];
  ios::init((ios *)(this + lVar4),0);
  lVar4 = *param_1;
  lVar1 = param_1[3];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  locale::locale((locale *)(this + 0x40));
  puVar2 = (undefined1 *)*param_2;
  lVar4 = param_2[1];
  *(undefined4 *)(this + 0x48) = 0;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  if ((puVar2 == (undefined1 *)0x0) && (lVar4 != 0)) {
    pvVar3 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
    locale::~locale((locale *)(this + 0x40));
    lVar4 = param_1[1];
    lVar1 = param_1[2];
    *(longlong *)this = lVar4;
    *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar3);
  }
  _text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag_isra_0
            ((longlong *)(this + 0x50),puVar2,(longlong)(puVar2 + lVar4));
  lVar4 = 0;
  *(uint *)(this + 0x48) = param_3 | 0x10;
  if ((param_3 & 3) != 0) {
    lVar4 = *(longlong *)(this + 0x58);
  }
  stringbuf::_M_sync((stringbuf *)(this + 8),*(stringbuf **)(this + 0x50),0,lVar4);
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 8));
  return;
}



// std::__cxx11::ostringstream::ostringstream(std::_Ios_Openmode)

void __thiscall
std::__cxx11::ostringstream::ostringstream(ostringstream *this,longlong *param_1,uint param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = param_1[2];
  ios::init((ios *)(this + lVar1),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  locale::locale((locale *)(this + 0x40));
  this[0x60] = (ostringstream)0x0;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  *(undefined8 *)(this + 0x58) = 0;
  *(uint *)(this + 0x48) = param_2 | 0x10;
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 8));
  return;
}



// std::__cxx11::ostringstream::ostringstream()

void __thiscall std::__cxx11::ostringstream::ostringstream(ostringstream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = param_1[2];
  ios::init((ios *)(this + lVar1),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  locale::locale((locale *)(this + 0x40));
  this[0x60] = (ostringstream)0x0;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  *(ostringstream **)(this + 0x50) = this + 0x60;
  *(undefined8 *)(this + 0x58) = 0;
  *(undefined4 *)(this + 0x48) = 0x10;
  ios::init((ios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 8));
  return;
}



// std::__cxx11::ostringstream::~ostringstream()

void __thiscall std::__cxx11::ostringstream::~ostringstream(ostringstream *this)

{
  *(undefined ***)(this + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined ***)this = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  if (*(ostringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(ostringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x40));
  *(undefined **)this = &DAT_1400d6d78;
  *(undefined ***)(this + 0x70) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  operator_delete(this);
  return;
}



// std::__cxx11::ostringstream::~ostringstream()

void __thiscall std::__cxx11::ostringstream::~ostringstream(ostringstream *this)

{
  *(undefined ***)(this + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined ***)this = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  if (*(ostringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(ostringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x40));
  *(undefined **)this = &DAT_1400d6d78;
  *(undefined ***)(this + 0x70) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  return;
}



// std::__cxx11::ostringstream::~ostringstream()

void __thiscall std::__cxx11::ostringstream::~ostringstream(ostringstream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  if (*(ostringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(ostringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x40));
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  return;
}



// std::__cxx11::ostringstream::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::ostringstream&&)

ostringstream * __thiscall
std::__cxx11::ostringstream::operator=(ostringstream *this,longlong *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  ios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  ios::_M_cache_locale((ios *)this_01,(longlong *)(this_01 + 0xd0));
  ios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar2 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  iVar1 = *(ios *)(this_01 + 0xe0);
  *(ios *)(this_01 + 0xe0) = this_00[0xe0];
  this_00[0xe0] = iVar1;
  iVar1 = *(ios *)(this_01 + 0xe1);
  *(ios *)(this_01 + 0xe1) = this_00[0xe1];
  this_00[0xe1] = iVar1;
  stringbuf::operator=((stringbuf *)(this + 8),(stringbuf *)(param_1 + 1));
  return this;
}



// std::__cxx11::wostringstream::str(std::__cxx11::wstring const&)

void __thiscall std::__cxx11::wostringstream::str(wostringstream *this,undefined8 *param_1)

{
  longlong lVar1;
  
  __cxx11::wstring::_M_replace
            ((wstring *)(this + 0x50),0,*(ulonglong *)(this + 0x58),(wstring *)*param_1,param_1[1]);
  lVar1 = 0;
  if (((byte)this[0x48] & 3) != 0) {
    lVar1 = *(longlong *)(this + 0x58);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 8),*(wstringbuf **)(this + 0x50),0,lVar1);
  return;
}



// std::__cxx11::wostringstream::swap(std::__cxx11::wostringstream&)

void __thiscall std::__cxx11::wostringstream::swap(wostringstream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  this_00[0xe2] = wVar1;
  wstringbuf::swap((wstringbuf *)(this + 8),param_1 + 1);
  return;
}



// std::__cxx11::wostringstream::wostringstream(std::__cxx11::wostringstream&&)

void __thiscall std::__cxx11::wostringstream::wostringstream(wostringstream *this,longlong *param_1)

{
  ios_base *this_00;
  wstringbuf *_Src;
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 auVar6 [16];
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  longlong lVar10;
  longlong local_70;
  longlong lStack_68;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  *(undefined **)(this + 0x70) = &DAT_1400d6df0;
  lVar9 = *param_1;
  *(undefined2 *)(this + 0x150) = 0;
  lVar9 = *(longlong *)(lVar9 + -0x18);
  this[0x152] = (wostringstream)0x0;
  *(undefined8 *)(this + 0x148) = 0;
  *(undefined **)this = &DAT_1400d6dc8;
  lVar9 = lVar9 + (longlong)param_1;
  ios_base::_M_move(this_00,lVar9);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this + 0x140));
  uVar2 = *(undefined8 *)(lVar9 + 0xd8);
  lVar3 = param_1[10];
  *(undefined8 *)(lVar9 + 0xd8) = 0;
  *(undefined8 *)(this + 0x148) = uVar2;
  uVar1 = *(undefined2 *)(lVar9 + 0xe0);
  *(undefined8 *)(this + 0x158) = 0;
  *(undefined2 *)(this + 0x150) = uVar1;
  this[0x152] = *(wostringstream *)(lVar9 + 0xe2);
  *(undefined ***)this = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(this + 0x70) = &PTR__wostringstream_1400dcc00;
  local_70 = -1;
  lStack_68 = -1;
  local_60 = -1;
  lStack_58 = -1;
  local_50 = -1;
  lStack_48 = -1;
  if (param_1[2] == 0) {
    lVar9 = param_1[5];
    if (lVar9 != 0) {
      lStack_58 = lVar9 - lVar3 >> 1;
      local_50 = param_1[6] - lVar9 >> 1;
      lStack_48 = param_1[7] - lVar3 >> 1;
      uVar7 = param_1[6];
      goto LAB_1400b13ff;
    }
  }
  else {
    local_70 = param_1[2] - lVar3 >> 1;
    lStack_68 = param_1[3] - lVar3 >> 1;
    uVar4 = param_1[4];
    local_60 = (longlong)(uVar4 - lVar3) >> 1;
    lVar9 = param_1[5];
    uVar7 = uVar4;
    if (lVar9 == 0) {
LAB_1400b13ff:
      if (uVar7 == 0) goto LAB_1400b1258;
    }
    else {
      lStack_58 = lVar9 - lVar3 >> 1;
      uVar5 = param_1[6];
      local_50 = (longlong)(uVar5 - lVar9) >> 1;
      lStack_48 = param_1[7] - lVar3 >> 1;
      uVar7 = uVar5;
      if (uVar4 == 0) goto LAB_1400b13ff;
      uVar7 = uVar4;
      if (uVar4 < uVar5) {
        uVar7 = uVar5;
      }
    }
    param_1[0xb] = (longlong)(uVar7 - lVar3) >> 1;
  }
LAB_1400b1258:
  wstreambuf::wstreambuf((wstreambuf *)(this + 8),(longlong)(param_1 + 1));
  lVar9 = param_1[0xb];
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[9];
  _Src = (wstringbuf *)(param_1 + 0xc);
  *(wostringstream **)(this + 0x50) = this + 0x60;
  *(int *)(this + 0x48) = (int)lVar3;
  if ((wstringbuf *)param_1[10] == _Src) {
    memcpy(this + 0x60,_Src,lVar9 * 2 + 2);
    lVar9 = param_1[0xb];
  }
  else {
    *(wstringbuf **)(this + 0x50) = (wstringbuf *)param_1[10];
    *(longlong *)(this + 0x60) = param_1[0xc];
  }
  *(longlong *)(this + 0x58) = lVar9;
  param_1[10] = (longlong)_Src;
  *(undefined2 *)(param_1 + 0xc) = 0;
  lVar9 = *(longlong *)(this + 0x50);
  param_1[0xb] = 0;
  if (local_70 != -1) {
    *(longlong *)(this + 0x10) = lVar9 + local_70 * 2;
    *(longlong *)(this + 0x18) = lVar9 + lStack_68 * 2;
    *(longlong *)(this + 0x20) = lVar9 + local_60 * 2;
  }
  if (lStack_58 == -1) goto LAB_1400b1399;
  lVar3 = lVar9 + lStack_58 * 2;
  *(longlong *)(this + 0x38) = lVar9 + lStack_48 * 2;
  *(longlong *)(this + 0x28) = lVar3;
  *(longlong *)(this + 0x30) = lVar3;
  lVar9 = local_50;
  lVar10 = lVar3;
  if (0x7fffffff < local_50) {
    lVar9 = local_50 + -0x7fffffff;
    auVar6._8_8_ = 0;
    auVar6._0_8_ = local_50 - 0x80000000U;
    lVar8 = SUB168(ZEXT816(0x200000005) * auVar6,8);
    lVar10 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar9) {
      if ((lVar8 + ((local_50 - 0x80000000U) - lVar8 >> 1) >> 0x1e & 1) != 0) {
        lVar9 = local_50 + -0xfffffffe;
        lVar10 = lVar3 + 0x1fffffffc;
        if (lVar9 < 0x80000000) goto LAB_1400b138e;
      }
      do {
        lVar9 = lVar9 + -0xfffffffe;
        lVar10 = lVar10 + 0x1fffffffc;
      } while (0x7fffffff < lVar9);
    }
  }
LAB_1400b138e:
  *(longlong *)(this + 0x30) = lVar10 + (longlong)(int)lVar9 * 2;
LAB_1400b1399:
  wstringbuf::_M_sync((wstringbuf *)(param_1 + 1),_Src,0,0);
  *(wstreambuf **)(this + 0x158) = (wstreambuf *)(this + 8);
  return;
}



// std::__cxx11::wostringstream::wostringstream(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wostringstream::wostringstream(wostringstream *this,undefined8 *param_1,uint param_2)

{
  ios_base *this_00;
  undefined2 *puVar1;
  PVOID pvVar2;
  longlong lVar3;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  this[0x152] = (wostringstream)0x0;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined8 *)(this + 0x148) = 0;
  *(undefined **)this = &DAT_1400d6dc8;
  *(undefined **)(this + 0x70) = &DAT_1400d6df0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined ***)this = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x40));
  puVar1 = (undefined2 *)*param_1;
  *(undefined4 *)(this + 0x48) = 0;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_1[1];
  *(wostringstream **)(this + 0x50) = this + 0x60;
  if ((puVar1 == (undefined2 *)0x0) && (lVar3 != 0)) {
    pvVar2 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x40));
    *(undefined **)this = &DAT_1400d6dc8;
    *(undefined ***)(this + 0x70) = &PTR__wios_1400deda0;
    ios_base::~ios_base(this_00);
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar2);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x50),puVar1,(longlong)(puVar1 + lVar3));
  lVar3 = 0;
  *(uint *)(this + 0x48) = param_2 | 0x10;
  if ((param_2 & 3) != 0) {
    lVar3 = *(longlong *)(this + 0x58);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 8),*(wstringbuf **)(this + 0x50),0,lVar3);
  wios::init((wios *)this_00,(longlong)(this + 8));
  return;
}



// std::__cxx11::wostringstream::wostringstream(std::_Ios_Openmode)

void __thiscall std::__cxx11::wostringstream::wostringstream(wostringstream *this,uint param_1)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6dc8;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined8 *)(this + 0x148) = 0;
  this[0x152] = (wostringstream)0x0;
  *(undefined **)(this + 0x70) = &DAT_1400d6df0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined ***)this = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x40));
  *(uint *)(this + 0x48) = param_1 | 0x10;
  *(undefined8 *)(this + 0x58) = 0;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  *(wostringstream **)(this + 0x50) = this + 0x60;
  *(undefined2 *)(this + 0x60) = 0;
  wios::init((wios *)this_00,(longlong)(this + 8));
  return;
}



// std::__cxx11::wostringstream::wostringstream()

void __thiscall std::__cxx11::wostringstream::wostringstream(wostringstream *this)

{
  ios_base *this_00;
  
  this_00 = (ios_base *)(this + 0x70);
  ios_base::ios_base(this_00);
  *(undefined **)this = &DAT_1400d6dc8;
  *(undefined2 *)(this + 0x150) = 0;
  *(undefined8 *)(this + 0x148) = 0;
  this[0x152] = (wostringstream)0x0;
  *(undefined **)(this + 0x70) = &DAT_1400d6df0;
  *(undefined1 (*) [16])(this + 0x158) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x168) = (undefined1  [16])0x0;
  wios::init((wios *)this_00,0);
  *(undefined ***)this = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  *(undefined1 (*) [16])(this + 0x10) = (undefined1  [16])0x0;
  *(undefined ***)(this + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined1 (*) [16])(this + 0x20) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x30) = (undefined1  [16])0x0;
  locale::locale((locale *)(this + 0x40));
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  *(wostringstream **)(this + 0x50) = this + 0x60;
  *(undefined4 *)(this + 0x48) = 0x10;
  *(undefined8 *)(this + 0x58) = 0;
  *(undefined2 *)(this + 0x60) = 0;
  wios::init((wios *)this_00,(longlong)(this + 8));
  return;
}



// std::__cxx11::wostringstream::wostringstream(std::__cxx11::wostringstream&&)

void __thiscall
std::__cxx11::wostringstream::wostringstream
          (wostringstream *this,longlong *param_1,longlong *param_2)

{
  wstringbuf *_Src;
  undefined2 uVar1;
  undefined8 uVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 auVar6 [16];
  ulonglong uVar7;
  longlong lVar8;
  longlong lVar9;
  ios_base *this_00;
  longlong lVar10;
  longlong local_60;
  longlong lStack_58;
  longlong local_50;
  longlong lStack_48;
  longlong local_40;
  longlong lStack_38;
  
  lVar8 = *(longlong *)(param_1[1] + -0x18);
  *(longlong *)this = param_1[1];
  this_00 = (ios_base *)(this + lVar8);
  *(longlong *)this_00 = param_1[2];
  lVar10 = *(longlong *)(*param_2 + -0x18) + (longlong)param_2;
  ios_base::_M_move(this_00,lVar10);
  wios::_M_cache_locale((wios *)this_00,(longlong *)(this_00 + 0xd0));
  lVar8 = param_2[10];
  uVar2 = *(undefined8 *)(lVar10 + 0xd8);
  *(undefined8 *)(lVar10 + 0xd8) = 0;
  lVar3 = param_1[3];
  *(undefined8 *)(this_00 + 0xd8) = uVar2;
  uVar1 = *(undefined2 *)(lVar10 + 0xe0);
  *(undefined8 *)(this_00 + 0xe8) = 0;
  *(undefined2 *)(this_00 + 0xe0) = uVar1;
  local_60 = -1;
  lStack_58 = -1;
  this_00[0xe2] = *(ios_base *)(lVar10 + 0xe2);
  lVar10 = *param_1;
  *(longlong *)this = lVar10;
  local_50 = -1;
  lStack_48 = -1;
  *(longlong *)(this + *(longlong *)(lVar10 + -0x18)) = lVar3;
  local_40 = -1;
  lStack_38 = -1;
  if (param_2[2] == 0) {
    lVar3 = param_2[5];
    if (lVar3 != 0) {
      lStack_48 = lVar3 - lVar8 >> 1;
      local_40 = param_2[6] - lVar3 >> 1;
      lStack_38 = param_2[7] - lVar8 >> 1;
      uVar7 = param_2[6];
      goto LAB_1400b1b67;
    }
  }
  else {
    local_60 = param_2[2] - lVar8 >> 1;
    lStack_58 = param_2[3] - lVar8 >> 1;
    uVar4 = param_2[4];
    local_50 = (longlong)(uVar4 - lVar8) >> 1;
    lVar3 = param_2[5];
    uVar7 = uVar4;
    if (lVar3 == 0) {
LAB_1400b1b67:
      if (uVar7 == 0) goto LAB_1400b19ba;
    }
    else {
      lStack_48 = lVar3 - lVar8 >> 1;
      uVar5 = param_2[6];
      local_40 = (longlong)(uVar5 - lVar3) >> 1;
      lStack_38 = param_2[7] - lVar8 >> 1;
      uVar7 = uVar5;
      if (uVar4 == 0) goto LAB_1400b1b67;
      uVar7 = uVar4;
      if (uVar4 < uVar5) {
        uVar7 = uVar5;
      }
    }
    param_2[0xb] = (longlong)(uVar7 - lVar8) >> 1;
  }
LAB_1400b19ba:
  wstreambuf::wstreambuf((wstreambuf *)(this + 8),(longlong)(param_2 + 1));
  lVar8 = param_2[0xb];
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  lVar3 = param_2[9];
  _Src = (wstringbuf *)(param_2 + 0xc);
  *(wostringstream **)(this + 0x50) = this + 0x60;
  *(int *)(this + 0x48) = (int)lVar3;
  if ((wstringbuf *)param_2[10] == _Src) {
    memcpy(this + 0x60,_Src,lVar8 * 2 + 2);
    lVar8 = param_2[0xb];
  }
  else {
    *(wstringbuf **)(this + 0x50) = (wstringbuf *)param_2[10];
    *(longlong *)(this + 0x60) = param_2[0xc];
  }
  *(longlong *)(this + 0x58) = lVar8;
  param_2[10] = (longlong)_Src;
  *(undefined2 *)(param_2 + 0xc) = 0;
  lVar8 = *(longlong *)(this + 0x50);
  param_2[0xb] = 0;
  if (local_60 != -1) {
    *(longlong *)(this + 0x10) = lVar8 + local_60 * 2;
    *(longlong *)(this + 0x18) = lVar8 + lStack_58 * 2;
    *(longlong *)(this + 0x20) = lVar8 + local_50 * 2;
  }
  if (lStack_48 == -1) goto LAB_1400b1af9;
  lVar3 = lVar8 + lStack_48 * 2;
  *(longlong *)(this + 0x38) = lVar8 + lStack_38 * 2;
  *(longlong *)(this + 0x28) = lVar3;
  *(longlong *)(this + 0x30) = lVar3;
  lVar8 = local_40;
  lVar10 = lVar3;
  if (0x7fffffff < local_40) {
    lVar8 = local_40 + -0x7fffffff;
    auVar6._8_8_ = 0;
    auVar6._0_8_ = local_40 - 0x80000000U;
    lVar9 = SUB168(ZEXT816(0x200000005) * auVar6,8);
    lVar10 = lVar3 + 0xfffffffe;
    if (0x7fffffff < lVar8) {
      if ((lVar9 + ((local_40 - 0x80000000U) - lVar9 >> 1) >> 0x1e & 1) != 0) {
        lVar8 = local_40 + -0xfffffffe;
        lVar10 = lVar3 + 0x1fffffffc;
        if (lVar8 < 0x80000000) goto LAB_1400b1aee;
      }
      do {
        lVar8 = lVar8 + -0xfffffffe;
        lVar10 = lVar10 + 0x1fffffffc;
      } while (0x7fffffff < lVar8);
    }
  }
LAB_1400b1aee:
  *(longlong *)(this + 0x30) = lVar10 + (longlong)(int)lVar8 * 2;
LAB_1400b1af9:
  wstringbuf::_M_sync((wstringbuf *)(param_2 + 1),_Src,0,0);
  *(wstreambuf **)(this + *(longlong *)(*(longlong *)this + -0x18) + 0xe8) =
       (wstreambuf *)(this + 8);
  return;
}



// std::__cxx11::wostringstream::wostringstream(std::__cxx11::wstring const&, std::_Ios_Openmode)

void __thiscall
std::__cxx11::wostringstream::wostringstream
          (wostringstream *this,longlong *param_1,undefined8 *param_2,uint param_3)

{
  longlong lVar1;
  undefined2 *puVar2;
  PVOID pvVar3;
  longlong lVar4;
  
  lVar4 = param_1[1];
  *(longlong *)this = lVar4;
  lVar4 = *(longlong *)(lVar4 + -0x18);
  *(longlong *)(this + lVar4) = param_1[2];
  wios::init((wios *)(this + lVar4),0);
  lVar4 = *param_1;
  lVar1 = param_1[3];
  *(longlong *)this = lVar4;
  *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  locale::locale((locale *)(this + 0x40));
  puVar2 = (undefined2 *)*param_2;
  *(undefined4 *)(this + 0x48) = 0;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  lVar4 = param_2[1];
  *(wostringstream **)(this + 0x50) = this + 0x60;
  if ((puVar2 == (undefined2 *)0x0) && (lVar4 != 0)) {
    pvVar3 = (PVOID)_text__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcyRKS3__part_0()
    ;
    *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
    locale::~locale((locale *)(this + 0x40));
    lVar4 = param_1[1];
    lVar1 = param_1[2];
    *(longlong *)this = lVar4;
    *(longlong *)(this + *(longlong *)(lVar4 + -0x18)) = lVar1;
                    // WARNING: Subroutine does not return
    _Unwind_Resume(pvVar3);
  }
  _text__ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE12_M_constructIPKwEEvT_S8_St20forward_iterator_tag_isra_0
            ((undefined8 *)(this + 0x50),puVar2,(longlong)(puVar2 + lVar4));
  lVar4 = 0;
  *(uint *)(this + 0x48) = param_3 | 0x10;
  if ((param_3 & 3) != 0) {
    lVar4 = *(longlong *)(this + 0x58);
  }
  wstringbuf::_M_sync((wstringbuf *)(this + 8),*(wstringbuf **)(this + 0x50),0,lVar4);
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 8));
  return;
}



// std::__cxx11::wostringstream::wostringstream(std::_Ios_Openmode)

void __thiscall
std::__cxx11::wostringstream::wostringstream(wostringstream *this,longlong *param_1,uint param_2)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = param_1[2];
  wios::init((wios *)(this + lVar1),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  locale::locale((locale *)(this + 0x40));
  *(uint *)(this + 0x48) = param_2 | 0x10;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  *(wostringstream **)(this + 0x50) = this + 0x60;
  *(undefined2 *)(this + 0x60) = 0;
  *(undefined8 *)(this + 0x58) = 0;
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 8));
  return;
}



// std::__cxx11::wostringstream::wostringstream()

void __thiscall std::__cxx11::wostringstream::wostringstream(wostringstream *this,longlong *param_1)

{
  longlong lVar1;
  longlong lVar2;
  
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  lVar1 = *(longlong *)(lVar1 + -0x18);
  *(longlong *)(this + lVar1) = param_1[2];
  wios::init((wios *)(this + lVar1),0);
  lVar1 = *param_1;
  lVar2 = param_1[3];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = lVar2;
  *(undefined8 *)(this + 0x10) = 0;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  *(undefined8 *)(this + 0x20) = 0;
  *(undefined8 *)(this + 0x28) = 0;
  *(undefined8 *)(this + 0x30) = 0;
  *(undefined8 *)(this + 0x38) = 0;
  locale::locale((locale *)(this + 0x40));
  *(undefined8 *)(this + 0x58) = 0;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  *(wostringstream **)(this + 0x50) = this + 0x60;
  *(undefined2 *)(this + 0x60) = 0;
  *(undefined4 *)(this + 0x48) = 0x10;
  wios::init((wios *)(this + *(longlong *)(*(longlong *)this + -0x18)),(longlong)(this + 8));
  return;
}



// std::__cxx11::wostringstream::~wostringstream()

void __thiscall std::__cxx11::wostringstream::~wostringstream(wostringstream *this)

{
  *(undefined ***)(this + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined ***)this = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wostringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(wostringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x40));
  *(undefined **)this = &DAT_1400d6dc8;
  *(undefined ***)(this + 0x70) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  operator_delete(this);
  return;
}



// std::__cxx11::wostringstream::~wostringstream()

void __thiscall std::__cxx11::wostringstream::~wostringstream(wostringstream *this)

{
  *(undefined ***)(this + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined ***)this = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wostringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(wostringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x40));
  *(undefined **)this = &DAT_1400d6dc8;
  *(undefined ***)(this + 0x70) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  return;
}



// std::__cxx11::wostringstream::~wostringstream()

void __thiscall
std::__cxx11::wostringstream::~wostringstream(wostringstream *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = *param_1;
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[3];
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wostringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(wostringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x40));
  lVar1 = param_1[1];
  *(longlong *)this = lVar1;
  *(longlong *)(this + *(longlong *)(lVar1 + -0x18)) = param_1[2];
  return;
}



// std::__cxx11::wostringstream::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wostringstream&&)

wostringstream * __thiscall
std::__cxx11::wostringstream::operator=(wostringstream *this,longlong *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  wios *this_00;
  ios_base *this_01;
  
  this_01 = (ios_base *)(this + *(longlong *)(*(longlong *)this + -0x18));
  this_00 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios_base::_M_swap(this_01,(ios_base *)this_00);
  wios::_M_cache_locale((wios *)this_01,(longlong *)(this_01 + 0xd0));
  wios::_M_cache_locale(this_00,(longlong *)(this_00 + 0xd0));
  uVar3 = *(undefined8 *)(this_01 + 0xd8);
  *(undefined8 *)(this_01 + 0xd8) = *(undefined8 *)(this_00 + 0xd8);
  *(undefined8 *)(this_00 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this_01 + 0xe0);
  *(undefined2 *)(this_01 + 0xe0) = *(undefined2 *)(this_00 + 0xe0);
  *(undefined2 *)(this_00 + 0xe0) = uVar2;
  wVar1 = *(wios *)(this_01 + 0xe2);
  *(wios *)(this_01 + 0xe2) = this_00[0xe2];
  this_00[0xe2] = wVar1;
  wstringbuf::operator=((wstringbuf *)(this + 8),(wstringbuf *)(param_1 + 1));
  return this;
}



// std::__cxx11::collate<char>::collate(int*, unsigned long long)

void __thiscall
std::__cxx11::collate<char>::collate(collate<char> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::__cxx11::collate<char>::collate(unsigned long long)

void __thiscall std::__cxx11::collate<char>::collate(collate<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::collate<char>::collate(int*, unsigned long long)

void __thiscall
std::__cxx11::collate<char>::collate(collate<char> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::__cxx11::collate<char>::collate(unsigned long long)

void __thiscall std::__cxx11::collate<char>::collate(collate<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc20;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::collate<char>::~collate()

void __thiscall std::__cxx11::collate<char>::~collate(collate<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc20;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::collate<char>::~collate()

void __thiscall std::__cxx11::collate<char>::~collate(collate<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc20;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::collate<char>::~collate()

void __thiscall std::__cxx11::collate<char>::~collate(collate<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc20;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::collate<wchar_t>::collate(int*, unsigned long long)

void __thiscall
std::__cxx11::collate<wchar_t>::collate
          (collate<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::__cxx11::collate<wchar_t>::collate(unsigned long long)

void __thiscall std::__cxx11::collate<wchar_t>::collate(collate<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::collate<wchar_t>::collate(int*, unsigned long long)

void __thiscall
std::__cxx11::collate<wchar_t>::collate
          (collate<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::__cxx11::collate<wchar_t>::collate(unsigned long long)

void __thiscall std::__cxx11::collate<wchar_t>::collate(collate<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400dcc60;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::collate<wchar_t>::~collate()

void __thiscall std::__cxx11::collate<wchar_t>::~collate(collate<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc60;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::collate<wchar_t>::~collate()

void __thiscall std::__cxx11::collate<wchar_t>::~collate(collate<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc60;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::collate<wchar_t>::~collate()

void __thiscall std::__cxx11::collate<wchar_t>::~collate(collate<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400dcc60;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages<char>::messages(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::messages<char>::messages
          (messages<char> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400dcca0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<char>::messages(unsigned long long)

void __thiscall std::__cxx11::messages<char>::messages(messages<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400dcca0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<char>::messages(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::messages<char>::messages
          (messages<char> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400dcca0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<char>::messages(unsigned long long)

void __thiscall std::__cxx11::messages<char>::messages(messages<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400dcca0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<char>::~messages()

void __thiscall std::__cxx11::messages<char>::~messages(messages<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcca0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::messages<char>::~messages()

void __thiscall std::__cxx11::messages<char>::~messages(messages<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcca0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages<char>::~messages()

void __thiscall std::__cxx11::messages<char>::~messages(messages<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcca0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages<wchar_t>::messages(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::messages<wchar_t>::messages
          (messages<wchar_t> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400dcce0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<wchar_t>::messages(unsigned long long)

void __thiscall std::__cxx11::messages<wchar_t>::messages(messages<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400dcce0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<wchar_t>::messages(int*, char const*, unsigned long long)

void __thiscall
std::__cxx11::messages<wchar_t>::messages
          (messages<wchar_t> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400dcce0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<wchar_t>::messages(unsigned long long)

void __thiscall std::__cxx11::messages<wchar_t>::messages(messages<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400dcce0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::__cxx11::messages<wchar_t>::~messages()

void __thiscall std::__cxx11::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcce0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::messages<wchar_t>::~messages()

void __thiscall std::__cxx11::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcce0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::messages<wchar_t>::~messages()

void __thiscall std::__cxx11::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400dcce0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::__cxx11::numpunct<char>::_M_initialize_numpunct(int*)

void std::__cxx11::numpunct<char>::_M_initialize_numpunct(longlong param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(param_1 + 0x10);
  if (puVar4 == (undefined8 *)0x0) {
    puVar4 = operator_new(0x90);
    *(undefined4 *)(puVar4 + 1) = 0;
    puVar4[2] = 0;
    *puVar4 = &PTR____numpunct_cache_1400ddb60;
    puVar4[3] = 0;
    *(undefined1 *)(puVar4 + 4) = 0;
    puVar4[5] = 0;
    puVar4[6] = 0;
    puVar4[7] = 0;
    puVar4[8] = 0;
    *(undefined2 *)(puVar4 + 9) = 0;
    *(undefined1 *)(puVar4 + 0x11) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  puVar4[3] = 0;
  puVar4[2] = &::_rdata;
  *(undefined1 *)(puVar4 + 4) = 0;
  *(undefined1 *)(puVar4 + 9) = 0x2e;
  *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x49) = 0x2c;
  puVar2 = __num_base::_S_atoms_out;
  lVar3 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 0x4a + lVar3) = puVar2[lVar3];
    puVar1 = __num_base::_S_atoms_in;
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0x24);
  lVar3 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 0x6e + lVar3) = puVar1[lVar3];
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0x1a);
  lVar3 = *(longlong *)(param_1 + 0x10);
  *(undefined **)(lVar3 + 0x28) = &DAT_1400c4d01;
  *(undefined8 *)(lVar3 + 0x30) = 4;
  *(char **)(lVar3 + 0x38) = "false";
  *(undefined8 *)(lVar3 + 0x40) = 5;
  return;
}



// std::__cxx11::numpunct<char>::numpunct(std::__numpunct_cache<char>*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<char>::numpunct(int*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<char>::numpunct(unsigned long long)

void __thiscall std::__cxx11::numpunct<char>::numpunct(numpunct<char> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<char>::numpunct(std::__numpunct_cache<char>*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<char>::numpunct(int*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<char>::numpunct(unsigned long long)

void __thiscall std::__cxx11::numpunct<char>::numpunct(numpunct<char> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<char>::~numpunct()

void __thiscall std::__cxx11::numpunct<char>::~numpunct(numpunct<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::numpunct<char>::~numpunct()

void __thiscall std::__cxx11::numpunct<char>::~numpunct(numpunct<char> *this)

{
  *(undefined ***)this = &PTR__numpunct_1400dcd20;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  return;
}



// std::__cxx11::numpunct<wchar_t>::_M_initialize_numpunct(int*)

void std::__cxx11::numpunct<wchar_t>::_M_initialize_numpunct(longlong param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined8 *puVar3;
  longlong lVar4;
  
  puVar3 = *(undefined8 **)(param_1 + 0x10);
  if (puVar3 == (undefined8 *)0x0) {
    puVar3 = operator_new(0xd0);
    *(undefined4 *)(puVar3 + 1) = 0;
    puVar3[2] = 0;
    *puVar3 = &PTR____numpunct_cache_1400ddb80;
    puVar3[3] = 0;
    *(undefined1 *)(puVar3 + 4) = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[8] = 0;
    *(undefined4 *)(puVar3 + 9) = 0;
    *(undefined1 *)(puVar3 + 0x19) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar3;
  }
  *(undefined1 *)(puVar3 + 4) = 0;
  puVar3[2] = &::_rdata;
  puVar3[3] = 0;
  puVar2 = __num_base::_S_atoms_out;
  lVar4 = 0;
  *(undefined4 *)(puVar3 + 9) = 0x2c002e;
  do {
    *(short *)((longlong)puVar3 + lVar4 * 2 + 0x4c) = (short)(char)puVar2[lVar4];
    puVar1 = __num_base::_S_atoms_in;
    lVar4 = lVar4 + 1;
  } while (lVar4 != 0x24);
  lVar4 = 0;
  do {
    *(short *)((longlong)puVar3 + lVar4 * 2 + 0x94) = (short)(char)puVar1[lVar4];
    lVar4 = lVar4 + 1;
  } while (lVar4 != 0x1a);
  puVar3[6] = 4;
  puVar3[5] = L"true";
  puVar3[7] = L"false";
  puVar3[8] = 5;
  return;
}



// std::__cxx11::numpunct<wchar_t>::numpunct(std::__numpunct_cache<wchar_t>*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<wchar_t>::numpunct
          (numpunct<wchar_t> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::numpunct(int*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<wchar_t>::numpunct
          (numpunct<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::numpunct(unsigned long long)

void __thiscall std::__cxx11::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::numpunct(std::__numpunct_cache<wchar_t>*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<wchar_t>::numpunct
          (numpunct<wchar_t> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::numpunct(int*, unsigned long long)

void __thiscall
std::__cxx11::numpunct<wchar_t>::numpunct
          (numpunct<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::numpunct(unsigned long long)

void __thiscall std::__cxx11::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::~numpunct()

void __thiscall std::__cxx11::numpunct<wchar_t>::~numpunct(numpunct<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::numpunct<wchar_t>::~numpunct()

void __thiscall std::__cxx11::numpunct<wchar_t>::~numpunct(numpunct<wchar_t> *this)

{
  *(undefined ***)this = &PTR__numpunct_1400dcd70;
  if (*(longlong **)(this + 0x10) != (longlong *)0x0) {
    (**(code **)(**(longlong **)(this + 0x10) + 8))();
  }
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get(unsigned long long)

void __thiscall std::__cxx11::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  return;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::time_get(unsigned long long)

void __thiscall std::__cxx11::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  return;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get()

void __thiscall std::__cxx11::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get()

void __thiscall std::__cxx11::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~time_get()

void __thiscall std::__cxx11::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dcdc0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get(unsigned long long)

void __thiscall std::__cxx11::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400dce20;
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get(unsigned long long)

void __thiscall std::__cxx11::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400dce20;
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get()

void __thiscall std::__cxx11::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dce20;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get()

void __thiscall std::__cxx11::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dce20;
  locale::facet::~facet();
  return;
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get()

void __thiscall std::__cxx11::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dce20;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::money_get(unsigned long long)

void __thiscall std::__cxx11::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dce80;
  return;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::money_get(unsigned long long)

void __thiscall std::__cxx11::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dce80;
  return;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~money_get()

void __thiscall std::__cxx11::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dce80;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~money_get()

void __thiscall std::__cxx11::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dce80;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::~money_get()

void __thiscall std::__cxx11::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dce80;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_get(unsigned long long)

void __thiscall std::__cxx11::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dceb0;
  return;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_get(unsigned long long)

void __thiscall std::__cxx11::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dceb0;
  return;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_get()

void __thiscall std::__cxx11::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dceb0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_get()

void __thiscall std::__cxx11::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dceb0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_get()

void __thiscall std::__cxx11::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dceb0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::money_put(unsigned long long)

void __thiscall std::__cxx11::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dcee0;
  return;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::money_put(unsigned long long)

void __thiscall std::__cxx11::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dcee0;
  return;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::~money_put()

void __thiscall std::__cxx11::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dcee0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::~money_put()

void __thiscall std::__cxx11::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dcee0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::~money_put()

void __thiscall std::__cxx11::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dcee0;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_put(unsigned long long)

void __thiscall std::__cxx11::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dcf10;
  return;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_put(unsigned long long)

void __thiscall std::__cxx11::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dcf10;
  return;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_put()

void __thiscall std::__cxx11::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dcf10;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_put()

void __thiscall std::__cxx11::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dcf10;
  locale::facet::~facet();
  return;
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_put()

void __thiscall std::__cxx11::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dcf10;
  locale::facet::~facet();
  return;
}



// std::codecvt<char32_t, char8_t, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de220;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::codecvt<char32_t, char8_t, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de220;
  locale::facet::~facet();
  return;
}



// std::codecvt<char32_t, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::codecvt<char32_t, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de280;
  locale::facet::~facet();
  return;
}



// std::codecvt<char16_t, char8_t, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de2e0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::codecvt<char16_t, char8_t, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de2e0;
  locale::facet::~facet();
  return;
}



// std::codecvt<char16_t, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::codecvt<char16_t, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined **)this = &DAT_1400de340;
  locale::facet::~facet();
  return;
}



// std::codecvt<char, char, int>::codecvt(int*, unsigned long long)

void __thiscall std::codecvt<>::codecvt(codecvt<> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__codecvt_1400de7e0;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::codecvt<char, char, int>::codecvt(unsigned long long)

void __thiscall std::codecvt<>::codecvt(codecvt<> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__codecvt_1400de7e0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::codecvt<char, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined ***)this = &PTR__codecvt_1400de7e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de3a0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::codecvt<char, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined ***)this = &PTR__codecvt_1400de7e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de3a0;
  locale::facet::~facet();
  return;
}



// std::codecvt<wchar_t, char, int>::codecvt(int*, unsigned long long)

void __thiscall std::codecvt<>::codecvt(codecvt<> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__codecvt_1400de840;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::codecvt<wchar_t, char, int>::codecvt(unsigned long long)

void __thiscall std::codecvt<>::codecvt(codecvt<> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__codecvt_1400de840;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::codecvt<wchar_t, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined ***)this = &PTR__codecvt_1400de840;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de400;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::codecvt<wchar_t, char, int>::~codecvt()

void __thiscall std::codecvt<>::~codecvt(codecvt<> *this)

{
  *(undefined ***)this = &PTR__codecvt_1400de840;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  *(undefined **)this = &DAT_1400de400;
  locale::facet::~facet();
  return;
}



// std::collate<char>::collate(int*, unsigned long long)

void __thiscall
std::collate<char>::collate(collate<char> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::collate<char>::collate(unsigned long long)

void __thiscall std::collate<char>::collate(collate<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::collate<char>::collate(int*, unsigned long long)

void __thiscall
std::collate<char>::collate(collate<char> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::collate<char>::collate(unsigned long long)

void __thiscall std::collate<char>::collate(collate<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400de8a0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::collate<char>::~collate()

void __thiscall std::collate<char>::~collate(collate<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8a0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::collate<char>::~collate()

void __thiscall std::collate<char>::~collate(collate<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8a0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::collate<char>::~collate()

void __thiscall std::collate<char>::~collate(collate<char> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8a0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::collate<wchar_t>::collate(int*, unsigned long long)

void __thiscall
std::collate<wchar_t>::collate(collate<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::collate<wchar_t>::collate(unsigned long long)

void __thiscall std::collate<wchar_t>::collate(collate<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::collate<wchar_t>::collate(int*, unsigned long long)

void __thiscall
std::collate<wchar_t>::collate(collate<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  undefined8 uVar1;
  
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  uVar1 = locale::facet::_S_clone_c_locale();
  *(undefined8 *)(this + 0x10) = uVar1;
  return;
}



// std::collate<wchar_t>::collate(unsigned long long)

void __thiscall std::collate<wchar_t>::collate(collate<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__collate_1400de8e0;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::collate<wchar_t>::~collate()

void __thiscall std::collate<wchar_t>::~collate(collate<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::collate<wchar_t>::~collate()

void __thiscall std::collate<wchar_t>::~collate(collate<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::collate<wchar_t>::~collate()

void __thiscall std::collate<wchar_t>::~collate(collate<wchar_t> *this)

{
  *(undefined ***)this = &PTR__collate_1400de8e0;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::num_get(unsigned
// long long)

void __thiscall std::num_get<>::num_get(num_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_get_1400de920;
  return;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::num_get(unsigned
// long long)

void __thiscall std::num_get<>::num_get(num_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_get_1400de920;
  return;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~num_get()

void __thiscall std::num_get<>::~num_get(num_get<> *this)

{
  *(undefined ***)this = &PTR__num_get_1400de920;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~num_get()

void __thiscall std::num_get<>::~num_get(num_get<> *this)

{
  *(undefined ***)this = &PTR__num_get_1400de920;
  locale::facet::~facet();
  return;
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~num_get()

void __thiscall std::num_get<>::~num_get(num_get<> *this)

{
  *(undefined ***)this = &PTR__num_get_1400de920;
  locale::facet::~facet();
  return;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::num_get(unsigned long long)

void __thiscall std::num_get<>::num_get(num_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_get_1400de9a0;
  return;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::num_get(unsigned long long)

void __thiscall std::num_get<>::num_get(num_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_get_1400de9a0;
  return;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::~num_get()

void __thiscall std::num_get<>::~num_get(num_get<> *this)

{
  *(undefined ***)this = &PTR__num_get_1400de9a0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::~num_get()

void __thiscall std::num_get<>::~num_get(num_get<> *this)

{
  *(undefined ***)this = &PTR__num_get_1400de9a0;
  locale::facet::~facet();
  return;
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::~num_get()

void __thiscall std::num_get<>::~num_get(num_get<> *this)

{
  *(undefined ***)this = &PTR__num_get_1400de9a0;
  locale::facet::~facet();
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::num_put(unsigned
// long long)

void __thiscall std::num_put<>::num_put(num_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_put_1400dea20;
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::num_put(unsigned
// long long)

void __thiscall std::num_put<>::num_put(num_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_put_1400dea20;
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~num_put()

void __thiscall std::num_put<>::~num_put(num_put<> *this)

{
  *(undefined ***)this = &PTR__num_put_1400dea20;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~num_put()

void __thiscall std::num_put<>::~num_put(num_put<> *this)

{
  *(undefined ***)this = &PTR__num_put_1400dea20;
  locale::facet::~facet();
  return;
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~num_put()

void __thiscall std::num_put<>::~num_put(num_put<> *this)

{
  *(undefined ***)this = &PTR__num_put_1400dea20;
  locale::facet::~facet();
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::num_put(unsigned long long)

void __thiscall std::num_put<>::num_put(num_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_put_1400dea80;
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::num_put(unsigned long long)

void __thiscall std::num_put<>::num_put(num_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__num_put_1400dea80;
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::~num_put()

void __thiscall std::num_put<>::~num_put(num_put<> *this)

{
  *(undefined ***)this = &PTR__num_put_1400dea80;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::~num_put()

void __thiscall std::num_put<>::~num_put(num_put<> *this)

{
  *(undefined ***)this = &PTR__num_put_1400dea80;
  locale::facet::~facet();
  return;
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >::~num_put()

void __thiscall std::num_put<>::~num_put(num_put<> *this)

{
  *(undefined ***)this = &PTR__num_put_1400dea80;
  locale::facet::~facet();
  return;
}



// std::bad_cast::~bad_cast()

void __thiscall std::bad_cast::~bad_cast(bad_cast *this)

{
  *(undefined ***)this = &PTR__bad_cast_1400deae0;
  exception::~exception();
  operator_delete(this);
  return;
}



// std::bad_cast::~bad_cast()

void __thiscall std::bad_cast::~bad_cast(bad_cast *this)

{
  *(undefined ***)this = &PTR__bad_cast_1400deae0;
  exception::~exception();
  return;
}



// std::ios_base::_M_grow_words(int, bool)

ios_base * __thiscall std::ios_base::_M_grow_words(ios_base *this,uint param_1,char param_2)

{
  uint uVar1;
  int iVar2;
  ios_base *piVar3;
  ios_base *piVar4;
  ios_base *piVar5;
  longlong lVar6;
  char *pcVar7;
  int iVar8;
  
  if (0x7ffffffe < param_1) {
    pcVar7 = "ios_base::_M_grow_words is not valid";
LAB_1400b3d37:
    uVar1 = *(uint *)(this + 0x20);
    *(uint *)(this + 0x20) = uVar1 | 1;
    if (((uVar1 | 1) & *(uint *)(this + 0x1c)) != 0) {
                    // WARNING: Subroutine does not return
      __throw_ios_failure((string *)pcVar7);
    }
    if (param_2 == '\0') {
      *(undefined8 *)(this + 0x30) = 0;
    }
    else {
      *(undefined4 *)(this + 0x38) = 0;
    }
    return this + 0x30;
  }
  iVar8 = 8;
  piVar3 = this + 0x40;
  if (7 < (int)param_1) {
    iVar8 = param_1 + 1;
    piVar3 = operator_new__((longlong)iVar8 * 0x10);
    if (piVar3 == (ios_base *)0x0) {
      pcVar7 = "ios_base::_M_grow_words allocation failed";
      goto LAB_1400b3d37;
    }
    piVar4 = piVar3;
    do {
      *(undefined8 *)piVar4 = 0;
      piVar5 = piVar4 + 0x10;
      *(undefined4 *)(piVar4 + 8) = 0;
      piVar4 = piVar5;
    } while (piVar3 + (longlong)iVar8 * 0x10 != piVar5);
    iVar2 = *(int *)(this + 0xc0);
    piVar4 = *(ios_base **)(this + 200);
    lVar6 = 0;
    if (0 < iVar2) {
      do {
        *(undefined8 *)(piVar3 + lVar6) = *(undefined8 *)(piVar4 + lVar6);
        *(undefined4 *)(piVar3 + lVar6 + 8) = *(undefined4 *)(piVar4 + lVar6 + 8);
        lVar6 = lVar6 + 0x10;
      } while (lVar6 != (longlong)iVar2 * 0x10);
    }
    if ((piVar4 != (ios_base *)0x0) && (this + 0x40 != piVar4)) {
      operator_delete__(piVar4);
    }
  }
  *(ios_base **)(this + 200) = piVar3;
  *(int *)(this + 0xc0) = iVar8;
  return piVar3 + (longlong)(int)param_1 * 0x10;
}



// std::ios_base::_M_call_callbacks(std::ios_base::event)

void __thiscall std::ios_base::_M_call_callbacks(ios_base *this,undefined4 param_1)

{
  undefined8 *puVar1;
  
  for (puVar1 = *(undefined8 **)(this + 0x28); puVar1 != (undefined8 *)0x0;
      puVar1 = (undefined8 *)*puVar1) {
    (*(code *)puVar1[1])(param_1,this,*(undefined4 *)(puVar1 + 2));
  }
  return;
}



// std::ios_base::register_callback(void (*)(std::ios_base::event, std::ios_base&, int), int)

void __thiscall
std::ios_base::register_callback(ios_base *this,undefined8 param_1,undefined4 param_2)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  
  puVar2 = operator_new(0x18);
  uVar1 = *(undefined8 *)(this + 0x28);
  puVar2[1] = param_1;
  *puVar2 = uVar1;
  *(undefined4 *)(puVar2 + 2) = param_2;
  *(undefined4 *)((longlong)puVar2 + 0x14) = 0;
  *(undefined8 **)(this + 0x28) = puVar2;
  return;
}



// std::ios_base::_M_dispose_callbacks()

void __thiscall std::ios_base::_M_dispose_callbacks(ios_base *this)

{
  int *piVar1;
  int iVar2;
  undefined8 *puVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(this + 0x28);
  while (puVar4 != (undefined8 *)0x0) {
    if (_CRT_MT == 0) {
      iVar2 = *(int *)((longlong)puVar4 + 0x14);
      *(int *)((longlong)puVar4 + 0x14) = iVar2 + -1;
    }
    else {
      LOCK();
      piVar1 = (int *)((longlong)puVar4 + 0x14);
      iVar2 = *piVar1;
      *piVar1 = *piVar1 + -1;
      UNLOCK();
    }
    if (iVar2 != 0) break;
    puVar3 = (undefined8 *)*puVar4;
    operator_delete(puVar4);
    puVar4 = puVar3;
  }
  *(undefined8 *)(this + 0x28) = 0;
  return;
}



// std::ios_base::imbue(std::locale const&)

locale * std::ios_base::imbue(locale *param_1,ios_base *param_2,undefined8 *param_3)

{
  locale::locale(param_1,(undefined8 *)(param_2 + 0xd0));
  locale::operator=((locale *)(param_2 + 0xd0),param_3);
  _M_call_callbacks(param_2,1);
  return param_1;
}



// std::ios_base::xalloc()

int std::ios_base::xalloc(void)

{
  int iVar1;
  
  iVar1 = _data__ZZNSt8ios_base6xallocEvE6_S_top;
  if (_CRT_MT == 0) {
    iVar1 = _data__ZZNSt8ios_base6xallocEvE6_S_top + 4;
    _data__ZZNSt8ios_base6xallocEvE6_S_top = _data__ZZNSt8ios_base6xallocEvE6_S_top + 1;
    return iVar1;
  }
  LOCK();
  _data__ZZNSt8ios_base6xallocEvE6_S_top = _data__ZZNSt8ios_base6xallocEvE6_S_top + 1;
  UNLOCK();
  return iVar1 + 4;
}



// std::ios_base::_M_init()

void __thiscall std::ios_base::_M_init(ios_base *this)

{
  locale local_20 [16];
  
  *(undefined4 *)(this + 0x18) = 0x1002;
  *(undefined8 *)(this + 8) = 6;
  *(undefined8 *)(this + 0x10) = 0;
  locale::locale(local_20);
  locale::operator=((locale *)(this + 0xd0),(undefined8 *)local_20);
  locale::~locale(local_20);
  return;
}



// std::ios_base::_M_move(std::ios_base&)

void __thiscall std::ios_base::_M_move(ios_base *this,longlong param_1)

{
  undefined4 uVar1;
  undefined8 uVar2;
  ios_base *piVar3;
  undefined8 uVar4;
  longlong lVar5;
  longlong lVar6;
  undefined8 *puVar7;
  undefined4 local_20;
  
  uVar2 = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(this + 0x10) = uVar2;
  *(undefined8 *)(this + 0x18) = *(undefined8 *)(param_1 + 0x18);
  *(undefined4 *)(this + 0x20) = *(undefined4 *)(param_1 + 0x20);
  uVar2 = *(undefined8 *)(param_1 + 0x28);
  *(undefined8 *)(param_1 + 0x28) = 0;
  *(undefined8 *)(this + 0x28) = uVar2;
  piVar3 = *(ios_base **)(this + 200);
  if ((piVar3 != (ios_base *)0x0) && (piVar3 != this + 0x40)) {
    operator_delete__(piVar3);
  }
  lVar6 = *(longlong *)(param_1 + 200);
  if (lVar6 == param_1 + 0x40) {
    *(ios_base **)(this + 200) = this + 0x40;
    lVar6 = 0;
    *(undefined4 *)(this + 0xc0) = 8;
    do {
      puVar7 = (undefined8 *)(*(longlong *)(param_1 + 200) + lVar6);
      uVar2 = *puVar7;
      uVar4 = puVar7[1];
      *puVar7 = 0;
      *(undefined4 *)(puVar7 + 1) = 0;
      lVar5 = *(longlong *)(this + 200);
      *(undefined8 *)(lVar5 + lVar6) = uVar2;
      local_20 = (undefined4)uVar4;
      *(undefined4 *)(lVar5 + 8 + lVar6) = local_20;
      lVar6 = lVar6 + 0x10;
    } while (lVar6 != 0x80);
  }
  else {
    *(longlong *)(param_1 + 200) = param_1 + 0x40;
    *(longlong *)(this + 200) = lVar6;
    uVar1 = *(undefined4 *)(param_1 + 0xc0);
    *(undefined4 *)(param_1 + 0xc0) = 8;
    *(undefined4 *)(this + 0xc0) = uVar1;
  }
  locale::operator=((locale *)(this + 0xd0),(undefined8 *)(param_1 + 0xd0));
  return;
}



// std::ios_base::_M_swap(std::ios_base&)

void __thiscall std::ios_base::_M_swap(ios_base *this,ios_base *param_1)

{
  ios_base *piVar1;
  undefined4 uVar2;
  undefined8 uVar3;
  ios_base *piVar4;
  undefined8 uVar5;
  longlong lVar6;
  ios_base *piVar7;
  ios_base *piVar8;
  ios_base *piVar9;
  undefined4 local_30;
  locale local_20 [8];
  
  uVar3 = *(undefined8 *)(this + 8);
  piVar9 = this + 0x40;
  piVar1 = param_1 + 0x40;
  *(undefined8 *)(this + 8) = *(undefined8 *)(param_1 + 8);
  *(undefined8 *)(param_1 + 8) = uVar3;
  uVar3 = *(undefined8 *)(this + 0x10);
  *(undefined8 *)(this + 0x10) = *(undefined8 *)(param_1 + 0x10);
  *(undefined8 *)(param_1 + 0x10) = uVar3;
  uVar2 = *(undefined4 *)(this + 0x18);
  *(undefined4 *)(this + 0x18) = *(undefined4 *)(param_1 + 0x18);
  *(undefined4 *)(param_1 + 0x18) = uVar2;
  uVar2 = *(undefined4 *)(this + 0x1c);
  *(undefined4 *)(this + 0x1c) = *(undefined4 *)(param_1 + 0x1c);
  *(undefined4 *)(param_1 + 0x1c) = uVar2;
  uVar2 = *(undefined4 *)(this + 0x20);
  *(undefined4 *)(this + 0x20) = *(undefined4 *)(param_1 + 0x20);
  *(undefined4 *)(param_1 + 0x20) = uVar2;
  uVar3 = *(undefined8 *)(this + 0x28);
  *(undefined8 *)(this + 0x28) = *(undefined8 *)(param_1 + 0x28);
  piVar7 = *(ios_base **)(param_1 + 200);
  *(undefined8 *)(param_1 + 0x28) = uVar3;
  piVar4 = *(ios_base **)(this + 200);
  if (piVar4 == piVar9) {
    if (piVar7 == piVar1) {
      lVar6 = 0x40;
      do {
        uVar3 = *(undefined8 *)(this + lVar6);
        uVar5 = *(undefined8 *)(this + lVar6 + 8);
        *(undefined8 *)(this + lVar6) = *(undefined8 *)(param_1 + lVar6);
        *(undefined4 *)(this + lVar6 + 8) = *(undefined4 *)(param_1 + lVar6 + 8);
        *(undefined8 *)(param_1 + lVar6) = uVar3;
        local_30 = (undefined4)uVar5;
        *(undefined4 *)(param_1 + lVar6 + 8) = local_30;
        lVar6 = lVar6 + 0x10;
      } while (lVar6 != 0xc0);
      goto LAB_1400b424d;
    }
    if (piVar4 != piVar9) goto LAB_1400b4220;
LAB_1400b41cd:
    piVar7 = this;
    piVar8 = param_1;
    if (piVar4 == piVar9) {
      piVar7 = param_1;
      piVar8 = this;
      piVar9 = piVar1;
    }
    lVar6 = 0x40;
    do {
      *(undefined8 *)(piVar7 + lVar6) = *(undefined8 *)(piVar8 + lVar6);
      *(undefined4 *)(piVar7 + lVar6 + 8) = *(undefined4 *)(piVar8 + lVar6 + 8);
      lVar6 = lVar6 + 0x10;
    } while (lVar6 != 0xc0);
    *(undefined8 *)(piVar8 + 200) = *(undefined8 *)(piVar7 + 200);
    *(ios_base **)(piVar7 + 200) = piVar9;
  }
  else {
LAB_1400b4220:
    if (piVar7 == piVar1) goto LAB_1400b41cd;
    *(ios_base **)(this + 200) = piVar7;
    *(ios_base **)(param_1 + 200) = piVar4;
  }
  uVar2 = *(undefined4 *)(this + 0xc0);
  *(undefined4 *)(this + 0xc0) = *(undefined4 *)(param_1 + 0xc0);
  *(undefined4 *)(param_1 + 0xc0) = uVar2;
LAB_1400b424d:
  locale::locale(local_20,(undefined8 *)(this + 0xd0));
  locale::operator=((locale *)(this + 0xd0),(undefined8 *)(param_1 + 0xd0));
  locale::operator=((locale *)(param_1 + 0xd0),(undefined8 *)local_20);
  locale::~locale(local_20);
  return;
}



// std::ios_base::failure[abi:cxx11]::failure(char const*, std::error_code const&)

void __thiscall
std::ios_base::failure[abi:cxx11]::failure
          (failure_abi_cxx11_ *this,string *param_1,undefined8 *param_2)

{
  undefined8 local_18;
  undefined8 uStack_10;
  
  local_18 = *param_2;
  uStack_10 = param_2[1];
  system_error::system_error((system_error *)this,&local_18,param_1);
  *(undefined ***)this = &PTR__failure_1400dcf40;
  return;
}



// std::ios_base::failure[abi:cxx11]::failure(std::__cxx11::string const&)

void __thiscall
std::ios_base::failure[abi:cxx11]::failure(failure_abi_cxx11_ *this,undefined8 *param_1)

{
  ulonglong local_28;
  undefined **local_20;
  
  local_20 = iostream_category();
  local_28 = 1;
  system_error::system_error((system_error *)this,&local_28,param_1);
  *(undefined ***)this = &PTR__failure_1400dcf40;
  return;
}



// std::ios_base::failure[abi:cxx11]::failure(std::__cxx11::string const&, std::error_code const&)

void __thiscall
std::ios_base::failure[abi:cxx11]::failure
          (failure_abi_cxx11_ *this,undefined8 *param_1,ulonglong *param_2)

{
  ulonglong local_18;
  ulonglong uStack_10;
  
  local_18 = *param_2;
  uStack_10 = param_2[1];
  system_error::system_error((system_error *)this,&local_18,param_1);
  *(undefined ***)this = &PTR__failure_1400dcf40;
  return;
}



// std::ios_base::failure[abi:cxx11]::~failure()

void __thiscall std::ios_base::failure[abi:cxx11]::~failure(failure_abi_cxx11_ *this)

{
  *(undefined ***)this = &PTR__failure_1400dcf40;
  system_error::~system_error((system_error *)this);
  operator_delete(this);
  return;
}



// std::ios_base::failure[abi:cxx11]::~failure()

void __thiscall std::ios_base::failure[abi:cxx11]::~failure(failure_abi_cxx11_ *this)

{
  *(undefined ***)this = &PTR__failure_1400dcf40;
  system_error::~system_error((system_error *)this);
  return;
}



// std::ios_base::failure::failure(std::string const&)

void __thiscall std::ios_base::failure::failure(failure *this,longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  undefined1 local_19;
  
  *(undefined ***)this = &PTR__failure_1400dcf70;
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    plVar2 = std::string::_Rep::_M_clone((_Rep *)(lVar1 + -0x18),&local_19,0);
    *(longlong **)(this + 8) = plVar2;
    return;
  }
  if (_CRT_MT == 0) {
    *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
    *(longlong *)(this + 8) = lVar1;
    return;
  }
  LOCK();
  *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1;
  UNLOCK();
  *(longlong *)(this + 8) = lVar1;
  return;
}



// std::ios_base::failure::~failure()

void __thiscall std::ios_base::failure::~failure(failure *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__failure_1400dcf70;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (iVar2 < 1) {
    std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  }
  exception::~exception();
  operator_delete(this);
  return;
}



// std::ios_base::failure::~failure()

void __thiscall std::ios_base::failure::~failure(failure *this)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  *(undefined ***)this = &PTR__failure_1400dcf70;
  lVar3 = *(longlong *)(this + 8);
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  std::string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::ios_base::ios_base()

void __thiscall std::ios_base::ios_base(ios_base *this)

{
  ios_base *piVar1;
  ios_base *piVar2;
  
  *(undefined ***)this = &PTR__ios_base_1400deb10;
  *(undefined8 *)(this + 0x18) = 0;
  *(undefined4 *)(this + 0x20) = 0;
  *(undefined4 *)(this + 0x38) = 0;
  *(undefined1 (*) [16])(this + 8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0x28) = (undefined1  [16])0x0;
  piVar1 = this + 0x40;
  do {
    *(undefined8 *)piVar1 = 0;
    piVar2 = piVar1 + 0x10;
    *(undefined4 *)(piVar1 + 8) = 0;
    piVar1 = piVar2;
  } while (piVar2 != this + 0xc0);
  *(ios_base **)(this + 200) = this + 0x40;
  *(undefined4 *)(this + 0xc0) = 8;
  locale::locale((locale *)(this + 0xd0));
  return;
}



// std::ios_base::~ios_base()

void __thiscall std::ios_base::~ios_base(ios_base *this)

{
  ios_base *piVar1;
  
  *(undefined ***)this = &PTR__ios_base_1400deb10;
  _M_call_callbacks(this,0);
  _M_dispose_callbacks(this);
  piVar1 = *(ios_base **)(this + 200);
  if (piVar1 != this + 0x40) {
    if (piVar1 != (ios_base *)0x0) {
      operator_delete__(piVar1);
    }
    *(undefined8 *)(this + 200) = 0;
  }
  locale::~locale((locale *)(this + 0xd0));
  operator_delete(this);
  return;
}



// std::ios_base::~ios_base()

void __thiscall std::ios_base::~ios_base(ios_base *this)

{
  ios_base *piVar1;
  
  *(undefined ***)this = &PTR__ios_base_1400deb10;
  _M_call_callbacks(this,0);
  _M_dispose_callbacks(this);
  piVar1 = *(ios_base **)(this + 200);
  if (piVar1 != this + 0x40) {
    if (piVar1 != (ios_base *)0x0) {
      operator_delete__(piVar1);
    }
    *(undefined8 *)(this + 200) = 0;
  }
  locale::~locale((locale *)(this + 0xd0));
  return;
}



// std::messages<char>::messages(int*, char const*, unsigned long long)

void __thiscall
std::messages<char>::messages
          (messages<char> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400deb30;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<char>::messages(unsigned long long)

void __thiscall std::messages<char>::messages(messages<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400deb30;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<char>::messages(int*, char const*, unsigned long long)

void __thiscall
std::messages<char>::messages
          (messages<char> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400deb30;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<char>::messages(unsigned long long)

void __thiscall std::messages<char>::messages(messages<char> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400deb30;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<char>::~messages()

void __thiscall std::messages<char>::~messages(messages<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb30;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::messages<char>::~messages()

void __thiscall std::messages<char>::~messages(messages<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb30;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::messages<char>::~messages()

void __thiscall std::messages<char>::~messages(messages<char> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb30;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::messages<wchar_t>::messages(int*, char const*, unsigned long long)

void __thiscall
std::messages<wchar_t>::messages
          (messages<wchar_t> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400deb70;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<wchar_t>::messages(unsigned long long)

void __thiscall std::messages<wchar_t>::messages(messages<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400deb70;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<wchar_t>::messages(int*, char const*, unsigned long long)

void __thiscall
std::messages<wchar_t>::messages
          (messages<wchar_t> *this,undefined8 param_1,undefined8 param_3_00,longlong param_3)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_3 != 0);
  *(undefined ***)this = &PTR__messages_1400deb70;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<wchar_t>::messages(unsigned long long)

void __thiscall std::messages<wchar_t>::messages(messages<wchar_t> *this,longlong param_1)

{
  longlong lVar1;
  
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__messages_1400deb70;
  lVar1 = locale::facet::_S_get_c_locale();
  *(longlong *)(this + 0x10) = lVar1;
  return;
}



// std::messages<wchar_t>::~messages()

void __thiscall std::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb70;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::messages<wchar_t>::~messages()

void __thiscall std::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb70;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::messages<wchar_t>::~messages()

void __thiscall std::messages<wchar_t>::~messages(messages<wchar_t> *this)

{
  *(undefined ***)this = &PTR__messages_1400deb70;
  locale::facet::_S_destroy_c_locale((undefined8 *)(this + 0x10));
  locale::facet::~facet();
  return;
}



// std::numpunct<char>::_M_initialize_numpunct(int*)

void std::numpunct<char>::_M_initialize_numpunct(longlong param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  longlong lVar3;
  undefined8 *puVar4;
  
  puVar4 = *(undefined8 **)(param_1 + 0x10);
  if (puVar4 == (undefined8 *)0x0) {
    puVar4 = operator_new(0x90);
    *puVar4 = &PTR____numpunct_cache_1400ddb60;
    *(undefined4 *)(puVar4 + 1) = 0;
    puVar4[2] = 0;
    puVar4[3] = 0;
    *(undefined1 *)(puVar4 + 4) = 0;
    puVar4[5] = 0;
    puVar4[6] = 0;
    puVar4[7] = 0;
    puVar4[8] = 0;
    *(undefined2 *)(puVar4 + 9) = 0;
    *(undefined1 *)(puVar4 + 0x11) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar4;
  }
  puVar4[3] = 0;
  puVar4[2] = &::_rdata;
  *(undefined1 *)(puVar4 + 4) = 0;
  *(undefined1 *)(puVar4 + 9) = 0x2e;
  *(undefined1 *)(*(longlong *)(param_1 + 0x10) + 0x49) = 0x2c;
  puVar2 = __num_base::_S_atoms_out;
  lVar3 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 0x4a + lVar3) = puVar2[lVar3];
    puVar1 = __num_base::_S_atoms_in;
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0x24);
  lVar3 = 0;
  do {
    *(undefined *)(*(longlong *)(param_1 + 0x10) + 0x6e + lVar3) = puVar1[lVar3];
    lVar3 = lVar3 + 1;
  } while (lVar3 != 0x1a);
  lVar3 = *(longlong *)(param_1 + 0x10);
  *(undefined **)(lVar3 + 0x28) = &DAT_1400c4d31;
  *(undefined8 *)(lVar3 + 0x30) = 4;
  *(char **)(lVar3 + 0x38) = "false";
  *(undefined8 *)(lVar3 + 0x40) = 5;
  return;
}



// std::numpunct<char>::numpunct(std::__numpunct_cache<char>*, unsigned long long)

void __thiscall
std::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<char>::numpunct(int*, unsigned long long)

void __thiscall
std::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<char>::numpunct(unsigned long long)

void __thiscall std::numpunct<char>::numpunct(numpunct<char> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<char>::numpunct(std::__numpunct_cache<char>*, unsigned long long)

void __thiscall
std::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<char>::numpunct(int*, unsigned long long)

void __thiscall
std::numpunct<char>::numpunct(numpunct<char> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<char>::numpunct(unsigned long long)

void __thiscall std::numpunct<char>::numpunct(numpunct<char> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<char>::~numpunct()

void __thiscall std::numpunct<char>::~numpunct(numpunct<char> *this)

{
  ~numpunct(this);
  operator_delete(this);
  return;
}



// std::numpunct<char>::~numpunct()

void __thiscall std::numpunct<char>::~numpunct(numpunct<char> *this)

{
  __numpunct_cache<char> *this_00;
  
  this_00 = *(__numpunct_cache<char> **)(this + 0x10);
  *(undefined ***)this = &PTR__numpunct_1400debb0;
  if (this_00 != (__numpunct_cache<char> *)0x0) {
    if (*(code **)(*(longlong *)this_00 + 8) != __numpunct_cache<char>::~__numpunct_cache) {
      (**(code **)(*(longlong *)this_00 + 8))();
      locale::facet::~facet();
      return;
    }
    __numpunct_cache<char>::~__numpunct_cache(this_00);
    operator_delete(this_00);
  }
  locale::facet::~facet();
  return;
}



// std::numpunct<wchar_t>::_M_initialize_numpunct(int*)

void std::numpunct<wchar_t>::_M_initialize_numpunct(longlong param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined8 *puVar3;
  longlong lVar4;
  
  puVar3 = *(undefined8 **)(param_1 + 0x10);
  if (puVar3 == (undefined8 *)0x0) {
    puVar3 = operator_new(0xd0);
    *(undefined4 *)(puVar3 + 1) = 0;
    *puVar3 = &PTR____numpunct_cache_1400ddb80;
    puVar3[2] = 0;
    puVar3[3] = 0;
    *(undefined1 *)(puVar3 + 4) = 0;
    puVar3[5] = 0;
    puVar3[6] = 0;
    puVar3[7] = 0;
    puVar3[8] = 0;
    *(undefined4 *)(puVar3 + 9) = 0;
    *(undefined1 *)(puVar3 + 0x19) = 0;
    *(undefined8 **)(param_1 + 0x10) = puVar3;
  }
  *(undefined1 *)(puVar3 + 4) = 0;
  puVar3[2] = &::_rdata;
  puVar3[3] = 0;
  puVar2 = __num_base::_S_atoms_out;
  lVar4 = 0;
  *(undefined4 *)(puVar3 + 9) = 0x2c002e;
  do {
    *(short *)((longlong)puVar3 + lVar4 * 2 + 0x4c) = (short)(char)puVar2[lVar4];
    puVar1 = __num_base::_S_atoms_in;
    lVar4 = lVar4 + 1;
  } while (lVar4 != 0x24);
  lVar4 = 0;
  do {
    *(short *)((longlong)puVar3 + lVar4 * 2 + 0x94) = (short)(char)puVar1[lVar4];
    lVar4 = lVar4 + 1;
  } while (lVar4 != 0x1a);
  puVar3[6] = 4;
  puVar3[5] = L"true";
  puVar3[7] = L"false";
  puVar3[8] = 5;
  return;
}



// std::numpunct<wchar_t>::numpunct(std::__numpunct_cache<wchar_t>*, unsigned long long)

void __thiscall
std::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<wchar_t>::numpunct(int*, unsigned long long)

void __thiscall
std::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<wchar_t>::numpunct(unsigned long long)

void __thiscall std::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<wchar_t>::numpunct(std::__numpunct_cache<wchar_t>*, unsigned long long)

void __thiscall
std::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,undefined8 param_1,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = param_1;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<wchar_t>::numpunct(int*, unsigned long long)

void __thiscall
std::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,undefined8 param_2_00,longlong param_2)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_2 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<wchar_t>::numpunct(unsigned long long)

void __thiscall std::numpunct<wchar_t>::numpunct(numpunct<wchar_t> *this,longlong param_1)

{
  *(undefined8 *)(this + 0x10) = 0;
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  _M_initialize_numpunct((longlong)this);
  return;
}



// std::numpunct<wchar_t>::~numpunct()

void __thiscall std::numpunct<wchar_t>::~numpunct(numpunct<wchar_t> *this)

{
  ~numpunct(this);
  operator_delete(this);
  return;
}



// std::numpunct<wchar_t>::~numpunct()

void __thiscall std::numpunct<wchar_t>::~numpunct(numpunct<wchar_t> *this)

{
  __numpunct_cache<wchar_t> *this_00;
  
  this_00 = *(__numpunct_cache<wchar_t> **)(this + 0x10);
  *(undefined ***)this = &PTR__numpunct_1400dec00;
  if (this_00 != (__numpunct_cache<wchar_t> *)0x0) {
    if (*(code **)(*(longlong *)this_00 + 8) != __numpunct_cache<wchar_t>::~__numpunct_cache) {
      (**(code **)(*(longlong *)this_00 + 8))();
      locale::facet::~facet();
      return;
    }
    __numpunct_cache<wchar_t>::~__numpunct_cache(this_00);
    operator_delete(this_00);
  }
  locale::facet::~facet();
  return;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::time_get(unsigned
// long long)

void __thiscall std::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400dec50;
  return;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::time_get(unsigned
// long long)

void __thiscall std::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400dec50;
  return;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~time_get()

void __thiscall std::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dec50;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~time_get()

void __thiscall std::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dec50;
  locale::facet::~facet();
  return;
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~time_get()

void __thiscall std::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400dec50;
  locale::facet::~facet();
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get(unsigned long long)

void __thiscall std::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400deca0;
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_get(unsigned long long)

void __thiscall std::time_get<>::time_get(time_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_get_1400deca0;
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get()

void __thiscall std::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400deca0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get()

void __thiscall std::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400deca0;
  locale::facet::~facet();
  return;
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_get()

void __thiscall std::time_get<>::~time_get(time_get<> *this)

{
  *(undefined ***)this = &PTR__time_get_1400deca0;
  locale::facet::~facet();
  return;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::time_put(unsigned
// long long)

void __thiscall std::time_put<>::time_put(time_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_put_1400decf0;
  return;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::time_put(unsigned
// long long)

void __thiscall std::time_put<>::time_put(time_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_put_1400decf0;
  return;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~time_put()

void __thiscall std::time_put<>::~time_put(time_put<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400decf0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~time_put()

void __thiscall std::time_put<>::~time_put(time_put<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400decf0;
  locale::facet::~facet();
  return;
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~time_put()

void __thiscall std::time_put<>::~time_put(time_put<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400decf0;
  locale::facet::~facet();
  return;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put(unsigned long long)

void __thiscall std::time_put<>::time_put(time_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_put_1400ded20;
  return;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::time_put(unsigned long long)

void __thiscall std::time_put<>::time_put(time_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__time_put_1400ded20;
  return;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_put()

void __thiscall std::time_put<>::~time_put(time_put<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400ded20;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_put()

void __thiscall std::time_put<>::~time_put(time_put<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400ded20;
  locale::facet::~facet();
  return;
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~time_put()

void __thiscall std::time_put<>::~time_put(time_put<> *this)

{
  *(undefined ***)this = &PTR__time_put_1400ded20;
  locale::facet::~facet();
  return;
}



// std::bad_alloc::~bad_alloc()

void __thiscall std::bad_alloc::~bad_alloc(bad_alloc *this)

{
  *(undefined ***)this = &PTR__bad_alloc_1400ded50;
  exception::~exception();
  operator_delete(this);
  return;
}



// std::bad_alloc::~bad_alloc()

void __thiscall std::bad_alloc::~bad_alloc(bad_alloc *this)

{
  *(undefined ***)this = &PTR__bad_alloc_1400ded50;
  exception::~exception();
  return;
}



// std::ios::exceptions(std::_Ios_Iostate)

void __thiscall std::ios::exceptions(ios *this,uint param_1)

{
  uint uVar1;
  
  uVar1 = *(uint *)(this + 0x20);
  *(uint *)(this + 0x1c) = param_1;
  if (*(longlong *)(this + 0xe8) == 0) {
    uVar1 = uVar1 | 1;
    *(uint *)(this + 0x20) = uVar1;
  }
  if ((param_1 & uVar1) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::ios::_M_setstate(std::_Ios_Iostate)

void __thiscall std::ios::_M_setstate(ios *this,uint param_1)

{
  *(uint *)(this + 0x20) = *(uint *)(this + 0x20) | param_1;
  if ((param_1 & *(uint *)(this + 0x1c)) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_rethrow();
}



// std::ios::_M_cache_locale(std::locale const&)

void __thiscall std::ios::_M_cache_locale(ios *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&ctype<char>::id);
  *(undefined8 *)(this + 0xf0) = *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
  lVar1 = locale::id::_M_id((id *)&num_put<>::id);
  *(undefined8 *)(this + 0xf8) = *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
  lVar1 = locale::id::_M_id((id *)&num_get<>::id);
  *(undefined8 *)(this + 0x100) = *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
  return;
}



// std::ios::tie(std::ostream*)

undefined8 __thiscall std::ios::tie(ios *this,undefined8 param_1)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(this + 0xd8);
  *(undefined8 *)(this + 0xd8) = param_1;
  return uVar1;
}



// std::ios::fill(char)

ulonglong __thiscall std::ios::fill(ios *this,ios param_2)

{
  ios iVar1;
  ctype<char> *this_00;
  ulonglong uVar2;
  
  if (this[0xe1] != (ios)0x0) {
    iVar1 = this[0xe0];
    this[0xe0] = param_2;
    return (ulonglong)(byte)iVar1;
  }
  this_00 = *(ctype<char> **)(this + 0xf0);
  if (this_00 != (ctype<char> *)0x0) {
    if (this_00[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this_00);
      uVar2 = 0x20;
      if (*(code **)(*(longlong *)this_00 + 0x30) != ctype<char>::do_widen) {
        uVar2 = (**(code **)(*(longlong *)this_00 + 0x30))(this_00,0x20);
      }
    }
    else {
      uVar2 = (ulonglong)(byte)this_00[0x59];
    }
    this[0xe1] = (ios)0x1;
    this[0xe0] = param_2;
    return uVar2;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::ios::init(std::streambuf*)

void __thiscall std::ios::init(ios *this,longlong param_1)

{
  ios_base::_M_init((ios_base *)this);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined4 *)(this + 0x1c) = 0;
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  return;
}



// std::ios::move(std::ios&&)

void __thiscall std::ios::move(ios *this,longlong param_1)

{
  ios iVar1;
  undefined8 uVar2;
  
  ios_base::_M_move((ios_base *)this,param_1);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  uVar2 = *(undefined8 *)(param_1 + 0xd8);
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(this + 0xd8) = uVar2;
  this[0xe0] = *(ios *)(param_1 + 0xe0);
  iVar1 = *(ios *)(param_1 + 0xe1);
  *(undefined8 *)(this + 0xe8) = 0;
  this[0xe1] = iVar1;
  return;
}



// std::ios::move(std::ios&)

void __thiscall std::ios::move(ios *this,longlong param_1)

{
  ios iVar1;
  undefined8 uVar2;
  
  ios_base::_M_move((ios_base *)this,param_1);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  uVar2 = *(undefined8 *)(param_1 + 0xd8);
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(this + 0xd8) = uVar2;
  this[0xe0] = *(ios *)(param_1 + 0xe0);
  iVar1 = *(ios *)(param_1 + 0xe1);
  *(undefined8 *)(this + 0xe8) = 0;
  this[0xe1] = iVar1;
  return;
}



// std::ios::swap(std::ios&)

void __thiscall std::ios::swap(ios *this,ios_base *param_1)

{
  ios iVar1;
  undefined8 uVar2;
  
  ios_base::_M_swap((ios_base *)this,param_1);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  _M_cache_locale((ios *)param_1,(longlong *)(param_1 + 0xd0));
  uVar2 = *(undefined8 *)(this + 0xd8);
  *(undefined8 *)(this + 0xd8) = *(undefined8 *)(param_1 + 0xd8);
  *(undefined8 *)(param_1 + 0xd8) = uVar2;
  iVar1 = this[0xe0];
  this[0xe0] = *(ios *)(param_1 + 0xe0);
  *(ios *)(param_1 + 0xe0) = iVar1;
  iVar1 = this[0xe1];
  this[0xe1] = *(ios *)(param_1 + 0xe1);
  *(ios *)(param_1 + 0xe1) = iVar1;
  return;
}



// std::ios::clear(std::_Ios_Iostate)

void __thiscall std::ios::clear(ios *this,uint param_1)

{
  if (*(longlong *)(this + 0xe8) == 0) {
    param_1 = param_1 | 1;
  }
  *(uint *)(this + 0x20) = param_1;
  if ((param_1 & *(uint *)(this + 0x1c)) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::ios::imbue(std::locale const&)

locale * std::ios::imbue(locale *param_1,ios *param_2,longlong *param_3)

{
  longlong *plVar1;
  locale local_30 [8];
  
  locale::locale(param_1,(undefined8 *)(param_2 + 0xd0));
  ios_base::imbue(local_30,(ios_base *)param_2,param_3);
  locale::~locale(local_30);
  _M_cache_locale(param_2,param_3);
  plVar1 = *(longlong **)(param_2 + 0xe8);
  if (plVar1 != (longlong *)0x0) {
    locale::locale(local_30,(undefined8 *)(plVar1 + 7));
    (**(code **)(*plVar1 + 0x10))(plVar1,param_3);
    locale::operator=((locale *)(plVar1 + 7),param_3);
    locale::~locale(local_30);
  }
  return param_1;
}



// std::ios::rdbuf(std::streambuf*)

undefined8 __thiscall std::ios::rdbuf(ios *this,longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(this + 0xe8);
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  if (((uint)(param_1 == 0) & *(uint *)(this + 0x1c)) == 0) {
    return uVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::ios::copyfmt(std::ios const&)

ios * __thiscall std::ios::copyfmt(ios *this,ios *param_1)

{
  ios iVar1;
  int iVar2;
  undefined4 uVar3;
  uint uVar4;
  longlong lVar5;
  undefined8 uVar6;
  ctype<char> *pcVar7;
  undefined8 uVar8;
  undefined8 uVar9;
  ctype<char> cVar10;
  longlong lVar11;
  ios *piVar12;
  ios *piVar13;
  uint uVar14;
  bool bVar15;
  locale local_30 [8];
  
  if (this != param_1) {
    if (*(int *)(param_1 + 0xc0) < 9) {
      piVar12 = this + 0x40;
    }
    else {
      piVar12 = operator_new__((longlong)*(int *)(param_1 + 0xc0) << 4);
      lVar11 = (longlong)*(int *)(param_1 + 0xc0) + -1;
      piVar13 = piVar12;
      if (-1 < lVar11) {
        do {
          *(undefined8 *)piVar13 = 0;
          *(undefined4 *)(piVar13 + 8) = 0;
          bVar15 = lVar11 != 0;
          lVar11 = lVar11 + -1;
          piVar13 = piVar13 + 0x10;
        } while (bVar15);
      }
    }
    lVar11 = *(longlong *)(param_1 + 0x28);
    if (lVar11 != 0) {
      if (_CRT_MT == 0) {
        *(int *)(lVar11 + 0x14) = *(int *)(lVar11 + 0x14) + 1;
      }
      else {
        LOCK();
        *(int *)(lVar11 + 0x14) = *(int *)(lVar11 + 0x14) + 1;
        UNLOCK();
      }
    }
    ios_base::_M_call_callbacks((ios_base *)this,0);
    piVar13 = *(ios **)(this + 200);
    if (piVar13 != this + 0x40) {
      if (piVar13 != (ios *)0x0) {
        operator_delete__(piVar13);
      }
      *(undefined8 *)(this + 200) = 0;
    }
    ios_base::_M_dispose_callbacks((ios_base *)this);
    iVar2 = *(int *)(param_1 + 0xc0);
    *(longlong *)(this + 0x28) = lVar11;
    lVar11 = 0;
    if (0 < iVar2) {
      do {
        lVar5 = *(longlong *)(param_1 + 200);
        *(undefined8 *)(piVar12 + lVar11) = *(undefined8 *)(lVar5 + lVar11);
        *(undefined4 *)(piVar12 + lVar11 + 8) = *(undefined4 *)(lVar5 + 8 + lVar11);
        lVar11 = lVar11 + 0x10;
      } while (lVar11 != (longlong)iVar2 * 0x10);
    }
    uVar3 = *(undefined4 *)(param_1 + 0x18);
    uVar8 = *(undefined8 *)(param_1 + 8);
    uVar9 = *(undefined8 *)(param_1 + 0x10);
    *(ios **)(this + 200) = piVar12;
    iVar1 = param_1[0xe1];
    *(int *)(this + 0xc0) = iVar2;
    *(undefined4 *)(this + 0x18) = uVar3;
    uVar6 = *(undefined8 *)(param_1 + 0xd8);
    *(undefined8 *)(this + 8) = uVar8;
    *(undefined8 *)(this + 0x10) = uVar9;
    *(undefined8 *)(this + 0xd8) = uVar6;
    if (iVar1 == (ios)0x0) {
      pcVar7 = *(ctype<char> **)(param_1 + 0xf0);
      if (pcVar7 == (ctype<char> *)0x0) goto LAB_1400b5bae;
      if (pcVar7[0x38] == (ctype<char>)0x0) {
        cVar10 = (ctype<char>)0x20;
        ctype<char>::_M_widen_init(pcVar7);
        if (*(code **)(*(longlong *)pcVar7 + 0x30) != ctype<char>::do_widen) {
          cVar10 = (ctype<char>)(**(code **)(*(longlong *)pcVar7 + 0x30))(pcVar7,0x20);
        }
      }
      else {
        cVar10 = pcVar7[0x59];
      }
      *(ctype<char> *)(param_1 + 0xe0) = cVar10;
      param_1[0xe1] = (ios)0x1;
    }
    else {
      cVar10 = *(ctype<char> *)(param_1 + 0xe0);
    }
    if (this[0xe1] == (ios)0x0) {
      pcVar7 = *(ctype<char> **)(this + 0xf0);
      if (pcVar7 == (ctype<char> *)0x0) {
LAB_1400b5bae:
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      if (pcVar7[0x38] == (ctype<char>)0x0) {
        ctype<char>::_M_widen_init(pcVar7);
        if (*(code **)(*(longlong *)pcVar7 + 0x30) != ctype<char>::do_widen) {
          (**(code **)(*(longlong *)pcVar7 + 0x30))(pcVar7,0x20);
        }
      }
      this[0xe1] = (ios)0x1;
    }
    *(ctype<char> *)(this + 0xe0) = cVar10;
    locale::locale(local_30,(undefined8 *)(param_1 + 0xd0));
    locale::operator=((locale *)(this + 0xd0),(undefined8 *)local_30);
    locale::~locale(local_30);
    _M_cache_locale(this,(longlong *)(this + 0xd0));
    ios_base::_M_call_callbacks((ios_base *)this,2);
    uVar4 = *(uint *)(param_1 + 0x1c);
    uVar14 = *(uint *)(this + 0x20);
    *(uint *)(this + 0x1c) = uVar4;
    if (*(longlong *)(this + 0xe8) == 0) {
      uVar14 = uVar14 | 1;
      *(uint *)(this + 0x20) = uVar14;
    }
    if ((uVar14 & uVar4) != 0) {
                    // WARNING: Subroutine does not return
      __throw_ios_failure((string *)"basic_ios::clear");
    }
  }
  return this;
}



// std::ios::setstate(std::_Ios_Iostate)

void __thiscall std::ios::setstate(ios *this,uint param_1)

{
  uint uVar1;
  
  uVar1 = param_1 | *(uint *)(this + 0x20);
  if (*(longlong *)(this + 0xe8) == 0) {
    uVar1 = uVar1 | 1;
  }
  *(uint *)(this + 0x20) = uVar1;
  if ((uVar1 & *(uint *)(this + 0x1c)) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::ios::set_rdbuf(std::streambuf*)

void __thiscall std::ios::set_rdbuf(ios *this,undefined8 param_1)

{
  *(undefined8 *)(this + 0xe8) = param_1;
  return;
}



// std::ios::ios(std::streambuf*)

void __thiscall std::ios::ios(ios *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined ***)this = &PTR__ios_1400ded80;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  ios_base::_M_init((ios_base *)this);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined4 *)(this + 0x1c) = 0;
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  return;
}



// std::ios::ios()

void __thiscall std::ios::ios(ios *this)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined ***)this = &PTR__ios_1400ded80;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  return;
}



// std::ios::ios(std::streambuf*)

void __thiscall std::ios::ios(ios *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined ***)this = &PTR__ios_1400ded80;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  ios_base::_M_init((ios_base *)this);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined4 *)(this + 0x1c) = 0;
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  return;
}



// std::ios::ios()

void __thiscall std::ios::ios(ios *this)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined ***)this = &PTR__ios_1400ded80;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  return;
}



// std::ios::~ios()

void __thiscall std::ios::~ios(ios *this)

{
  *(undefined ***)this = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)this);
  operator_delete(this);
  return;
}



// std::ios::~ios()

void __thiscall std::ios::~ios(ios *this)

{
  *(undefined ***)this = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)this);
  return;
}



// std::ios::~ios()

void __thiscall std::ios::~ios(ios *this)

{
  *(undefined ***)this = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)this);
  return;
}



// std::wios::exceptions(std::_Ios_Iostate)

void __thiscall std::wios::exceptions(wios *this,uint param_1)

{
  uint uVar1;
  
  uVar1 = *(uint *)(this + 0x20);
  *(uint *)(this + 0x1c) = param_1;
  if (*(longlong *)(this + 0xe8) == 0) {
    uVar1 = uVar1 | 1;
    *(uint *)(this + 0x20) = uVar1;
  }
  if ((param_1 & uVar1) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::wios::_M_setstate(std::_Ios_Iostate)

void __thiscall std::wios::_M_setstate(wios *this,uint param_1)

{
  *(uint *)(this + 0x20) = *(uint *)(this + 0x20) | param_1;
  if ((param_1 & *(uint *)(this + 0x1c)) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __cxa_rethrow();
}



// std::wios::_M_cache_locale(std::locale const&)

void __thiscall std::wios::_M_cache_locale(wios *this,longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  *(undefined8 *)(this + 0xf0) = *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
  lVar1 = locale::id::_M_id((id *)&num_put<>::id);
  *(undefined8 *)(this + 0xf8) = *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
  lVar1 = locale::id::_M_id((id *)&num_get<>::id);
  *(undefined8 *)(this + 0x100) = *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
  return;
}



// std::wios::tie(std::wostream*)

undefined8 __thiscall std::wios::tie(wios *this,undefined8 param_1)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(this + 0xd8);
  *(undefined8 *)(this + 0xd8) = param_1;
  return uVar1;
}



// std::wios::fill(wchar_t)

ulonglong __thiscall std::wios::fill(wios *this,undefined2 param_1)

{
  ushort uVar1;
  longlong *plVar2;
  ulonglong uVar3;
  
  if (this[0xe2] != (wios)0x0) {
    uVar1 = *(ushort *)(this + 0xe0);
    *(undefined2 *)(this + 0xe0) = param_1;
    return (ulonglong)uVar1;
  }
  plVar2 = *(longlong **)(this + 0xf0);
  if (plVar2 != (longlong *)0x0) {
    uVar3 = (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
    this[0xe2] = (wios)0x1;
    *(undefined2 *)(this + 0xe0) = param_1;
    return uVar3;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wios::init(std::wstreambuf*)

void __thiscall std::wios::init(wios *this,longlong param_1)

{
  ios_base::_M_init((ios_base *)this);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  this[0xe2] = (wios)0x0;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined4 *)(this + 0x1c) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  return;
}



// std::wios::move(std::wios&&)

void __thiscall std::wios::move(wios *this,longlong param_1)

{
  wios wVar1;
  undefined8 uVar2;
  
  ios_base::_M_move((ios_base *)this,param_1);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  uVar2 = *(undefined8 *)(param_1 + 0xd8);
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(this + 0xd8) = uVar2;
  *(undefined2 *)(this + 0xe0) = *(undefined2 *)(param_1 + 0xe0);
  wVar1 = *(wios *)(param_1 + 0xe2);
  *(undefined8 *)(this + 0xe8) = 0;
  this[0xe2] = wVar1;
  return;
}



// std::wios::move(std::wios&)

void __thiscall std::wios::move(wios *this,longlong param_1)

{
  wios wVar1;
  undefined8 uVar2;
  
  ios_base::_M_move((ios_base *)this,param_1);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  uVar2 = *(undefined8 *)(param_1 + 0xd8);
  *(undefined8 *)(param_1 + 0xd8) = 0;
  *(undefined8 *)(this + 0xd8) = uVar2;
  *(undefined2 *)(this + 0xe0) = *(undefined2 *)(param_1 + 0xe0);
  wVar1 = *(wios *)(param_1 + 0xe2);
  *(undefined8 *)(this + 0xe8) = 0;
  this[0xe2] = wVar1;
  return;
}



// std::wios::swap(std::wios&)

void __thiscall std::wios::swap(wios *this,ios_base *param_1)

{
  wios wVar1;
  undefined2 uVar2;
  undefined8 uVar3;
  
  ios_base::_M_swap((ios_base *)this,param_1);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  _M_cache_locale((wios *)param_1,(longlong *)(param_1 + 0xd0));
  uVar3 = *(undefined8 *)(this + 0xd8);
  *(undefined8 *)(this + 0xd8) = *(undefined8 *)(param_1 + 0xd8);
  *(undefined8 *)(param_1 + 0xd8) = uVar3;
  uVar2 = *(undefined2 *)(this + 0xe0);
  *(undefined2 *)(this + 0xe0) = *(undefined2 *)(param_1 + 0xe0);
  *(undefined2 *)(param_1 + 0xe0) = uVar2;
  wVar1 = this[0xe2];
  this[0xe2] = *(wios *)(param_1 + 0xe2);
  *(wios *)(param_1 + 0xe2) = wVar1;
  return;
}



// std::wios::clear(std::_Ios_Iostate)

void __thiscall std::wios::clear(wios *this,uint param_1)

{
  if (*(longlong *)(this + 0xe8) == 0) {
    param_1 = param_1 | 1;
  }
  *(uint *)(this + 0x20) = param_1;
  if ((param_1 & *(uint *)(this + 0x1c)) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::wios::imbue(std::locale const&)

locale * std::wios::imbue(locale *param_1,wios *param_2,longlong *param_3)

{
  longlong *plVar1;
  locale local_30 [8];
  
  locale::locale(param_1,(undefined8 *)(param_2 + 0xd0));
  ios_base::imbue(local_30,(ios_base *)param_2,param_3);
  locale::~locale(local_30);
  _M_cache_locale(param_2,param_3);
  plVar1 = *(longlong **)(param_2 + 0xe8);
  if (plVar1 != (longlong *)0x0) {
    locale::locale(local_30,(undefined8 *)(plVar1 + 7));
    (**(code **)(*plVar1 + 0x10))(plVar1,param_3);
    locale::operator=((locale *)(plVar1 + 7),param_3);
    locale::~locale(local_30);
  }
  return param_1;
}



// std::wios::rdbuf(std::wstreambuf*)

undefined8 __thiscall std::wios::rdbuf(wios *this,longlong param_1)

{
  undefined8 uVar1;
  
  uVar1 = *(undefined8 *)(this + 0xe8);
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  if (((uint)(param_1 == 0) & *(uint *)(this + 0x1c)) == 0) {
    return uVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::wios::copyfmt(std::wios const&)

wios * __thiscall std::wios::copyfmt(wios *this,wios *param_1)

{
  wios wVar1;
  int iVar2;
  undefined4 uVar3;
  uint uVar4;
  longlong lVar5;
  undefined8 uVar6;
  longlong *plVar7;
  undefined8 uVar8;
  undefined8 uVar9;
  undefined2 uVar10;
  longlong lVar11;
  wios *pwVar12;
  wios *pwVar13;
  uint uVar14;
  bool bVar15;
  locale local_30 [8];
  
  if (this != param_1) {
    if (*(int *)(param_1 + 0xc0) < 9) {
      pwVar12 = this + 0x40;
    }
    else {
      pwVar12 = operator_new__((longlong)*(int *)(param_1 + 0xc0) << 4);
      lVar11 = (longlong)*(int *)(param_1 + 0xc0) + -1;
      pwVar13 = pwVar12;
      if (-1 < lVar11) {
        do {
          *(undefined8 *)pwVar13 = 0;
          *(undefined4 *)(pwVar13 + 8) = 0;
          bVar15 = lVar11 != 0;
          lVar11 = lVar11 + -1;
          pwVar13 = pwVar13 + 0x10;
        } while (bVar15);
      }
    }
    lVar11 = *(longlong *)(param_1 + 0x28);
    if (lVar11 != 0) {
      if (_CRT_MT == 0) {
        *(int *)(lVar11 + 0x14) = *(int *)(lVar11 + 0x14) + 1;
      }
      else {
        LOCK();
        *(int *)(lVar11 + 0x14) = *(int *)(lVar11 + 0x14) + 1;
        UNLOCK();
      }
    }
    ios_base::_M_call_callbacks((ios_base *)this,0);
    pwVar13 = *(wios **)(this + 200);
    if (pwVar13 != this + 0x40) {
      if (pwVar13 != (wios *)0x0) {
        operator_delete__(pwVar13);
      }
      *(undefined8 *)(this + 200) = 0;
    }
    ios_base::_M_dispose_callbacks((ios_base *)this);
    iVar2 = *(int *)(param_1 + 0xc0);
    *(longlong *)(this + 0x28) = lVar11;
    lVar11 = 0;
    if (0 < iVar2) {
      do {
        lVar5 = *(longlong *)(param_1 + 200);
        *(undefined8 *)(pwVar12 + lVar11) = *(undefined8 *)(lVar5 + lVar11);
        *(undefined4 *)(pwVar12 + lVar11 + 8) = *(undefined4 *)(lVar5 + 8 + lVar11);
        lVar11 = lVar11 + 0x10;
      } while (lVar11 != (longlong)iVar2 * 0x10);
    }
    uVar3 = *(undefined4 *)(param_1 + 0x18);
    uVar8 = *(undefined8 *)(param_1 + 8);
    uVar9 = *(undefined8 *)(param_1 + 0x10);
    *(wios **)(this + 200) = pwVar12;
    wVar1 = param_1[0xe2];
    *(int *)(this + 0xc0) = iVar2;
    *(undefined4 *)(this + 0x18) = uVar3;
    uVar6 = *(undefined8 *)(param_1 + 0xd8);
    *(undefined8 *)(this + 8) = uVar8;
    *(undefined8 *)(this + 0x10) = uVar9;
    *(undefined8 *)(this + 0xd8) = uVar6;
    if (wVar1 == (wios)0x0) {
      plVar7 = *(longlong **)(param_1 + 0xf0);
      if (plVar7 == (longlong *)0x0) goto LAB_1400b64ca;
      uVar10 = (**(code **)(*plVar7 + 0x50))(plVar7,0x20);
      param_1[0xe2] = (wios)0x1;
      *(undefined2 *)(param_1 + 0xe0) = uVar10;
    }
    else {
      uVar10 = *(undefined2 *)(param_1 + 0xe0);
    }
    if (this[0xe2] == (wios)0x0) {
      plVar7 = *(longlong **)(this + 0xf0);
      if (plVar7 == (longlong *)0x0) {
LAB_1400b64ca:
                    // WARNING: Subroutine does not return
        __throw_bad_cast();
      }
      (**(code **)(*plVar7 + 0x50))(plVar7,0x20);
      this[0xe2] = (wios)0x1;
    }
    *(undefined2 *)(this + 0xe0) = uVar10;
    locale::locale(local_30,(undefined8 *)(param_1 + 0xd0));
    locale::operator=((locale *)(this + 0xd0),(undefined8 *)local_30);
    locale::~locale(local_30);
    _M_cache_locale(this,(longlong *)(this + 0xd0));
    ios_base::_M_call_callbacks((ios_base *)this,2);
    uVar4 = *(uint *)(param_1 + 0x1c);
    uVar14 = *(uint *)(this + 0x20);
    *(uint *)(this + 0x1c) = uVar4;
    if (*(longlong *)(this + 0xe8) == 0) {
      uVar14 = uVar14 | 1;
      *(uint *)(this + 0x20) = uVar14;
    }
    if ((uVar14 & uVar4) != 0) {
                    // WARNING: Subroutine does not return
      __throw_ios_failure((string *)"basic_ios::clear");
    }
  }
  return this;
}



// std::wios::setstate(std::_Ios_Iostate)

void __thiscall std::wios::setstate(wios *this,uint param_1)

{
  uint uVar1;
  
  uVar1 = param_1 | *(uint *)(this + 0x20);
  if (*(longlong *)(this + 0xe8) == 0) {
    uVar1 = uVar1 | 1;
  }
  *(uint *)(this + 0x20) = uVar1;
  if ((uVar1 & *(uint *)(this + 0x1c)) == 0) {
    return;
  }
                    // WARNING: Subroutine does not return
  __throw_ios_failure((string *)"basic_ios::clear");
}



// std::wios::set_rdbuf(std::wstreambuf*)

void __thiscall std::wios::set_rdbuf(wios *this,undefined8 param_1)

{
  *(undefined8 *)(this + 0xe8) = param_1;
  return;
}



// std::wios::wios(std::wstreambuf*)

void __thiscall std::wios::wios(wios *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined ***)this = &PTR__wios_1400deda0;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  this[0xe2] = (wios)0x0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  ios_base::_M_init((ios_base *)this);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  *(undefined2 *)(this + 0xe0) = 0;
  this[0xe2] = (wios)0x0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined4 *)(this + 0x1c) = 0;
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  return;
}



// std::wios::wios()

void __thiscall std::wios::wios(wios *this)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined ***)this = &PTR__wios_1400deda0;
  *(undefined2 *)(this + 0xe0) = 0;
  this[0xe2] = (wios)0x0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  return;
}



// std::wios::wios(std::wstreambuf*)

void __thiscall std::wios::wios(wios *this,longlong param_1)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined ***)this = &PTR__wios_1400deda0;
  *(undefined2 *)(this + 0xe0) = 0;
  *(undefined8 *)(this + 0xd8) = 0;
  this[0xe2] = (wios)0x0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  ios_base::_M_init((ios_base *)this);
  _M_cache_locale(this,(longlong *)(this + 0xd0));
  *(undefined2 *)(this + 0xe0) = 0;
  this[0xe2] = (wios)0x0;
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined4 *)(this + 0x1c) = 0;
  *(longlong *)(this + 0xe8) = param_1;
  *(uint *)(this + 0x20) = (uint)(param_1 == 0);
  return;
}



// std::wios::wios()

void __thiscall std::wios::wios(wios *this)

{
  ios_base::ios_base((ios_base *)this);
  *(undefined8 *)(this + 0xd8) = 0;
  *(undefined ***)this = &PTR__wios_1400deda0;
  *(undefined2 *)(this + 0xe0) = 0;
  this[0xe2] = (wios)0x0;
  *(undefined1 (*) [16])(this + 0xe8) = (undefined1  [16])0x0;
  *(undefined1 (*) [16])(this + 0xf8) = (undefined1  [16])0x0;
  return;
}



// std::wios::~wios()

void __thiscall std::wios::~wios(wios *this)

{
  *(undefined ***)this = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)this);
  operator_delete(this);
  return;
}



// std::wios::~wios()

void __thiscall std::wios::~wios(wios *this)

{
  *(undefined ***)this = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)this);
  return;
}



// std::wios::~wios()

void __thiscall std::wios::~wios(wios *this)

{
  *(undefined ***)this = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)this);
  return;
}



// std::exception::~exception()

void __thiscall std::exception::~exception(exception *this)

{
  operator_delete(this);
  return;
}



// std::exception::~exception()

void __thiscall std::exception::~exception(void)

{
  return;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::money_get(unsigned long long)

void __thiscall std::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dedf0;
  return;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// >::money_get(unsigned long long)

void __thiscall std::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dedf0;
  return;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~money_get()

void __thiscall std::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dedf0;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~money_get()

void __thiscall std::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dedf0;
  locale::facet::~facet();
  return;
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >::~money_get()

void __thiscall std::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dedf0;
  locale::facet::~facet();
  return;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_get(unsigned long long)

void __thiscall std::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dee20;
  return;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_get(unsigned long long)

void __thiscall std::money_get<>::money_get(money_get<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_get_1400dee20;
  return;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_get()

void __thiscall std::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dee20;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_get()

void __thiscall std::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dee20;
  locale::facet::~facet();
  return;
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_get()

void __thiscall std::money_get<>::~money_get(money_get<> *this)

{
  *(undefined ***)this = &PTR__money_get_1400dee20;
  locale::facet::~facet();
  return;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::money_put(unsigned long long)

void __thiscall std::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dee50;
  return;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// >::money_put(unsigned long long)

void __thiscall std::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dee50;
  return;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~money_put()

void __thiscall std::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dee50;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~money_put()

void __thiscall std::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dee50;
  locale::facet::~facet();
  return;
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::~money_put()

void __thiscall std::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dee50;
  locale::facet::~facet();
  return;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_put(unsigned long long)

void __thiscall std::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dee80;
  return;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::money_put(unsigned long long)

void __thiscall std::money_put<>::money_put(money_put<> *this,longlong param_1)

{
  *(uint *)(this + 8) = (uint)(param_1 != 0);
  *(undefined ***)this = &PTR__money_put_1400dee80;
  return;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_put()

void __thiscall std::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dee80;
  locale::facet::~facet();
  operator_delete(this);
  return;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_put()

void __thiscall std::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dee80;
  locale::facet::~facet();
  return;
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> >
// >::~money_put()

void __thiscall std::money_put<>::~money_put(money_put<> *this)

{
  *(undefined ***)this = &PTR__money_put_1400dee80;
  locale::facet::~facet();
  return;
}



// std::type_info::~type_info()

void __thiscall std::type_info::~type_info(type_info *this)

{
  operator_delete(this);
  return;
}



// std::type_info::~type_info()

void __thiscall std::type_info::~type_info(void)

{
  return;
}



// std::unexpected()

void std::unexpected(void)

{
                    // WARNING: Subroutine does not return
  __cxxabiv1::__unexpected(__cxxabiv1::__unexpected_handler);
}



// int std::__int_to_char<char, unsigned long>(char*, unsigned long, char const*,
// std::_Ios_Fmtflags, bool)

int std::__int_to_char<>
              (undefined1 *param_1,uint param_2,longlong param_3,uint param_4,char param_5)

{
  uint uVar1;
  uint uVar2;
  undefined1 *puVar4;
  ulonglong uVar3;
  
  uVar3 = (ulonglong)param_2;
  puVar4 = param_1;
  if (param_5 == '\0') {
    if ((param_4 & 0x4a) == 0x40) {
      do {
        uVar1 = (uint)uVar3;
        puVar4 = puVar4 + -1;
        uVar2 = uVar1 >> 3;
        uVar3 = (ulonglong)uVar2;
        *puVar4 = *(undefined1 *)(param_3 + 4 + (ulonglong)(uVar1 & 7));
      } while (uVar2 != 0);
    }
    else {
      do {
        uVar1 = (uint)uVar3;
        puVar4 = puVar4 + -1;
        uVar2 = uVar1 >> 4;
        uVar3 = (ulonglong)uVar2;
        *puVar4 = *(undefined1 *)
                   (param_3 +
                   (ulonglong)
                   ((uVar1 & 0xf) + (-(uint)((param_4 & 0x4000) == 0) & 0xfffffff0) + 0x14));
      } while (uVar2 != 0);
    }
  }
  else {
    do {
      puVar4 = puVar4 + -1;
      uVar1 = (uint)uVar3;
      *puVar4 = *(undefined1 *)(param_3 + (ulonglong)(uVar1 + (int)(uVar3 / 10) * -10 + 4));
      uVar3 = uVar3 / 10;
    } while (9 < uVar1);
  }
  return (int)param_1 - (int)puVar4;
}



// int std::__int_to_char<char, unsigned long long>(char*, unsigned long long, char const*,
// std::_Ios_Fmtflags, bool)

int std::__int_to_char<>
              (undefined1 *param_1,ulonglong param_2,longlong param_3,uint param_4,char param_5)

{
  bool bVar1;
  uint uVar2;
  undefined1 *puVar3;
  
  puVar3 = param_1;
  if (param_5 == '\0') {
    if ((param_4 & 0x4a) == 0x40) {
      do {
        puVar3 = puVar3 + -1;
        uVar2 = (uint)param_2;
        param_2 = param_2 >> 3;
        *puVar3 = *(undefined1 *)(param_3 + 4 + (ulonglong)(uVar2 & 7));
      } while (param_2 != 0);
    }
    else {
      do {
        puVar3 = puVar3 + -1;
        uVar2 = (uint)param_2;
        param_2 = param_2 >> 4;
        *puVar3 = *(undefined1 *)
                   (param_3 + 0x14 + (-(ulonglong)((param_4 & 0x4000) == 0) & 0xfffffffffffffff0) +
                   (ulonglong)(uVar2 & 0xf));
      } while (param_2 != 0);
    }
  }
  else {
    do {
      puVar3 = puVar3 + -1;
      *puVar3 = *(undefined1 *)(param_3 + 4 + param_2 % 10);
      bVar1 = 9 < param_2;
      param_2 = param_2 / 10;
    } while (bVar1);
  }
  return (int)param_1 - (int)puVar3;
}



// int std::__int_to_char<wchar_t, unsigned long>(wchar_t*, unsigned long, wchar_t const*,
// std::_Ios_Fmtflags, bool)

longlong std::__int_to_char<>
                   (undefined2 *param_1,uint param_2,longlong param_3,uint param_4,char param_5)

{
  uint uVar1;
  uint uVar2;
  undefined2 *puVar4;
  ulonglong uVar3;
  
  uVar3 = (ulonglong)param_2;
  puVar4 = param_1;
  if (param_5 == '\0') {
    if ((param_4 & 0x4a) == 0x40) {
      do {
        uVar1 = (uint)uVar3;
        puVar4 = puVar4 + -1;
        uVar2 = uVar1 >> 3;
        uVar3 = (ulonglong)uVar2;
        *puVar4 = *(undefined2 *)(param_3 + 8 + (ulonglong)(uVar1 & 7) * 2);
      } while (uVar2 != 0);
    }
    else {
      do {
        uVar1 = (uint)uVar3;
        puVar4 = puVar4 + -1;
        uVar2 = uVar1 >> 4;
        uVar3 = (ulonglong)uVar2;
        *puVar4 = *(undefined2 *)
                   (param_3 +
                   (ulonglong)
                   ((uVar1 & 0xf) + (-(uint)((param_4 & 0x4000) == 0) & 0xfffffff0) + 0x14) * 2);
      } while (uVar2 != 0);
    }
  }
  else {
    do {
      puVar4 = puVar4 + -1;
      uVar1 = (uint)uVar3;
      *puVar4 = *(undefined2 *)(param_3 + (ulonglong)(uVar1 + (int)(uVar3 / 10) * -10 + 4) * 2);
      uVar3 = uVar3 / 10;
    } while (9 < uVar1);
  }
  return (longlong)param_1 - (longlong)puVar4 >> 1;
}



// int std::__int_to_char<wchar_t, unsigned long long>(wchar_t*, unsigned long long, wchar_t const*,
// std::_Ios_Fmtflags, bool)

longlong std::__int_to_char<>
                   (undefined2 *param_1,ulonglong param_2,longlong param_3,uint param_4,char param_5
                   )

{
  bool bVar1;
  uint uVar2;
  undefined2 *puVar3;
  
  puVar3 = param_1;
  if (param_5 == '\0') {
    if ((param_4 & 0x4a) == 0x40) {
      do {
        puVar3 = puVar3 + -1;
        uVar2 = (uint)param_2;
        param_2 = param_2 >> 3;
        *puVar3 = *(undefined2 *)(param_3 + 8 + (ulonglong)(uVar2 & 7) * 2);
      } while (param_2 != 0);
    }
    else {
      do {
        puVar3 = puVar3 + -1;
        uVar2 = (uint)param_2;
        param_2 = param_2 >> 4;
        *puVar3 = *(undefined2 *)
                   (param_3 +
                   ((ulonglong)(uVar2 & 0xf) +
                   (-(ulonglong)((param_4 & 0x4000) == 0) & 0xfffffffffffffff0) + 0x14) * 2);
      } while (param_2 != 0);
    }
  }
  else {
    do {
      puVar3 = puVar3 + -1;
      *puVar3 = *(undefined2 *)(param_3 + 8 + (param_2 % 10) * 2);
      bVar1 = 9 < param_2;
      param_2 = param_2 / 10;
    } while (bVar1);
  }
  return (longlong)param_1 - (longlong)puVar3 >> 1;
}



// std::get_terminate()

undefined * std::get_terminate(void)

{
  return __cxxabiv1::__terminate_handler;
}



// std::set_terminate(void (*)())

undefined * std::set_terminate(undefined *param_1)

{
  undefined *puVar1;
  
  puVar1 = __cxxabiv1::__terminate_handler;
  if (param_1 == (undefined *)0x0) {
    param_1 = __gnu_cxx::__verbose_terminate_handler;
  }
  LOCK();
  __cxxabiv1::__terminate_handler = param_1;
  UNLOCK();
  return puVar1;
}



// char* std::__add_grouping<char>(char*, char, char const*, unsigned long long, char const*, char
// const*)

undefined1 *
std::__add_grouping<char>
          (undefined1 *param_1,undefined1 param_2,byte *param_3,longlong param_4,longlong param_5,
          longlong param_6)

{
  byte bVar1;
  longlong lVar2;
  longlong lVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  undefined1 *puVar6;
  ulonglong uVar7;
  byte *pbVar8;
  longlong lVar9;
  
  lVar2 = (longlong)(char)*param_3;
  if (((byte)(*param_3 - 1) < 0x7e) && (lVar2 < param_6 - param_5)) {
    lVar9 = 0;
    uVar5 = 0;
    do {
      param_6 = param_6 - lVar2;
      if (uVar5 < param_4 - 1U) {
        uVar5 = uVar5 + 1;
      }
      else {
        lVar9 = lVar9 + 1;
      }
      pbVar8 = param_3 + uVar5;
      lVar2 = (longlong)(char)*pbVar8;
    } while (((byte)(*pbVar8 - 1) < 0x7e) && (lVar2 < param_6 - param_5));
    lVar2 = lVar9 + -1;
    uVar7 = uVar5 - 1;
    if (param_5 == param_6) goto joined_r0x0001400b6e19;
  }
  else {
    if (param_6 == param_5) {
      return param_1;
    }
    uVar7 = 0xffffffffffffffff;
    lVar9 = 0;
    uVar5 = 0;
    lVar2 = -1;
    pbVar8 = param_3;
  }
  lVar3 = 0;
  do {
    param_1[lVar3] = *(undefined1 *)(param_5 + lVar3);
    lVar3 = lVar3 + 1;
  } while (lVar3 != param_6 - param_5);
  param_1 = param_1 + lVar3;
joined_r0x0001400b6e19:
  while (lVar3 = lVar2, lVar9 != 0) {
    *param_1 = param_2;
    bVar1 = *pbVar8;
    puVar6 = param_1 + 1;
    if ('\0' < (char)bVar1) {
      uVar4 = 0;
      do {
        param_1[uVar4 + 1] = *(undefined1 *)(param_6 + uVar4);
        uVar4 = uVar4 + 1;
      } while (uVar4 != bVar1);
      param_6 = param_6 + uVar4;
      puVar6 = puVar6 + uVar4;
    }
    param_1 = puVar6;
    lVar2 = lVar3 + -1;
    lVar9 = lVar3;
  }
  while (uVar4 = uVar7, uVar5 != 0) {
    *param_1 = param_2;
    uVar7 = (ulonglong)param_3[uVar4];
    puVar6 = param_1 + 1;
    if ('\0' < (char)param_3[uVar4]) {
      uVar5 = 0;
      do {
        param_1[uVar5 + 1] = *(undefined1 *)(param_6 + uVar5);
        uVar5 = uVar5 + 1;
      } while (uVar7 != uVar5);
      param_6 = param_6 + uVar7;
      puVar6 = puVar6 + uVar7;
    }
    param_1 = puVar6;
    uVar7 = uVar4 - 1;
    uVar5 = uVar4;
  }
  return param_1;
}



// wchar_t* std::__add_grouping<wchar_t>(wchar_t*, wchar_t, char const*, unsigned long long, wchar_t
// const*, wchar_t const*)

undefined2 *
std::__add_grouping<wchar_t>
          (undefined2 *param_1,undefined2 param_2,byte *param_3,longlong param_4,longlong param_5,
          longlong param_6)

{
  byte bVar1;
  ulonglong uVar2;
  longlong lVar3;
  undefined2 *puVar4;
  longlong lVar5;
  ulonglong uVar6;
  ulonglong uVar7;
  byte *pbVar8;
  longlong lVar9;
  
  lVar5 = (longlong)(char)*param_3;
  if ((lVar5 < param_6 - param_5 >> 1) && ((byte)(*param_3 - 1) < 0x7e)) {
    uVar7 = 0;
    lVar9 = 0;
    do {
      param_6 = param_6 + lVar5 * -2;
      if (uVar7 < param_4 - 1U) {
        uVar7 = uVar7 + 1;
      }
      else {
        lVar9 = lVar9 + 1;
      }
      pbVar8 = param_3 + uVar7;
      lVar5 = (longlong)(char)*pbVar8;
    } while ((lVar5 < param_6 - param_5 >> 1) && ((byte)(*pbVar8 - 1) < 0x7e));
    lVar5 = lVar9 + -1;
    uVar6 = uVar7 - 1;
    if (param_5 == param_6) goto joined_r0x0001400b6fb2;
  }
  else {
    if (param_6 == param_5) {
      return param_1;
    }
    uVar6 = 0xffffffffffffffff;
    lVar9 = 0;
    uVar7 = 0;
    lVar5 = -1;
    pbVar8 = param_3;
  }
  lVar3 = 0;
  do {
    *(undefined2 *)((longlong)param_1 + lVar3) = *(undefined2 *)(param_5 + lVar3);
    lVar3 = lVar3 + 2;
  } while (lVar3 != param_6 - param_5);
  param_1 = (undefined2 *)((longlong)param_1 + lVar3);
joined_r0x0001400b6fb2:
  while (lVar3 = lVar5, lVar9 != 0) {
    *param_1 = param_2;
    bVar1 = *pbVar8;
    puVar4 = param_1 + 1;
    if ('\0' < (char)bVar1) {
      lVar5 = (ulonglong)bVar1 * 2;
      lVar9 = 0;
      do {
        *(undefined2 *)((longlong)param_1 + lVar9 + 2) = *(undefined2 *)(param_6 + lVar9);
        lVar9 = lVar9 + 2;
      } while (lVar5 != lVar9);
      param_6 = param_6 + lVar5;
      puVar4 = puVar4 + bVar1;
    }
    param_1 = puVar4;
    lVar5 = lVar3 + -1;
    lVar9 = lVar3;
  }
  while (uVar2 = uVar6, uVar7 != 0) {
    *param_1 = param_2;
    bVar1 = param_3[uVar2];
    puVar4 = param_1 + 1;
    if ('\0' < (char)bVar1) {
      lVar5 = 0;
      do {
        *(undefined2 *)((longlong)param_1 + lVar5 + 2) = *(undefined2 *)(param_6 + lVar5);
        lVar5 = lVar5 + 2;
      } while (lVar5 != (ulonglong)bVar1 * 2);
      param_6 = param_6 + lVar5;
      puVar4 = (undefined2 *)((longlong)puVar4 + lVar5);
    }
    param_1 = puVar4;
    uVar6 = uVar2 - 1;
    uVar7 = uVar2;
  }
  return param_1;
}



// void std::__convert_to_v<double>(char const*, double&, std::_Ios_Iostate&, int* const&)

void std::__convert_to_v<double>(char *param_1,double *param_2,undefined4 *param_3)

{
  char *_Locale;
  double dVar1;
  double dVar2;
  char *local_30 [2];
  
  _Locale = _text__ZNSt12_GLOBAL__N_114__set_C_localeEv();
  if (_Locale == (char *)0x0) {
    *param_3 = 4;
    return;
  }
  dVar1 = __strtod(param_1,local_30);
  *param_2 = dVar1;
  if ((local_30[0] == param_1) || (*local_30[0] != '\0')) {
    *param_2 = 0.0;
    *param_3 = 4;
  }
  else {
    dVar2 = 1.7976931348623157e+308;
    if ((dVar1 == INFINITY) || (dVar2 = -1.7976931348623157e+308, dVar1 == -INFINITY)) {
      *param_2 = dVar2;
      *param_3 = 4;
    }
  }
  setlocale(0,_Locale);
  operator_delete__(_Locale);
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address
// void std::__convert_to_v<long double>(char const*, long double&, std::_Ios_Iostate&, int* const&)

void std::__convert_to_v<>(char *param_1,float10 *param_2,undefined4 *param_3)

{
  char *_Locale;
  float10 fVar1;
  long_double local_48;
  char *local_30 [2];
  
  _Locale = _text__ZNSt12_GLOBAL__N_114__set_C_localeEv();
  if (_Locale != (char *)0x0) {
    __strtold(&local_48,param_1,local_30);
    *param_2 = local_48._0_10_;
    if ((local_30[0] == param_1) || (*local_30[0] != '\0')) {
      *param_2 = (float10)0;
      *param_3 = 4;
    }
    else {
      fVar1 = _DAT_1400c8200;
      if ((local_48._0_10_ == (float10)INFINITY) ||
         (fVar1 = _DAT_1400c8210, local_48._0_10_ == (float10)-INFINITY)) {
        *param_2 = fVar1;
        *param_3 = 4;
      }
    }
    setlocale(0,_Locale);
    operator_delete__(_Locale);
    return;
  }
  *param_3 = 4;
  return;
}



// void std::__convert_to_v<float>(char const*, float&, std::_Ios_Iostate&, int* const&)

void std::__convert_to_v<float>(char *param_1,float *param_2,undefined4 *param_3)

{
  char *_Locale;
  float fVar1;
  float fVar2;
  char *local_30 [2];
  
  _Locale = _text__ZNSt12_GLOBAL__N_114__set_C_localeEv();
  if (_Locale == (char *)0x0) {
    *param_3 = 4;
    return;
  }
  fVar1 = __strtof(param_1,local_30);
  *param_2 = fVar1;
  if ((local_30[0] == param_1) || (*local_30[0] != '\0')) {
    *param_2 = 0.0;
    *param_3 = 4;
  }
  else {
    fVar2 = 3.4028235e+38;
    if ((fVar1 == INFINITY) || (fVar2 = -3.4028235e+38, fVar1 == -INFINITY)) {
      *param_2 = fVar2;
      *param_3 = 4;
    }
  }
  setlocale(0,_Locale);
  operator_delete__(_Locale);
  return;
}



// std::get_unexpected()

undefined * std::get_unexpected(void)

{
  return __cxxabiv1::__unexpected_handler;
}



// std::set_unexpected(void (*)())

undefined * std::set_unexpected(undefined *param_1)

{
  undefined *puVar1;
  
  puVar1 = __cxxabiv1::__unexpected_handler;
  if (param_1 == (undefined *)0x0) {
    param_1 = terminate;
  }
  LOCK();
  __cxxabiv1::__unexpected_handler = param_1;
  UNLOCK();
  return puVar1;
}



// std::__cxx11::moneypunct<char, false> const* std::__try_use_facet<std::__cxx11::moneypunct<char,
// false> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,false>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::moneypunct<char, true> const* std::__try_use_facet<std::__cxx11::moneypunct<char,
// true> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,true>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::moneypunct<wchar_t, false> const*
// std::__try_use_facet<std::__cxx11::moneypunct<wchar_t, false> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::moneypunct<wchar_t, true> const*
// std::__try_use_facet<std::__cxx11::moneypunct<wchar_t, true> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::collate<char> const* std::__try_use_facet<std::__cxx11::collate<char> >(std::locale
// const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::collate<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::collate<wchar_t> const* std::__try_use_facet<std::__cxx11::collate<wchar_t>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::collate<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::messages<char> const* std::__try_use_facet<std::__cxx11::messages<char>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::messages<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::messages<wchar_t> const* std::__try_use_facet<std::__cxx11::messages<wchar_t>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::messages<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::numpunct<char> const* std::__try_use_facet<std::__cxx11::numpunct<char>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::numpunct<wchar_t> const* std::__try_use_facet<std::__cxx11::numpunct<wchar_t>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::__cxx11::time_get<char, std::istreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::time_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >
// const* std::__try_use_facet<std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::time_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::__cxx11::money_get<char, std::istreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >
// const* std::__try_use_facet<std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::__cxx11::money_put<char, std::ostreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >
// const* std::__try_use_facet<std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::moneypunct<char, false> const* std::__try_use_facet<std::moneypunct<char, false>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::moneypunct<char, true> const* std::__try_use_facet<std::moneypunct<char, true> >(std::locale
// const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::moneypunct<wchar_t, false> const* std::__try_use_facet<std::moneypunct<wchar_t, false>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&moneypunct<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::moneypunct<wchar_t, true> const* std::__try_use_facet<std::moneypunct<wchar_t, true>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&moneypunct<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::__timepunct<char> const* std::__try_use_facet<std::__timepunct<char> >(std::locale const&)

longlong * std::__try_use_facet<>(longlong *param_1)

{
  ulonglong uVar1;
  longlong *plVar2;
  
  uVar1 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if ((uVar1 < *(ulonglong *)(*param_1 + 0x10)) &&
     (plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + uVar1 * 8), plVar2 != (longlong *)0x0))
  {
    plVar2 = __dynamic_cast(plVar2,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<char>::typeinfo,0);
    return plVar2;
  }
  return (longlong *)0x0;
}



// std::__timepunct<wchar_t> const* std::__try_use_facet<std::__timepunct<wchar_t> >(std::locale
// const&)

longlong * std::__try_use_facet<>(longlong *param_1)

{
  ulonglong uVar1;
  longlong *plVar2;
  
  uVar1 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if ((uVar1 < *(ulonglong *)(*param_1 + 0x10)) &&
     (plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + uVar1 * 8), plVar2 != (longlong *)0x0))
  {
    plVar2 = __dynamic_cast(plVar2,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<wchar_t>::typeinfo,0);
    return plVar2;
  }
  return (longlong *)0x0;
}



// std::ctype<char> const* std::__try_use_facet<std::ctype<char> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&ctype<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::ctype<wchar_t> const* std::__try_use_facet<std::ctype<wchar_t> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::codecvt<char, char, int> const* std::__try_use_facet<std::codecvt<char, char, int>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&codecvt<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::codecvt<wchar_t, char, int> const* std::__try_use_facet<std::codecvt<wchar_t, char, int>
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&codecvt<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::collate<char> const* std::__try_use_facet<std::collate<char> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&collate<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::collate<wchar_t> const* std::__try_use_facet<std::collate<wchar_t> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&collate<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const*
// std::__try_use_facet<std::num_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const*
// std::__try_use_facet<std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::messages<char> const* std::__try_use_facet<std::messages<char> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&messages<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::messages<wchar_t> const* std::__try_use_facet<std::messages<wchar_t> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&messages<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::numpunct<char> const* std::__try_use_facet<std::numpunct<char> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&numpunct<char>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::numpunct<wchar_t> const* std::__try_use_facet<std::numpunct<wchar_t> >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const*
// std::__try_use_facet<std::time_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const*
// std::__try_use_facet<std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const*
// std::__try_use_facet<std::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_get<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const*
// std::__try_use_facet<std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const*
// std::__try_use_facet<std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::__try_use_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_put<>::id);
  return *(undefined8 *)(*(longlong *)(*param_1 + 8) + lVar1 * 8);
}



// std::get_new_handler()

undefined8 std::get_new_handler(void)

{
  return _data__ZN12_GLOBAL__N_113__new_handlerE;
}



// std::set_new_handler(void (*)())

undefined8 std::set_new_handler(undefined8 param_1)

{
  undefined8 uVar1;
  
  uVar1 = _data__ZN12_GLOBAL__N_113__new_handlerE;
  LOCK();
  _data__ZN12_GLOBAL__N_113__new_handlerE = param_1;
  UNLOCK();
  return uVar1;
}



// std::__convert_from_v(int* const&, char*, int, char const*, ...)

int std::__convert_from_v(undefined8 param_1,char *param_2,int param_3,char *param_4,...)

{
  uint uVar1;
  int iVar2;
  byte *_Str;
  size_t sVar3;
  char *_Locale;
  
  _Str = (byte *)setlocale(4,(char *)0x0);
  uVar1 = *_Str - 0x43;
  if (uVar1 == 0) {
    uVar1 = (uint)_Str[1];
  }
  if (uVar1 == 0) {
    iVar2 = __mingw_vsnprintf(param_2,(longlong)param_3,param_4,&stack0x00000028);
    return iVar2;
  }
  sVar3 = strlen((char *)_Str);
  _Locale = operator_new__(sVar3 + 1);
  memcpy(_Locale,_Str,sVar3 + 1);
  setlocale(4,"C");
  iVar2 = __mingw_vsnprintf(param_2,(longlong)param_3,param_4,&stack0x00000028);
  setlocale(4,_Locale);
  operator_delete__(_Locale);
  return iVar2;
}



// std::ostream& std::__ostream_insert<char, std::char_traits<char> >(std::ostream&, char const*,
// long long)

longlong * std::__ostream_insert<>(longlong *param_1,undefined8 param_2,longlong param_3)

{
  uint uVar1;
  longlong *plVar2;
  ctype<char> *pcVar3;
  ctype<char> cVar4;
  int iVar5;
  undefined4 uVar6;
  longlong lVar7;
  ios *piVar8;
  longlong lVar9;
  longlong lVar10;
  sentry local_58 [8];
  longlong *local_50;
  
  ostream::sentry::sentry(local_58,param_1);
  if (local_58[0] != (sentry)0x0) {
    lVar7 = *(longlong *)(*param_1 + -0x18);
    piVar8 = (ios *)((longlong)param_1 + lVar7);
    lVar10 = *(longlong *)(piVar8 + 0x10);
    if (param_3 < lVar10) {
      uVar1 = *(uint *)(piVar8 + 0x18);
      if ((uVar1 & 0xb0) != 0x20) {
        lVar9 = lVar10 - param_3;
        if (piVar8[0xe1] == (ios)0x0) {
          pcVar3 = *(ctype<char> **)(piVar8 + 0xf0);
          if (pcVar3 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
            __throw_bad_cast();
          }
          if (pcVar3[0x38] == (ctype<char>)0x0) {
            ctype<char>::_M_widen_init(pcVar3);
            cVar4 = (ctype<char>)0x20;
            if (*(code **)(*(longlong *)pcVar3 + 0x30) != ctype<char>::do_widen) {
              cVar4 = (ctype<char>)(**(code **)(*(longlong *)pcVar3 + 0x30))(pcVar3,0x20);
            }
          }
          else {
            cVar4 = pcVar3[0x59];
          }
          *(ctype<char> *)(piVar8 + 0xe0) = cVar4;
          lVar7 = *param_1;
          piVar8[0xe1] = (ios)0x1;
          lVar7 = *(longlong *)(lVar7 + -0x18);
        }
        else {
          cVar4 = *(ctype<char> *)(piVar8 + 0xe0);
        }
        do {
          plVar2 = *(longlong **)((longlong)param_1 + lVar7 + 0xe8);
          if ((ctype<char> *)plVar2[5] < (ctype<char> *)plVar2[6]) {
            *(ctype<char> *)plVar2[5] = cVar4;
            plVar2[5] = plVar2[5] + 1;
          }
          else {
            iVar5 = (**(code **)(*plVar2 + 0x68))(plVar2,cVar4);
            if (iVar5 == -1) {
              piVar8 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
              ios::clear(piVar8,*(uint *)(piVar8 + 0x20) | 1);
              piVar8 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
              if (*(int *)(piVar8 + 0x20) != 0) goto LAB_1400b7d90;
              goto LAB_1400b7e3f;
            }
          }
          lVar7 = *(longlong *)(*param_1 + -0x18);
          lVar9 = lVar9 + -1;
        } while (lVar9 != 0);
        piVar8 = (ios *)((longlong)param_1 + lVar7);
      }
      if (*(int *)(piVar8 + 0x20) == 0) {
LAB_1400b7e3f:
        lVar9 = (**(code **)(**(longlong **)(piVar8 + 0xe8) + 0x60))
                          (*(longlong **)(piVar8 + 0xe8),param_2,param_3);
        lVar7 = *param_1;
        if (param_3 != lVar9) {
          piVar8 = (ios *)(*(longlong *)(lVar7 + -0x18) + (longlong)param_1);
          ios::clear(piVar8,*(uint *)(piVar8 + 0x20) | 1);
          lVar7 = *param_1;
        }
        lVar7 = *(longlong *)(lVar7 + -0x18);
        piVar8 = (ios *)((longlong)param_1 + lVar7);
        if (((uVar1 & 0xb0) == 0x20) && (*(int *)(piVar8 + 0x20) == 0)) {
          lVar10 = lVar10 - param_3;
          if (piVar8[0xe1] == (ios)0x0) {
            pcVar3 = *(ctype<char> **)(piVar8 + 0xf0);
            if (pcVar3 == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
              __throw_bad_cast();
            }
            if (pcVar3[0x38] == (ctype<char>)0x0) {
              ctype<char>::_M_widen_init(pcVar3);
              cVar4 = (ctype<char>)0x20;
              if (*(code **)(*(longlong *)pcVar3 + 0x30) != ctype<char>::do_widen) {
                cVar4 = (ctype<char>)(**(code **)(*(longlong *)pcVar3 + 0x30))(pcVar3,0x20);
              }
            }
            else {
              cVar4 = pcVar3[0x59];
            }
            *(ctype<char> *)(piVar8 + 0xe0) = cVar4;
            lVar7 = *param_1;
            piVar8[0xe1] = (ios)0x1;
            lVar7 = *(longlong *)(lVar7 + -0x18);
          }
          else {
            cVar4 = *(ctype<char> *)(piVar8 + 0xe0);
          }
          do {
            plVar2 = *(longlong **)((longlong)param_1 + lVar7 + 0xe8);
            if ((ctype<char> *)plVar2[5] < (ctype<char> *)plVar2[6]) {
              *(ctype<char> *)plVar2[5] = cVar4;
              plVar2[5] = plVar2[5] + 1;
            }
            else {
              iVar5 = (**(code **)(*plVar2 + 0x68))(plVar2,cVar4);
              if (iVar5 == -1) {
                piVar8 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
                ios::clear(piVar8,*(uint *)(piVar8 + 0x20) | 1);
                goto LAB_1400b7e18;
              }
            }
            lVar7 = *(longlong *)(*param_1 + -0x18);
            lVar10 = lVar10 + -1;
          } while (lVar10 != 0);
          piVar8 = (ios *)((longlong)param_1 + lVar7);
        }
      }
    }
    else {
      lVar7 = (**(code **)(**(longlong **)(piVar8 + 0xe8) + 0x60))
                        (*(longlong **)(piVar8 + 0xe8),param_2,param_3);
      piVar8 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      if (param_3 != lVar7) {
        ios::clear(piVar8,*(uint *)(piVar8 + 0x20) | 1);
LAB_1400b7e18:
        *(undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = 0;
        goto LAB_1400b7d98;
      }
    }
LAB_1400b7d90:
    *(undefined8 *)(piVar8 + 0x10) = 0;
  }
LAB_1400b7d98:
  lVar7 = *(longlong *)(*local_50 + -0x18);
  if (((((*(byte *)((longlong)local_50 + lVar7 + 0x19) & 0x20) != 0) &&
       (uVar6 = uncaught_exception(), (char)uVar6 == '\0')) &&
      (plVar2 = *(longlong **)((longlong)local_50 + lVar7 + 0xe8), plVar2 != (longlong *)0x0)) &&
     (iVar5 = (**(code **)(*plVar2 + 0x30))(), iVar5 == -1)) {
    piVar8 = (ios *)((longlong)local_50 + *(longlong *)(*local_50 + -0x18));
    ios::clear(piVar8,*(uint *)(piVar8 + 0x20) | 1);
  }
  return param_1;
}



// std::wostream& std::__ostream_insert<wchar_t, std::char_traits<wchar_t> >(std::wostream&, wchar_t
// const*, long long)

longlong * std::__ostream_insert<>(longlong *param_1,undefined8 param_2,longlong param_3)

{
  uint uVar1;
  longlong *plVar2;
  short *psVar3;
  short sVar4;
  short sVar5;
  undefined4 uVar6;
  int iVar7;
  longlong lVar8;
  wios *pwVar9;
  longlong lVar10;
  longlong lVar11;
  sentry local_58 [8];
  longlong *local_50;
  
  wostream::sentry::sentry(local_58,param_1);
  if (local_58[0] != (sentry)0x0) {
    pwVar9 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    lVar11 = *(longlong *)(pwVar9 + 0x10);
    if (param_3 < lVar11) {
      uVar1 = *(uint *)(pwVar9 + 0x18);
      if ((uVar1 & 0xb0) == 0x20) {
LAB_1400b8188:
        iVar7 = *(int *)(pwVar9 + 0x20);
      }
      else {
        lVar10 = lVar11 - param_3;
        if (pwVar9[0xe2] == (wios)0x0) {
          plVar2 = *(longlong **)(pwVar9 + 0xf0);
          if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
            __throw_bad_cast();
          }
          sVar5 = (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
          *(short *)(pwVar9 + 0xe0) = sVar5;
          lVar8 = *param_1;
          pwVar9[0xe2] = (wios)0x1;
          pwVar9 = (wios *)(*(longlong *)(lVar8 + -0x18) + (longlong)param_1);
        }
        else {
          sVar5 = *(short *)(pwVar9 + 0xe0);
        }
        do {
          plVar2 = *(longlong **)(pwVar9 + 0xe8);
          psVar3 = (short *)plVar2[5];
          if (psVar3 < (short *)plVar2[6]) {
            *psVar3 = sVar5;
            plVar2[5] = (longlong)(psVar3 + 1);
            sVar4 = sVar5;
          }
          else {
            sVar4 = (**(code **)(*plVar2 + 0x68))(plVar2,sVar5);
            pwVar9 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
          }
          if (sVar4 == -1) {
            wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
            pwVar9 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
            goto LAB_1400b8188;
          }
          lVar10 = lVar10 + -1;
        } while (lVar10 != 0);
        iVar7 = *(int *)(pwVar9 + 0x20);
      }
      if (iVar7 == 0) {
        lVar8 = (**(code **)(**(longlong **)(pwVar9 + 0xe8) + 0x60))
                          (*(longlong **)(pwVar9 + 0xe8),param_2,param_3);
        lVar10 = *param_1;
        if (param_3 != lVar8) {
          pwVar9 = (wios *)(*(longlong *)(lVar10 + -0x18) + (longlong)param_1);
          wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
          lVar10 = *param_1;
        }
        pwVar9 = (wios *)(*(longlong *)(lVar10 + -0x18) + (longlong)param_1);
        if (((uVar1 & 0xb0) == 0x20) && (*(int *)(pwVar9 + 0x20) == 0)) {
          lVar11 = lVar11 - param_3;
          if (pwVar9[0xe2] == (wios)0x0) {
            plVar2 = *(longlong **)(pwVar9 + 0xf0);
            if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
              __throw_bad_cast();
            }
            sVar5 = (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
            *(short *)(pwVar9 + 0xe0) = sVar5;
            lVar10 = *param_1;
            pwVar9[0xe2] = (wios)0x1;
            pwVar9 = (wios *)(*(longlong *)(lVar10 + -0x18) + (longlong)param_1);
          }
          else {
            sVar5 = *(short *)(pwVar9 + 0xe0);
          }
          do {
            plVar2 = *(longlong **)(pwVar9 + 0xe8);
            psVar3 = (short *)plVar2[5];
            if (psVar3 < (short *)plVar2[6]) {
              *psVar3 = sVar5;
              plVar2[5] = (longlong)(psVar3 + 1);
              sVar4 = sVar5;
            }
            else {
              sVar4 = (**(code **)(*plVar2 + 0x68))(plVar2,sVar5);
              pwVar9 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
            }
            if (sVar4 == -1) {
              wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
              goto LAB_1400b8221;
            }
            lVar11 = lVar11 + -1;
          } while (lVar11 != 0);
        }
      }
    }
    else {
      lVar11 = (**(code **)(**(longlong **)(pwVar9 + 0xe8) + 0x60))
                         (*(longlong **)(pwVar9 + 0xe8),param_2,param_3);
      pwVar9 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      if (param_3 != lVar11) {
        wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
LAB_1400b8221:
        *(undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = 0;
        goto LAB_1400b819c;
      }
    }
    *(undefined8 *)(pwVar9 + 0x10) = 0;
  }
LAB_1400b819c:
  lVar11 = *(longlong *)(*local_50 + -0x18);
  if (((((*(byte *)((longlong)local_50 + lVar11 + 0x19) & 0x20) != 0) &&
       (uVar6 = uncaught_exception(), (char)uVar6 == '\0')) &&
      (plVar2 = *(longlong **)((longlong)local_50 + lVar11 + 0xe8), plVar2 != (longlong *)0x0)) &&
     (iVar7 = (**(code **)(*plVar2 + 0x30))(), iVar7 == -1)) {
    pwVar9 = (wios *)((longlong)local_50 + *(longlong *)(*local_50 + -0x18));
    wios::clear(pwVar9,*(uint *)(pwVar9 + 0x20) | 1);
  }
  return param_1;
}



// long long std::__copy_streambufs<char, std::char_traits<char> >(std::streambuf*, std::streambuf*)

longlong std::__copy_streambufs<>(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  undefined1 local_9 [9];
  
  lVar1 = __copy_streambufs_eof<>(param_1,param_2,local_9);
  return lVar1;
}



// long long std::__copy_streambufs<wchar_t, std::char_traits<wchar_t> >(std::wstreambuf*,
// std::wstreambuf*)

longlong std::__copy_streambufs<>(longlong *param_1,longlong *param_2)

{
  longlong lVar1;
  undefined1 local_9 [9];
  
  lVar1 = __copy_streambufs_eof<>(param_1,param_2,local_9);
  return lVar1;
}



// void std::__istream_extract<wchar_t, std::char_traits<wchar_t> >(std::wistream&, wchar_t*, long
// long)

void std::__istream_extract<>(longlong *param_1,short *param_2,longlong param_3)

{
  longlong *plVar1;
  longlong *plVar2;
  short *psVar3;
  char cVar4;
  short sVar5;
  longlong lVar6;
  wios *this;
  byte bVar7;
  uint uVar8;
  short *psVar9;
  longlong lVar10;
  longlong lVar11;
  sentry local_51;
  longlong local_50 [2];
  
  wistream::sentry::sentry(&local_51,param_1,'\0');
  lVar6 = *param_1;
  if (local_51 == (sentry)0x0) {
    uVar8 = 4;
  }
  else {
    lVar11 = *(longlong *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10);
    if ((lVar11 < 1) || (param_3 <= lVar11)) {
      lVar11 = param_3;
    }
    locale::locale((locale *)local_50,
                   (undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0xd0));
    lVar6 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
    plVar1 = *(longlong **)(*(longlong *)(local_50[0] + 8) + lVar6 * 8);
    if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    locale::~locale((locale *)local_50);
    plVar2 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
    if ((short *)plVar2[2] < (short *)plVar2[3]) {
      sVar5 = *(short *)plVar2[2];
    }
    else {
      sVar5 = (**(code **)(*plVar2 + 0x48))();
    }
    lVar11 = lVar11 + -1;
    if (lVar11 < 1) {
      local_51 = (sentry)(sVar5 == -1);
    }
    else {
      lVar10 = 0;
      if (sVar5 != -1) {
        do {
          cVar4 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20);
          if (cVar4 != '\0') {
            lVar6 = *param_1;
            *param_2 = 0;
            *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
            if (lVar10 != 0) {
              return;
            }
            bVar7 = 0;
            goto LAB_1400b86c7;
          }
          psVar9 = param_2 + 1;
          psVar3 = (short *)plVar2[2];
          lVar10 = lVar10 + 1;
          *param_2 = sVar5;
          if (psVar3 < (short *)plVar2[3]) {
            sVar5 = *psVar3;
            plVar2[2] = (longlong)(psVar3 + 1);
          }
          else {
            sVar5 = (**(code **)(*plVar2 + 0x50))(plVar2);
          }
          if (sVar5 == -1) break;
          if ((short *)plVar2[2] < (short *)plVar2[3]) {
            sVar5 = *(short *)plVar2[2];
          }
          else {
            sVar5 = (**(code **)(*plVar2 + 0x48))(plVar2);
          }
          if (lVar10 == lVar11) {
            lVar6 = *param_1;
            *psVar9 = 0;
            *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
            return;
          }
          param_2 = psVar9;
        } while (sVar5 != -1);
        *psVar9 = 0;
        lVar6 = *param_1;
        *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
        if (lVar11 <= lVar10) {
          return;
        }
        uVar8 = 2;
        goto LAB_1400b8635;
      }
    }
    lVar6 = *param_1;
    *param_2 = 0;
    bVar7 = 0 < lVar11 & (byte)local_51;
    *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
LAB_1400b86c7:
    uVar8 = (uint)bVar7 * 2 | 4;
  }
LAB_1400b8635:
  this = (wios *)(*(longlong *)(lVar6 + -0x18) + (longlong)param_1);
  wios::clear(this,uVar8 | *(uint *)(this + 0x20));
  return;
}



// std::__istream_extract(std::istream&, char*, long long)

void std::__istream_extract(longlong *param_1,undefined1 *param_2,longlong param_3)

{
  longlong *plVar1;
  void *_Src;
  int iVar2;
  longlong lVar3;
  byte *pbVar4;
  ulonglong uVar5;
  longlong lVar6;
  ios *this;
  uint uVar7;
  longlong lVar8;
  longlong lVar9;
  undefined1 *puVar10;
  longlong lVar11;
  longlong lVar12;
  longlong lVar13;
  size_t _Size;
  sentry local_51;
  longlong local_50 [2];
  
  istream::sentry::sentry(&local_51,param_1,'\0');
  lVar3 = *param_1;
  if (local_51 == (sentry)0x0) {
    uVar7 = 4;
    goto LAB_1400b893d;
  }
  lVar12 = *(longlong *)((longlong)param_1 + *(longlong *)(lVar3 + -0x18) + 0x10);
  if ((lVar12 < 1) || (param_3 <= lVar12)) {
    lVar12 = param_3;
  }
  locale::locale((locale *)local_50,
                 (undefined8 *)((longlong)param_1 + *(longlong *)(lVar3 + -0x18) + 0xd0));
  lVar3 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar3 = *(longlong *)(*(longlong *)(local_50[0] + 8) + lVar3 * 8);
  if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  locale::~locale((locale *)local_50);
  plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
  if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
    uVar5 = (ulonglong)*(byte *)plVar1[2];
    if (0 < lVar12 + -1) {
LAB_1400b8845:
      lVar13 = lVar12 + -1;
      lVar9 = 0;
LAB_1400b8850:
      lVar6 = *(longlong *)(lVar3 + 0x30);
      puVar10 = param_2;
      if ((*(byte *)(lVar6 + (uVar5 & 0xff) * 2) & 0x20) == 0) {
        do {
          _Src = (void *)plVar1[2];
          lVar8 = (lVar12 - lVar9) + -1;
          lVar11 = plVar1[3] - (longlong)_Src;
          if (lVar11 < lVar8) {
            lVar8 = lVar11;
          }
          if (1 < lVar8) {
            pbVar4 = (byte *)((longlong)_Src + 1);
            if (pbVar4 < (byte *)(lVar8 + (longlong)_Src)) goto LAB_1400b88a9;
            _Size = 1;
            goto LAB_1400b89f0;
          }
          *param_2 = (char)uVar5;
          puVar10 = param_2 + 1;
          lVar9 = lVar9 + 1;
          if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
            pbVar4 = (byte *)plVar1[2] + 1;
            plVar1[2] = (longlong)pbVar4;
            if ((byte *)plVar1[3] <= pbVar4) goto LAB_1400b8a87;
          }
          else {
            iVar2 = (**(code **)(*plVar1 + 0x50))(plVar1);
            if (iVar2 == -1) {
              param_2[1] = 0;
              lVar3 = *param_1;
              *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar3 + -0x18) + 0x10) = 0;
              uVar7 = 2;
              if (lVar9 == 0) goto LAB_1400b89db;
              if (lVar13 <= lVar9) {
                return;
              }
              uVar7 = 2;
              goto LAB_1400b893d;
            }
            pbVar4 = (byte *)plVar1[2];
            if ((byte *)plVar1[3] <= pbVar4) goto LAB_1400b8a87;
          }
          uVar5 = (ulonglong)*pbVar4;
          if (lVar13 <= lVar9) goto LAB_1400b88e5;
          lVar6 = *(longlong *)(lVar3 + 0x30);
          param_2 = puVar10;
          if ((*(byte *)(lVar6 + (ulonglong)*pbVar4 * 2) & 0x20) != 0) break;
        } while( true );
      }
      *puVar10 = 0;
      lVar3 = *param_1;
      *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar3 + -0x18) + 0x10) = 0;
      if (lVar9 != 0) {
        return;
      }
      uVar7 = 0;
      goto LAB_1400b89db;
    }
LAB_1400b8acb:
    uVar7 = 0;
  }
  else {
    uVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
    if (lVar12 + -1 < 1) goto LAB_1400b8acb;
    if ((int)uVar5 != -1) goto LAB_1400b8845;
    uVar7 = 2;
  }
  *param_2 = 0;
  lVar3 = *param_1;
  *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar3 + -0x18) + 0x10) = 0;
LAB_1400b89db:
  uVar7 = uVar7 | 4;
LAB_1400b893d:
  this = (ios *)(*(longlong *)(lVar3 + -0x18) + (longlong)param_1);
  ios::clear(this,uVar7 | *(uint *)(this + 0x20));
  return;
  while (pbVar4 = pbVar4 + 1, (byte *)(lVar8 + (longlong)_Src) != pbVar4) {
LAB_1400b88a9:
    if ((*(byte *)(lVar6 + (ulonglong)*pbVar4 * 2) & 0x20) != 0) break;
  }
  _Size = (longlong)pbVar4 - (longlong)_Src;
  if (_Size == 0) {
    plVar1[2] = (longlong)pbVar4;
    if (pbVar4 < (byte *)plVar1[3]) goto LAB_1400b88d9;
  }
  else {
LAB_1400b89f0:
    lVar9 = lVar9 + _Size;
    memcpy(param_2,_Src,_Size);
    pbVar4 = (byte *)(plVar1[2] + _Size);
    param_2 = param_2 + _Size;
    plVar1[2] = (longlong)pbVar4;
    if (pbVar4 < (byte *)plVar1[3]) {
LAB_1400b88d9:
      uVar5 = (ulonglong)*pbVar4;
      puVar10 = param_2;
      if (lVar13 <= lVar9) {
LAB_1400b88e5:
        *puVar10 = 0;
        *(undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = 0;
        return;
      }
      goto LAB_1400b8850;
    }
  }
  uVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
  puVar10 = param_2;
LAB_1400b8a2c:
  if (lVar13 <= lVar9) goto LAB_1400b88e5;
  param_2 = puVar10;
  if ((int)uVar5 == -1) {
    *puVar10 = 0;
    lVar3 = *param_1;
    *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar3 + -0x18) + 0x10) = 0;
    uVar7 = 2;
    if (lVar9 == 0) {
      uVar7 = 6;
    }
    goto LAB_1400b893d;
  }
  goto LAB_1400b8850;
LAB_1400b8a87:
  uVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
  goto LAB_1400b8a2c;
}



// std::__verify_grouping(char const*, unsigned long long, std::__cxx11::string const&)

void std::__verify_grouping(longlong param_1,longlong param_2,undefined8 *param_3)

{
  __verify_grouping_impl(param_1,param_2,(char *)*param_3,param_3[1]);
  return;
}



// std::__verify_grouping(char const*, unsigned long long, std::string const&)

void std::__verify_grouping(longlong param_1,longlong param_2,undefined8 *param_3)

{
  __verify_grouping_impl(param_1,param_2,(char *)*param_3,*(longlong *)((char *)*param_3 + -0x18));
  return;
}



// std::iostream_category()

undefined ** std::iostream_category(void)

{
  return &_data__ZN12_GLOBAL__N_120io_category_instanceE;
}



// std::uncaught_exception()

undefined4 std::uncaught_exception(void)

{
  longlong lVar1;
  
  lVar1 = __cxa_get_globals();
  return CONCAT31((int3)((uint)*(int *)(lVar1 + 8) >> 8),*(int *)(lVar1 + 8) != 0);
}



// std::uncaught_exceptions()

undefined4 std::uncaught_exceptions(void)

{
  longlong lVar1;
  
  lVar1 = __cxa_get_globals();
  return *(undefined4 *)(lVar1 + 8);
}



// long long std::__copy_streambufs_eof<char, std::char_traits<char> >(std::streambuf*,
// std::streambuf*, bool&)

longlong std::__copy_streambufs_eof<>(longlong *param_1,longlong *param_2,undefined1 *param_3)

{
  uint uVar1;
  int iVar2;
  longlong lVar3;
  byte *pbVar4;
  longlong lVar5;
  byte *pbVar6;
  longlong lVar7;
  
  pbVar6 = (byte *)param_1[3];
  pbVar4 = (byte *)param_1[2];
  *param_3 = 1;
  if (pbVar4 < pbVar6) {
    uVar1 = (uint)*pbVar4;
  }
  else {
    uVar1 = (**(code **)(*param_1 + 0x48))();
    if (uVar1 == 0xffffffff) {
      return 0;
    }
    pbVar6 = (byte *)param_1[3];
    pbVar4 = (byte *)param_1[2];
  }
  lVar7 = 0;
  do {
    lVar5 = (longlong)pbVar6 - (longlong)pbVar4;
    if (lVar5 < 2) {
      if ((undefined1 *)param_2[5] < (undefined1 *)param_2[6]) {
        *(undefined1 *)param_2[5] = (char)uVar1;
        param_2[5] = param_2[5] + 1;
      }
      else {
        iVar2 = (**(code **)(*param_2 + 0x68))(param_2,uVar1 & 0xff);
        if (iVar2 == -1) goto LAB_1400b8cc8;
      }
      pbVar6 = (byte *)param_1[3];
      lVar7 = lVar7 + 1;
      if ((byte *)param_1[2] < pbVar6) {
        pbVar4 = (byte *)param_1[2] + 1;
        param_1[2] = (longlong)pbVar4;
      }
      else {
        iVar2 = (**(code **)(*param_1 + 0x50))(param_1);
        if (iVar2 == -1) {
          return lVar7;
        }
        pbVar4 = (byte *)param_1[2];
        pbVar6 = (byte *)param_1[3];
      }
      if (pbVar6 <= pbVar4) goto LAB_1400b8c59;
      uVar1 = (uint)*pbVar4;
    }
    else {
      lVar3 = (**(code **)(*param_2 + 0x60))(param_2,pbVar4,lVar5);
      param_1[2] = param_1[2] + lVar3;
      lVar7 = lVar7 + lVar3;
      if (lVar3 < lVar5) {
LAB_1400b8cc8:
        *param_3 = 0;
        return lVar7;
      }
LAB_1400b8c59:
      uVar1 = (**(code **)(*param_1 + 0x48))(param_1);
      if (uVar1 == 0xffffffff) {
        return lVar7;
      }
      pbVar6 = (byte *)param_1[3];
    }
    pbVar4 = (byte *)param_1[2];
  } while( true );
}



// long long std::__copy_streambufs_eof<wchar_t, std::char_traits<wchar_t> >(std::wstreambuf*,
// std::wstreambuf*, bool&)

longlong std::__copy_streambufs_eof<>(longlong *param_1,longlong *param_2,undefined1 *param_3)

{
  short *psVar1;
  short *psVar2;
  short sVar3;
  longlong lVar4;
  short *psVar5;
  longlong lVar6;
  longlong lVar7;
  
  psVar1 = (short *)param_1[2];
  *param_3 = 1;
  if (psVar1 < (short *)param_1[3]) {
    sVar3 = *psVar1;
  }
  else {
    sVar3 = (**(code **)(*param_1 + 0x48))();
  }
  lVar6 = 0;
  do {
    while( true ) {
      if (sVar3 == -1) {
        return lVar6;
      }
      psVar1 = (short *)param_1[3];
      psVar5 = (short *)param_1[2];
      lVar7 = (longlong)psVar1 - (longlong)psVar5;
      if (lVar7 < 3) break;
      lVar7 = lVar7 >> 1;
      lVar4 = (**(code **)(*param_2 + 0x60))(param_2,psVar5,lVar7);
      lVar6 = lVar6 + lVar4;
      param_1[2] = param_1[2] + lVar4 * 2;
      if (lVar4 < lVar7) {
LAB_1400b8de0:
        *param_3 = 0;
        return lVar6;
      }
LAB_1400b8d7b:
      sVar3 = (**(code **)(*param_1 + 0x48))(param_1);
    }
    psVar2 = (short *)param_2[5];
    if (psVar2 < (short *)param_2[6]) {
      *psVar2 = sVar3;
      param_2[5] = (longlong)(psVar2 + 1);
      if (psVar5 < psVar1) goto LAB_1400b8dc0;
LAB_1400b8e20:
      sVar3 = (**(code **)(*param_1 + 0x50))(param_1);
    }
    else {
      sVar3 = (**(code **)(*param_2 + 0x68))(param_2,sVar3);
      if (sVar3 == -1) goto LAB_1400b8de0;
      psVar5 = (short *)param_1[2];
      if ((short *)param_1[3] <= psVar5) goto LAB_1400b8e20;
LAB_1400b8dc0:
      sVar3 = *psVar5;
      param_1[2] = (longlong)(psVar5 + 1);
    }
    lVar6 = lVar6 + 1;
    if (sVar3 == -1) {
      return lVar6;
    }
    if ((short *)param_1[3] <= (short *)param_1[2]) goto LAB_1400b8d7b;
    sVar3 = *(short *)param_1[2];
  } while( true );
}



// std::__destroy_ios_failure(void*)

void std::__destroy_ios_failure(undefined8 *param_1)

{
  int *piVar1;
  int iVar2;
  longlong lVar3;
  
  if (*(code **)*param_1 != ios_base::failure::~failure) {
                    // WARNING: Could not recover jumptable at 0x0001400b8ec5. Too many branches
                    // WARNING: Treating indirect jump as call
    (**(code **)*param_1)();
    return;
  }
  *param_1 = &PTR__failure_1400dcf70;
  lVar3 = param_1[1];
  if (_CRT_MT == 0) {
    iVar2 = *(int *)(lVar3 + -8);
    *(int *)(lVar3 + -8) = iVar2 + -1;
  }
  else {
    LOCK();
    piVar1 = (int *)(lVar3 + -8);
    iVar2 = *piVar1;
    *piVar1 = *piVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    exception::~exception();
    return;
  }
  string::_Rep::_M_destroy((void *)(lVar3 + -0x18));
  exception::~exception();
  return;
}



// std::__verify_grouping_impl(char const*, unsigned long long, char const*, unsigned long long)

bool std::__verify_grouping_impl(longlong param_1,longlong param_2,char *param_3,longlong param_4)

{
  char *pcVar1;
  char cVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  ulonglong uVar5;
  bool bVar6;
  bool bVar7;
  
  uVar4 = param_4 - 1;
  uVar3 = param_2 - 1U;
  if (uVar4 < param_2 - 1U) {
    uVar3 = uVar4;
  }
  if (uVar3 == 0) {
    bVar6 = true;
  }
  else {
    uVar5 = 0;
    do {
      bVar6 = param_3[uVar4] == *(char *)(param_1 + uVar5);
      uVar5 = uVar5 + 1;
      uVar4 = uVar4 - 1;
      if (uVar3 <= uVar5) break;
    } while (bVar6);
  }
  cVar2 = *(char *)(param_1 + uVar3);
  while ((uVar4 != 0 && (bVar7 = bVar6 != false, bVar6 = false, bVar7))) {
    pcVar1 = param_3 + uVar4;
    uVar4 = uVar4 - 1;
    bVar6 = *pcVar1 == cVar2;
  }
  if ((byte)(cVar2 - 1U) < 0x7e) {
    bVar6 = (bool)(bVar6 & *param_3 <= cVar2);
  }
  return bVar6;
}



// std::__construct_ios_failure(void*, char const*)

void std::__construct_ios_failure(failure *param_1,char *param_2)

{
  size_t *psVar1;
  int iVar2;
  size_t _Size;
  size_t *psVar3;
  size_t *local_30 [2];
  
  if (param_2 == (char *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_logic_error("basic_string::_S_construct null not valid");
  }
  _Size = strlen(param_2);
  psVar3 = (size_t *)string::_Rep::_S_create(_Size,0);
  local_30[0] = psVar3 + 3;
  if (_Size == 1) {
    *(char *)(psVar3 + 3) = *param_2;
  }
  else if (_Size != 0) {
    local_30[0] = memcpy(local_30[0],param_2,_Size);
  }
  *(undefined4 *)(psVar3 + 2) = 0;
  *psVar3 = _Size;
  *(undefined1 *)((longlong)psVar3 + _Size + 0x18) = 0;
  ios_base::failure::failure(param_1,(longlong *)local_30);
  if (_CRT_MT == 0) {
    iVar2 = (int)psVar3[2];
    *(int *)(psVar3 + 2) = iVar2 + -1;
  }
  else {
    LOCK();
    psVar1 = psVar3 + 2;
    iVar2 = (int)*psVar1;
    *(int *)psVar1 = (int)*psVar1 + -1;
    UNLOCK();
  }
  if (0 < iVar2) {
    return;
  }
  string::_Rep::_M_destroy(psVar3);
  return;
}



// std::__is_ios_failure_handler(__cxxabiv1::__class_type_info const*)

void std::__is_ios_failure_handler(type_info *param_1)

{
  type_info::operator==(param_1,(type_info *)&ios_base::failure::typeinfo);
  return;
}



// WARNING: Function: ___chkstk_ms replaced with injection: alloca_probe
// std::__throw_out_of_range_fmt(char const*, ...)

void std::__throw_out_of_range_fmt
               (char *param_1,ulonglong param_2,undefined8 param_3,undefined8 param_4,...)

{
  longlong lVar1;
  size_t sVar2;
  out_of_range *this;
  ulonglong local_res10;
  undefined8 local_res18;
  undefined8 local_res20;
  undefined8 auStack_50 [5];
  char acStack_28 [8];
  ulonglong *local_20;
  
  auStack_50[0] = 0x1400b9070;
  local_res10 = param_2;
  local_res18 = param_3;
  local_res20 = param_4;
  sVar2 = strlen(param_1);
  auStack_50[0] = 0x1400b9086;
  lVar1 = -(sVar2 + 0x20f & 0xfffffffffffffff0);
  local_20 = &local_res10;
  *(undefined8 *)((longlong)auStack_50 + lVar1) = 0x1400b90a1;
  __gnu_cxx::__snprintf_lite(acStack_28 + lVar1,sVar2 + 0x200,param_1,&local_res10);
  *(undefined8 *)((longlong)auStack_50 + lVar1) = 0x1400b90ab;
  this = (out_of_range *)__cxa_allocate_exception(0x10);
  *(undefined8 *)((longlong)auStack_50 + lVar1) = 0x1400b90b9;
  out_of_range::out_of_range(this,acStack_28 + lVar1);
                    // WARNING: Subroutine does not return
  *(undefined **)((longlong)auStack_50 + lVar1) = &UNK_1400b90cf;
  __cxa_throw((longlong)this,&out_of_range::typeinfo,out_of_range::~out_of_range);
}



// std::istream& std::ws<char, std::char_traits<char> >(std::istream&)

longlong * std::ws<>(longlong *param_1)

{
  longlong *plVar1;
  int iVar2;
  longlong lVar3;
  byte *pbVar4;
  ulonglong uVar5;
  ios *this;
  sentry local_31;
  longlong local_30 [2];
  
  istream::sentry::sentry(&local_31,param_1,'\x01');
  if (local_31 == (sentry)0x0) {
    return param_1;
  }
  locale::locale((locale *)local_30,
                 (undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xd0));
  lVar3 = locale::id::_M_id((id *)&ctype<char>::id);
  lVar3 = *(longlong *)(*(longlong *)(local_30[0] + 8) + lVar3 * 8);
  if (lVar3 == 0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  locale::~locale((locale *)local_30);
  plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
  pbVar4 = (byte *)plVar1[2];
  if (pbVar4 < (byte *)plVar1[3]) goto LAB_1400b919d;
LAB_1400b91e0:
  uVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
  if ((int)uVar5 == -1) {
LAB_1400b91ee:
    this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    ios::clear(this,*(uint *)(this + 0x20) | 2);
    return param_1;
  }
  do {
    if ((*(byte *)(*(longlong *)(lVar3 + 0x30) + (uVar5 & 0xff) * 2) & 0x20) == 0) {
      return param_1;
    }
    if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
      pbVar4 = (byte *)plVar1[2] + 1;
      plVar1[2] = (longlong)pbVar4;
      if ((byte *)plVar1[3] <= pbVar4) goto LAB_1400b91e0;
    }
    else {
      iVar2 = (**(code **)(*plVar1 + 0x50))(plVar1);
      if (iVar2 == -1) goto LAB_1400b91ee;
      pbVar4 = (byte *)plVar1[2];
      if ((byte *)plVar1[3] <= pbVar4) goto LAB_1400b91e0;
    }
LAB_1400b919d:
    uVar5 = (ulonglong)*pbVar4;
  } while( true );
}



// std::wistream& std::ws<wchar_t, std::char_traits<wchar_t> >(std::wistream&)

longlong * std::ws<>(longlong *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  char cVar3;
  short sVar4;
  longlong lVar5;
  short *psVar6;
  wios *this;
  sentry local_31;
  longlong local_30 [2];
  
  wistream::sentry::sentry(&local_31,param_1,'\x01');
  if (local_31 == (sentry)0x0) {
    return param_1;
  }
  locale::locale((locale *)local_30,
                 (undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xd0));
  lVar5 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  plVar1 = *(longlong **)(*(longlong *)(local_30[0] + 8) + lVar5 * 8);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  locale::~locale((locale *)local_30);
  plVar2 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
  psVar6 = (short *)plVar2[2];
  if (psVar6 < (short *)plVar2[3]) goto LAB_1400b9363;
LAB_1400b93c0:
  sVar4 = (**(code **)(*plVar2 + 0x48))(plVar2);
  do {
    if (sVar4 == -1) {
LAB_1400b939d:
      this = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      wios::clear(this,*(uint *)(this + 0x20) | 2);
      return param_1;
    }
    cVar3 = (**(code **)(*plVar1 + 0x10))(plVar1,0x20);
    if (cVar3 == '\0') {
      return param_1;
    }
    psVar6 = (short *)plVar2[2];
    if (psVar6 < (short *)plVar2[3]) {
      sVar4 = *psVar6;
      plVar2[2] = (longlong)(psVar6 + 1);
    }
    else {
      sVar4 = (**(code **)(*plVar2 + 0x50))(plVar2);
    }
    if (sVar4 == -1) goto LAB_1400b939d;
    psVar6 = (short *)plVar2[2];
    if ((short *)plVar2[3] <= psVar6) goto LAB_1400b93c0;
LAB_1400b9363:
    sVar4 = *psVar6;
  } while( true );
}



// std::ostream& std::endl<char, std::char_traits<char> >(std::ostream&)

ostream * std::endl<>(ostream *param_1)

{
  ctype<char> *this;
  ctype<char> cVar1;
  ostream *poVar2;
  
  this = *(ctype<char> **)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0xf0);
  if (this != (ctype<char> *)0x0) {
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      cVar1 = (ctype<char>)0xa;
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        cVar1 = (ctype<char>)(**(code **)(*(longlong *)this + 0x30))(this);
      }
    }
    else {
      cVar1 = this[0x43];
    }
    poVar2 = ostream::put(param_1,cVar1);
    poVar2 = ostream::flush(poVar2);
    return poVar2;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::wostream& std::endl<wchar_t, std::char_traits<wchar_t> >(std::wostream&)

wostream * std::endl<>(wostream *param_1)

{
  longlong *plVar1;
  short sVar2;
  wostream *pwVar3;
  
  plVar1 = *(longlong **)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0xf0);
  if (plVar1 != (longlong *)0x0) {
    sVar2 = (**(code **)(*plVar1 + 0x50))(plVar1,10);
    pwVar3 = wostream::put(param_1,sVar2);
    pwVar3 = wostream::flush(pwVar3);
    return pwVar3;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::ostream& std::ends<char, std::char_traits<char> >(std::ostream&)

ostream * std::ends<>(ostream *param_1)

{
  ostream *poVar1;
  
  poVar1 = ostream::put(param_1,0);
  return poVar1;
}



// std::wostream& std::ends<wchar_t, std::char_traits<wchar_t> >(std::wostream&)

wostream * std::ends<>(wostream *param_1)

{
  wostream *pwVar1;
  
  pwVar1 = wostream::put(param_1,0);
  return pwVar1;
}



// std::ostream& std::flush<char, std::char_traits<char> >(std::ostream&)

longlong * std::flush<>(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  int iVar3;
  undefined4 uVar4;
  ios *piVar5;
  sentry asStack_28 [8];
  longlong *plStack_20;
  
  if (*(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8) != 0) {
    ostream::sentry::sentry(asStack_28,param_1);
    if (asStack_28[0] != (sentry)0x0) {
      iVar3 = (**(code **)(**(longlong **)
                             ((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8) + 0x30))()
      ;
      if (iVar3 == -1) {
        piVar5 = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
        ios::clear(piVar5,*(uint *)(piVar5 + 0x20) | 1);
      }
    }
    lVar1 = *(longlong *)(*plStack_20 + -0x18);
    if ((*(byte *)((longlong)plStack_20 + lVar1 + 0x19) & 0x20) != 0) {
      uVar4 = uncaught_exception();
      if (((char)uVar4 == '\0') &&
         (plVar2 = *(longlong **)((longlong)plStack_20 + lVar1 + 0xe8), plVar2 != (longlong *)0x0))
      {
        iVar3 = (**(code **)(*plVar2 + 0x30))();
        if (iVar3 == -1) {
          piVar5 = (ios *)((longlong)plStack_20 + *(longlong *)(*plStack_20 + -0x18));
          ios::clear(piVar5,*(uint *)(piVar5 + 0x20) | 1);
        }
      }
    }
  }
  return param_1;
}



// std::wostream& std::flush<wchar_t, std::char_traits<wchar_t> >(std::wostream&)

longlong * std::flush<>(longlong *param_1)

{
  longlong lVar1;
  longlong *plVar2;
  int iVar3;
  undefined4 uVar4;
  wios *pwVar5;
  sentry asStack_28 [8];
  longlong *plStack_20;
  
  if (*(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8) != 0) {
    wostream::sentry::sentry(asStack_28,param_1);
    if (asStack_28[0] != (sentry)0x0) {
      iVar3 = (**(code **)(**(longlong **)
                             ((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8) + 0x30))()
      ;
      if (iVar3 == -1) {
        pwVar5 = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
        wios::clear(pwVar5,*(uint *)(pwVar5 + 0x20) | 1);
      }
    }
    lVar1 = *(longlong *)(*plStack_20 + -0x18);
    if ((*(byte *)((longlong)plStack_20 + lVar1 + 0x19) & 0x20) != 0) {
      uVar4 = uncaught_exception();
      if (((char)uVar4 == '\0') &&
         (plVar2 = *(longlong **)((longlong)plStack_20 + lVar1 + 0xe8), plVar2 != (longlong *)0x0))
      {
        iVar3 = (**(code **)(*plVar2 + 0x30))();
        if (iVar3 == -1) {
          pwVar5 = (wios *)((longlong)plStack_20 + *(longlong *)(*plStack_20 + -0x18));
          wios::clear(pwVar5,*(uint *)(pwVar5 + 0x20) | 1);
        }
      }
    }
  }
  return param_1;
}



// std::istream& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::istream&,
// std::__cxx11::string&, char)

longlong * std::getline<>(longlong *param_1,string *param_2,byte param_3)

{
  longlong *plVar1;
  size_t sVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  void *pvVar6;
  byte *pbVar7;
  string *psVar8;
  byte *pbVar9;
  uint uVar10;
  ios *this;
  ulonglong uVar11;
  ulonglong uVar12;
  size_t _MaxCount;
  string *_Buf;
  sentry local_49 [9];
  
  istream::sentry::sentry(local_49,param_1,'\x01');
  if (local_49[0] != (sentry)0x0) {
    *(undefined8 *)(param_2 + 8) = 0;
    uVar10 = (uint)param_3;
    **(undefined1 **)param_2 = 0;
    plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
    _Buf = (string *)plVar1[2];
    psVar8 = (string *)plVar1[3];
    if (_Buf < psVar8) {
      uVar5 = (uint)(byte)*_Buf;
      uVar12 = 0;
      if (uVar10 != (byte)*_Buf) goto LAB_1400b9610;
    }
    else {
      uVar5 = (**(code **)(*plVar1 + 0x48))(plVar1);
      if (uVar5 == 0xffffffff) {
LAB_1400b9796:
        uVar10 = 6;
        goto LAB_1400b959d;
      }
      _Buf = (string *)plVar1[2];
      psVar8 = (string *)plVar1[3];
      if (uVar10 == uVar5) {
        if (_Buf < psVar8) {
          plVar1[2] = (longlong)(_Buf + 1);
          return param_1;
        }
        (**(code **)(*plVar1 + 0x50))(plVar1);
        return param_1;
      }
LAB_1400b9610:
      uVar12 = 0;
LAB_1400b96aa:
      sVar2 = *(size_t *)(param_2 + 8);
      _MaxCount = 0x3fffffffffffffff - uVar12;
      if ((longlong)psVar8 - (longlong)_Buf < (longlong)(0x3fffffffffffffff - uVar12)) {
        _MaxCount = (longlong)psVar8 - (longlong)_Buf;
      }
      if (1 < (longlong)_MaxCount) {
        pvVar6 = memchr(_Buf,(int)(char)param_3,_MaxCount);
        if (pvVar6 != (void *)0x0) {
          _MaxCount = (longlong)pvVar6 - (longlong)_Buf;
        }
        if (0x3fffffffffffffff - sVar2 < _MaxCount) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
        __cxx11::string::_M_append(param_2,_Buf,_MaxCount);
        uVar12 = uVar12 + _MaxCount;
        pbVar7 = (byte *)(plVar1[2] + _MaxCount);
        plVar1[2] = (longlong)pbVar7;
        if (pbVar7 < (byte *)plVar1[3]) {
          uVar5 = (uint)*pbVar7;
          uVar3 = (uint)*pbVar7;
          if (0x3ffffffffffffffe < uVar12) goto LAB_1400b972c;
LAB_1400b9698:
          if (uVar10 == uVar5) goto LAB_1400b9740;
          psVar8 = (string *)plVar1[3];
          _Buf = (string *)plVar1[2];
          goto LAB_1400b96aa;
        }
LAB_1400b9770:
        uVar3 = (**(code **)(*plVar1 + 0x48))(plVar1);
        if (0x3ffffffffffffffe < uVar12) {
          if (uVar3 != 0xffffffff) goto LAB_1400b972c;
          goto LAB_1400b9800;
        }
        uVar5 = uVar3;
        if (uVar3 != 0xffffffff) goto LAB_1400b9698;
        if (uVar12 == 0) goto LAB_1400b9796;
LAB_1400b9800:
        uVar10 = 2;
        goto LAB_1400b959d;
      }
      psVar8 = *(string **)param_2;
      if (psVar8 == param_2 + 0x10) {
        uVar11 = 0xf;
      }
      else {
        uVar11 = *(ulonglong *)(param_2 + 0x10);
      }
      if (uVar11 < sVar2 + 1) {
        __cxx11::string::_M_mutate(param_2,sVar2,0,(undefined1 *)0x0,1);
        psVar8 = *(string **)param_2;
      }
      psVar8[sVar2] = SUB41(uVar5,0);
      uVar12 = uVar12 + 1;
      *(size_t *)(param_2 + 8) = sVar2 + 1;
      *(undefined1 *)(*(longlong *)param_2 + 1 + sVar2) = 0;
      pbVar7 = (byte *)plVar1[3];
      if (pbVar7 <= (byte *)plVar1[2]) {
        iVar4 = (**(code **)(*plVar1 + 0x50))(plVar1);
        if (iVar4 != -1) {
          pbVar9 = (byte *)plVar1[2];
          pbVar7 = (byte *)plVar1[3];
          goto LAB_1400b971b;
        }
        goto LAB_1400b9800;
      }
      pbVar9 = (byte *)plVar1[2] + 1;
      plVar1[2] = (longlong)pbVar9;
LAB_1400b971b:
      if (pbVar7 <= pbVar9) goto LAB_1400b9770;
      uVar3 = (uint)*pbVar9;
      uVar5 = (uint)*pbVar9;
      if (uVar12 != 0x3fffffffffffffff) goto LAB_1400b9698;
LAB_1400b972c:
      if (uVar10 != uVar3) goto LAB_1400b9598;
LAB_1400b9740:
      _Buf = (string *)plVar1[2];
    }
    if (_Buf < (string *)plVar1[3]) {
      plVar1[2] = (longlong)(_Buf + 1);
    }
    else {
      (**(code **)(*plVar1 + 0x50))(plVar1);
    }
    if (uVar12 != 0xffffffffffffffff) {
      return param_1;
    }
  }
LAB_1400b9598:
  uVar10 = 4;
LAB_1400b959d:
  this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios::clear(this,uVar10 | *(uint *)(this + 0x20));
  return param_1;
}



// std::wistream& std::getline<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>
// >(std::wistream&, std::__cxx11::wstring&, wchar_t)

longlong * std::getline<>(longlong *param_1,wstring *param_2,short param_3)

{
  longlong *plVar1;
  short *psVar2;
  short *psVar3;
  short sVar4;
  short *psVar5;
  short *psVar6;
  wstring *pwVar7;
  wios *this;
  short *psVar8;
  uint uVar9;
  short *psVar10;
  ulonglong uVar11;
  ulonglong uVar12;
  longlong lVar13;
  sentry local_49 [9];
  
  wistream::sentry::sentry(local_49,param_1,'\x01');
  if (local_49[0] != (sentry)0x0) {
    *(undefined8 *)(param_2 + 8) = 0;
    **(undefined2 **)param_2 = 0;
    plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
    if ((short *)plVar1[2] < (short *)plVar1[3]) {
      sVar4 = *(short *)plVar1[2];
    }
    else {
      sVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
    }
    if (sVar4 == -1) {
LAB_1400b9bcd:
      uVar9 = 6;
      goto LAB_1400b994d;
    }
    uVar12 = 0;
    if (sVar4 == param_3) {
      uVar11 = plVar1[2];
      lVar13 = 1;
      if (uVar11 < (ulonglong)plVar1[3]) goto LAB_1400b9aac;
    }
    else {
      do {
        psVar6 = (short *)plVar1[3];
        psVar8 = (short *)plVar1[2];
        lVar13 = *(longlong *)(param_2 + 8);
        psVar5 = (short *)((longlong)psVar6 - (longlong)psVar8 >> 1);
        if ((longlong)(0x1fffffffffffffff - uVar12) < (longlong)psVar5) {
          psVar5 = (short *)(0x1fffffffffffffff - uVar12);
        }
        psVar2 = psVar8;
        psVar10 = psVar5;
        psVar3 = psVar8;
        if ((longlong)psVar5 < 2) {
          pwVar7 = *(wstring **)param_2;
          if (pwVar7 == param_2 + 0x10) {
            uVar11 = 7;
          }
          else {
            uVar11 = *(ulonglong *)(param_2 + 0x10);
          }
          if (uVar11 < lVar13 + 1U) {
            __cxx11::wstring::_M_mutate(param_2,lVar13,0,(undefined2 *)0x0,1);
            pwVar7 = *(wstring **)param_2;
            psVar8 = (short *)plVar1[2];
            psVar6 = (short *)plVar1[3];
          }
          *(short *)(pwVar7 + lVar13 * 2) = sVar4;
          uVar12 = uVar12 + 1;
          *(ulonglong *)(param_2 + 8) = lVar13 + 1U;
          *(undefined2 *)(pwVar7 + lVar13 * 2 + 2) = 0;
          if (psVar8 < psVar6) {
            sVar4 = *psVar8;
            plVar1[2] = (longlong)(psVar8 + 1);
          }
          else {
            sVar4 = (**(code **)(*plVar1 + 0x50))(plVar1);
          }
          if (sVar4 != -1) {
            psVar6 = (short *)plVar1[2];
            if ((short *)plVar1[3] <= psVar6) goto LAB_1400b9b2f;
            goto LAB_1400b9a6e;
          }
LAB_1400b9bc3:
          uVar9 = 2;
          goto LAB_1400b994d;
        }
        while (psVar3 != (short *)0x0) {
          if (*psVar2 == param_3) {
            psVar5 = (short *)((longlong)psVar2 - (longlong)psVar8 >> 1);
            break;
          }
          psVar10 = (short *)((longlong)psVar10 + -1);
          psVar2 = psVar2 + 1;
          psVar3 = psVar10;
        }
        if ((short *)(0x1fffffffffffffff - lVar13) < psVar5) {
                    // WARNING: Subroutine does not return
          __throw_length_error("basic_string::append");
        }
        __cxx11::wstring::_M_append(param_2,psVar8,(longlong)psVar5);
        uVar12 = uVar12 + (longlong)psVar5;
        psVar6 = (short *)(plVar1[2] + (longlong)psVar5 * 2);
        plVar1[2] = (longlong)psVar6;
        if (psVar6 < (short *)plVar1[3]) {
LAB_1400b9a6e:
          sVar4 = *psVar6;
        }
        else {
LAB_1400b9b2f:
          sVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
        }
        if (0x1ffffffffffffffe < uVar12) {
          if (sVar4 == -1) goto LAB_1400b9bc3;
          if (sVar4 != param_3) goto LAB_1400b9948;
          lVar13 = uVar12 + 1;
          if ((ulonglong)plVar1[3] <= (ulonglong)plVar1[2]) goto LAB_1400b9bfb;
          plVar1[2] = plVar1[2] + 2;
          goto joined_r0x0001400b9b9e;
        }
        if (sVar4 == -1) {
          if (uVar12 != 0) goto LAB_1400b9bc3;
          goto LAB_1400b9bcd;
        }
      } while (sVar4 != param_3);
      uVar11 = plVar1[2];
      lVar13 = uVar12 + 1;
      if (uVar11 < (ulonglong)plVar1[3]) {
LAB_1400b9aac:
        plVar1[2] = uVar11 + 2;
        return param_1;
      }
    }
LAB_1400b9bfb:
    (**(code **)(*plVar1 + 0x50))(plVar1);
joined_r0x0001400b9b9e:
    if (lVar13 != 0) {
      return param_1;
    }
  }
LAB_1400b9948:
  uVar9 = 4;
LAB_1400b994d:
  this = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  wios::clear(this,uVar9 | *(uint *)(this + 0x20));
  return param_1;
}



// std::_Setfill<char> std::setfill<char>(char)

undefined4 std::setfill<char>(undefined4 param_1)

{
  return param_1;
}



// std::_Setfill<wchar_t> std::setfill<wchar_t>(wchar_t)

undefined4 std::setfill<wchar_t>(undefined4 param_1)

{
  return param_1;
}



// bool std::has_facet<std::__cxx11::moneypunct<char, false> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,false>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::moneypunct<wchar_t, false> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::collate<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::collate<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::collate<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::collate<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::messages<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::messages<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::messages<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::messages<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::numpunct<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::numpunct<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::time_get<char, std::istreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::time_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::time_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::money_get<char, std::istreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::money_put<char, std::ostreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&__cxx11::money_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::moneypunct<char, false> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::moneypunct<wchar_t, false> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&moneypunct<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::__timepunct<char> >(std::locale const&)

bool std::has_facet<>(longlong *param_1)

{
  ulonglong uVar1;
  longlong *plVar2;
  
  uVar1 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if ((uVar1 < *(ulonglong *)(*param_1 + 0x10)) &&
     (plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + uVar1 * 8), plVar2 != (longlong *)0x0))
  {
    plVar2 = __dynamic_cast(plVar2,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<char>::typeinfo,0);
    return plVar2 != (longlong *)0x0;
  }
  return false;
}



// bool std::has_facet<std::__timepunct<wchar_t> >(std::locale const&)

bool std::has_facet<>(longlong *param_1)

{
  ulonglong uVar1;
  longlong *plVar2;
  
  uVar1 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if ((uVar1 < *(ulonglong *)(*param_1 + 0x10)) &&
     (plVar2 = *(longlong **)(*(longlong *)(*param_1 + 8) + uVar1 * 8), plVar2 != (longlong *)0x0))
  {
    plVar2 = __dynamic_cast(plVar2,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<wchar_t>::typeinfo,0);
    return plVar2 != (longlong *)0x0;
  }
  return false;
}



// bool std::has_facet<std::ctype<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&ctype<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::ctype<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::codecvt<char, char, int> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&codecvt<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::codecvt<wchar_t, char, int> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&codecvt<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::collate<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&collate<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::collate<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&collate<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::num_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&num_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::messages<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&messages<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::messages<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&messages<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::numpunct<char> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&numpunct<char>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::numpunct<wchar_t> >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::time_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&time_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> >
// > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_get<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> >
// > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// bool std::has_facet<std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

undefined8 std::has_facet<>(longlong *param_1)

{
  longlong lVar1;
  
  lVar1 = locale::id::_M_id((id *)&money_put<>::id);
  return CONCAT71((int7)((ulonglong)*(longlong *)(*param_1 + 8) >> 8),
                  *(longlong *)(*(longlong *)(*param_1 + 8) + lVar1 * 8) != 0);
}



// std::terminate()

void std::terminate(void)

{
                    // WARNING: Subroutine does not return
  __cxxabiv1::__terminate(__cxxabiv1::__terminate_handler);
}



// std::__cxx11::moneypunct<char, false> const& std::use_facet<std::__cxx11::moneypunct<char, false>
// >(std::locale const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,false>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::moneypunct<char, true> const& std::use_facet<std::__cxx11::moneypunct<char, true>
// >(std::locale const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<char,true>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::moneypunct<wchar_t, false> const& std::use_facet<std::__cxx11::moneypunct<wchar_t,
// false> >(std::locale const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::moneypunct<wchar_t, true> const& std::use_facet<std::__cxx11::moneypunct<wchar_t,
// true> >(std::locale const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::moneypunct<>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::collate<char> const& std::use_facet<std::__cxx11::collate<char> >(std::locale
// const&)

collate * std::use_facet<>(longlong *param_1)

{
  collate *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::collate<char>::id);
  pcVar1 = *(collate **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (collate *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::collate<wchar_t> const& std::use_facet<std::__cxx11::collate<wchar_t> >(std::locale
// const&)

collate * std::use_facet<>(longlong *param_1)

{
  collate *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::collate<wchar_t>::id);
  pcVar1 = *(collate **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (collate *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::messages<char> const& std::use_facet<std::__cxx11::messages<char> >(std::locale
// const&)

messages * std::use_facet<>(longlong *param_1)

{
  messages *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::messages<char>::id);
  pmVar1 = *(messages **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (messages *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::messages<wchar_t> const& std::use_facet<std::__cxx11::messages<wchar_t>
// >(std::locale const&)

messages * std::use_facet<>(longlong *param_1)

{
  messages *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::messages<wchar_t>::id);
  pmVar1 = *(messages **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (messages *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::numpunct<char> const& std::use_facet<std::__cxx11::numpunct<char> >(std::locale
// const&)

numpunct * std::use_facet<>(longlong *param_1)

{
  numpunct *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::numpunct<char>::id);
  pnVar1 = *(numpunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (numpunct *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::numpunct<wchar_t> const& std::use_facet<std::__cxx11::numpunct<wchar_t>
// >(std::locale const&)

numpunct * std::use_facet<>(longlong *param_1)

{
  numpunct *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::numpunct<wchar_t>::id);
  pnVar1 = *(numpunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (numpunct *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::__cxx11::time_get<char, std::istreambuf_iterator<char, std::char_traits<char>
// > > >(std::locale const&)

time_get * std::use_facet<>(longlong *param_1)

{
  time_get *ptVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::time_get<>::id);
  ptVar1 = *(time_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (ptVar1 != (time_get *)0x0) {
    return ptVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >
// const& std::use_facet<std::__cxx11::time_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

time_get * std::use_facet<>(longlong *param_1)

{
  time_get *ptVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::time_get<>::id);
  ptVar1 = *(time_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (ptVar1 != (time_get *)0x0) {
    return ptVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::__cxx11::money_get<char, std::istreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

money_get * std::use_facet<>(longlong *param_1)

{
  money_get *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::money_get<>::id);
  pmVar1 = *(money_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_get *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >
// const& std::use_facet<std::__cxx11::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

money_get * std::use_facet<>(longlong *param_1)

{
  money_get *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::money_get<>::id);
  pmVar1 = *(money_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_get *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::__cxx11::money_put<char, std::ostreambuf_iterator<char,
// std::char_traits<char> > > >(std::locale const&)

money_put * std::use_facet<>(longlong *param_1)

{
  money_put *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::money_put<>::id);
  pmVar1 = *(money_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_put *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > >
// const& std::use_facet<std::__cxx11::money_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

money_put * std::use_facet<>(longlong *param_1)

{
  money_put *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&__cxx11::money_put<>::id);
  pmVar1 = *(money_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_put *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::moneypunct<char, false> const& std::use_facet<std::moneypunct<char, false> >(std::locale
// const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&moneypunct<char,false>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::moneypunct<char, true> const& std::use_facet<std::moneypunct<char, true> >(std::locale
// const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&moneypunct<char,true>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::moneypunct<wchar_t, false> const& std::use_facet<std::moneypunct<wchar_t, false>
// >(std::locale const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&moneypunct<>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::moneypunct<wchar_t, true> const& std::use_facet<std::moneypunct<wchar_t, true> >(std::locale
// const&)

moneypunct * std::use_facet<>(longlong *param_1)

{
  moneypunct *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&moneypunct<>::id);
  pmVar1 = *(moneypunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (moneypunct *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__timepunct<char> const& std::use_facet<std::__timepunct<char> >(std::locale const&)

__timepunct * std::use_facet<>(longlong *param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  __timepunct *p_Var3;
  
  uVar2 = locale::id::_M_id((id *)&__timepunct<char>::id);
  if ((uVar2 < *(ulonglong *)(*param_1 + 0x10)) &&
     (plVar1 = *(longlong **)(*(longlong *)(*param_1 + 8) + uVar2 * 8), plVar1 != (longlong *)0x0))
  {
    p_Var3 = (__timepunct *)
             __dynamic_cast(plVar1,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<char>::typeinfo,0);
    if (p_Var3 != (__timepunct *)0x0) {
      return p_Var3;
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::__timepunct<wchar_t> const& std::use_facet<std::__timepunct<wchar_t> >(std::locale const&)

__timepunct * std::use_facet<>(longlong *param_1)

{
  longlong *plVar1;
  ulonglong uVar2;
  __timepunct *p_Var3;
  
  uVar2 = locale::id::_M_id((id *)&__timepunct<wchar_t>::id);
  if ((uVar2 < *(ulonglong *)(*param_1 + 0x10)) &&
     (plVar1 = *(longlong **)(*(longlong *)(*param_1 + 8) + uVar2 * 8), plVar1 != (longlong *)0x0))
  {
    p_Var3 = (__timepunct *)
             __dynamic_cast(plVar1,&locale::facet::typeinfo,
                            (type_info *)&__timepunct<wchar_t>::typeinfo,0);
    if (p_Var3 != (__timepunct *)0x0) {
      return p_Var3;
    }
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::ctype<char> const& std::use_facet<std::ctype<char> >(std::locale const&)

ctype * std::use_facet<>(longlong *param_1)

{
  ctype *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&ctype<char>::id);
  pcVar1 = *(ctype **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (ctype *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::ctype<wchar_t> const& std::use_facet<std::ctype<wchar_t> >(std::locale const&)

ctype * std::use_facet<>(longlong *param_1)

{
  ctype *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&ctype<wchar_t>::id);
  pcVar1 = *(ctype **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (ctype *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::codecvt<char, char, int> const& std::use_facet<std::codecvt<char, char, int> >(std::locale
// const&)

codecvt * std::use_facet<>(longlong *param_1)

{
  codecvt *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&codecvt<>::id);
  pcVar1 = *(codecvt **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (codecvt *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::codecvt<wchar_t, char, int> const& std::use_facet<std::codecvt<wchar_t, char, int>
// >(std::locale const&)

codecvt * std::use_facet<>(longlong *param_1)

{
  codecvt *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&codecvt<>::id);
  pcVar1 = *(codecvt **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (codecvt *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::collate<char> const& std::use_facet<std::collate<char> >(std::locale const&)

collate * std::use_facet<>(longlong *param_1)

{
  collate *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&collate<char>::id);
  pcVar1 = *(collate **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (collate *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::collate<wchar_t> const& std::use_facet<std::collate<wchar_t> >(std::locale const&)

collate * std::use_facet<>(longlong *param_1)

{
  collate *pcVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&collate<wchar_t>::id);
  pcVar1 = *(collate **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pcVar1 != (collate *)0x0) {
    return pcVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::num_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

num_get * std::use_facet<>(longlong *param_1)

{
  num_get *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&num_get<>::id);
  pnVar1 = *(num_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (num_get *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const&
// std::use_facet<std::num_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t>
// > > >(std::locale const&)

num_get * std::use_facet<>(longlong *param_1)

{
  num_get *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&num_get<>::id);
  pnVar1 = *(num_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (num_get *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

num_put * std::use_facet<>(longlong *param_1)

{
  num_put *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&num_put<>::id);
  pnVar1 = *(num_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (num_put *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const&
// std::use_facet<std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t>
// > > >(std::locale const&)

num_put * std::use_facet<>(longlong *param_1)

{
  num_put *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&num_put<>::id);
  pnVar1 = *(num_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (num_put *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::messages<char> const& std::use_facet<std::messages<char> >(std::locale const&)

messages * std::use_facet<>(longlong *param_1)

{
  messages *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&messages<char>::id);
  pmVar1 = *(messages **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (messages *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::messages<wchar_t> const& std::use_facet<std::messages<wchar_t> >(std::locale const&)

messages * std::use_facet<>(longlong *param_1)

{
  messages *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&messages<wchar_t>::id);
  pmVar1 = *(messages **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (messages *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::numpunct<char> const& std::use_facet<std::numpunct<char> >(std::locale const&)

numpunct * std::use_facet<>(longlong *param_1)

{
  numpunct *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&numpunct<char>::id);
  pnVar1 = *(numpunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (numpunct *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::numpunct<wchar_t> const& std::use_facet<std::numpunct<wchar_t> >(std::locale const&)

numpunct * std::use_facet<>(longlong *param_1)

{
  numpunct *pnVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&numpunct<wchar_t>::id);
  pnVar1 = *(numpunct **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pnVar1 != (numpunct *)0x0) {
    return pnVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::time_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

time_get * std::use_facet<>(longlong *param_1)

{
  time_get *ptVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&time_get<>::id);
  ptVar1 = *(time_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (ptVar1 != (time_get *)0x0) {
    return ptVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const&
// std::use_facet<std::time_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t>
// > > >(std::locale const&)

time_get * std::use_facet<>(longlong *param_1)

{
  time_get *ptVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&time_get<>::id);
  ptVar1 = *(time_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (ptVar1 != (time_get *)0x0) {
    return ptVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::time_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

time_put * std::use_facet<>(longlong *param_1)

{
  time_put *ptVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&time_put<>::id);
  ptVar1 = *(time_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (ptVar1 != (time_put *)0x0) {
    return ptVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const&
// std::use_facet<std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t>
// > > >(std::locale const&)

time_put * std::use_facet<>(longlong *param_1)

{
  time_put *ptVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&time_put<>::id);
  ptVar1 = *(time_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (ptVar1 != (time_put *)0x0) {
    return ptVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::money_get<char, std::istreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

money_get * std::use_facet<>(longlong *param_1)

{
  money_get *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&money_get<>::id);
  pmVar1 = *(money_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_get *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::money_get<wchar_t, std::istreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const&
// std::use_facet<std::money_get<wchar_t, std::istreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

money_get * std::use_facet<>(longlong *param_1)

{
  money_get *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&money_get<>::id);
  pmVar1 = *(money_get **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_get *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > > const&
// std::use_facet<std::money_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >
// >(std::locale const&)

money_put * std::use_facet<>(longlong *param_1)

{
  money_put *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&money_put<>::id);
  pmVar1 = *(money_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_put *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t, std::char_traits<wchar_t> > > const&
// std::use_facet<std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t,
// std::char_traits<wchar_t> > > >(std::locale const&)

money_put * std::use_facet<>(longlong *param_1)

{
  money_put *pmVar1;
  longlong lVar2;
  
  lVar2 = locale::id::_M_id((id *)&money_put<>::id);
  pmVar1 = *(money_put **)(*(longlong *)(*param_1 + 8) + lVar2 * 8);
  if (pmVar1 != (money_put *)0x0) {
    return pmVar1;
  }
                    // WARNING: Subroutine does not return
  __throw_bad_cast();
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, signed char const*)

longlong * std::operator<<(longlong *param_1,char *param_2)

{
  size_t sVar1;
  ios *this;
  
  if (param_2 != (char *)0x0) {
    sVar1 = strlen(param_2);
    __ostream_insert<>(param_1,param_2,sVar1);
    return param_1;
  }
  this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios::clear(this,*(uint *)(this + 0x20) | 1);
  return param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, char const*)

longlong * std::operator<<(longlong *param_1,char *param_2)

{
  size_t sVar1;
  ios *this;
  
  if (param_2 != (char *)0x0) {
    sVar1 = strlen(param_2);
    __ostream_insert<>(param_1,param_2,sVar1);
    return param_1;
  }
  this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios::clear(this,*(uint *)(this + 0x20) | 1);
  return param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, unsigned char const*)

longlong * std::operator<<(longlong *param_1,char *param_2)

{
  size_t sVar1;
  ios *this;
  
  if (param_2 != (char *)0x0) {
    sVar1 = strlen(param_2);
    __ostream_insert<>(param_1,param_2,sVar1);
    return param_1;
  }
  this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  ios::clear(this,*(uint *)(this + 0x20) | 1);
  return param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, signed char)

ostream * std::operator<<(ostream *param_1,undefined1 param_2)

{
  ostream *poVar1;
  undefined1 local_9;
  
  local_9 = param_2;
  if (*(longlong *)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0x10) != 0) {
    poVar1 = (ostream *)__ostream_insert<>((longlong *)param_1,&local_9,1);
    return poVar1;
  }
  ostream::put(param_1,param_2);
  return param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, char)

ostream * std::operator<<(ostream *param_1,undefined1 param_2)

{
  ostream *poVar1;
  undefined1 local_res10 [24];
  
  local_res10[0] = param_2;
  if (*(longlong *)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0x10) != 0) {
    poVar1 = (ostream *)__ostream_insert<>((longlong *)param_1,local_res10,1);
    return poVar1;
  }
  ostream::put(param_1,param_2);
  return param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, unsigned char)

ostream * std::operator<<(ostream *param_1,undefined1 param_2)

{
  ostream *poVar1;
  undefined1 local_9;
  
  local_9 = param_2;
  if (*(longlong *)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0x10) != 0) {
    poVar1 = (ostream *)__ostream_insert<>((longlong *)param_1,&local_9,1);
    return poVar1;
  }
  ostream::put(param_1,param_2);
  return param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, std::_Setiosflags)

ostream * std::operator<<(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 | param_2;
  return (ostream *)param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, std::_Setprecision)

ostream * std::operator<<(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 8) = (longlong)param_2;
  return (ostream *)param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, std::_Resetiosflags)

ostream * std::operator<<(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 & ~param_2;
  return (ostream *)param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, std::_Setw)

ostream * std::operator<<(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = (longlong)param_2;
  return (ostream *)param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, std::_Setbase)

ostream * std::operator<<(longlong *param_1,int param_2)

{
  uint uVar1;
  
  uVar1 = 0;
  if (param_2 - 8U < 9) {
    uVar1 = *(uint *)(&_rdata_CSWTCH_434 + (ulonglong)(param_2 - 8U) * 4);
  }
  *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) =
       *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) & 0xffffffb5 | uVar1;
  return (ostream *)param_1;
}



// std::ostream& std::TEMPNAMEPLACEHOLDERVALUE(std::ostream&, std::_Setfill<char>)

longlong * std::operator<<(longlong *param_1,undefined1 param_2)

{
  longlong lVar1;
  ctype<char> *this;
  
  lVar1 = *(longlong *)(*param_1 + -0x18);
  if (*(char *)((longlong)param_1 + lVar1 + 0xe1) == '\0') {
    this = *(ctype<char> **)((longlong)param_1 + lVar1 + 0xf0);
    if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        (**(code **)(*(longlong *)this + 0x30))(this,0x20);
      }
    }
    *(undefined1 *)((longlong)param_1 + lVar1 + 0xe1) = 1;
  }
  *(undefined1 *)((longlong)param_1 + lVar1 + 0xe0) = param_2;
  return param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, wchar_t const*)

longlong * std::operator<<(longlong *param_1,wchar_t *param_2)

{
  size_t sVar1;
  wios *this;
  
  if (param_2 != (wchar_t *)0x0) {
    sVar1 = wcslen(param_2);
    __ostream_insert<>(param_1,param_2,sVar1);
    return param_1;
  }
  this = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
  wios::clear(this,*(uint *)(this + 0x20) | 1);
  return param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, char const*)

longlong * std::operator<<(longlong *param_1,char *param_2)

{
  char *pcVar1;
  longlong *plVar2;
  undefined2 uVar3;
  size_t sVar4;
  undefined2 *puVar5;
  wios *this;
  undefined2 *puVar6;
  
  if (param_2 == (char *)0x0) {
    this = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    wios::clear(this,*(uint *)(this + 0x20) | 1);
    return param_1;
  }
  sVar4 = strlen(param_2);
  if (sVar4 < 0x3ffffffffffffffd) {
    puVar5 = operator_new__(sVar4 * 2);
    pcVar1 = param_2 + sVar4;
    puVar6 = puVar5;
    if (sVar4 != 0) {
      do {
        plVar2 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xf0);
        if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
          __throw_bad_cast();
        }
        uVar3 = (**(code **)(*plVar2 + 0x50))(plVar2,(int)*param_2);
        param_2 = param_2 + 1;
        *puVar6 = uVar3;
        puVar6 = puVar6 + 1;
      } while (pcVar1 != param_2);
    }
    __ostream_insert<>(param_1,puVar5,sVar4);
    operator_delete__(puVar5);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __cxa_throw_bad_array_new_length();
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, wchar_t)

wostream * std::operator<<(wostream *param_1,short param_2)

{
  wostream *pwVar1;
  short local_res10 [12];
  
  local_res10[0] = param_2;
  if (*(longlong *)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0x10) != 0) {
    pwVar1 = (wostream *)__ostream_insert<>((longlong *)param_1,local_res10,1);
    return pwVar1;
  }
  wostream::put(param_1,param_2);
  return param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, std::_Setiosflags)

wostream * std::operator<<(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 | param_2;
  return (wostream *)param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, std::_Setprecision)

wostream * std::operator<<(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 8) = (longlong)param_2;
  return (wostream *)param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, std::_Resetiosflags)

wostream * std::operator<<(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 & ~param_2;
  return (wostream *)param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, std::_Setw)

wostream * std::operator<<(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = (longlong)param_2;
  return (wostream *)param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, std::_Setbase)

wostream * std::operator<<(longlong *param_1,int param_2)

{
  uint uVar1;
  
  uVar1 = 0;
  if (param_2 - 8U < 9) {
    uVar1 = *(uint *)(&_rdata_CSWTCH_434 + (ulonglong)(param_2 - 8U) * 4);
  }
  *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) =
       *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) & 0xffffffb5 | uVar1;
  return (wostream *)param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, std::_Setfill<wchar_t>)

longlong * std::operator<<(longlong *param_1,undefined2 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(*param_1 + -0x18);
  if (*(char *)((longlong)param_1 + lVar1 + 0xe2) == '\0') {
    plVar2 = *(longlong **)((longlong)param_1 + lVar1 + 0xf0);
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
    *(undefined1 *)((longlong)param_1 + lVar1 + 0xe2) = 1;
  }
  *(undefined2 *)((longlong)param_1 + lVar1 + 0xe0) = param_2;
  return param_1;
}



// std::wostream& std::TEMPNAMEPLACEHOLDERVALUE(std::wostream&, char)

wostream * std::operator<<(wostream *param_1,char param_2)

{
  longlong *plVar1;
  wostream *pwVar2;
  short local_a;
  
  plVar1 = *(longlong **)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0xf0);
  if (plVar1 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
    __throw_bad_cast();
  }
  local_a = (**(code **)(*plVar1 + 0x50))(plVar1,(int)param_2);
  if (*(longlong *)(param_1 + *(longlong *)(*(longlong *)param_1 + -0x18) + 0x10) == 0) {
    wostream::put(param_1,local_a);
    return param_1;
  }
  pwVar2 = (wostream *)__ostream_insert<>((longlong *)param_1,&local_a,1);
  return pwVar2;
}



// std::__cxx11::string std::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::string&&,
// std::__cxx11::string&&)

longlong * std::operator+(longlong *param_1,string *param_2,string *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  string *psVar3;
  longlong lVar4;
  uint uVar5;
  string *psVar6;
  ulonglong uVar7;
  string *psVar8;
  uint uVar9;
  ulonglong uVar10;
  
  uVar1 = *(ulonglong *)(param_2 + 8);
  uVar2 = *(ulonglong *)(param_3 + 8);
  psVar8 = *(string **)param_3;
  uVar7 = uVar2 + uVar1;
  if (*(string **)param_2 == param_2 + 0x10) {
    if ((0xf < uVar7) && (psVar8 != param_3 + 0x10)) {
LAB_1400bb751:
      uVar10 = *(ulonglong *)(param_3 + 0x10);
      goto LAB_1400bb755;
    }
LAB_1400bb75a:
    if (0x3fffffffffffffff - uVar1 < uVar2) {
                    // WARNING: Subroutine does not return
      __throw_length_error("basic_string::append");
    }
    psVar3 = __cxx11::string::_M_append(param_2,psVar8,uVar2);
    *param_1 = (longlong)(param_1 + 2);
    psVar6 = *(string **)psVar3;
    psVar8 = psVar3 + 0x10;
    if (psVar6 == psVar8) {
      lVar4 = *(longlong *)(psVar3 + 8);
      uVar7 = lVar4 + 1;
      if ((uint)uVar7 < 8) {
LAB_1400bb8e8:
        if ((uVar7 & 4) != 0) {
          *(undefined4 *)(param_1 + 2) = *(undefined4 *)(psVar3 + 0x10);
          *(undefined4 *)((longlong)param_1 + (uVar7 & 0xffffffff) + 0xc) =
               *(undefined4 *)(psVar8 + ((uVar7 & 0xffffffff) - 4));
          lVar4 = *(longlong *)(psVar3 + 8);
          goto LAB_1400bb7a1;
        }
        if ((int)uVar7 == 0) goto LAB_1400bb7a1;
        *(string *)(param_1 + 2) = psVar3[0x10];
        if ((uVar7 & 2) != 0) {
          *(undefined2 *)((longlong)param_1 + (uVar7 & 0xffffffff) + 0xe) =
               *(undefined2 *)(psVar8 + ((uVar7 & 0xffffffff) - 2));
          lVar4 = *(longlong *)(psVar3 + 8);
          goto LAB_1400bb7a1;
        }
      }
      else {
        param_1[2] = *(longlong *)(psVar3 + 0x10);
        *(undefined8 *)((longlong)param_1 + (uVar7 & 0xffffffff) + 8) =
             *(undefined8 *)(psVar3 + (uVar7 & 0xffffffff) + 8);
        lVar4 = (longlong)(param_1 + 2) - ((ulonglong)(param_1 + 3) & 0xfffffffffffffff8);
        uVar9 = (uint)uVar7 + (int)lVar4 & 0xfffffff8;
        if (7 < uVar9) {
          uVar7 = 0;
          do {
            uVar5 = (int)uVar7 + 8;
            *(undefined8 *)(((ulonglong)(param_1 + 3) & 0xfffffffffffffff8) + uVar7) =
                 *(undefined8 *)(psVar8 + (uVar7 - lVar4));
            uVar7 = (ulonglong)uVar5;
          } while (uVar5 < uVar9);
        }
      }
    }
    else {
LAB_1400bb792:
      *param_1 = (longlong)psVar6;
      param_1[2] = *(longlong *)(psVar3 + 0x10);
    }
  }
  else {
    if (uVar7 <= *(ulonglong *)(param_2 + 0x10)) goto LAB_1400bb75a;
    if (psVar8 != param_3 + 0x10) goto LAB_1400bb751;
    uVar10 = 0xf;
LAB_1400bb755:
    if (uVar10 < uVar7) goto LAB_1400bb75a;
    psVar3 = __cxx11::string::_M_replace(param_3,0,0,*(string **)param_2,uVar1);
    *param_1 = (longlong)(param_1 + 2);
    psVar6 = *(string **)psVar3;
    psVar8 = psVar3 + 0x10;
    if (psVar6 != psVar8) goto LAB_1400bb792;
    lVar4 = *(longlong *)(psVar3 + 8);
    uVar7 = lVar4 + 1;
    if ((uint)uVar7 < 8) goto LAB_1400bb8e8;
    param_1[2] = *(longlong *)(psVar3 + 0x10);
    *(undefined8 *)((longlong)param_1 + (uVar7 & 0xffffffff) + 8) =
         *(undefined8 *)(psVar3 + (uVar7 & 0xffffffff) + 8);
    lVar4 = (longlong)(param_1 + 2) - ((ulonglong)(param_1 + 3) & 0xfffffffffffffff8);
    uVar9 = (uint)uVar7 + (int)lVar4 & 0xfffffff8;
    if (7 < uVar9) {
      uVar7 = 0;
      do {
        uVar5 = (int)uVar7 + 8;
        *(undefined8 *)(((ulonglong)(param_1 + 3) & 0xfffffffffffffff8) + uVar7) =
             *(undefined8 *)(psVar8 + (uVar7 - lVar4));
        uVar7 = (ulonglong)uVar5;
      } while (uVar5 < uVar9);
    }
  }
  lVar4 = *(longlong *)(psVar3 + 8);
LAB_1400bb7a1:
  param_1[1] = lVar4;
  *(string **)psVar3 = psVar8;
  *(longlong *)(psVar3 + 8) = 0;
  psVar3[0x10] = (string)0x0;
  return param_1;
}



// std::__cxx11::string std::TEMPNAMEPLACEHOLDERVALUE(char const*, std::__cxx11::string const&)

string * std::operator+(string *param_1,string *param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  string *psVar2;
  size_t sVar3;
  
  uVar1 = param_3[1];
  psVar2 = (string *)*param_3;
  sVar3 = strlen((char *)param_2);
  *(undefined8 *)(param_1 + 8) = 0;
  param_1[0x10] = (string)0x0;
  *(string **)param_1 = param_1 + 0x10;
  __cxx11::string::reserve(param_1,uVar1 + sVar3);
  if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < sVar3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::string::_M_append(param_1,param_2,sVar3);
  if (uVar1 <= 0x3fffffffffffffffU - *(longlong *)(param_1 + 8)) {
    __cxx11::string::_M_append(param_1,psVar2,uVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string std::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::string const&,
// std::__cxx11::string const&)

string * std::operator+(string *param_1,undefined8 *param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  string *psVar3;
  string *psVar4;
  
  uVar1 = param_3[1];
  uVar2 = param_2[1];
  psVar3 = (string *)*param_2;
  psVar4 = (string *)*param_3;
  *(undefined8 *)(param_1 + 8) = 0;
  *(string **)param_1 = param_1 + 0x10;
  param_1[0x10] = (string)0x0;
  __cxx11::string::reserve(param_1,uVar1 + uVar2);
  if (0x3fffffffffffffffU - *(longlong *)(param_1 + 8) < uVar2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::string::_M_append(param_1,psVar3,uVar2);
  if (uVar1 <= 0x3fffffffffffffffU - *(longlong *)(param_1 + 8)) {
    __cxx11::string::_M_append(param_1,psVar4,uVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::string std::TEMPNAMEPLACEHOLDERVALUE(char, std::__cxx11::string const&)

string * std::operator+(string *param_1,string param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  string *psVar2;
  string local_res10 [24];
  
  uVar1 = param_3[1];
  psVar2 = (string *)*param_3;
  *(undefined8 *)(param_1 + 8) = 0;
  *(string **)param_1 = param_1 + 0x10;
  param_1[0x10] = (string)0x0;
  local_res10[0] = param_2;
  __cxx11::string::reserve(param_1,uVar1 + 1);
  if (*(longlong *)(param_1 + 8) == 0x3fffffffffffffff) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::string::_M_append(param_1,local_res10,1);
  if (uVar1 <= 0x3fffffffffffffffU - *(longlong *)(param_1 + 8)) {
    __cxx11::string::_M_append(param_1,psVar2,uVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::string std::TEMPNAMEPLACEHOLDERVALUE(char const*, std::string const&)

string * std::operator+(string *param_1,char *param_2,undefined8 *param_3)

{
  undefined1 *puVar1;
  ulonglong uVar2;
  size_t sVar3;
  undefined8 *puVar4;
  
  puVar1 = (undefined1 *)*param_3;
  uVar2 = *(ulonglong *)(puVar1 + -0x18);
  sVar3 = strlen(param_2);
  puVar4 = (undefined8 *)string::_Rep::_S_create(0,0);
  *(undefined4 *)(puVar4 + 2) = 0;
  *puVar4 = 0;
  *(undefined1 *)(puVar4 + 3) = 0;
  *(undefined8 **)param_1 = puVar4 + 3;
  string::reserve(param_1,sVar3 + uVar2);
  string::append(param_1,param_2,sVar3);
  string::append(param_1,puVar1,uVar2);
  return param_1;
}



// std::string std::TEMPNAMEPLACEHOLDERVALUE(std::string const&, std::string const&)

string * std::operator+(string *param_1,undefined8 *param_2,undefined8 *param_3)

{
  undefined1 *puVar1;
  undefined1 *puVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined8 *puVar5;
  
  puVar1 = (undefined1 *)*param_3;
  puVar2 = (undefined1 *)*param_2;
  uVar3 = *(ulonglong *)(puVar1 + -0x18);
  uVar4 = *(ulonglong *)(puVar2 + -0x18);
  puVar5 = (undefined8 *)string::_Rep::_S_create(0,0);
  *(undefined4 *)(puVar5 + 2) = 0;
  *puVar5 = 0;
  *(undefined1 *)(puVar5 + 3) = 0;
  *(undefined8 **)param_1 = puVar5 + 3;
  string::reserve(param_1,uVar4 + uVar3);
  string::append(param_1,puVar2,uVar4);
  string::append(param_1,puVar1,uVar3);
  return param_1;
}



// std::string std::TEMPNAMEPLACEHOLDERVALUE(char, std::string const&)

string * std::operator+(string *param_1,undefined1 param_2,undefined8 *param_3)

{
  undefined1 *puVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  undefined1 local_res10 [24];
  
  puVar1 = (undefined1 *)*param_3;
  uVar2 = *(ulonglong *)(puVar1 + -0x18);
  local_res10[0] = param_2;
  puVar3 = (undefined8 *)string::_Rep::_S_create(0,0);
  *(undefined4 *)(puVar3 + 2) = 0;
  *puVar3 = 0;
  *(undefined1 *)(puVar3 + 3) = 0;
  *(undefined8 **)param_1 = puVar3 + 3;
  string::reserve(param_1,uVar2 + 1);
  string::append(param_1,local_res10,1);
  string::append(param_1,puVar1,uVar2);
  return param_1;
}



// std::__cxx11::wstring std::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*, std::__cxx11::wstring const&)

wstring * std::operator+(wstring *param_1,wchar_t *param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  undefined2 *puVar2;
  size_t sVar3;
  
  uVar1 = param_3[1];
  puVar2 = (undefined2 *)*param_3;
  sVar3 = wcslen(param_2);
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  __cxx11::wstring::reserve(param_1,sVar3 + uVar1);
  if (0x1fffffffffffffffU - *(longlong *)(param_1 + 8) < sVar3) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::wstring::_M_append(param_1,param_2,sVar3);
  if (uVar1 <= 0x1fffffffffffffffU - *(longlong *)(param_1 + 8)) {
    __cxx11::wstring::_M_append(param_1,puVar2,uVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring std::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstring const&,
// std::__cxx11::wstring const&)

wstring * std::operator+(wstring *param_1,undefined8 *param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  ulonglong uVar2;
  undefined2 *puVar3;
  undefined2 *puVar4;
  
  uVar1 = param_3[1];
  uVar2 = param_2[1];
  puVar3 = (undefined2 *)*param_2;
  puVar4 = (undefined2 *)*param_3;
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  __cxx11::wstring::reserve(param_1,uVar1 + uVar2);
  if (0x1fffffffffffffffU - *(longlong *)(param_1 + 8) < uVar2) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::wstring::_M_append(param_1,puVar3,uVar2);
  if (uVar1 <= 0x1fffffffffffffffU - *(longlong *)(param_1 + 8)) {
    __cxx11::wstring::_M_append(param_1,puVar4,uVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::__cxx11::wstring std::TEMPNAMEPLACEHOLDERVALUE(wchar_t, std::__cxx11::wstring const&)

wstring * std::operator+(wstring *param_1,undefined2 param_2,undefined8 *param_3)

{
  ulonglong uVar1;
  undefined2 *puVar2;
  undefined2 local_res10 [12];
  
  uVar1 = param_3[1];
  puVar2 = (undefined2 *)*param_3;
  *(undefined8 *)(param_1 + 8) = 0;
  *(wstring **)param_1 = param_1 + 0x10;
  *(undefined2 *)(param_1 + 0x10) = 0;
  local_res10[0] = param_2;
  __cxx11::wstring::reserve(param_1,uVar1 + 1);
  if (*(longlong *)(param_1 + 8) == 0x1fffffffffffffff) {
                    // WARNING: Subroutine does not return
    __throw_length_error("basic_string::append");
  }
  __cxx11::wstring::_M_append(param_1,local_res10,1);
  if (uVar1 <= 0x1fffffffffffffffU - *(longlong *)(param_1 + 8)) {
    __cxx11::wstring::_M_append(param_1,puVar2,uVar1);
    return param_1;
  }
                    // WARNING: Subroutine does not return
  __throw_length_error("basic_string::append");
}



// std::wstring std::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*, std::wstring const&)

wstring * std::operator+(wstring *param_1,wchar_t *param_2,undefined8 *param_3)

{
  undefined2 *puVar1;
  ulonglong uVar2;
  size_t sVar3;
  undefined8 *puVar4;
  
  puVar1 = (undefined2 *)*param_3;
  uVar2 = *(ulonglong *)(puVar1 + -0xc);
  sVar3 = wcslen(param_2);
  puVar4 = wstring::_Rep::_S_create(0,0);
  *(undefined2 *)(puVar4 + 3) = 0;
  *(undefined4 *)(puVar4 + 2) = 0;
  *puVar4 = 0;
  *(undefined8 **)param_1 = puVar4 + 3;
  wstring::reserve(param_1,sVar3 + uVar2);
  wstring::append(param_1,param_2,sVar3);
  wstring::append(param_1,puVar1,uVar2);
  return param_1;
}



// std::wstring std::TEMPNAMEPLACEHOLDERVALUE(std::wstring const&, std::wstring const&)

wstring * std::operator+(wstring *param_1,undefined8 *param_2,undefined8 *param_3)

{
  undefined2 *puVar1;
  undefined2 *puVar2;
  ulonglong uVar3;
  ulonglong uVar4;
  undefined8 *puVar5;
  
  puVar1 = (undefined2 *)*param_3;
  puVar2 = (undefined2 *)*param_2;
  uVar3 = *(ulonglong *)(puVar1 + -0xc);
  uVar4 = *(ulonglong *)(puVar2 + -0xc);
  puVar5 = wstring::_Rep::_S_create(0,0);
  *(undefined2 *)(puVar5 + 3) = 0;
  *(undefined4 *)(puVar5 + 2) = 0;
  *puVar5 = 0;
  *(undefined8 **)param_1 = puVar5 + 3;
  wstring::reserve(param_1,uVar4 + uVar3);
  wstring::append(param_1,puVar2,uVar4);
  wstring::append(param_1,puVar1,uVar3);
  return param_1;
}



// std::wstring std::TEMPNAMEPLACEHOLDERVALUE(wchar_t, std::wstring const&)

wstring * std::operator+(wstring *param_1,undefined2 param_2,undefined8 *param_3)

{
  undefined2 *puVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  undefined2 local_res10 [12];
  
  puVar1 = (undefined2 *)*param_3;
  uVar2 = *(ulonglong *)(puVar1 + -0xc);
  local_res10[0] = param_2;
  puVar3 = wstring::_Rep::_S_create(0,0);
  *(undefined2 *)(puVar3 + 3) = 0;
  *(undefined4 *)(puVar3 + 2) = 0;
  *puVar3 = 0;
  *(undefined8 **)param_1 = puVar3 + 3;
  wstring::reserve(param_1,uVar2 + 1);
  wstring::append(param_1,local_res10,1);
  wstring::append(param_1,puVar1,uVar2);
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, signed char*)

longlong * std::operator>>(longlong *param_1,undefined1 *param_2)

{
  __istream_extract(param_1,param_2,0x7fffffffffffffff);
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, unsigned char*)

longlong * std::operator>>(longlong *param_1,undefined1 *param_2)

{
  __istream_extract(param_1,param_2,0x7fffffffffffffff);
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, signed char&)

longlong * std::operator>>(longlong *param_1,undefined1 *param_2)

{
  longlong *plVar1;
  byte *pbVar2;
  uint uVar3;
  ios *this;
  sentry asStack_19 [9];
  
  istream::sentry::sentry(asStack_19,param_1,'\0');
  if (asStack_19[0] == (sentry)0x0) {
    return param_1;
  }
  plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
  pbVar2 = (byte *)plVar1[2];
  if (pbVar2 < (byte *)plVar1[3]) {
    uVar3 = (uint)*pbVar2;
    plVar1[2] = (longlong)(pbVar2 + 1);
  }
  else {
    uVar3 = (**(code **)(*plVar1 + 0x50))();
    if (uVar3 == 0xffffffff) {
      this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      ios::clear(this,*(uint *)(this + 0x20) | 6);
      return param_1;
    }
  }
  *param_2 = (char)uVar3;
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, unsigned char&)

longlong * std::operator>>(longlong *param_1,undefined1 *param_2)

{
  longlong *plVar1;
  byte *pbVar2;
  uint uVar3;
  ios *this;
  sentry asStack_19 [9];
  
  istream::sentry::sentry(asStack_19,param_1,'\0');
  if (asStack_19[0] == (sentry)0x0) {
    return param_1;
  }
  plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
  pbVar2 = (byte *)plVar1[2];
  if (pbVar2 < (byte *)plVar1[3]) {
    uVar3 = (uint)*pbVar2;
    plVar1[2] = (longlong)(pbVar2 + 1);
  }
  else {
    uVar3 = (**(code **)(*plVar1 + 0x50))();
    if (uVar3 == 0xffffffff) {
      this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      ios::clear(this,*(uint *)(this + 0x20) | 6);
      return param_1;
    }
  }
  *param_2 = (char)uVar3;
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, char*)

longlong * std::operator>>(longlong *param_1,undefined1 *param_2)

{
  __istream_extract(param_1,param_2,0x7fffffffffffffff);
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, char&)

longlong * std::operator>>(longlong *param_1,undefined1 *param_2)

{
  longlong *plVar1;
  byte *pbVar2;
  uint uVar3;
  ios *this;
  sentry local_19 [9];
  
  istream::sentry::sentry(local_19,param_1,'\0');
  if (local_19[0] == (sentry)0x0) {
    return param_1;
  }
  plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
  pbVar2 = (byte *)plVar1[2];
  if (pbVar2 < (byte *)plVar1[3]) {
    uVar3 = (uint)*pbVar2;
    plVar1[2] = (longlong)(pbVar2 + 1);
  }
  else {
    uVar3 = (**(code **)(*plVar1 + 0x50))();
    if (uVar3 == 0xffffffff) {
      this = (ios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
      ios::clear(this,*(uint *)(this + 0x20) | 6);
      return param_1;
    }
  }
  *param_2 = (char)uVar3;
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::_Setiosflags)

istream * std::operator>>(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 | param_2;
  return (istream *)param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::_Setprecision)

istream * std::operator>>(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 8) = (longlong)param_2;
  return (istream *)param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::_Resetiosflags)

istream * std::operator>>(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 & ~param_2;
  return (istream *)param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::_Setw)

istream * std::operator>>(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = (longlong)param_2;
  return (istream *)param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::_Setbase)

istream * std::operator>>(longlong *param_1,int param_2)

{
  uint uVar1;
  
  uVar1 = 0;
  if (param_2 - 8U < 9) {
    uVar1 = *(uint *)(&_rdata_CSWTCH_825 + (ulonglong)(param_2 - 8U) * 4);
  }
  *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) =
       *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) & 0xffffffb5 | uVar1;
  return (istream *)param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::_Setfill<char>)

longlong * std::operator>>(longlong *param_1,undefined1 param_2)

{
  longlong lVar1;
  ctype<char> *this;
  
  lVar1 = *(longlong *)(*param_1 + -0x18);
  if (*(char *)((longlong)param_1 + lVar1 + 0xe1) == '\0') {
    this = *(ctype<char> **)((longlong)param_1 + lVar1 + 0xf0);
    if (this == (ctype<char> *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    if (this[0x38] == (ctype<char>)0x0) {
      ctype<char>::_M_widen_init(this);
      if (*(code **)(*(longlong *)this + 0x30) != ctype<char>::do_widen) {
        (**(code **)(*(longlong *)this + 0x30))(this,0x20);
      }
    }
    *(undefined1 *)((longlong)param_1 + lVar1 + 0xe1) = 1;
  }
  *(undefined1 *)((longlong)param_1 + lVar1 + 0xe0) = param_2;
  return param_1;
}



// std::istream& std::TEMPNAMEPLACEHOLDERVALUE(std::istream&, std::__cxx11::string&)

longlong * std::operator>>(longlong *param_1,string *param_2)

{
  longlong *plVar1;
  longlong lVar2;
  size_t sVar3;
  uint uVar4;
  int iVar5;
  longlong lVar6;
  longlong lVar7;
  string *psVar8;
  byte *pbVar9;
  string *psVar10;
  ios *this;
  byte *pbVar11;
  ulonglong uVar12;
  ulonglong uVar13;
  string *psVar14;
  ulonglong uVar15;
  ulonglong uVar16;
  sentry local_51;
  longlong local_50 [2];
  
  istream::sentry::sentry(&local_51,param_1,'\0');
  if (local_51 == (sentry)0x0) {
    lVar6 = *param_1;
    uVar4 = 4;
  }
  else {
    *(undefined8 *)(param_2 + 8) = 0;
    **(undefined1 **)param_2 = 0;
    uVar16 = *(ulonglong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10);
    if ((longlong)uVar16 < 1) {
      uVar16 = 0x3fffffffffffffff;
    }
    locale::locale((locale *)local_50,
                   (undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xd0));
    lVar6 = locale::id::_M_id((id *)&ctype<char>::id);
    lVar6 = *(longlong *)(*(longlong *)(local_50[0] + 8) + lVar6 * 8);
    if (lVar6 == 0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    locale::~locale((locale *)local_50);
    plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
    if ((byte *)plVar1[2] < (byte *)plVar1[3]) {
      uVar15 = (ulonglong)*(byte *)plVar1[2];
    }
    else {
      uVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
      uVar15 = (ulonglong)uVar4;
      if (uVar4 == 0xffffffff) {
        lVar6 = *param_1;
        *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
        uVar4 = 6;
        goto LAB_1400bc486;
      }
    }
    uVar13 = 0;
    do {
      while( true ) {
        lVar2 = *(longlong *)(lVar6 + 0x30);
        if ((*(byte *)(lVar2 + (uVar15 & 0xff) * 2) & 0x20) != 0) {
          lVar6 = *param_1;
          *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
          uVar4 = 4;
          if (uVar13 != 0) {
            return param_1;
          }
          goto LAB_1400bc486;
        }
        psVar10 = (string *)plVar1[2];
        sVar3 = *(size_t *)(param_2 + 8);
        lVar7 = plVar1[3] - (longlong)psVar10;
        if ((longlong)(uVar16 - uVar13) < plVar1[3] - (longlong)psVar10) {
          lVar7 = uVar16 - uVar13;
        }
        if (1 < lVar7) break;
        psVar10 = *(string **)param_2;
        if (psVar10 == param_2 + 0x10) {
          uVar12 = 0xf;
        }
        else {
          uVar12 = *(ulonglong *)(param_2 + 0x10);
        }
        if (uVar12 < sVar3 + 1) {
          __cxx11::string::_M_mutate(param_2,sVar3,0,(undefined1 *)0x0,1);
          psVar10 = *(string **)param_2;
        }
        psVar10[sVar3] = SUB81(uVar15,0);
        uVar13 = uVar13 + 1;
        *(size_t *)(param_2 + 8) = sVar3 + 1;
        *(undefined1 *)(*(longlong *)param_2 + 1 + sVar3) = 0;
        pbVar11 = (byte *)plVar1[3];
        if ((byte *)plVar1[2] < pbVar11) {
          pbVar9 = (byte *)plVar1[2] + 1;
          plVar1[2] = (longlong)pbVar9;
        }
        else {
          iVar5 = (**(code **)(*plVar1 + 0x50))(plVar1);
          if (iVar5 == -1) {
            lVar6 = *param_1;
            if (uVar16 <= uVar13) {
              *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
              return param_1;
            }
            *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
            uVar4 = 2;
            goto LAB_1400bc486;
          }
          pbVar9 = (byte *)plVar1[2];
          pbVar11 = (byte *)plVar1[3];
        }
        if (pbVar11 <= pbVar9) goto LAB_1400bc684;
LAB_1400bc608:
        uVar15 = (ulonglong)*pbVar9;
        if (uVar16 <= uVar13) {
LAB_1400bc615:
          *(undefined8 *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = 0;
          return param_1;
        }
      }
      psVar8 = psVar10 + lVar7;
      psVar14 = psVar10 + 1;
      if (psVar14 < psVar8) {
        do {
          if ((*(byte *)(lVar2 + (ulonglong)(byte)*psVar14 * 2) & 0x20) != 0) {
            uVar15 = (longlong)psVar14 - (longlong)psVar10;
            goto LAB_1400bc5cc;
          }
          psVar14 = psVar14 + 1;
        } while (psVar8 != psVar14);
        uVar15 = (longlong)psVar8 - (longlong)psVar10;
      }
      else {
        uVar15 = 1;
      }
LAB_1400bc5cc:
      if (0x3fffffffffffffff - sVar3 < uVar15) {
                    // WARNING: Subroutine does not return
        __throw_length_error("basic_string::append");
      }
      __cxx11::string::_M_append(param_2,psVar10,uVar15);
      uVar13 = uVar13 + uVar15;
      pbVar9 = (byte *)(plVar1[2] + uVar15);
      plVar1[2] = (longlong)pbVar9;
      if (pbVar9 < (byte *)plVar1[3]) goto LAB_1400bc608;
LAB_1400bc684:
      uVar4 = (**(code **)(*plVar1 + 0x48))(plVar1);
      uVar15 = (ulonglong)uVar4;
      if (uVar16 <= uVar13) goto LAB_1400bc615;
    } while (uVar4 != 0xffffffff);
    lVar6 = *param_1;
    *(undefined8 *)((longlong)param_1 + *(longlong *)(lVar6 + -0x18) + 0x10) = 0;
    uVar4 = (-(uint)(uVar13 == 0) & 4) + 2;
  }
LAB_1400bc486:
  this = (ios *)(*(longlong *)(lVar6 + -0x18) + (longlong)param_1);
  ios::clear(this,uVar4 | *(uint *)(this + 0x20));
  return param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, wchar_t*)

longlong * std::operator>>(longlong *param_1,short *param_2)

{
  __istream_extract<>(param_1,param_2,0x3fffffffffffffff);
  return param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, wchar_t&)

longlong * std::operator>>(longlong *param_1,short *param_2)

{
  longlong *plVar1;
  short *psVar2;
  short sVar3;
  wios *this;
  sentry local_19 [9];
  
  wistream::sentry::sentry(local_19,param_1,'\0');
  if (local_19[0] != (sentry)0x0) {
    plVar1 = *(longlong **)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0xe8);
    psVar2 = (short *)plVar1[2];
    if (psVar2 < (short *)plVar1[3]) {
      sVar3 = *psVar2;
      plVar1[2] = (longlong)(psVar2 + 1);
    }
    else {
      sVar3 = (**(code **)(*plVar1 + 0x50))();
    }
    if (sVar3 != -1) {
      *param_2 = sVar3;
      return param_1;
    }
    this = (wios *)(*(longlong *)(*param_1 + -0x18) + (longlong)param_1);
    wios::clear(this,*(uint *)(this + 0x20) | 6);
  }
  return param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, std::_Setiosflags)

wistream * std::operator>>(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 | param_2;
  return (wistream *)param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, std::_Setprecision)

wistream * std::operator>>(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 8) = (longlong)param_2;
  return (wistream *)param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, std::_Resetiosflags)

wistream * std::operator>>(longlong *param_1,uint param_2)

{
  uint *puVar1;
  
  puVar1 = (uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18);
  *puVar1 = *puVar1 & ~param_2;
  return (wistream *)param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, std::_Setw)

wistream * std::operator>>(longlong *param_1,int param_2)

{
  *(longlong *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x10) = (longlong)param_2;
  return (wistream *)param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, std::_Setbase)

wistream * std::operator>>(longlong *param_1,int param_2)

{
  uint uVar1;
  
  uVar1 = 0;
  if (param_2 - 8U < 9) {
    uVar1 = *(uint *)(&_rdata_CSWTCH_825 + (ulonglong)(param_2 - 8U) * 4);
  }
  *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) =
       *(uint *)((longlong)param_1 + *(longlong *)(*param_1 + -0x18) + 0x18) & 0xffffffb5 | uVar1;
  return (wistream *)param_1;
}



// std::wistream& std::TEMPNAMEPLACEHOLDERVALUE(std::wistream&, std::_Setfill<wchar_t>)

longlong * std::operator>>(longlong *param_1,undefined2 param_2)

{
  longlong lVar1;
  longlong *plVar2;
  
  lVar1 = *(longlong *)(*param_1 + -0x18);
  if (*(char *)((longlong)param_1 + lVar1 + 0xe2) == '\0') {
    plVar2 = *(longlong **)((longlong)param_1 + lVar1 + 0xf0);
    if (plVar2 == (longlong *)0x0) {
                    // WARNING: Subroutine does not return
      __throw_bad_cast();
    }
    (**(code **)(*plVar2 + 0x50))(plVar2,0x20);
    *(undefined1 *)((longlong)param_1 + lVar1 + 0xe2) = 1;
  }
  *(undefined2 *)((longlong)param_1 + lVar1 + 0xe0) = param_2;
  return param_1;
}



// non-virtual thunk to std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this)

{
  *(undefined **)(this + -0x10) = &DAT_1400d6e18;
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6e68;
  *(undefined ***)(this + 8) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 8));
  operator_delete(this + -0x10);
  return;
}



// non-virtual thunk to std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this)

{
  *(undefined **)(this + -0x10) = &DAT_1400d6e18;
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6e68;
  *(undefined ***)(this + 8) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 8));
  return;
}



// non-virtual thunk to std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this)

{
  *(undefined **)(this + -0x10) = &DAT_1400d6eb8;
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6f08;
  *(undefined ***)(this + 8) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 8));
  operator_delete(this + -0x10);
  return;
}



// non-virtual thunk to std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this)

{
  *(undefined **)(this + -0x10) = &DAT_1400d6eb8;
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6f08;
  *(undefined ***)(this + 8) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 8));
  return;
}



// non-virtual thunk to std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this)

{
  *(undefined ***)(this + -0x10) = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x70) = &PTR__stringstream_1400dca38;
  *(undefined ***)this = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(stringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x40));
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6b68;
  *(undefined **)(this + -0x10) = &DAT_1400d6b18;
  *(undefined ***)(this + 0x70) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  operator_delete(this + -0x10);
  return;
}



// non-virtual thunk to std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this)

{
  *(undefined ***)(this + -0x10) = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(this + 0x70) = &PTR__stringstream_1400dca38;
  *(undefined ***)this = &PTR__stringstream_1400dca10;
  *(undefined ***)(this + 8) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(stringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(this + 0x40));
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6b68;
  *(undefined **)(this + -0x10) = &DAT_1400d6b18;
  *(undefined ***)(this + 0x70) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  return;
}



// non-virtual thunk to std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this)

{
  *(undefined ***)(this + -0x10) = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x70) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)this = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(wstringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x40));
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6c88;
  *(undefined **)(this + -0x10) = &DAT_1400d6bb8;
  *(undefined ***)(this + 0x70) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  operator_delete(this + -0x10);
  return;
}



// non-virtual thunk to std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this)

{
  *(undefined ***)(this + -0x10) = &PTR__wstringstream_1400dca68;
  *(undefined ***)(this + 0x70) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)this = &PTR__wstringstream_1400dca90;
  *(undefined ***)(this + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(this + 0x50) != this + 0x60) {
    operator_delete(*(wstringstream **)(this + 0x50));
  }
  *(undefined ***)(this + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(this + 0x40));
  *(undefined8 *)(this + -8) = 0;
  *(undefined **)this = &DAT_1400d6c88;
  *(undefined **)(this + -0x10) = &DAT_1400d6bb8;
  *(undefined ***)(this + 0x70) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(this + 0x70));
  return;
}



// virtual thunk to std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this)

{
  iostream *piVar1;
  
  piVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined **)piVar1 = &DAT_1400d6e18;
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined **)(piVar1 + 0x10) = &DAT_1400d6e68;
  *(undefined ***)(piVar1 + 0x18) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x18));
  operator_delete(piVar1);
  return;
}



// virtual thunk to std::iostream::~iostream()

void __thiscall std::iostream::~iostream(iostream *this)

{
  iostream *piVar1;
  
  piVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined **)piVar1 = &DAT_1400d6e18;
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined **)(piVar1 + 0x10) = &DAT_1400d6e68;
  *(undefined ***)(piVar1 + 0x18) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x18));
  return;
}



// virtual thunk to std::istream::~istream()

void __thiscall std::istream::~istream(istream *this)

{
  istream *piVar1;
  
  piVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)piVar1 = &PTR__istream_1400dd028;
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined ***)(piVar1 + 0x10) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x10));
  operator_delete(piVar1);
  return;
}



// virtual thunk to std::istream::~istream()

void __thiscall std::istream::~istream(istream *this)

{
  istream *piVar1;
  
  piVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)piVar1 = &PTR__istream_1400dd028;
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined ***)(piVar1 + 0x10) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x10));
  return;
}



// virtual thunk to std::ostream::~ostream()

void __thiscall std::ostream::~ostream(ostream *this)

{
  ostream *poVar1;
  
  poVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)poVar1 = &PTR__ostream_1400dd078;
  *(undefined ***)(poVar1 + 8) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(poVar1 + 8));
  operator_delete(poVar1);
  return;
}



// virtual thunk to std::ostream::~ostream()

void __thiscall std::ostream::~ostream(ostream *this)

{
  ostream *poVar1;
  
  poVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)poVar1 = &PTR__ostream_1400dd078;
  *(undefined ***)(poVar1 + 8) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(poVar1 + 8));
  return;
}



// virtual thunk to std::wistream::~wistream()

void __thiscall std::wistream::~wistream(wistream *this)

{
  wistream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wistream_1400dd558;
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x10));
  operator_delete(pwVar1);
  return;
}



// virtual thunk to std::wistream::~wistream()

void __thiscall std::wistream::~wistream(wistream *this)

{
  wistream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wistream_1400dd558;
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x10));
  return;
}



// virtual thunk to std::wostream::~wostream()

void __thiscall std::wostream::~wostream(wostream *this)

{
  wostream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wostream_1400dd5a8;
  *(undefined ***)(pwVar1 + 8) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 8));
  operator_delete(pwVar1);
  return;
}



// virtual thunk to std::wostream::~wostream()

void __thiscall std::wostream::~wostream(wostream *this)

{
  wostream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wostream_1400dd5a8;
  *(undefined ***)(pwVar1 + 8) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 8));
  return;
}



// virtual thunk to std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this)

{
  wiostream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined **)pwVar1 = &DAT_1400d6eb8;
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined **)(pwVar1 + 0x10) = &DAT_1400d6f08;
  *(undefined ***)(pwVar1 + 0x18) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x18));
  operator_delete(pwVar1);
  return;
}



// virtual thunk to std::wiostream::~wiostream()

void __thiscall std::wiostream::~wiostream(wiostream *this)

{
  wiostream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined **)pwVar1 = &DAT_1400d6eb8;
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined **)(pwVar1 + 0x10) = &DAT_1400d6f08;
  *(undefined ***)(pwVar1 + 0x18) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x18));
  return;
}



// virtual thunk to std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this)

{
  stringstream *psVar1;
  
  psVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)psVar1 = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(psVar1 + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined ***)(psVar1 + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(psVar1 + 0x18) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(psVar1 + 0x60) != psVar1 + 0x70) {
    operator_delete(*(stringstream **)(psVar1 + 0x60));
  }
  *(undefined ***)(psVar1 + 0x18) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(psVar1 + 0x50));
  *(undefined8 *)(psVar1 + 8) = 0;
  *(undefined **)(psVar1 + 0x10) = &DAT_1400d6b68;
  *(undefined **)psVar1 = &DAT_1400d6b18;
  *(undefined ***)(psVar1 + 0x80) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(psVar1 + 0x80));
  operator_delete(psVar1);
  return;
}



// virtual thunk to std::__cxx11::stringstream::~stringstream()

void __thiscall std::__cxx11::stringstream::~stringstream(stringstream *this)

{
  stringstream *psVar1;
  
  psVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)psVar1 = &PTR__stringstream_1400dc9e8;
  *(undefined ***)(psVar1 + 0x80) = &PTR__stringstream_1400dca38;
  *(undefined ***)(psVar1 + 0x10) = &PTR__stringstream_1400dca10;
  *(undefined ***)(psVar1 + 0x18) = &PTR__stringbuf_1400dc540;
  if (*(stringstream **)(psVar1 + 0x60) != psVar1 + 0x70) {
    operator_delete(*(stringstream **)(psVar1 + 0x60));
  }
  *(undefined ***)(psVar1 + 0x18) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(psVar1 + 0x50));
  *(undefined8 *)(psVar1 + 8) = 0;
  *(undefined **)(psVar1 + 0x10) = &DAT_1400d6b68;
  *(undefined **)psVar1 = &DAT_1400d6b18;
  *(undefined ***)(psVar1 + 0x80) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(psVar1 + 0x80));
  return;
}



// virtual thunk to std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this)

{
  wstringstream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wstringstream_1400dca68;
  *(undefined ***)(pwVar1 + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(pwVar1 + 0x18) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(pwVar1 + 0x60) != pwVar1 + 0x70) {
    operator_delete(*(wstringstream **)(pwVar1 + 0x60));
  }
  *(undefined ***)(pwVar1 + 0x18) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(pwVar1 + 0x50));
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined **)(pwVar1 + 0x10) = &DAT_1400d6c88;
  *(undefined **)pwVar1 = &DAT_1400d6bb8;
  *(undefined ***)(pwVar1 + 0x80) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x80));
  operator_delete(pwVar1);
  return;
}



// virtual thunk to std::__cxx11::wstringstream::~wstringstream()

void __thiscall std::__cxx11::wstringstream::~wstringstream(wstringstream *this)

{
  wstringstream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wstringstream_1400dca68;
  *(undefined ***)(pwVar1 + 0x80) = &PTR__wstringstream_1400dcab8;
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wstringstream_1400dca90;
  *(undefined ***)(pwVar1 + 0x18) = &PTR__wstringbuf_1400dc5c0;
  if (*(wstringstream **)(pwVar1 + 0x60) != pwVar1 + 0x70) {
    operator_delete(*(wstringstream **)(pwVar1 + 0x60));
  }
  *(undefined ***)(pwVar1 + 0x18) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(pwVar1 + 0x50));
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined **)(pwVar1 + 0x10) = &DAT_1400d6c88;
  *(undefined **)pwVar1 = &DAT_1400d6bb8;
  *(undefined ***)(pwVar1 + 0x80) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x80));
  return;
}



// virtual thunk to std::__cxx11::istringstream::~istringstream()

void __thiscall std::__cxx11::istringstream::~istringstream(istringstream *this)

{
  istringstream *piVar1;
  
  piVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)piVar1 = &PTR__istringstream_1400dcae8;
  *(undefined ***)(piVar1 + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined ***)(piVar1 + 0x10) = &PTR__stringbuf_1400dc540;
  if (*(istringstream **)(piVar1 + 0x58) != piVar1 + 0x68) {
    operator_delete(*(istringstream **)(piVar1 + 0x58));
  }
  *(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(piVar1 + 0x48));
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined **)piVar1 = &DAT_1400d6cd8;
  *(undefined ***)(piVar1 + 0x78) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x78));
  operator_delete(piVar1);
  return;
}



// virtual thunk to std::__cxx11::istringstream::~istringstream()

void __thiscall std::__cxx11::istringstream::~istringstream(istringstream *this)

{
  istringstream *piVar1;
  
  piVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)piVar1 = &PTR__istringstream_1400dcae8;
  *(undefined ***)(piVar1 + 0x78) = &PTR__istringstream_1400dcb10;
  *(undefined ***)(piVar1 + 0x10) = &PTR__stringbuf_1400dc540;
  if (*(istringstream **)(piVar1 + 0x58) != piVar1 + 0x68) {
    operator_delete(*(istringstream **)(piVar1 + 0x58));
  }
  *(undefined ***)(piVar1 + 0x10) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(piVar1 + 0x48));
  *(undefined8 *)(piVar1 + 8) = 0;
  *(undefined **)piVar1 = &DAT_1400d6cd8;
  *(undefined ***)(piVar1 + 0x78) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(piVar1 + 0x78));
  return;
}



// virtual thunk to std::__cxx11::wistringstream::~wistringstream()

void __thiscall std::__cxx11::wistringstream::~wistringstream(wistringstream *this)

{
  wistringstream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(pwVar1 + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wstringbuf_1400dc5c0;
  if (*(wistringstream **)(pwVar1 + 0x58) != pwVar1 + 0x68) {
    operator_delete(*(wistringstream **)(pwVar1 + 0x58));
  }
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(pwVar1 + 0x48));
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined **)pwVar1 = &DAT_1400d6d28;
  *(undefined ***)(pwVar1 + 0x78) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x78));
  operator_delete(pwVar1);
  return;
}



// virtual thunk to std::__cxx11::wistringstream::~wistringstream()

void __thiscall std::__cxx11::wistringstream::~wistringstream(wistringstream *this)

{
  wistringstream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)pwVar1 = &PTR__wistringstream_1400dcb38;
  *(undefined ***)(pwVar1 + 0x78) = &PTR__wistringstream_1400dcb60;
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wstringbuf_1400dc5c0;
  if (*(wistringstream **)(pwVar1 + 0x58) != pwVar1 + 0x68) {
    operator_delete(*(wistringstream **)(pwVar1 + 0x58));
  }
  *(undefined ***)(pwVar1 + 0x10) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(pwVar1 + 0x48));
  *(undefined8 *)(pwVar1 + 8) = 0;
  *(undefined **)pwVar1 = &DAT_1400d6d28;
  *(undefined ***)(pwVar1 + 0x78) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x78));
  return;
}



// virtual thunk to std::__cxx11::ostringstream::~ostringstream()

void __thiscall std::__cxx11::ostringstream::~ostringstream(ostringstream *this)

{
  ostringstream *poVar1;
  
  poVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)(poVar1 + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined ***)poVar1 = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(poVar1 + 8) = &PTR__stringbuf_1400dc540;
  if (*(ostringstream **)(poVar1 + 0x50) != poVar1 + 0x60) {
    operator_delete(*(ostringstream **)(poVar1 + 0x50));
  }
  *(undefined ***)(poVar1 + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(poVar1 + 0x40));
  *(undefined **)poVar1 = &DAT_1400d6d78;
  *(undefined ***)(poVar1 + 0x70) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(poVar1 + 0x70));
  operator_delete(poVar1);
  return;
}



// virtual thunk to std::__cxx11::ostringstream::~ostringstream()

void __thiscall std::__cxx11::ostringstream::~ostringstream(ostringstream *this)

{
  ostringstream *poVar1;
  
  poVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)(poVar1 + 0x70) = &PTR__ostringstream_1400dcbb0;
  *(undefined ***)poVar1 = &PTR__ostringstream_1400dcb88;
  *(undefined ***)(poVar1 + 8) = &PTR__stringbuf_1400dc540;
  if (*(ostringstream **)(poVar1 + 0x50) != poVar1 + 0x60) {
    operator_delete(*(ostringstream **)(poVar1 + 0x50));
  }
  *(undefined ***)(poVar1 + 8) = &PTR__streambuf_1400dd810;
  locale::~locale((locale *)(poVar1 + 0x40));
  *(undefined **)poVar1 = &DAT_1400d6d78;
  *(undefined ***)(poVar1 + 0x70) = &PTR__ios_1400ded80;
  ios_base::~ios_base((ios_base *)(poVar1 + 0x70));
  return;
}



// virtual thunk to std::__cxx11::wostringstream::~wostringstream()

void __thiscall std::__cxx11::wostringstream::~wostringstream(wostringstream *this)

{
  wostringstream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)(pwVar1 + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined ***)pwVar1 = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(pwVar1 + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wostringstream **)(pwVar1 + 0x50) != pwVar1 + 0x60) {
    operator_delete(*(wostringstream **)(pwVar1 + 0x50));
  }
  *(undefined ***)(pwVar1 + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(pwVar1 + 0x40));
  *(undefined **)pwVar1 = &DAT_1400d6dc8;
  *(undefined ***)(pwVar1 + 0x70) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x70));
  operator_delete(pwVar1);
  return;
}



// virtual thunk to std::__cxx11::wostringstream::~wostringstream()

void __thiscall std::__cxx11::wostringstream::~wostringstream(wostringstream *this)

{
  wostringstream *pwVar1;
  
  pwVar1 = this + *(longlong *)(*(longlong *)this + -0x18);
  *(undefined ***)(pwVar1 + 0x70) = &PTR__wostringstream_1400dcc00;
  *(undefined ***)pwVar1 = &PTR__wostringstream_1400dcbd8;
  *(undefined ***)(pwVar1 + 8) = &PTR__wstringbuf_1400dc5c0;
  if (*(wostringstream **)(pwVar1 + 0x50) != pwVar1 + 0x60) {
    operator_delete(*(wostringstream **)(pwVar1 + 0x50));
  }
  *(undefined ***)(pwVar1 + 8) = &PTR__wstreambuf_1400dd890;
  locale::~locale((locale *)(pwVar1 + 0x40));
  *(undefined **)pwVar1 = &DAT_1400d6dc8;
  *(undefined ***)(pwVar1 + 0x70) = &PTR__wios_1400deda0;
  ios_base::~ios_base((ios_base *)(pwVar1 + 0x70));
  return;
}



// operator delete[](void*)

void operator_delete__(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



// operator delete(void*)

void operator_delete(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



// operator delete(void*, unsigned long long)

void operator_delete(void *param_1)

{
                    // WARNING: Could not recover jumptable at 0x0001400204d8. Too many branches
                    // WARNING: Treating indirect jump as call
  free(param_1);
  return;
}



// operator new[](unsigned long long)

void * operator_new__(size_t param_1)

{
  size_t _Size;
  void *pvVar1;
  code *pcVar2;
  ulonglong *puVar3;
  
  _Size = 1;
  if (param_1 != 0) {
    _Size = param_1;
  }
  while( true ) {
    pvVar1 = malloc(_Size);
    if (pvVar1 != (void *)0x0) {
      return pvVar1;
    }
    pcVar2 = (code *)std::get_new_handler();
    if (pcVar2 == (code *)0x0) break;
    (*pcVar2)();
  }
  puVar3 = __cxa_allocate_exception(8);
  *puVar3 = (ulonglong)&PTR__bad_alloc_1400ded50;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar3,&std::bad_alloc::typeinfo,std::bad_alloc::~bad_alloc);
}



// operator new[](unsigned long long, std::nothrow_t const&)

void * operator_new__(size_t param_1)

{
  void *pvVar1;
  
  pvVar1 = operator_new__(param_1);
  return pvVar1;
}



// operator new(unsigned long long)

void * operator_new(size_t param_1)

{
  size_t _Size;
  void *pvVar1;
  code *pcVar2;
  ulonglong *puVar3;
  
  _Size = 1;
  if (param_1 != 0) {
    _Size = param_1;
  }
  while( true ) {
    pvVar1 = malloc(_Size);
    if (pvVar1 != (void *)0x0) {
      return pvVar1;
    }
    pcVar2 = (code *)std::get_new_handler();
    if (pcVar2 == (code *)0x0) break;
    (*pcVar2)();
  }
  puVar3 = __cxa_allocate_exception(8);
  *puVar3 = (ulonglong)&PTR__bad_alloc_1400ded50;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar3,&std::bad_alloc::typeinfo,std::bad_alloc::~bad_alloc);
}



ulonglong * __cxa_allocate_dependent_exception(void)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  
  puVar1 = malloc(0x90);
  if (puVar1 == (ulonglong *)0x0) {
    puVar1 = _text__ZN12_GLOBAL__N_14pool8allocateEy_constprop_0(0x90);
    if (puVar1 == (ulonglong *)0x0) {
                    // WARNING: Subroutine does not return
      std::terminate();
    }
  }
  *puVar1 = 0;
  puVar1[0x11] = 0;
  puVar3 = (undefined8 *)((ulonglong)(puVar1 + 1) & 0xfffffffffffffff8);
  for (uVar2 = (ulonglong)
               (((int)puVar1 - (int)(undefined8 *)((ulonglong)(puVar1 + 1) & 0xfffffffffffffff8)) +
                0x90U >> 3); uVar2 != 0; uVar2 = uVar2 - 1) {
    *puVar3 = 0;
    puVar3 = puVar3 + 1;
  }
  return puVar1;
}



ulonglong * __cxa_allocate_exception(longlong param_1)

{
  ulonglong *puVar1;
  ulonglong uVar2;
  undefined8 *puVar3;
  
  puVar1 = malloc(param_1 + 0xa0U);
  if (puVar1 == (ulonglong *)0x0) {
    puVar1 = _text__ZN12_GLOBAL__N_14pool8allocateEy_constprop_0(param_1 + 0xa0U);
    if (puVar1 == (ulonglong *)0x0) {
                    // WARNING: Subroutine does not return
      std::terminate();
    }
  }
  *puVar1 = 0;
  puVar1[0x13] = 0;
  puVar3 = (undefined8 *)((ulonglong)(puVar1 + 1) & 0xfffffffffffffff8);
  for (uVar2 = (ulonglong)
               (((int)puVar1 - (int)(undefined8 *)((ulonglong)(puVar1 + 1) & 0xfffffffffffffff8)) +
                0xa0U >> 3); uVar2 != 0; uVar2 = uVar2 - 1) {
    *puVar3 = 0;
    puVar3 = puVar3 + 1;
  }
  return puVar1 + 0x14;
}



longlong __cxa_begin_catch(longlong *param_1)

{
  longlong *plVar1;
  longlong *plVar2;
  int iVar3;
  longlong *plVar4;
  
  plVar4 = (longlong *)__cxa_get_globals();
  plVar1 = param_1 + -10;
  plVar2 = (longlong *)*plVar4;
  if (*param_1 + 0xb8b1aabcbcd4d500U < 2) {
    iVar3 = (int)param_1[-5];
    if (iVar3 < 0) {
      iVar3 = -iVar3;
    }
    *(int *)(param_1 + -5) = iVar3 + 1;
    *(int *)(plVar4 + 1) = (int)plVar4[1] + -1;
    if (plVar2 != plVar1) {
      param_1[-6] = (longlong)plVar2;
      *plVar4 = (longlong)plVar1;
    }
    return param_1[-1];
  }
  if (plVar2 == (longlong *)0x0) {
    *plVar4 = (longlong)plVar1;
    return 0;
  }
                    // WARNING: Subroutine does not return
  std::terminate();
}



void __cxa_call_terminate(longlong *param_1)

{
  if (param_1 != (longlong *)0x0) {
    __cxa_begin_catch(param_1);
    if (*param_1 + 0xb8b1aabcbcd4d500U < 2) {
                    // WARNING: Subroutine does not return
      __cxxabiv1::__terminate((undefined *)param_1[-7]);
    }
  }
                    // WARNING: Subroutine does not return
  std::terminate();
}



void __cxa_call_unexpected(longlong *param_1)

{
  __cxa_begin_catch(param_1);
                    // WARNING: Subroutine does not return
  __cxxabiv1::__unexpected((undefined *)param_1[-8]);
}



longlong __cxa_current_exception_type(void)

{
  longlong *plVar1;
  longlong lVar2;
  
  plVar1 = (longlong *)__cxa_get_globals();
  plVar1 = (longlong *)*plVar1;
  lVar2 = 0;
  if (plVar1 != (longlong *)0x0) {
    if ((*(byte *)(plVar1 + 10) & 1) != 0) {
      plVar1 = (longlong *)(*plVar1 + -0x90);
    }
    lVar2 = *plVar1;
  }
  return lVar2;
}



void __cxa_end_catch(void)

{
  longlong lVar1;
  longlong *plVar2;
  int iVar3;
  
  plVar2 = (longlong *)__cxa_get_globals_fast();
  lVar1 = *plVar2;
  if (lVar1 != 0) {
    if (1 < *(longlong *)(lVar1 + 0x50) + 0xb8b1aabcbcd4d500U) {
      *plVar2 = 0;
      _Unwind_DeleteException(lVar1 + 0x50);
      return;
    }
    iVar3 = *(int *)(lVar1 + 0x28);
    if (iVar3 < 0) {
      iVar3 = iVar3 + 1;
      if (iVar3 == 0) {
        *plVar2 = *(longlong *)(lVar1 + 0x20);
      }
    }
    else {
      iVar3 = iVar3 + -1;
      if (iVar3 == 0) {
        *plVar2 = *(longlong *)(lVar1 + 0x20);
        _Unwind_DeleteException(lVar1 + 0x50);
        return;
      }
      if (iVar3 == -1) {
                    // WARNING: Subroutine does not return
        std::terminate();
      }
    }
    *(int *)(lVar1 + 0x28) = iVar3;
  }
  return;
}



void __cxa_free_dependent_exception(void *param_1)

{
  if ((param_1 < (void *)(DAT_1400c09f8 + (longlong)DAT_1400c09f0)) && (DAT_1400c09f0 < param_1)) {
    _text__ZN12_GLOBAL__N_14pool4freeEPv_constprop_0((longlong)param_1);
    return;
  }
  free(param_1);
  return;
}



void __cxa_free_exception(longlong param_1)

{
  void *_Memory;
  
  _Memory = (void *)(param_1 + -0xa0);
  if ((_Memory < (void *)(DAT_1400c09f8 + (longlong)DAT_1400c09f0)) && (DAT_1400c09f0 < _Memory)) {
    _text__ZN12_GLOBAL__N_14pool4freeEPv_constprop_0((longlong)_Memory);
    return;
  }
  free(_Memory);
  return;
}



undefined8 __cxa_get_exception_ptr(longlong param_1)

{
  return *(undefined8 *)(param_1 + -8);
}



void __cxa_get_globals(void)

{
  __emutls_get_address((size_t *)&_data___emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global);
  return;
}



void __cxa_get_globals_fast(void)

{
  __emutls_get_address((size_t *)&_data___emutls_v__ZZN12_GLOBAL__N_110get_globalEvE6global);
  return;
}



ulonglong __cxa_guard_abort(longlong param_1)

{
  DWORD DVar1;
  ulonglong in_RAX;
  undefined8 uVar2;
  ulonglong *puVar3;
  recursive_init_error *this;
  PCONDITION_VARIABLE pRVar4;
  PCONDITION_VARIABLE pRVar5;
  ulonglong uVar6;
  
  if (_CRT_MT == 0) {
    *(undefined1 *)(param_1 + 1) = 0;
  }
  else {
    in_RAX = __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_116get_static_mutexEvE4once,
                               _text__ZN12_GLOBAL__N_1L4initEv);
    if ((_CRT_MT != 0) &&
       (in_RAX = __gthr_win32_mutex_lock(_data__ZN12_GLOBAL__N_1L12static_mutexE), (int)in_RAX != 0)
       ) {
      puVar3 = __cxa_allocate_exception(8);
      *puVar3 = (ulonglong)&PTR____concurrence_lock_error_1400db830;
                    // WARNING: Subroutine does not return
      __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_lock_error::typeinfo,
                  __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error);
    }
    *(undefined1 *)(param_1 + 1) = 0;
    if ((_CRT_MT != 0) &&
       (in_RAX = __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_115get_static_condEvE4once,
                                   _text__ZN12_GLOBAL__N_1L16init_static_condEv), _CRT_MT != 0)) {
      pRVar4 = _data__ZN12_GLOBAL__N_1L11static_condE;
      uVar2 = __gthr_win32_cond_broadcast(_data__ZN12_GLOBAL__N_1L11static_condE);
      if ((int)uVar2 != 0) {
        __gnu_cxx::__throw_concurrence_broadcast_error();
        if (*(char *)&pRVar4->Ptr == '\0') {
          if (_CRT_MT == 0) {
            uVar6 = 0;
            if (*(char *)&pRVar4->Ptr == '\0') {
              if (*(char *)((longlong)&pRVar4->Ptr + 1) != '\0') {
                this = (recursive_init_error *)__cxa_allocate_exception(8);
                __gnu_cxx::recursive_init_error::recursive_init_error(this);
                    // WARNING: Subroutine does not return
                __cxa_throw((longlong)this,&__gnu_cxx::recursive_init_error::typeinfo,
                            __gnu_cxx::recursive_init_error::~recursive_init_error);
              }
              *(undefined1 *)((longlong)&pRVar4->Ptr + 1) = 1;
              uVar6 = 1;
            }
          }
          else {
            __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_116get_static_mutexEvE4once,
                              _text__ZN12_GLOBAL__N_1L4initEv);
            if ((_CRT_MT != 0) &&
               (uVar2 = __gthr_win32_mutex_lock(_data__ZN12_GLOBAL__N_1L12static_mutexE),
               (int)uVar2 != 0)) {
              puVar3 = __cxa_allocate_exception(8);
              *puVar3 = (ulonglong)&PTR____concurrence_lock_error_1400db830;
                    // WARNING: Subroutine does not return
              __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_lock_error::typeinfo,
                          __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error);
            }
            while (*(char *)&pRVar4->Ptr == '\0') {
              if (*(char *)((longlong)&pRVar4->Ptr + 1) == '\0') {
                *(undefined1 *)((longlong)&pRVar4->Ptr + 1) = 1;
                uVar6 = 1;
                goto LAB_1400be015;
              }
              pRVar5 = _data__ZN12_GLOBAL__N_1L11static_condE;
              if ((_CRT_MT != 0) &&
                 (__gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_115get_static_condEvE4once,
                                    _text__ZN12_GLOBAL__N_1L16init_static_condEv),
                 pRVar5 = _data__ZN12_GLOBAL__N_1L11static_condE, _CRT_MT != 0)) {
                __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_116get_static_mutexEvE4once,
                                  _text__ZN12_GLOBAL__N_1L4initEv);
              }
              DVar1 = __gthr_win32_cond_wait(pRVar5,_data__ZN12_GLOBAL__N_1L12static_mutexE);
              if (DVar1 != 0) {
                puVar3 = __cxa_allocate_exception(8);
                *puVar3 = (ulonglong)&PTR____concurrence_wait_error_1400db860;
                    // WARNING: Subroutine does not return
                __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_wait_error::typeinfo,
                            __gnu_cxx::__concurrence_wait_error::~__concurrence_wait_error);
              }
            }
            uVar6 = 0;
LAB_1400be015:
            if ((_CRT_MT != 0) &&
               (uVar2 = __gthr_win32_mutex_unlock(_data__ZN12_GLOBAL__N_1L12static_mutexE),
               (int)uVar2 != 0)) {
              puVar3 = __cxa_allocate_exception(8);
              *puVar3 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
              __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                          __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
            }
          }
        }
        else {
          uVar6 = 0;
        }
        return uVar6;
      }
      in_RAX = (ulonglong)(uint)_CRT_MT;
      if ((_CRT_MT != 0) &&
         (in_RAX = __gthr_win32_mutex_unlock(_data__ZN12_GLOBAL__N_1L12static_mutexE),
         (int)in_RAX != 0)) {
        puVar3 = __cxa_allocate_exception(8);
        *puVar3 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
        __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                    __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
      }
    }
  }
  return in_RAX;
}



undefined4 __cxa_guard_acquire(char *param_1)

{
  DWORD DVar1;
  undefined8 uVar2;
  ulonglong *puVar3;
  recursive_init_error *this;
  undefined4 uVar4;
  PCONDITION_VARIABLE pRVar5;
  
  if (*param_1 == '\0') {
    if (_CRT_MT == 0) {
      uVar4 = 0;
      if (*param_1 == '\0') {
        if (param_1[1] != '\0') {
          this = (recursive_init_error *)__cxa_allocate_exception(8);
          __gnu_cxx::recursive_init_error::recursive_init_error(this);
                    // WARNING: Subroutine does not return
          __cxa_throw((longlong)this,&__gnu_cxx::recursive_init_error::typeinfo,
                      __gnu_cxx::recursive_init_error::~recursive_init_error);
        }
        param_1[1] = '\x01';
        uVar4 = 1;
      }
    }
    else {
      __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_116get_static_mutexEvE4once,
                        _text__ZN12_GLOBAL__N_1L4initEv);
      if ((_CRT_MT != 0) &&
         (uVar2 = __gthr_win32_mutex_lock(_data__ZN12_GLOBAL__N_1L12static_mutexE), (int)uVar2 != 0)
         ) {
        puVar3 = __cxa_allocate_exception(8);
        *puVar3 = (ulonglong)&PTR____concurrence_lock_error_1400db830;
                    // WARNING: Subroutine does not return
        __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_lock_error::typeinfo,
                    __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error);
      }
      while (*param_1 == '\0') {
        if (param_1[1] == '\0') {
          param_1[1] = '\x01';
          uVar4 = 1;
          goto LAB_1400be015;
        }
        pRVar5 = _data__ZN12_GLOBAL__N_1L11static_condE;
        if ((_CRT_MT != 0) &&
           (__gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_115get_static_condEvE4once,
                              _text__ZN12_GLOBAL__N_1L16init_static_condEv),
           pRVar5 = _data__ZN12_GLOBAL__N_1L11static_condE, _CRT_MT != 0)) {
          __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_116get_static_mutexEvE4once,
                            _text__ZN12_GLOBAL__N_1L4initEv);
        }
        DVar1 = __gthr_win32_cond_wait(pRVar5,_data__ZN12_GLOBAL__N_1L12static_mutexE);
        if (DVar1 != 0) {
          puVar3 = __cxa_allocate_exception(8);
          *puVar3 = (ulonglong)&PTR____concurrence_wait_error_1400db860;
                    // WARNING: Subroutine does not return
          __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_wait_error::typeinfo,
                      __gnu_cxx::__concurrence_wait_error::~__concurrence_wait_error);
        }
      }
      uVar4 = 0;
LAB_1400be015:
      if ((_CRT_MT != 0) &&
         (uVar2 = __gthr_win32_mutex_unlock(_data__ZN12_GLOBAL__N_1L12static_mutexE),
         (int)uVar2 != 0)) {
        puVar3 = __cxa_allocate_exception(8);
        *puVar3 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
        __cxa_throw((longlong)puVar3,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                    __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
      }
    }
  }
  else {
    uVar4 = 0;
  }
  return uVar4;
}



PCONDITION_VARIABLE __cxa_guard_release(undefined1 *param_1)

{
  PCONDITION_VARIABLE in_RAX;
  undefined8 uVar1;
  ulonglong *puVar2;
  undefined *puVar3;
  PCONDITION_VARIABLE pRVar4;
  PVOID pvVar5;
  PVOID pvVar6;
  
  if (_CRT_MT == 0) {
    param_1[1] = 0;
    *param_1 = 1;
  }
  else {
    in_RAX = (PCONDITION_VARIABLE)
             __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_116get_static_mutexEvE4once,
                               _text__ZN12_GLOBAL__N_1L4initEv);
    pvVar6 = (PVOID)(ulonglong)(uint)_CRT_MT;
    if (_CRT_MT != 0) {
      in_RAX = (PCONDITION_VARIABLE)__gthr_win32_mutex_lock(_data__ZN12_GLOBAL__N_1L12static_mutexE)
      ;
      if ((int)in_RAX != 0) {
        puVar2 = __cxa_allocate_exception(8);
        *puVar2 = (ulonglong)&PTR____concurrence_lock_error_1400db830;
                    // WARNING: Subroutine does not return
        __cxa_throw((longlong)puVar2,&__gnu_cxx::__concurrence_lock_error::typeinfo,
                    __gnu_cxx::__concurrence_lock_error::~__concurrence_lock_error);
      }
    }
    param_1[1] = 0;
    *param_1 = 1;
    if (_CRT_MT != 0) {
      in_RAX = (PCONDITION_VARIABLE)
               __gthr_win32_once((int *)&_data__ZZN12_GLOBAL__N_115get_static_condEvE4once,
                                 _text__ZN12_GLOBAL__N_1L16init_static_condEv);
      pvVar5 = (PVOID)(ulonglong)(uint)_CRT_MT;
      if (_CRT_MT != 0) {
        pRVar4 = _data__ZN12_GLOBAL__N_1L11static_condE;
        uVar1 = __gthr_win32_cond_broadcast(_data__ZN12_GLOBAL__N_1L11static_condE);
        if ((int)uVar1 != 0) {
          __gnu_cxx::__throw_concurrence_broadcast_error();
          *(undefined4 *)&pRVar4[-0x14].Ptr = 0;
          pRVar4[-0x12].Ptr = pvVar5;
          pRVar4[-0x11].Ptr = pvVar6;
          puVar3 = std::get_unexpected();
          pRVar4[-0x10].Ptr = puVar3;
          puVar3 = std::get_terminate();
          pRVar4[-0xf].Ptr = puVar3;
          pRVar4[-8].Ptr = (PVOID)0x474e5543432b2b00;
          pRVar4[-7].Ptr =
               _text__ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception;
          return pRVar4 + -0x14;
        }
        in_RAX = (PCONDITION_VARIABLE)(ulonglong)(uint)_CRT_MT;
        if (_CRT_MT != 0) {
          in_RAX = (PCONDITION_VARIABLE)
                   __gthr_win32_mutex_unlock(_data__ZN12_GLOBAL__N_1L12static_mutexE);
          if ((int)in_RAX != 0) {
            puVar2 = __cxa_allocate_exception(8);
            *puVar2 = (ulonglong)&PTR____concurrence_unlock_error_1400db890;
                    // WARNING: Subroutine does not return
            __cxa_throw((longlong)puVar2,&__gnu_cxx::__concurrence_unlock_error::typeinfo,
                        __gnu_cxx::__concurrence_unlock_error::~__concurrence_unlock_error);
          }
        }
      }
    }
  }
  return in_RAX;
}



longlong __cxa_init_primary_exception(longlong param_1,undefined8 param_2,undefined8 param_3)

{
  undefined *puVar1;
  
  *(undefined4 *)(param_1 + -0xa0) = 0;
  *(undefined8 *)(param_1 + -0x90) = param_2;
  *(undefined8 *)(param_1 + -0x88) = param_3;
  puVar1 = std::get_unexpected();
  *(undefined **)(param_1 + -0x80) = puVar1;
  puVar1 = std::get_terminate();
  *(undefined **)(param_1 + -0x78) = puVar1;
  *(undefined8 *)(param_1 + -0x40) = 0x474e5543432b2b00;
  *(code **)(param_1 + -0x38) =
       _text__ZL23__gxx_exception_cleanup19_Unwind_Reason_CodeP17_Unwind_Exception;
  return param_1 + -0xa0;
}



void __cxa_rethrow(void)

{
  longlong lVar1;
  longlong *plVar2;
  
  plVar2 = (longlong *)__cxa_get_globals();
  lVar1 = *plVar2;
  *(int *)(plVar2 + 1) = (int)plVar2[1] + 1;
  if (lVar1 != 0) {
    if (*(longlong *)(lVar1 + 0x50) + 0xb8b1aabcbcd4d500U < 2) {
      *(int *)(lVar1 + 0x28) = -*(int *)(lVar1 + 0x28);
    }
    else {
      *plVar2 = 0;
    }
    _Unwind_Resume_or_Rethrow((longlong *)(lVar1 + 0x50));
    __cxa_begin_catch((longlong *)(lVar1 + 0x50));
  }
                    // WARNING: Subroutine does not return
  std::terminate();
}



void __cxa_throw(longlong param_1,undefined8 param_2,undefined8 param_3)

{
  longlong lVar1;
  undefined4 *puVar2;
  
  lVar1 = __cxa_get_globals();
  *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1;
  puVar2 = (undefined4 *)__cxa_init_primary_exception(param_1,param_2,param_3);
  *puVar2 = 1;
  _Unwind_RaiseException((ULONG_PTR)(puVar2 + 0x18));
  __cxa_begin_catch((longlong *)(puVar2 + 0x18));
                    // WARNING: Subroutine does not return
  std::terminate();
}



longlong * __dynamic_cast(longlong *param_1,undefined8 param_2,type_info *param_3,longlong param_4)

{
  longlong *plVar1;
  longlong lVar2;
  type_info *this;
  uint uVar3;
  undefined8 uVar4;
  longlong *local_48;
  undefined8 local_40;
  undefined8 local_38;
  
  if (param_1 != (longlong *)0x0) {
    lVar2 = *(longlong *)(*param_1 + -0x10);
    plVar1 = (longlong *)((longlong)param_1 + lVar2);
    this = *(type_info **)(*param_1 + -8);
    local_48 = (longlong *)0x0;
    local_38 = 0x1000000000;
    local_40 = 0;
    if (*(type_info **)(*plVar1 + -8) == this) {
      if (((-1 < param_4) && (lVar2 + param_4 == 0)) &&
         (uVar4 = std::type_info::operator==(this,param_3), (char)uVar4 != '\0')) {
        return plVar1;
      }
      (**(code **)(*(longlong *)this + 0x38))
                (this,param_4,6,param_3,plVar1,param_2,param_1,&local_48);
      if (local_48 != (longlong *)0x0) {
        if ((~(uint)local_38 & 6) == 0) {
          return local_48;
        }
        if ((~((uint)local_40 & local_40._4_4_) & 6) == 0) {
          return local_48;
        }
        if (((local_40._4_4_ & 5) != 4) && ((uint)local_38 == 0)) {
          if (param_4 < 0) {
            if ((param_4 != -2) &&
               (uVar3 = (**(code **)(*(longlong *)param_3 + 0x40))
                                  (param_3,param_4,local_48,param_2,param_1), (~uVar3 & 6) == 0)) {
              return local_48;
            }
          }
          else if (param_1 == (longlong *)((longlong)local_48 + param_4)) {
            return local_48;
          }
        }
      }
    }
  }
  return (longlong *)0x0;
}



void __gxx_personality_seh0
               (PEXCEPTION_RECORD param_1,PVOID param_2,PCONTEXT param_3,ULONG_PTR *param_4)

{
  _GCC_specific_handler
            (param_1,param_2,param_3,param_4,
             _text__ZN10__cxxabiv1L21__gxx_personality_impEiiyP17_Unwind_ExceptionP15_Unwind_Context
            );
  return;
}



void _text___tcf_0(void)

{
  if (_CRT_MT == 0) {
    return;
  }
  __gthr_win32_mutex_destroy
            ((LPCRITICAL_SECTION)
             &_data__ZZN12_GLOBAL__N_122get_locale_cache_mutexEvE18locale_cache_mutex);
  return;
}



void _text___tcf_0(void)

{
  if (_CRT_MT == 0) {
    return;
  }
  __gthr_win32_mutex_destroy
            ((LPCRITICAL_SECTION)&_data__ZZN12_GLOBAL__N_116get_locale_mutexEvE12locale_mutex);
  return;
}



void _text___tcf_0(void)

{
  if (_CRT_MT == 0) {
    return;
  }
  __gthr_win32_mutex_destroy((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE);
  return;
}



void _text___tcf_0(void)

{
  return;
}



void _text___tcf_0(void)

{
  return;
}



void _text___tcf_1(void)

{
  return;
}



void _text_startup__GLOBAL__sub_I__ZNSt12ctype_bynameIcEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEy
               (void)

{
  if (std::__cxx11::money_get<>::id == '\0') {
    std::__cxx11::money_get<>::id = '\x01';
  }
  if (std::__cxx11::money_put<>::id == '\0') {
    std::__cxx11::money_put<>::id = '\x01';
  }
  if (std::__cxx11::moneypunct<char,false>::id == '\0') {
    std::__cxx11::moneypunct<char,false>::id = '\x01';
  }
  if (std::__cxx11::moneypunct<char,true>::id == '\0') {
    std::__cxx11::moneypunct<char,true>::id = '\x01';
  }
  if (std::__cxx11::numpunct<char>::id == '\0') {
    std::__cxx11::numpunct<char>::id = '\x01';
  }
  if (std::__cxx11::time_get<>::id == '\0') {
    std::__cxx11::time_get<>::id = '\x01';
  }
  if (std::__cxx11::messages<char>::id == '\0') {
    std::__cxx11::messages<char>::id = '\x01';
  }
  if (std::__cxx11::collate<char>::id == '\0') {
    std::__cxx11::collate<char>::id = '\x01';
  }
  return;
}



void _text_startup__GLOBAL__sub_I__ZNSt12ctype_bynameIwEC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEy
               (void)

{
  if (std::__cxx11::money_get<>::id == '\0') {
    std::__cxx11::money_get<>::id = '\x01';
  }
  if (std::__cxx11::money_put<>::id == '\0') {
    std::__cxx11::money_put<>::id = '\x01';
  }
  if (std::__cxx11::moneypunct<>::id == '\0') {
    std::__cxx11::moneypunct<>::id = '\x01';
  }
  if (std::__cxx11::moneypunct<>::id == '\0') {
    std::__cxx11::moneypunct<>::id = '\x01';
  }
  if (std::__cxx11::numpunct<wchar_t>::id == '\0') {
    std::__cxx11::numpunct<wchar_t>::id = '\x01';
  }
  if (std::__cxx11::time_get<>::id == '\0') {
    std::__cxx11::time_get<>::id = '\x01';
  }
  if (std::__cxx11::messages<wchar_t>::id == '\0') {
    std::__cxx11::messages<wchar_t>::id = '\x01';
  }
  if (std::__cxx11::collate<wchar_t>::id == '\0') {
    std::__cxx11::collate<wchar_t>::id = '\x01';
  }
  return;
}



// std::__throw_bad_exception()

void std::__throw_bad_exception(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_exception_1400dd520;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&bad_exception::typeinfo,bad_exception::~bad_exception);
}



// std::__throw_bad_alloc()

void std::__throw_bad_alloc(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_alloc_1400ded50;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&bad_alloc::typeinfo,bad_alloc::~bad_alloc);
}



// std::__throw_bad_array_new_length()

void std::__throw_bad_array_new_length(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_array_new_length_1400de0f0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&bad_array_new_length::typeinfo,
              bad_array_new_length::~bad_array_new_length);
}



// std::__throw_bad_cast()

void std::__throw_bad_cast(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_cast_1400deae0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&bad_cast::typeinfo,bad_cast::~bad_cast);
}



// std::__throw_bad_typeid()

void std::__throw_bad_typeid(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_typeid_1400dd0c0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&bad_typeid::typeinfo,bad_typeid::~bad_typeid);
}



// std::__throw_logic_error(char const*)

void std::__throw_logic_error(char *param_1)

{
  logic_error *this;
  
  this = (logic_error *)__cxa_allocate_exception(0x10);
  logic_error::logic_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&logic_error::typeinfo,logic_error::~logic_error);
}



// std::__throw_domain_error(char const*)

void std::__throw_domain_error(char *param_1)

{
  domain_error *this;
  
  this = (domain_error *)__cxa_allocate_exception(0x10);
  domain_error::domain_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&domain_error::typeinfo,domain_error::~domain_error);
}



// std::__throw_invalid_argument(char const*)

void std::__throw_invalid_argument(char *param_1)

{
  invalid_argument *this;
  
  this = (invalid_argument *)__cxa_allocate_exception(0x10);
  invalid_argument::invalid_argument(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&invalid_argument::typeinfo,invalid_argument::~invalid_argument);
}



// std::__throw_length_error(char const*)

void std::__throw_length_error(char *param_1)

{
  length_error *this;
  
  this = (length_error *)__cxa_allocate_exception(0x10);
  length_error::length_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&length_error::typeinfo,length_error::~length_error);
}



// std::__throw_out_of_range(char const*)

void std::__throw_out_of_range(char *param_1)

{
  out_of_range *this;
  
  this = (out_of_range *)__cxa_allocate_exception(0x10);
  out_of_range::out_of_range(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&out_of_range::typeinfo,out_of_range::~out_of_range);
}



// std::__throw_runtime_error(char const*)

void std::__throw_runtime_error(char *param_1)

{
  runtime_error *this;
  
  this = (runtime_error *)__cxa_allocate_exception(0x10);
  runtime_error::runtime_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&runtime_error::typeinfo,runtime_error::~runtime_error);
}



// std::__throw_range_error(char const*)

void std::__throw_range_error(char *param_1)

{
  range_error *this;
  
  this = (range_error *)__cxa_allocate_exception(0x10);
  range_error::range_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&range_error::typeinfo,range_error::~range_error);
}



// std::__throw_overflow_error(char const*)

void std::__throw_overflow_error(char *param_1)

{
  overflow_error *this;
  
  this = (overflow_error *)__cxa_allocate_exception(0x10);
  overflow_error::overflow_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&overflow_error::typeinfo,overflow_error::~overflow_error);
}



// std::__throw_underflow_error(char const*)

void std::__throw_underflow_error(char *param_1)

{
  underflow_error *this;
  
  this = (underflow_error *)__cxa_allocate_exception(0x10);
  underflow_error::underflow_error(this,param_1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&underflow_error::typeinfo,underflow_error::~underflow_error);
}



void _text_startup__GLOBAL__sub_I__ZNSt12ctype_bynameIcEC2ERKSsy(void)

{
  if (std::num_get<>::id == '\0') {
    std::num_get<>::id = '\x01';
  }
  if (std::num_put<>::id == '\0') {
    std::num_put<>::id = '\x01';
  }
  if (std::money_get<>::id == '\0') {
    std::money_get<>::id = '\x01';
  }
  if (std::money_put<>::id == '\0') {
    std::money_put<>::id = '\x01';
  }
  if (std::moneypunct<char,false>::id == '\0') {
    std::moneypunct<char,false>::id = '\x01';
  }
  if (std::moneypunct<char,true>::id == '\0') {
    std::moneypunct<char,true>::id = '\x01';
  }
  if (std::numpunct<char>::id == '\0') {
    std::numpunct<char>::id = '\x01';
  }
  if (std::__timepunct<char>::id == '\0') {
    std::__timepunct<char>::id = '\x01';
  }
  if (std::time_put<>::id == '\0') {
    std::time_put<>::id = '\x01';
  }
  if (std::time_get<>::id == '\0') {
    std::time_get<>::id = '\x01';
  }
  if (std::messages<char>::id == '\0') {
    std::messages<char>::id = '\x01';
  }
  if (std::collate<char>::id == '\0') {
    std::collate<char>::id = '\x01';
  }
  return;
}



void _text_startup__GLOBAL__sub_I__ZNSt12ctype_bynameIwEC2ERKSsy(void)

{
  if (std::num_get<>::id == '\0') {
    std::num_get<>::id = '\x01';
  }
  if (std::num_put<>::id == '\0') {
    std::num_put<>::id = '\x01';
  }
  if (std::money_get<>::id == '\0') {
    std::money_get<>::id = '\x01';
  }
  if (std::money_put<>::id == '\0') {
    std::money_put<>::id = '\x01';
  }
  if (std::moneypunct<>::id == '\0') {
    std::moneypunct<>::id = '\x01';
  }
  if (std::moneypunct<>::id == '\0') {
    std::moneypunct<>::id = '\x01';
  }
  if (std::numpunct<wchar_t>::id == '\0') {
    std::numpunct<wchar_t>::id = '\x01';
  }
  if (std::__timepunct<wchar_t>::id == '\0') {
    std::__timepunct<wchar_t>::id = '\x01';
  }
  if (std::time_put<>::id == '\0') {
    std::time_put<>::id = '\x01';
  }
  if (std::time_get<>::id == '\0') {
    std::time_get<>::id = '\x01';
  }
  if (std::messages<wchar_t>::id == '\0') {
    std::messages<wchar_t>::id = '\x01';
  }
  if (std::collate<wchar_t>::id == '\0') {
    std::collate<wchar_t>::id = '\x01';
  }
  return;
}



void _text_unlikely(undefined8 param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4)

{
  code *pcVar1;
  longlong unaff_RBX;
  
  *(undefined8 *)(unaff_RBX + 0x18) = param_2;
  FUN_14000a100(&stack0x00000034,&DAT_1400c654c,param_3,param_4);
                    // WARNING: Does not return
  pcVar1 = (code *)invalidInstructionException();
  (*pcVar1)();
}



// __gnu_cxx::__freeres()

void __gnu_cxx::__freeres(void)

{
  if (DAT_1400c09f0 != (void *)0x0) {
    free(DAT_1400c09f0);
    DAT_1400c09f0 = (void *)0x0;
  }
  return;
}



// WARNING: Globals starting with '_' overlap smaller symbols at the same address

void _text_startup__GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv(void)

{
  size_t sVar1;
  int iVar2;
  int iVar3;
  ulong uVar4;
  char *pcVar5;
  size_t *psVar6;
  longlong *plVar7;
  longlong *plVar8;
  longlong *local_70;
  size_t local_68;
  char *local_60;
  int local_58;
  undefined8 local_50;
  char *local_48;
  int local_40;
  size_t local_38;
  
  if (_CRT_MT != 0) {
    __gthr_win32_mutex_init_function((LPCRITICAL_SECTION)&_data__ZN12_GLOBAL__N_114emergency_poolE);
  }
  DAT_1400c09f8 = 0;
  _DAT_1400c09e8 = (undefined1  [16])0x0;
  pcVar5 = getenv("GLIBCXX_TUNABLES");
  local_58 = 0;
  local_68 = 8;
  local_60 = "obj_size";
  local_50 = 9;
  local_48 = "obj_count";
  local_40 = 0x100;
  if (pcVar5 == (char *)0x0) {
    DAT_1400c09f8 = 0x16000;
  }
  else {
    do {
      plVar8 = (longlong *)(pcVar5 + (*pcVar5 == ':'));
      plVar7 = plVar8;
      if (((*plVar8 == 0x2e78786362696c67) &&
          (*(longlong *)((longlong)plVar8 + 7) == 0x6c6f6f705f68652e)) &&
         (*(char *)((longlong)plVar8 + 0xf) == '.')) {
        plVar7 = plVar8 + 2;
        psVar6 = &local_68;
        do {
          sVar1 = *psVar6;
          if (((sVar1 == 0) || (iVar2 = memcmp((void *)psVar6[1],plVar7,sVar1), iVar2 == 0)) &&
             (*(char *)((longlong)plVar7 + sVar1) == '=')) {
            uVar4 = strtoul((char *)((longlong)plVar8 + sVar1 + 0x11),(char **)&local_70,0);
            plVar7 = local_70;
            if ((((char)*local_70 == ':') || ((char)*local_70 == '\0')) && (-1 < (int)uVar4)) {
              *(ulong *)(psVar6 + 2) = uVar4;
            }
            break;
          }
          psVar6 = psVar6 + 3;
        } while (psVar6 != &local_38);
      }
      pcVar5 = strchr((char *)plVar7,0x3a);
    } while (pcVar5 != (char *)0x0);
    iVar2 = 0x1000;
    if (local_40 < 0x1001) {
      iVar2 = local_40;
    }
    iVar3 = local_58;
    if (local_58 == 0) {
      iVar3 = 6;
    }
    DAT_1400c09f8 = ((longlong)iVar3 + 0x26) * (longlong)iVar2 * 8;
    if (DAT_1400c09f8 == 0) goto LAB_1400bee47;
  }
  sVar1 = DAT_1400c09f8;
  psVar6 = malloc(DAT_1400c09f8);
  DAT_1400c09f0 = psVar6;
  if (psVar6 == (size_t *)0x0) {
    DAT_1400c09f8 = 0;
  }
  else {
    DAT_1400c09e8 = psVar6;
    *psVar6 = sVar1;
    psVar6[1] = 0;
  }
LAB_1400bee47:
  atexit(_text___tcf_0);
  return;
}



void __cxa_bad_cast(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_cast_1400deae0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&std::bad_cast::typeinfo,std::bad_cast::~bad_cast);
}



void __cxa_bad_typeid(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_typeid_1400dd0c0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&std::bad_typeid::typeinfo,std::bad_typeid::~bad_typeid);
}



void __cxa_throw_bad_array_new_length(void)

{
  ulonglong *puVar1;
  
  puVar1 = __cxa_allocate_exception(8);
  *puVar1 = (ulonglong)&PTR__bad_array_new_length_1400de0f0;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)puVar1,&std::bad_array_new_length::typeinfo,
              std::bad_array_new_length::~bad_array_new_length);
}



// std::__throw_ios_failure(char const*)

void std::__throw_ios_failure(string *param_1)

{
  system_error *this;
  char *pcVar1;
  undefined8 local_28;
  undefined **local_20;
  
  this = (system_error *)__cxa_allocate_exception(0x30);
  local_20 = iostream_category();
  local_28 = 1;
  system_error::system_error(this,&local_28,param_1);
  *(undefined ***)this = &PTR____ios_failure_1400dd4f0;
  pcVar1 = (char *)logic_error::what((logic_error *)this);
  __construct_ios_failure((failure *)(this + 0x20),pcVar1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&__ios_failure::typeinfo,__ios_failure::~__ios_failure);
}



// std::__throw_ios_failure(char const*, int)

void std::__throw_ios_failure(string *param_1,uint param_2)

{
  system_error *this;
  char *pcVar1;
  ulonglong uVar2;
  ulonglong local_28;
  undefined **local_20;
  
  uVar2 = (ulonglong)param_2;
  this = (system_error *)__cxa_allocate_exception(0x30);
  if (param_2 == 0) {
    local_20 = iostream_category();
    uVar2 = 1;
  }
  else {
    local_20 = _V2::generic_category();
  }
  local_28 = uVar2;
  system_error::system_error(this,&local_28,param_1);
  *(undefined ***)this = &PTR____ios_failure_1400dd4f0;
  pcVar1 = (char *)logic_error::what((logic_error *)this);
  __construct_ios_failure((failure *)(this + 0x20),pcVar1);
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&__ios_failure::typeinfo,__ios_failure::~__ios_failure);
}



void _text_startup__GLOBAL__sub_I__ZSt17iostream_categoryv(void)

{
  atexit(_text___tcf_0);
  return;
}



// std::__throw_system_error(int)

void std::__throw_system_error(undefined4 param_1)

{
  runtime_error *this;
  undefined1 *local_48 [2];
  undefined1 local_38 [24];
  
  this = (runtime_error *)__cxa_allocate_exception(0x20);
  (**(code **)(_data__ZN12_GLOBAL__N_125generic_category_instanceE + 0x20))
            (local_48,&_data__ZN12_GLOBAL__N_125generic_category_instanceE,param_1);
  runtime_error::runtime_error(this,local_48);
  if (local_48[0] != local_38) {
    operator_delete(local_48[0]);
  }
  *(undefined4 *)(this + 0x10) = param_1;
  *(undefined ***)this = &PTR__system_error_1400dd4c0;
  *(undefined ***)(this + 0x18) = &_data__ZN12_GLOBAL__N_125generic_category_instanceE;
                    // WARNING: Subroutine does not return
  __cxa_throw((longlong)this,&system_error::typeinfo,system_error::~system_error);
}



void _text_startup__GLOBAL__sub_I__ZSt20__throw_system_errori(void)

{
  atexit(_text___tcf_0);
  atexit(_text___tcf_1);
  return;
}



int main(int argc,_TCHAR **argv,_TCHAR **envp)

{
  char *pcVar1;
  char cVar2;
  int iVar3;
  char **ppcVar4;
  longlong lVar5;
  char *lpCmdLine;
  bool bVar6;
  LPSTARTUPINFOA p_Var7;
  uint nShowCmd;
  STARTUPINFO StartupInfo;
  
                    // Unresolved local var: HINSTANCE hInstance@[???]
                    // Unresolved local var: _TCHAR * lpCmdLine@[???]
                    // Unresolved local var: DWORD nShowCmd@[???]
                    // Unresolved local var: BOOL inDoubleQuote@[???]
  bVar6 = false;
  __main();
  ppcVar4 = __p__acmdln();
  lpCmdLine = *ppcVar4;
  if (lpCmdLine != (char *)0x0) {
    do {
      cVar2 = *lpCmdLine;
      if (cVar2 < '!') {
        if (cVar2 == '\0') goto LAB_1400bf250;
        if (!bVar6) goto LAB_1400bf238;
        bVar6 = true;
      }
      else if (cVar2 == '\"') {
        bVar6 = (bool)(bVar6 ^ 1);
      }
      iVar3 = _ismbblead((int)cVar2);
      if (iVar3 != 0) {
        lpCmdLine = lpCmdLine + (lpCmdLine[1] != '\0');
      }
      lpCmdLine = lpCmdLine + 1;
    } while( true );
  }
  lpCmdLine = "";
  goto LAB_1400bf250;
LAB_1400bf238:
  if (cVar2 != '\0') {
    do {
      pcVar1 = lpCmdLine + 1;
      lpCmdLine = lpCmdLine + 1;
      if (*pcVar1 == '\0') break;
    } while (*pcVar1 < '!');
  }
LAB_1400bf250:
  p_Var7 = (LPSTARTUPINFOA)&StartupInfo;
  for (lVar5 = 0xd; lVar5 != 0; lVar5 = lVar5 + -1) {
    *(undefined8 *)p_Var7 = 0;
    p_Var7 = (LPSTARTUPINFOA)&p_Var7->lpReserved;
  }
  GetStartupInfoA((LPSTARTUPINFOA)&StartupInfo);
  nShowCmd = 10;
  if (((byte)StartupInfo.dwFlags & 1) != 0) {
    nShowCmd = (uint)StartupInfo.wShowWindow;
  }
  iVar3 = WinMain((HINSTANCE)&IMAGE_DOS_HEADER_140000000,(HINSTANCE)0x0,lpCmdLine,nShowCmd);
  return iVar3;
}



void register_frame_ctor(void)

{
  atexit(__gcc_deregister_frame);
  return;
}


